Skip to content

Fix REopt API calls#1904

Merged
cpaulgilman merged 9 commits intodevelopfrom
sam-1830-reopt-error-handling
Nov 13, 2024
Merged

Fix REopt API calls#1904
cpaulgilman merged 9 commits intodevelopfrom
sam-1830-reopt-error-handling

Conversation

@cpaulgilman
Copy link
Collaborator

@cpaulgilman cpaulgilman commented Nov 11, 2024

Pull Request Template

Goes with:

Requires SAM-private build to test (or modifying private.h to add NREL Developer API key in open source build).

Description

Use "stable" version of REopt API instead of "v3" in webapis.conf file to avoid issue with API returning empty string instead of run_uuid. Note we would prefer to use "v3" to ensure that SAM works when "stable" is updated, but until "stable" and "v3" generate the same results, this is not possible.

Temporarily set maximum tier values to 1e14 in UI before REopt API call because HiGHS solver doesn't work with numbers in vectors greater than 1e15. See https://ergo-code.github.io/HiGHS/dev/options/definitions/#large_matrix_value

Fix for both PV-Battery and PVWatts-Battery (simple).

Test on Mac and confirm same results on Mac and Windows.

Fixes #1830

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Copy link
Collaborator

@brtietz brtietz left a comment

Choose a reason for hiding this comment

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

Works well!

Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Working on RedHat Linux

"\tur_ec_tou_mat_original = value('ur_ec_tou_mat');\r",
"\t\r",
"\t// set energy and demand tier max value to 1e14 to avoid issue with HiGHS optimization\r",
"\ttier_max = 1e14;\r",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for catching and updating

@cpaulgilman cpaulgilman merged commit d071b71 into develop Nov 13, 2024
@cpaulgilman cpaulgilman deleted the sam-1830-reopt-error-handling branch November 13, 2024 20:59
@cpaulgilman cpaulgilman added added to release notes PR and/or issue has been added to release notes for a public release bug labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REopt API call fails with callback error

3 participants