Skip to content

Apply ratchets to per kw charges#637

Merged
brtietz merged 14 commits into
developfrom
apply_ratchets_to_per_kw_charges
Nov 9, 2021
Merged

Apply ratchets to per kw charges#637
brtietz merged 14 commits into
developfrom
apply_ratchets_to_per_kw_charges

Conversation

@brtietz

@brtietz brtietz commented Nov 3, 2021

Copy link
Copy Markdown
Collaborator

Pairs with SAM PR NatLabRockies/SAM#728

  • Renames billing demand variables to remove the reference to energy charges
  • Adds variable "ur_dc_billing_demand_periods" to cover whether or or not a given demand charge TOU period should be included with billing demand
  • Applies billing demand calculations to demand charges as well

Fixes NatLabRockies/SAM#71

Brian Mirletz added 12 commits October 22, 2021 15:21
…ails because it doesn't apply ratchets to tou rates. Fix bug so that monthly data gets propigated all year, instead of just repeating yr 1 billing demand values
…g demand calc to use new inputs and look at only relevant tou periods. test failure is stil expected
…harges. Some edge cases still to test at this point
…nds as specified in the tou billing demand table
Brian Mirletz added 2 commits November 3, 2021 16:24
…this as needed in price signal dispatch's utility rate calculator

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

Some comments, but looks good!

double billing_demand = ec_bd_minimum;
int prev_yr_lookback = 11 - (ec_bd_lookback_months - month); // What month do we stop looking back in the prev yr?
double billing_demand = bd_minimum;
int prev_yr_lookback = 11 - (bd_lookback_months - month); // What month do we stop looking back in the prev yr?

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.

How does this work across year boundaries - especially for year 1?

double flat_peak = m_month[m].dc_flat_peak;
if (en_billing_demand_lookback) {
// If ratchets are present the peak used here might be the actual peak, or something based on a previous month.
flat_peak = get_billing_demand(m);

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.

Is there a reference for this? i.e. are all flat demand charges to be based on the billing demand lookback? Seems like that overwrites the flat demand charge...

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.

Okay, you are not overwriting the ds_flat_peak - please disregard above comment.

Comment thread ssc/common.cpp
{ SSC_INPUT, SSC_NUMBER, "ur_billing_demand_lookback_period", "Billing demand lookback period", "mn", "", "Electricity Rates", "ur_enable_billing_demand=1", "INTEGER,MIN=0,MAX=12", "" },
{ SSC_INPUT, SSC_MATRIX, "ur_billing_demand_lookback_percentages", "Billing demand lookback percentages by month and consider actual peak demand", "", "12x2", "Electricity Rates", "ur_enable_billing_demand=1", "", "" },
{ SSC_INPUT, SSC_MATRIX, "ur_dc_billing_demand_periods", "Billing demand applicability to a given demand charge time of use period", "", "", "Electricity Rates", "ur_enable_billing_demand=1", "", "" },
{ SSC_INPUT, SSC_ARRAY, "ur_yearzero_usage_peaks", "Peak usage by month for year zero", "", "12", "Electricity Rates", "ur_enable_billing_demand=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.

So, this takes care of the lookback across year 1 boundary. Should this be a user input or constucted from year 1 values? Maybe a questions for @cpaulgilman

ssc_data_set_number(data, "ur_ec_billing_demand_lookback_period", 11);
ssc_data_set_number(data, "ur_enable_billing_demand", 1);
ssc_data_set_number(data, "ur_billing_demand_minimum", 100);
ssc_data_set_number(data, "ur_billing_demand_lookback_period", 11);

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.

Do you have a min, max for lookback months? (Should be taken care of in the compute module precheck.

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, 0 and 12:

image

@brtietz brtietz merged commit 8e9dcb0 into develop Nov 9, 2021
@brtietz brtietz deleted the apply_ratchets_to_per_kw_charges branch December 7, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requests for ratcheting demand rates

3 participants