Skip to content

Fix ResidentialPVBatteryWithCustomDispatch example for PySAM 8 - #230

Merged
brtietz merged 1 commit into
NatLabRockies:patchfrom
Blizzeq:fix/residential-battery-example-pysam8
Sep 27, 2026
Merged

brtietz merged 1 commit into
NatLabRockies:patchfrom
Blizzeq:fix/residential-battery-example-pysam8

Conversation

@Blizzeq

@Blizzeq Blizzeq commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #224.

PySAM 8 added use_snow_weather_file to Pvsamv1, and none of the Pvsamv1 defaults in nlr-pysam 8.0.0 set it, so the example failed in execute() with "required but not assigned". The example now sets Losses.use_snow_weather_file = 0. The snow loss model is off in this config (en_snow_model = 0), so the value does not affect the results.

Tested with nlr-pysam 8.0.0: the script runs and the roundtrip efficiency matches the 7.1 run (91.24%).

@brtietz brtietz 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.

New example code works well, thank you!

I expect the test failures are unrelated, so I'll merge this and debug those elsewhere.

@brtietz
brtietz merged commit c2aa256 into NatLabRockies:patch Sep 27, 2026
1 of 4 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.

ResidentialPVBatteryWithCustomDispatch.py needs to be updated to PySAM 8

2 participants