Gen may be longer than any merchant plant price array.#1389
Gen may be longer than any merchant plant price array.#1389brtietz merged 5 commits intossc_1378_custom_generation_lifetimefrom
Conversation
* fix #1361 * apply pos/neg limits to calculate_max_charge_kw and calculate_max_discharge_kw * revert minor test change --------- Co-authored-by: Brian Mirletz <brian.mirletz@nlr.gov>
* Improve albedo messages for Detailed PV * Improve albedo message for PVWatts
…is when setting up nsteps
|
Can't upgrade Gtest yet but the failing test is CmodMerchantPlantTest.CustomGenerationBattery_LCOS |
It looks like that test is failing because it had one minute input data, therefore we'd expect the results to change with this PR. Does that make sense to you? However, when trying to recreate the test data, I get:
525600 is the expected number for one minute data, so that shouldn't throw. I expect the error handling over on #1384 is better for this, so I might redirect this PR and merge that branch into this one. |
…com/NREL/ssc into sam_2161_subhourly_compatability
https://github.com/NatLabRockies/ssc/blob/develop/ssc/common.cpp#L976C9-L977C87 Seems like it's an issue with forcast_price_signal::setup() in common.cpp. If line 976 is triggered and resets step_per_hour, I don't see how 977 can not be triggered unless nyears is 1. |
…g subhourly data from running. Update tests to reflect full timeseries
Agreed. I think when I wrote that code ~4 years ago I copied 976 over unnecessarily, so I removed it just now. I think it's safe to assume the upstream battery code as a good handle on steps per hour and it shouldn't change here. I wasn't awake enough to notice that this was a battery bug and not a merchant plant bug (even though it's basically the same routine interpreting these arrays). So I changed the PR target even though it wasn't strictly necessary since that seems hard to undo for not a lot of benefit. |
Coverage Report for CI Build 24407492393Coverage increased (+0.003%) to 56.278%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions313 previously-covered lines in 6 files lost coverage.
Coverage Stats
💛 - Coveralls |
cpaulgilman
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the fix!
Pull Request Template
Description
Check the length of gen when setting up nsteps for price arrays. A subhourly gen may be the longest array.
Fixes NatLabRockies/SAM#2161
Corresponding branches and PRs:
Develop on other branches
Unit Test Impact:
No changes expected
Checklist
Reminders- this section can be deleted
[Checking for PySAM Incompatible API Changes]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files).
[When do the PySAM files need to be regenerated?]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files#when-do-the-pysam-files-need-to-be-regenerated-via-export_config)