From 0f36c8920ec667e0523fe17a96887e7dfaa6f353 Mon Sep 17 00:00:00 2001 From: astronobri Date: Mon, 13 Jan 2025 16:05:31 -0500 Subject: [PATCH] derUtilityCost: Converted annual recurring subsidy to monthly subsidy input. --- omf/models/derUtilityCost.html | 6 +++--- omf/models/derUtilityCost.py | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/omf/models/derUtilityCost.html b/omf/models/derUtilityCost.html index 0cdf15a19..190a60361 100644 --- a/omf/models/derUtilityCost.html +++ b/omf/models/derUtilityCost.html @@ -104,11 +104,11 @@
- +
- +
@@ -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) diff --git a/omf/models/derUtilityCost.py b/omf/models/derUtilityCost.py index a9b4d37ed..344f1593a 100644 --- a/omf/models/derUtilityCost.py +++ b/omf/models/derUtilityCost.py @@ -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 @@ -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 = {