Skip to content

Commit

Permalink
delete if unit availability = 0 changed to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
arght committed Nov 24, 2023
1 parent 03a2b58 commit 7c081f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions openTEPES/openTEPES_InputData.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions openTEPES/openTEPES_OutputResults.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7c081f2

Please sign in to comment.