Skip to content

Apply Net Metering Credits to Future Bills#468

Merged
brtietz merged 2 commits into
developfrom
sam_16_rollover_credits_to_future_months
Oct 25, 2020
Merged

Apply Net Metering Credits to Future Bills#468
brtietz merged 2 commits into
developfrom
sam_16_rollover_credits_to_future_months

Conversation

@brtietz

@brtietz brtietz commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

Previously (based on PR #382) the "Apply credits to future bills" option just delayed the check by a month. This PR implements @cpaulgilman 's request from that PR, and applies them as bill credits, reducing the bill amount subject to annual minimums.

The implementation leans on some of the Net metering with $ credits code in order to apply the true-up period credits.
Comparisons between a rate that cuts a check vs a rate that applies the credits to future bills can be made in the attached SAM file: rollover_tests.zip

This will close NatLabRockies/SAM#16, though the third part of that issue has been moved to its own issue: NatLabRockies/SAM#410

…n rollover code is checked, $ will rollover subject to monthly minimums
@brtietz brtietz added this to the SAM 2021 Release milestone Oct 23, 2020

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

@brtietz Thanks for untangling this mess of requests! This handling of net metering end of period rollovers seems to work as I would expect from month to month and across years.

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

Looks good and thanks for digging through this!

Comment thread ssc/cmod_utilityrate5.cpp
if (rollover_credit && m == net_metering_credit_month)
{
ssc_number_t year_end_dollars = monthly_cumulative_excess_energy[m] * as_number("ur_nm_yearend_sell_rate") * rate_esc;
payment[c - 1] -= year_end_dollars;

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.

Are the hourly values matching with the bill when summed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - for the file I attached the annual bill in the summary is $251 (rounded to the nearest dollar), and the sum of the hourly values is $251.19.

Comment thread ssc/cmod_utilityrate5.cpp
payment[c - 1] -= year_end_dollars;
monthly_ec_charges[m] -= year_end_dollars;
excess_dollars_earned[m] += year_end_dollars;
dollars_applied += year_end_dollars;

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.

Are the monthly, hourly, and bill values matching?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.


float june_dollars = excess_dollars[credit_month + 1];
EXPECT_NEAR(50.28, june_dollars, 0.1);
EXPECT_NEAR(11.37, june_dollars, 0.1);

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.

Does the change show the difference between the true up and the rollover when happening mid-year?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous value here was for the "cut a check a month late" code, so the old value was the full bill for June. The new code applies the credit to the bill, so the June value is reduced. To compare with the "cut a check in the true up month" rate, see Test_Residential_net_metering_credits_in_may

@brtietz brtietz merged commit 7f70c01 into develop Oct 25, 2020
@dguittet dguittet deleted the sam_16_rollover_credits_to_future_months branch December 23, 2020 22:48
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.

Electricity bill calculation improvements

3 participants