Allow for zero time series buy and sell rates#1264
Merged
Conversation
Collaborator
Author
sjanzou
approved these changes
Dec 11, 2024
sjanzou
left a comment
Collaborator
There was a problem hiding this comment.
SAM issue 1964 resolved using this update!
|
|
||
| // Fall back to TOU rates if m_ec_ts_sell_rate.size() is too small | ||
| if (tier_credit == 0) { // So AFAICT this is to make sure we don't compute both time step and TOU. Maybe better as an else? | ||
| if (use_ec_table_sell_rates) { // So AFAICT this is to make sure we don't compute both time step and TOU. Maybe better as an else? |
Collaborator
There was a problem hiding this comment.
Seems okay - not sure is else is more clear or confusing...
| EXPECT_TRUE(status); | ||
| } | ||
|
|
||
| TEST(cmod_utilityrate5_eqns, Test_Residential_TOU_Rates_buyall_sellall_ts_buy_rate) { |
Collaborator
There was a problem hiding this comment.
Thanks for adding the test!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use a boolean instead of tier_charge == 0 to determine whether time series rates or table rates should be used.
Fixes NatLabRockies/SAM#1964