Skip to content

Commit d3a2bc5

Browse files
committed
Update openTEPES_ModelFormulation.py
1 parent 127a8d5 commit d3a2bc5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openTEPES/openTEPES_ModelFormulation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - March 20, 2025
2+
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - April 05, 2025
33
"""
44

55
import time
@@ -1025,15 +1025,15 @@ def eMaxCommitGen(OptModel,n,g):
10251025
if pIndLogConsole == 1:
10261026
print('eMaxCommitGen ... ', len(getattr(OptModel, f'eMaxCommitGen_{p}_{sc}_{st}')), ' rows')
10271027

1028-
def eExclusiveGens(OptModel,n,g):
1028+
def eExclusiveGens(OptModel,g):
10291029
if len(mTEPES.g2g) and (p,g) in mTEPES.pg:
10301030
if sum(1 for gg in mTEPES.g if (gg,g) in mTEPES.g2g):
10311031
return OptModel.vMaxCommitment[p,sc,g] + sum(OptModel.vMaxCommitment[p,sc,gg] for gg in mTEPES.g if (gg,g) in mTEPES.g2g) <= 1
10321032
else:
10331033
return Constraint.Skip
10341034
else:
10351035
return Constraint.Skip
1036-
setattr(OptModel, f'eExclusiveGens_{p}_{sc}_{st}', Constraint(mTEPES.n, mTEPES.g, rule=eExclusiveGens, doc='mutually exclusive generators'))
1036+
setattr(OptModel, f'eExclusiveGens_{p}_{sc}_{st}', Constraint(mTEPES.g, rule=eExclusiveGens, doc='mutually exclusive generators'))
10371037

10381038
if pIndLogConsole == 1:
10391039
print('eExclusiveGens ... ', len(getattr(OptModel, f'eExclusiveGens_{p}_{sc}_{st}')), ' rows')

0 commit comments

Comments
 (0)