Skip to content

Throw error whenever cumulative energy exceeds maximum tier usage for a given period.#1304

Merged
sjanzou merged 1 commit into
developfrom
SAM_1834
Mar 28, 2025
Merged

Throw error whenever cumulative energy exceeds maximum tier usage for a given period.#1304
sjanzou merged 1 commit into
developfrom
SAM_1834

Conversation

@sjanzou

@sjanzou sjanzou commented Mar 27, 2025

Copy link
Copy Markdown
Collaborator

Addressed SAM issue NatLabRockies/SAM#1834

Throws error message rather than producing erroneous results.

To test follow the steps:
Load a behind the meter model
Set the compensation for distributed generation to net billing
Set a maximum tier to 100 kWh (or something lower than the month's usage
Run simulation
The bill savings are negative

The following file can be used to test a valid case and a case with an invalid maximum usage for the maximum tier.

SAM_1834.zip

@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 14103495681

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 20 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.001%) to 54.688%

Files with Coverage Reduction New Missed Lines %
ssc/ssc/cmod_utilityrate5.cpp 20 90.74%
Totals Coverage Status
Change from base Build 14037556513: -0.001%
Covered Lines: 64176
Relevant Lines: 117349

💛 - Coveralls

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

This works well! I additionally tested a two tiered rate to make sure it still worked, and I got the expected errors.

@sjanzou sjanzou merged commit e979c53 into develop Mar 28, 2025
@sjanzou sjanzou deleted the SAM_1834 branch March 28, 2025 06:37
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.

Tiers without a maximum kWh greater than the kWh consumed give negative bill savings with net billing

3 participants