Skip to content

Ensure key variables in the powerflow code have a minimum of zero#979

Merged
brtietz merged 1 commit into
patchfrom
fix_sam_1324_grid_outage_loop_fix
Jan 27, 2023
Merged

Ensure key variables in the powerflow code have a minimum of zero#979
brtietz merged 1 commit into
patchfrom
fix_sam_1324_grid_outage_loop_fix

Conversation

@brtietz

@brtietz brtietz commented Jan 26, 2023

Copy link
Copy Markdown
Collaborator

Fixes NatLabRockies/SAM#1324

The specific combination of factors in the test file was driving batt_to_load_ac negative, which lead to a positive batt_to_grid_ac, which caused an infinite loop between the powerflow code and the dispatch code. Fix this by preventing these variables from going negative.

…ich prevents swapping from not dispatching to charging

@cpaulgilman cpaulgilman 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. Test case simulation finishes with outage loss reported in results.

@brtietz brtietz merged commit b2624c6 into patch Jan 27, 2023
@brtietz brtietz deleted the fix_sam_1324_grid_outage_loop_fix branch December 13, 2023 16:23
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.

Grid outage causes simulation to hang at around 30%

2 participants