Throw an error if all billing demand periods are zero#1293
Conversation
|
It looks like the test failure is caused by https://github.com/NREL/ssc/blame/31d4a54a01f2531fbb412aee93e5ac39a973a3ce/test/ssc_test/cmod_utilityrate5_test.cpp#L1717, which was put in place to test the solution to NatLabRockies/SAM#857 That test file has a rate that should be valid, but throws an error on the branch with this code. Should the lookback periods look at energy charge periods for a case like this? Or do we want to force the user to set up demand charge periods and then set the demand charges to zero? |
sjanzou
left a comment
There was a problem hiding this comment.
Error message looks good and is repeated twice for emphasis ;-)

As far as should the lookback periods look at energy charge periods for a case like this? Or do we want to force the user to set up demand charge periods and then set the demand charges to zero?
Maybe put the onus on the user - if they are using lookback periods, then they should be able to add detailed inputs - @cpaulgilman ?
I agree with Steve. If billing demand lookback is enabled, then the user should set up the lookback periods correctly (with at least one "Included in Billing Demand (0/1)" set to 1 as per the Help note mentioned in NatLabRockies/SAM#1985). |
…rror_message_for_bd_lookback
|
Thanks, I've adjusted the test data to reflect that change. Do you recommend any adjustments to the error message (or help) to reflect the change as well? A small number of users will have files that were valid in 2024.12.12 that will not run with this change, and I'm not sure versions.lk is the right way to solve that (too many edge cases, and too much risk of overwriting valid data). "Wait for the forum question" might also be an acceptable answer given how small the number of users might be. |
Pull Request Test Coverage Report for Build 13845597437Details
💛 - Coveralls |
@brtietz , I think the error message is fine now and I think the "Wait for the forum question" is appropriate for the small number of users affected. However, I defer to @cpaulgilman for the final verdict. |
Fixes NatLabRockies/SAM#1985
To test: