From eea9ce5862e6e27c3f149ee4b9eb4578938b7339 Mon Sep 17 00:00:00 2001 From: astronobri Date: Mon, 9 Dec 2024 18:49:48 -0500 Subject: [PATCH] derUtilityCost: Moved NPV/SPP text, fixed utilityNetSavings_1year_total --- omf/models/derUtilityCost.html | 2 +- omf/models/derUtilityCost.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omf/models/derUtilityCost.html b/omf/models/derUtilityCost.html index c1392a54c..77b730d6c 100644 --- a/omf/models/derUtilityCost.html +++ b/omf/models/derUtilityCost.html @@ -344,7 +344,7 @@ new Highcharts.Chart({"credits":{"enabled":false}, "plotOptions":{"column":{"stacking":'normal'},"series":{"animation":false,"shadow":false},"spline":{"animation":false,"shadow":false}}, "xAxis":{"title":{"text":"Year After Installation","style":{"color":"gray"}},"type":"linear","tickColor":"gray","tickInterval":1,"lineColor":"gray","minorTickColor":"gray", "minorTickInterval":5}, - "title":{"text":"NPV:$" + allOutputData.NPV.toFixed(0) + ", SPP:" + allOutputData.SPP.toFixed(3), "verticalAlign":"top", "align":"right", "y":5, "x":-10, "style":{"color":"#333333", "fontSize":"12px"}}, + "title":{"text":"NPV:$" + allOutputData.NPV.toFixed(0) + ", SPP:" + allOutputData.SPP.toFixed(3), "verticalAlign":"top", "align":"right", "y":35, "x":-10, "style":{"color":"#333333", "fontSize":"12px"}}, //"title":{"text":""}, "series":[ {"name":"Net Benefits", "data": allOutputData.netCashflow}, diff --git a/omf/models/derUtilityCost.py b/omf/models/derUtilityCost.py index 8915ef4a2..091958063 100644 --- a/omf/models/derUtilityCost.py +++ b/omf/models/derUtilityCost.py @@ -613,10 +613,10 @@ def work(modelDir, inputDict): utilitySavings_allyears_array = np.full(projectionLength, utilitySavings_1year_total) ## Calculating total utility net savings (savings minus costs) - utilityNetSavings_1year_total = utilityCosts_1year_total - utilitySavings_1year_total + utilityNetSavings_1year_total = utilitySavings_1year_total - utilityCosts_1year_total utilityNetSavings_1year_array = list(np.array(utilitySavings_1year_array) - np.array(utilityCosts_1year_array)) utilityNetSavings_allyears_total = utilitySavings_allyears_total - utilityCosts_allyears_total - utilityNetSavings_allyears_array = np.full(projectionLength,utilityNetSavings_1year_total) + utilityNetSavings_allyears_array = np.full(projectionLength, utilityNetSavings_1year_total) ## Note: The following for-loop would display the net savings as positive. If there are negative savings (when costs are greater than savings), it will only show $0 savings, rather than the negative savings amount. This might not be a useful way to display it, so it is commented for now. ## Calculate the net savings and costs for each month