|
1 | 1 | """ |
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 |
3 | 3 | """ |
4 | 4 |
|
5 | 5 | import time |
@@ -1025,15 +1025,15 @@ def eMaxCommitGen(OptModel,n,g): |
1025 | 1025 | if pIndLogConsole == 1: |
1026 | 1026 | print('eMaxCommitGen ... ', len(getattr(OptModel, f'eMaxCommitGen_{p}_{sc}_{st}')), ' rows') |
1027 | 1027 |
|
1028 | | - def eExclusiveGens(OptModel,n,g): |
| 1028 | + def eExclusiveGens(OptModel,g): |
1029 | 1029 | if len(mTEPES.g2g) and (p,g) in mTEPES.pg: |
1030 | 1030 | if sum(1 for gg in mTEPES.g if (gg,g) in mTEPES.g2g): |
1031 | 1031 | return OptModel.vMaxCommitment[p,sc,g] + sum(OptModel.vMaxCommitment[p,sc,gg] for gg in mTEPES.g if (gg,g) in mTEPES.g2g) <= 1 |
1032 | 1032 | else: |
1033 | 1033 | return Constraint.Skip |
1034 | 1034 | else: |
1035 | 1035 | 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')) |
1037 | 1037 |
|
1038 | 1038 | if pIndLogConsole == 1: |
1039 | 1039 | print('eExclusiveGens ... ', len(getattr(OptModel, f'eExclusiveGens_{p}_{sc}_{st}')), ' rows') |
|
0 commit comments