Skip to content

Commit

Permalink
derUtilityCost: Converted annual recurring subsidy to monthly subsidy…
Browse files Browse the repository at this point in the history
… input.
  • Loading branch information
astronobri committed Jan 13, 2025
1 parent 450b060 commit 0f36c89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions omf/models/derUtilityCost.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@
<input type="text" id="rateCompensation" name="rateCompensation" value="{{allInputDataDict.rateCompensation}}" pattern="^\d+\.?\d*?$" min="0" required="required"/>
</div>
<div class="shortInput">
<label class="tooltip">Upfront Subsidy Amount ($)<span class="classic">The total upfront one-time subsidy amount ($) paid to the member-consumer.</span></label>
<label class="tooltip">Upfront Subsidy Amount ($)<span class="classic">The total upfront one-time subsidy amount ($) paid to the member-consumer (not including any recurring subsidies).</span></label>
<input type="text" id="subsidyUpfront" name="subsidyUpfront" value="{{allInputDataDict.subsidyUpfront}}" pattern="^\d+\.?\d*?$" required="required"/>
</div>
<div class="shortInput">
<label class="tooltip">Annual Recurring Subsidy Amount ($)<span class="classic">The total annual recurring subsidy amount ($) paid to the member-consumer.</span></label>
<label class="tooltip">Monthly Recurring Subsidy Amount ($)<span class="classic">The total monthly recurring subsidy amount ($) paid to the member-consumer (not including any upfront subsidies).</span></label>
<input type="text" id="subsidyRecurring" name="subsidyRecurring" value="{{allInputDataDict.subsidyRecurring}}" pattern="^\d+\.?\d*?$" required="required"/>
</div>

Expand Down Expand Up @@ -323,7 +323,7 @@
insertMetric("monthlySummaryTable","Adjusted Demand Charge ($)", allOutputData.demandChargeAdjusted_total)
insertMetric("monthlySummaryTable","Total Cost of Service ($)", allOutputData.totalCost_service)
insertMetric("monthlySummaryTable","Adjusted Total Cost of Service ($)", allOutputData.totalCostAdjusted_service)
insertMetric("monthlySummaryTable","Consumer Compensation ($)", allOutputData.totalCost_paidToConsumer)
insertMetric("monthlySummaryTable","Total Consumer Compensation ($)", allOutputData.totalCost_paidToConsumer)
insertMetric("monthlySummaryTable","Net Utility Savings ($)", allOutputData.savings_total)
//insertMetric("monthlySummaryTable","1 kW Consumer Savings ($)", allOutputData.totalSavingsSmallConsumer)
//insertMetric("monthlySummaryTable","10 kW Consumer Savings ($)", allOutputData.totalSavingsLargeConsumer)
Expand Down
13 changes: 8 additions & 5 deletions omf/models/derUtilityCost.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,14 @@ def work(modelDir, inputDict):
## Calculate the subsidies
projectionLength = int(inputDict['projectionLength'])
subsidyUpfront = float(inputDict['subsidyUpfront'])
subsidyRecurring_1year_total = float(inputDict['subsidyRecurring'])
subsidyRecurring_1month_total = subsidyRecurring_1year_total / 12
subsidyRecurring_total = subsidyRecurring_1year_total * projectionLength
subsidyMonthly = float(inputDict['subsidyRecurring'])

subsidyRecurring_1year_total = subsidyMonthly * 12.
subsidyRecurring_allyears_array = np.full(projectionLength, subsidyMonthly)
subsidyRecurring_allyears_total = subsidyRecurring_1year_total * projectionLength

total_subsidy_1year = subsidyUpfront + subsidyRecurring_1year_total
total_subsidy_1year_array = np.full(12, subsidyRecurring_1month_total)
total_subsidy_1year_array = np.full(12, subsidyMonthly)
total_subsidy_1year_array[0] += subsidyUpfront
total_subsidy_allyears_array = np.full(projectionLength, subsidyRecurring_1year_total)
total_subsidy_allyears_array[0] += subsidyUpfront
Expand Down Expand Up @@ -729,7 +732,7 @@ def new(modelDir):
''' Create a new instance of this model. Returns true on success, false on failure. '''
with open(pJoin(__neoMetaModel__._omfDir,'static','testFiles','utility_2018_kW_load.csv')) as f:
demand_curve = f.read()
with open(pJoin(__neoMetaModel__._omfDir,'static','testFiles','utility_CO_2018_temperatures.csv')) as f:
with open(pJoin(__neoMetaModel__._omfDir,'static','testFiles','open-meteo-denverCO-noheaders.csv')) as f:
temp_curve = f.read()

defaultInputs = {
Expand Down

0 comments on commit 0f36c89

Please sign in to comment.