From db789481411b62b9a199d350a6478374aae15878 Mon Sep 17 00:00:00 2001 From: Andres Ramos <61053256+arght@users.noreply.github.com> Date: Sat, 9 Dec 2023 20:10:53 +0100 Subject: [PATCH] fix error in RsrInvCost --- openTEPES/openTEPES_OutputResults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openTEPES/openTEPES_OutputResults.py b/openTEPES/openTEPES_OutputResults.py index bcbb94ef..42b61310 100644 --- a/openTEPES/openTEPES_OutputResults.py +++ b/openTEPES/openTEPES_OutputResults.py @@ -1352,7 +1352,7 @@ def CostSummaryResults(DirName, CaseName, OptModel, mTEPES): if mTEPES.pIndHydroTopology == 1: RsrInvCost = pd.Series(data=[mTEPES.pDiscountedWeight[p] * sum(mTEPES.pRsrInvestCost[rc ] * OptModel.vReservoirInvest [p,rc ]() for rc in mTEPES.rn ) for p in mTEPES.p], index=mTEPES.p).to_frame(name='Reservoir Investment Cost').stack() else: - RsrInvCost = pd.Series(data=[0.0 ], index=mTEPES.p).to_frame(name='Reservoir Investment Cost').stack() + RsrInvCost = pd.Series(data=[0.0 for p in mTEPES.p], index=mTEPES.p).to_frame(name='Reservoir Investment Cost').stack() NetInvCost = pd.Series(data=[mTEPES.pDiscountedWeight[p] * sum(mTEPES.pNetFixedCost [lc ] * OptModel.vNetworkInvest [p,lc ]() for lc in mTEPES.lc ) for p in mTEPES.p], index=mTEPES.p).to_frame(name='Network Investment Cost').stack() GenCost = pd.Series(data=[mTEPES.pDiscountedWeight[p] * sum(mTEPES.pScenProb [p,sc]() * OptModel.vTotalGCost [p,sc,n]() for sc,n in mTEPES.sc*mTEPES.n if mTEPES.pScenProb[p,sc]()) for p in mTEPES.p], index=mTEPES.p).to_frame(name='Generation Operation Cost').stack() ConCost = pd.Series(data=[mTEPES.pDiscountedWeight[p] * sum(mTEPES.pScenProb [p,sc]() * OptModel.vTotalCCost [p,sc,n]() for sc,n in mTEPES.sc*mTEPES.n if mTEPES.pScenProb[p,sc]()) for p in mTEPES.p], index=mTEPES.p).to_frame(name='Consumption Operation Cost').stack()