Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical load data length compared to load #1390

Merged
merged 3 commits into from Apr 21, 2023

Conversation

cpaulgilman
Copy link
Collaborator

@cpaulgilman cpaulgilman commented Apr 19, 2023

Pull Request Template

Description

Move msgbox() for load data length error messages from MIMO function in Electric Load UI form's equations to functions in UI callback so that check on load and critical load data length is triggered by on_load and on_change events on Electric Load and Grid Outage UI forms.

This change allows load and crit_load to be passed to SSC with wrong time step, so requires that we add a check in SSC to generate a simulation error when the time steps do not match. (Before this fix, the equation error prevented the user from being able to start a simulation.)

File for testing with 15-minute weather file: crit-load-timestep-test.zip

Fixes #1371

Type of change

  • 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

* New `load_error_messages()` UI callback function to display error when critical load and electric load time steps do not match and to check critical load multiple of 8760

* Move `msgbox()` from Electric Load Equations to UI callback function because equations evaluated when case loads, so message does not appear when variables change on Grid Outage and Electric Load page
@cpaulgilman cpaulgilman merged commit ce5d38c into patch Apr 21, 2023
4 checks passed
@cpaulgilman cpaulgilman deleted the critical-load-ui-callback branch April 21, 2023 22:43
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label May 30, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mismatched array length between critical load and load equation error
2 participants