Skip to content

Update REopt API#1187

Merged
cpaulgilman merged 5 commits into
patchfrom
update-reopt-api
Jul 24, 2024
Merged

Update REopt API#1187
cpaulgilman merged 5 commits into
patchfrom
update-reopt-api

Conversation

@cpaulgilman

Copy link
Copy Markdown
Collaborator

Fixes NatLabRockies/SAM#1742

  • Set REopt input net_metering_limit_kw to system capacity when net metering is enabled.
  • Change REopt solver from HiGHS to SCIP to allow large numbers for tier limits (1e38).
  • Specify only max_kw instead of both existing_kw and max_kw.

To test:

  1. Build a) SAM-private or b) SAM open source with NREL developer key and email in private.h.

  2. Create a default PV Battery / Residential and PV Battery / Commercial case and click Get size and dispatch on Battery Cell and System page. REopt should return non-zero battery size and dispatch array.

Note that REopt API call and optimization takes a while -- I'm not sure if the SCIP solver is slower than HiGHS. This is something we may want to investigate for the Fall 2024 release.

@cpaulgilman cpaulgilman added this to the 2023 Release Patch 2 milestone Jul 23, 2024
@cpaulgilman cpaulgilman requested review from brtietz and sjanzou July 23, 2024 22:48
@cpaulgilman cpaulgilman self-assigned this Jul 23, 2024

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good... the Windows runners seem to have intermittent issues with the test results. I restarted the failed job.

Comment thread ssc/cmod_battery_eqns.cpp

reopt_settings.assign_match_case("time_steps_per_hour", var_data((int)(sim_len / 8760)));
reopt_settings.assign("solver_name", var_data("SCIP")); // "HiGHS" option does not work with large numbers like 1e38 for tier max values per https://github.com/NREL/SAM/issues/1742

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting to note for OR tools inclusion in ssc for the Fall release!

@cpaulgilman cpaulgilman merged commit 724d05a into patch Jul 24, 2024
@cpaulgilman cpaulgilman deleted the update-reopt-api branch July 24, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REopt API call for default PV Battery / Commercial returns battery size of zero

2 participants