Skip to content

Commit

Permalink
derUtilityCost: Moved NPV/SPP text, fixed utilityNetSavings_1year_total
Browse files Browse the repository at this point in the history
  • Loading branch information
astronobri committed Dec 9, 2024
1 parent d4e8cc9 commit eea9ce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omf/models/derUtilityCost.html
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
4 changes: 2 additions & 2 deletions omf/models/derUtilityCost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eea9ce5

Please sign in to comment.