Skip to content

Fix: Fire suppression keycheck and custom output name#27

Merged
dustin-cook merged 3 commits into
OpenPBEE:mainfrom
hgp297:extended_testing
Apr 28, 2026
Merged

Fix: Fire suppression keycheck and custom output name#27
dustin-cook merged 3 commits into
OpenPBEE:mainfrom
hgp297:extended_testing

Conversation

@hgp297

@hgp297 hgp297 commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR fixes an error that exists when examples are ran with fire_watch=False. This raises a call in other_functionality_functions.py where an undefined key in the recovery_day dictionary was referenced.

Additionally, this PR allows for an optional filename to be passed to run_analysis. This allows users to output results in alternate names other than recovery_outputs.json, as is often the case when batch running multiple iterations of the same input.

Changes:

  • Fixed key reference for fire_suppression in recovery_day of other_functionality_functions.py. The previous key recovery_day['building']['fire'] did not exist.
  • driver and cli now support an optional argument output_file, defaulting to recovery_outputs.json

hgp297 added 3 commits April 17, 2026 17:31
- matched key (recovery_day['building'] -> ['fire_suppression']). this
  matches matlab code.
- amax to fmax to fix array size reduction and element-wise matching.
  this fix is previously precedented in commit 1522d04
- Added --output_file optional argument to cli parser with default 'recovery_outputs.json'
- Condensed default behavior in driver.py from None -> if None -> string to 'recovery_outputs.json'
@wangz539

Copy link
Copy Markdown
Collaborator

I agree with these changes. I just tested the changes on model 2009_S5a_2_IM4, which previously raised an error. Run was successful after the fix.

@dustin-cook dustin-cook 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.

This looks good to me and good catch

@dustin-cook
dustin-cook merged commit a45720d into OpenPBEE:main Apr 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants