From 7c081f243588e27b34dea54bc553cc2d5d1fc800 Mon Sep 17 00:00:00 2001 From: Andres Ramos <61053256+arght@users.noreply.github.com> Date: Fri, 24 Nov 2023 10:27:43 +0100 Subject: [PATCH] delete if unit availability = 0 changed to 1 --- openTEPES/openTEPES_InputData.py | 10 +++++----- openTEPES/openTEPES_OutputResults.py | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/openTEPES/openTEPES_InputData.py b/openTEPES/openTEPES_InputData.py index 21cc9fb1..39dcdb97 100644 --- a/openTEPES/openTEPES_InputData.py +++ b/openTEPES/openTEPES_InputData.py @@ -1,5 +1,5 @@ """ -Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - November 03, 2023 +Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - November 23, 2023 """ import datetime @@ -1214,10 +1214,10 @@ def count_lines_in_csv(csv_file_path): mTEPES.gm = [(p,sc,g ) for p,sc,g in mTEPES.psg if sum(mTEPES.pMinEnergy [p,sc,n2,g ] for n2 in mTEPES.n2)] mTEPES.gM = [(p,sc,g ) for p,sc,g in mTEPES.psg if sum(mTEPES.pMaxEnergy [p,sc,n2,g ] for n2 in mTEPES.n2)] - # if unit availability = 0 changed to 1 - for g in mTEPES.g: - if mTEPES.pAvailability[g]() == 0.0: - mTEPES.pAvailability[g] = 1.0 + # # if unit availability = 0 changed to 1 + # for g in mTEPES.g: + # if mTEPES.pAvailability[g]() == 0.0: + # mTEPES.pAvailability[g] = 1.0 # if line length = 0 changed to geographical distance with an additional 10% for ni,nf,cc in mTEPES.la: diff --git a/openTEPES/openTEPES_OutputResults.py b/openTEPES/openTEPES_OutputResults.py index d0ac1a39..e7822c7a 100644 --- a/openTEPES/openTEPES_OutputResults.py +++ b/openTEPES/openTEPES_OutputResults.py @@ -1,5 +1,5 @@ """ -Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - October 22, 2023 +Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - November 22, 2023 """ import time @@ -1312,8 +1312,7 @@ def ReliabilityResults(DirName, CaseName, OptModel, mTEPES): if len(mTEPES.gc): CandCapacity = [(p,sc,n,g) for p,sc,n,g in mTEPES.psng if g in mTEPES.gc] pCandMaxPower = pd.Series(data=[mTEPES.pMaxPower[p,sc,n,g ] * OptModel.vGenerationInvest[p,g]() for p,sc,n,g in CandCapacity], index=pd.Index(CandCapacity)) - frames = [pExistMaxPower, pCandMaxPower] - pMaxPower = pd.concat(frames) + pMaxPower = pd.concat([pExistMaxPower, pCandMaxPower]) else: pMaxPower = pExistMaxPower