openTEPES 4.18.4__py3-none-any.whl → 4.18.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openTEPES/9n_PTDF/oT_Data_Demand_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_Duration_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_Emission_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_EnergyInflows_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_EnergyOutflows_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_Generation_9n_PTDF.csv +17 -0
- openTEPES/9n_PTDF/oT_Data_Inertia_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_Network_9n_PTDF.csv +14 -0
- openTEPES/9n_PTDF/oT_Data_NodeLocation_9n_PTDF.csv +10 -0
- openTEPES/9n_PTDF/oT_Data_OperatingReserveDown_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_OperatingReserveUp_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_Option_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_Parameter_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_Period_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_RESEnergy_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_ReserveMargin_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_Scenario_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_Stage_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Data_VariableEmissionCost_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableFuelCost_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMaxConsumption_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMaxEnergy_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMaxGeneration_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMaxStorage_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMinConsumption_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMinEnergy_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMinGeneration_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariableMinStorage_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Data_VariablePTDF_9n_PTDF.csv +8740 -0
- openTEPES/9n_PTDF/oT_Data_VariableTTCBck_9n_PTDF.csv +8739 -0
- openTEPES/9n_PTDF/oT_Data_VariableTTCFrw_9n_PTDF.csv +8739 -0
- openTEPES/9n_PTDF/oT_Dict_AreaToRegion_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Dict_Area_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Dict_Circuit_9n_PTDF.csv +3 -0
- openTEPES/9n_PTDF/oT_Dict_Generation_9n_PTDF.csv +17 -0
- openTEPES/9n_PTDF/oT_Dict_Line_9n_PTDF.csv +3 -0
- openTEPES/9n_PTDF/oT_Dict_LoadLevel_9n_PTDF.csv +8737 -0
- openTEPES/9n_PTDF/oT_Dict_NodeToZone_9n_PTDF.csv +10 -0
- openTEPES/9n_PTDF/oT_Dict_Node_9n_PTDF.csv +10 -0
- openTEPES/9n_PTDF/oT_Dict_Period_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Dict_Region_9n_PTDF.csv +31 -0
- openTEPES/9n_PTDF/oT_Dict_Scenario_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Dict_Stage_9n_PTDF.csv +2 -0
- openTEPES/9n_PTDF/oT_Dict_Storage_9n_PTDF.csv +3 -0
- openTEPES/9n_PTDF/oT_Dict_Technology_9n_PTDF.csv +7 -0
- openTEPES/9n_PTDF/oT_Dict_ZoneToArea_9n_PTDF.csv +10 -0
- openTEPES/9n_PTDF/oT_Dict_Zone_9n_PTDF.csv +10 -0
- openTEPES/RTS-GMLC_6y/oT_Dict_AreaToRegion_RTS-GMLC_6y.csv +4 -4
- openTEPES/RTS-GMLC_6y/oT_Dict_Area_RTS-GMLC_6y.csv +4 -4
- openTEPES/RTS-GMLC_6y/oT_Dict_Circuit_RTS-GMLC_6y.csv +5 -5
- openTEPES/RTS-GMLC_6y/oT_Dict_Line_RTS-GMLC_6y.csv +3 -3
- openTEPES/RTS-GMLC_6y/oT_Dict_NodeToZone_RTS-GMLC_6y.csv +74 -74
- openTEPES/RTS-GMLC_6y/oT_Dict_Region_RTS-GMLC_6y.csv +2 -2
- openTEPES/RTS-GMLC_6y/oT_Dict_Scenario_RTS-GMLC_6y.csv +2 -2
- openTEPES/RTS-GMLC_6y/oT_Dict_Storage_RTS-GMLC_6y.csv +3 -3
- openTEPES/RTS-GMLC_6y/oT_Dict_Technology_RTS-GMLC_6y.csv +10 -10
- openTEPES/RTS-GMLC_6y/oT_Dict_ZoneToArea_RTS-GMLC_6y.csv +22 -22
- openTEPES/RTS-GMLC_6y/oT_Dict_Zone_RTS-GMLC_6y.csv +22 -22
- openTEPES/__init__.py +1 -1
- openTEPES/openTEPES.py +21 -15
- openTEPES/openTEPES_InputData.py +383 -214
- openTEPES/openTEPES_Main.py +2 -2
- openTEPES/openTEPES_ModelFormulation.py +413 -156
- openTEPES/openTEPES_OutputResults.py +228 -166
- openTEPES/openTEPES_ProblemSolving.py +30 -28
- {opentepes-4.18.4.dist-info → openTEPES-4.18.5.dist-info}/METADATA +15 -16
- {opentepes-4.18.4.dist-info → openTEPES-4.18.5.dist-info}/RECORD +70 -23
- {opentepes-4.18.4.dist-info → openTEPES-4.18.5.dist-info}/WHEEL +1 -1
- {opentepes-4.18.4.dist-info → openTEPES-4.18.5.dist-info}/LICENSE +0 -0
- {opentepes-4.18.4.dist-info → openTEPES-4.18.5.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Area,Region
|
|
2
|
-
Area_1,Region_1
|
|
3
|
-
Area_2,Region_1
|
|
4
|
-
Area_3,Region_1
|
|
1
|
+
Area,Region
|
|
2
|
+
Area_1,Region_1
|
|
3
|
+
Area_2,Region_1
|
|
4
|
+
Area_3,Region_1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Area
|
|
2
|
-
Area_1
|
|
3
|
-
Area_2
|
|
4
|
-
Area_3
|
|
1
|
+
Area
|
|
2
|
+
Area_1
|
|
3
|
+
Area_2
|
|
4
|
+
Area_3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Circuit
|
|
2
|
-
eac1
|
|
3
|
-
eac2
|
|
4
|
-
eac3
|
|
5
|
-
eac4
|
|
1
|
+
Circuit
|
|
2
|
+
eac1
|
|
3
|
+
eac2
|
|
4
|
+
eac3
|
|
5
|
+
eac4
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
LineType
|
|
2
|
-
AC
|
|
3
|
-
DC
|
|
1
|
+
LineType
|
|
2
|
+
AC
|
|
3
|
+
DC
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
Node,Zone
|
|
2
|
-
Node_101,Zone_11
|
|
3
|
-
Node_102,Zone_12
|
|
4
|
-
Node_103,Zone_11
|
|
5
|
-
Node_104,Zone_11
|
|
6
|
-
Node_105,Zone_11
|
|
7
|
-
Node_106,Zone_12
|
|
8
|
-
Node_107,Zone_12
|
|
9
|
-
Node_108,Zone_12
|
|
10
|
-
Node_109,Zone_13
|
|
11
|
-
Node_110,Zone_13
|
|
12
|
-
Node_111,Zone_13
|
|
13
|
-
Node_112,Zone_13
|
|
14
|
-
Node_113,Zone_14
|
|
15
|
-
Node_114,Zone_16
|
|
16
|
-
Node_115,Zone_16
|
|
17
|
-
Node_116,Zone_16
|
|
18
|
-
Node_117,Zone_17
|
|
19
|
-
Node_118,Zone_17
|
|
20
|
-
Node_119,Zone_15
|
|
21
|
-
Node_120,Zone_15
|
|
22
|
-
Node_121,Zone_17
|
|
23
|
-
Node_122,Zone_17
|
|
24
|
-
Node_123,Zone_15
|
|
25
|
-
Node_124,Zone_16
|
|
26
|
-
Node_201,Zone_21
|
|
27
|
-
Node_202,Zone_22
|
|
28
|
-
Node_203,Zone_21
|
|
29
|
-
Node_204,Zone_21
|
|
30
|
-
Node_205,Zone_21
|
|
31
|
-
Node_206,Zone_22
|
|
32
|
-
Node_207,Zone_22
|
|
33
|
-
Node_208,Zone_22
|
|
34
|
-
Node_209,Zone_23
|
|
35
|
-
Node_210,Zone_23
|
|
36
|
-
Node_211,Zone_23
|
|
37
|
-
Node_212,Zone_23
|
|
38
|
-
Node_213,Zone_24
|
|
39
|
-
Node_214,Zone_26
|
|
40
|
-
Node_215,Zone_26
|
|
41
|
-
Node_216,Zone_26
|
|
42
|
-
Node_217,Zone_27
|
|
43
|
-
Node_218,Zone_27
|
|
44
|
-
Node_219,Zone_25
|
|
45
|
-
Node_220,Zone_25
|
|
46
|
-
Node_221,Zone_27
|
|
47
|
-
Node_222,Zone_27
|
|
48
|
-
Node_223,Zone_25
|
|
49
|
-
Node_224,Zone_26
|
|
50
|
-
Node_301,Zone_31
|
|
51
|
-
Node_302,Zone_32
|
|
52
|
-
Node_303,Zone_31
|
|
53
|
-
Node_304,Zone_31
|
|
54
|
-
Node_305,Zone_31
|
|
55
|
-
Node_306,Zone_32
|
|
56
|
-
Node_307,Zone_32
|
|
57
|
-
Node_308,Zone_32
|
|
58
|
-
Node_309,Zone_33
|
|
59
|
-
Node_310,Zone_33
|
|
60
|
-
Node_311,Zone_33
|
|
61
|
-
Node_312,Zone_33
|
|
62
|
-
Node_313,Zone_34
|
|
63
|
-
Node_314,Zone_36
|
|
64
|
-
Node_315,Zone_36
|
|
65
|
-
Node_316,Zone_36
|
|
66
|
-
Node_317,Zone_37
|
|
67
|
-
Node_318,Zone_37
|
|
68
|
-
Node_319,Zone_35
|
|
69
|
-
Node_320,Zone_35
|
|
70
|
-
Node_321,Zone_37
|
|
71
|
-
Node_322,Zone_37
|
|
72
|
-
Node_323,Zone_35
|
|
73
|
-
Node_324,Zone_36
|
|
74
|
-
Node_325,Zone_35
|
|
1
|
+
Node,Zone
|
|
2
|
+
Node_101,Zone_11
|
|
3
|
+
Node_102,Zone_12
|
|
4
|
+
Node_103,Zone_11
|
|
5
|
+
Node_104,Zone_11
|
|
6
|
+
Node_105,Zone_11
|
|
7
|
+
Node_106,Zone_12
|
|
8
|
+
Node_107,Zone_12
|
|
9
|
+
Node_108,Zone_12
|
|
10
|
+
Node_109,Zone_13
|
|
11
|
+
Node_110,Zone_13
|
|
12
|
+
Node_111,Zone_13
|
|
13
|
+
Node_112,Zone_13
|
|
14
|
+
Node_113,Zone_14
|
|
15
|
+
Node_114,Zone_16
|
|
16
|
+
Node_115,Zone_16
|
|
17
|
+
Node_116,Zone_16
|
|
18
|
+
Node_117,Zone_17
|
|
19
|
+
Node_118,Zone_17
|
|
20
|
+
Node_119,Zone_15
|
|
21
|
+
Node_120,Zone_15
|
|
22
|
+
Node_121,Zone_17
|
|
23
|
+
Node_122,Zone_17
|
|
24
|
+
Node_123,Zone_15
|
|
25
|
+
Node_124,Zone_16
|
|
26
|
+
Node_201,Zone_21
|
|
27
|
+
Node_202,Zone_22
|
|
28
|
+
Node_203,Zone_21
|
|
29
|
+
Node_204,Zone_21
|
|
30
|
+
Node_205,Zone_21
|
|
31
|
+
Node_206,Zone_22
|
|
32
|
+
Node_207,Zone_22
|
|
33
|
+
Node_208,Zone_22
|
|
34
|
+
Node_209,Zone_23
|
|
35
|
+
Node_210,Zone_23
|
|
36
|
+
Node_211,Zone_23
|
|
37
|
+
Node_212,Zone_23
|
|
38
|
+
Node_213,Zone_24
|
|
39
|
+
Node_214,Zone_26
|
|
40
|
+
Node_215,Zone_26
|
|
41
|
+
Node_216,Zone_26
|
|
42
|
+
Node_217,Zone_27
|
|
43
|
+
Node_218,Zone_27
|
|
44
|
+
Node_219,Zone_25
|
|
45
|
+
Node_220,Zone_25
|
|
46
|
+
Node_221,Zone_27
|
|
47
|
+
Node_222,Zone_27
|
|
48
|
+
Node_223,Zone_25
|
|
49
|
+
Node_224,Zone_26
|
|
50
|
+
Node_301,Zone_31
|
|
51
|
+
Node_302,Zone_32
|
|
52
|
+
Node_303,Zone_31
|
|
53
|
+
Node_304,Zone_31
|
|
54
|
+
Node_305,Zone_31
|
|
55
|
+
Node_306,Zone_32
|
|
56
|
+
Node_307,Zone_32
|
|
57
|
+
Node_308,Zone_32
|
|
58
|
+
Node_309,Zone_33
|
|
59
|
+
Node_310,Zone_33
|
|
60
|
+
Node_311,Zone_33
|
|
61
|
+
Node_312,Zone_33
|
|
62
|
+
Node_313,Zone_34
|
|
63
|
+
Node_314,Zone_36
|
|
64
|
+
Node_315,Zone_36
|
|
65
|
+
Node_316,Zone_36
|
|
66
|
+
Node_317,Zone_37
|
|
67
|
+
Node_318,Zone_37
|
|
68
|
+
Node_319,Zone_35
|
|
69
|
+
Node_320,Zone_35
|
|
70
|
+
Node_321,Zone_37
|
|
71
|
+
Node_322,Zone_37
|
|
72
|
+
Node_323,Zone_35
|
|
73
|
+
Node_324,Zone_36
|
|
74
|
+
Node_325,Zone_35
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Region
|
|
2
|
-
Region_1
|
|
1
|
+
Region
|
|
2
|
+
Region_1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Scenario
|
|
2
|
-
sc01
|
|
1
|
+
Scenario
|
|
2
|
+
sc01
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
StorageType
|
|
2
|
-
Daily
|
|
3
|
-
Weekly
|
|
1
|
+
StorageType
|
|
2
|
+
Daily
|
|
3
|
+
Weekly
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Technology
|
|
2
|
-
Oil
|
|
3
|
-
Coal
|
|
4
|
-
NG
|
|
5
|
-
Sync_Cond
|
|
6
|
-
Nuclear
|
|
7
|
-
Hydro
|
|
8
|
-
Solar
|
|
9
|
-
Wind
|
|
10
|
-
Storage
|
|
1
|
+
Technology
|
|
2
|
+
Oil
|
|
3
|
+
Coal
|
|
4
|
+
NG
|
|
5
|
+
Sync_Cond
|
|
6
|
+
Nuclear
|
|
7
|
+
Hydro
|
|
8
|
+
Solar
|
|
9
|
+
Wind
|
|
10
|
+
Storage
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
Zone,Area
|
|
2
|
-
Zone_11,Area_1
|
|
3
|
-
Zone_12,Area_1
|
|
4
|
-
Zone_13,Area_1
|
|
5
|
-
Zone_14,Area_1
|
|
6
|
-
Zone_16,Area_1
|
|
7
|
-
Zone_17,Area_1
|
|
8
|
-
Zone_15,Area_1
|
|
9
|
-
Zone_21,Area_2
|
|
10
|
-
Zone_22,Area_2
|
|
11
|
-
Zone_23,Area_2
|
|
12
|
-
Zone_24,Area_2
|
|
13
|
-
Zone_26,Area_2
|
|
14
|
-
Zone_27,Area_2
|
|
15
|
-
Zone_25,Area_2
|
|
16
|
-
Zone_31,Area_3
|
|
17
|
-
Zone_32,Area_3
|
|
18
|
-
Zone_33,Area_3
|
|
19
|
-
Zone_34,Area_3
|
|
20
|
-
Zone_36,Area_3
|
|
21
|
-
Zone_37,Area_3
|
|
22
|
-
Zone_35,Area_3
|
|
1
|
+
Zone,Area
|
|
2
|
+
Zone_11,Area_1
|
|
3
|
+
Zone_12,Area_1
|
|
4
|
+
Zone_13,Area_1
|
|
5
|
+
Zone_14,Area_1
|
|
6
|
+
Zone_16,Area_1
|
|
7
|
+
Zone_17,Area_1
|
|
8
|
+
Zone_15,Area_1
|
|
9
|
+
Zone_21,Area_2
|
|
10
|
+
Zone_22,Area_2
|
|
11
|
+
Zone_23,Area_2
|
|
12
|
+
Zone_24,Area_2
|
|
13
|
+
Zone_26,Area_2
|
|
14
|
+
Zone_27,Area_2
|
|
15
|
+
Zone_25,Area_2
|
|
16
|
+
Zone_31,Area_3
|
|
17
|
+
Zone_32,Area_3
|
|
18
|
+
Zone_33,Area_3
|
|
19
|
+
Zone_34,Area_3
|
|
20
|
+
Zone_36,Area_3
|
|
21
|
+
Zone_37,Area_3
|
|
22
|
+
Zone_35,Area_3
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
Zone
|
|
2
|
-
Zone_11
|
|
3
|
-
Zone_12
|
|
4
|
-
Zone_13
|
|
5
|
-
Zone_14
|
|
6
|
-
Zone_16
|
|
7
|
-
Zone_17
|
|
8
|
-
Zone_15
|
|
9
|
-
Zone_21
|
|
10
|
-
Zone_22
|
|
11
|
-
Zone_23
|
|
12
|
-
Zone_24
|
|
13
|
-
Zone_26
|
|
14
|
-
Zone_27
|
|
15
|
-
Zone_25
|
|
16
|
-
Zone_31
|
|
17
|
-
Zone_32
|
|
18
|
-
Zone_33
|
|
19
|
-
Zone_34
|
|
20
|
-
Zone_36
|
|
21
|
-
Zone_37
|
|
22
|
-
Zone_35
|
|
1
|
+
Zone
|
|
2
|
+
Zone_11
|
|
3
|
+
Zone_12
|
|
4
|
+
Zone_13
|
|
5
|
+
Zone_14
|
|
6
|
+
Zone_16
|
|
7
|
+
Zone_17
|
|
8
|
+
Zone_15
|
|
9
|
+
Zone_21
|
|
10
|
+
Zone_22
|
|
11
|
+
Zone_23
|
|
12
|
+
Zone_24
|
|
13
|
+
Zone_26
|
|
14
|
+
Zone_27
|
|
15
|
+
Zone_25
|
|
16
|
+
Zone_31
|
|
17
|
+
Zone_32
|
|
18
|
+
Zone_33
|
|
19
|
+
Zone_34
|
|
20
|
+
Zone_36
|
|
21
|
+
Zone_37
|
|
22
|
+
Zone_35
|
openTEPES/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@ Open Generation, Storage, and Transmission Operation and Expansion Planning Mode
|
|
|
14
14
|
>>> import openTEPES as oT
|
|
15
15
|
>>> oT.routine("9n", "C:\\Users\\UserName\\Documents\\GitHub\\openTEPES", "glpk")
|
|
16
16
|
"""
|
|
17
|
-
__version__ = "4.18.
|
|
17
|
+
__version__ = "4.18.5"
|
|
18
18
|
|
|
19
19
|
from .openTEPES_Main import main
|
|
20
20
|
from .openTEPES import *
|
openTEPES/openTEPES.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) -
|
|
2
|
+
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - June 20, 2025
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
# import dill as pickle
|
|
@@ -39,8 +39,8 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
39
39
|
idxDict['y' ] = 1
|
|
40
40
|
|
|
41
41
|
#%% model declaration
|
|
42
|
-
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.
|
|
43
|
-
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.
|
|
42
|
+
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.5 - June 23, 2025')
|
|
43
|
+
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.5 - June 23, 2025', file=open(f'{_path}/openTEPES_version_{CaseName}.log','w'))
|
|
44
44
|
|
|
45
45
|
pIndOutputResults = [j for i,j in idxDict.items() if i == pIndOutputResults][0]
|
|
46
46
|
pIndLogConsole = [j for i,j in idxDict.items() if i == pIndLogConsole ][0]
|
|
@@ -100,12 +100,12 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
100
100
|
if sum(1 for rs,h in mTEPES.r2p):
|
|
101
101
|
mTEPES.npc = [(n,h ) for n,h in mTEPES.n*mTEPES.h if sum(1 for rs in mTEPES.rs if (rs,h) in mTEPES.r2p) and mTEPES.n.ord(n) % sum(mTEPES.pReservoirTimeStep[rs] for rs in mTEPES.rs if (rs,h) in mTEPES.r2p) == 0]
|
|
102
102
|
else:
|
|
103
|
-
mTEPES.npc
|
|
103
|
+
mTEPES.npc = []
|
|
104
104
|
mTEPES.nrsc = [(n,rs) for n,rs in mTEPES.n*mTEPES.rs if mTEPES.n.ord(n) % mTEPES.pReservoirTimeStep[rs] == 0]
|
|
105
105
|
mTEPES.nrcc = [(n,rs) for n,rs in mTEPES.n*mTEPES.rn if mTEPES.n.ord(n) % mTEPES.pReservoirTimeStep[rs] == 0]
|
|
106
106
|
mTEPES.nrso = [(n,rs) for n,rs in mTEPES.n*mTEPES.rs if mTEPES.n.ord(n) % mTEPES.pWaterOutTimeStep [rs] == 0]
|
|
107
107
|
|
|
108
|
-
if
|
|
108
|
+
if mTEPES.st:
|
|
109
109
|
|
|
110
110
|
# load levels up to the current stage for emission and RES energy constraints
|
|
111
111
|
# if (p != mTEPES.p.first() or sc != mTEPES.sc.first()) and st == mTEPES.First_st:
|
|
@@ -153,6 +153,9 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
153
153
|
if (max([mTEPES.pRESEnergy[p,ar] for ar in mTEPES.ar]) == 0
|
|
154
154
|
and (min([mTEPES.pEmission [p,ar] for ar in mTEPES.ar]) == math.inf or sum(mTEPES.pEmissionRate[nr] for nr in mTEPES.nr) == 0)):
|
|
155
155
|
|
|
156
|
+
if (p,sc) == mTEPES.ps.last() and st == mTEPES.Last_st and mTEPES.NoRepetition == 0:
|
|
157
|
+
mTEPES.NoRepetition = 1
|
|
158
|
+
|
|
156
159
|
# Writing LP file
|
|
157
160
|
if pIndLogConsole == 1:
|
|
158
161
|
StartTime = time.time()
|
|
@@ -177,6 +180,9 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
177
180
|
|
|
178
181
|
if st == mTEPES.Last_st and mTEPES.NoRepetition == 0:
|
|
179
182
|
|
|
183
|
+
if (p,sc) == mTEPES.ps.last():
|
|
184
|
+
mTEPES.NoRepetition = 1
|
|
185
|
+
|
|
180
186
|
mTEPES.del_component(mTEPES.st)
|
|
181
187
|
mTEPES.del_component(mTEPES.n )
|
|
182
188
|
mTEPES.del_component(mTEPES.n2)
|
|
@@ -203,7 +209,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
203
209
|
mTEPES.nrcc = [(n,rs) for n,rs in mTEPES.n*mTEPES.rn if mTEPES.n.ord(n) % mTEPES.pReservoirTimeStep[rs] == 0]
|
|
204
210
|
mTEPES.nrso = [(n,rs) for n,rs in mTEPES.n*mTEPES.rs if mTEPES.n.ord(n) % mTEPES.pWaterOutTimeStep [rs] == 0]
|
|
205
211
|
|
|
206
|
-
# Writing LP file
|
|
212
|
+
# Writing an LP file
|
|
207
213
|
if pIndLogConsole == 1:
|
|
208
214
|
StartTime = time.time()
|
|
209
215
|
mTEPES.write(f'{_path}/openTEPES_{CaseName}_{p}_{sc}_{st}.lp', io_options={'symbolic_solver_labels': True})
|
|
@@ -211,7 +217,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
211
217
|
StartTime = time.time()
|
|
212
218
|
print('Writing LP file ... ', round(WritingLPFileTime), 's')
|
|
213
219
|
|
|
214
|
-
# there are investment decisions (it is an expansion and operation model) or there are system emission constraints
|
|
220
|
+
# there are investment decisions (it is an expansion and operation model), or there are system emission constraints
|
|
215
221
|
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc, st)
|
|
216
222
|
|
|
217
223
|
# deactivate the constraints of the previous period and scenario
|
|
@@ -256,7 +262,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
256
262
|
mTEPES.nrcc = [(n,rs) for n,rs in mTEPES.n*mTEPES.rn if mTEPES.n.ord(n) % mTEPES.pReservoirTimeStep[rs] == 0]
|
|
257
263
|
mTEPES.nrso = [(n,rs) for n,rs in mTEPES.n*mTEPES.rs if mTEPES.n.ord(n) % mTEPES.pWaterOutTimeStep [rs] == 0]
|
|
258
264
|
|
|
259
|
-
# Writing LP file
|
|
265
|
+
# Writing an LP file
|
|
260
266
|
if pIndLogConsole == 1:
|
|
261
267
|
StartTime = time.time()
|
|
262
268
|
mTEPES.write(f'{_path}/openTEPES_{CaseName}_{p}_{sc}_{st}.lp', io_options={'symbolic_solver_labels': True})
|
|
@@ -264,7 +270,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
264
270
|
StartTime = time.time()
|
|
265
271
|
print('Writing LP file ... ', round(WritingLPFileTime), 's')
|
|
266
272
|
|
|
267
|
-
# there are investment decisions (it is an expansion and operation model) or there are system emission constraints
|
|
273
|
+
# there are investment decisions (it is an expansion and operation model), or there are system emission constraints
|
|
268
274
|
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc, st)
|
|
269
275
|
|
|
270
276
|
mTEPES.del_component(mTEPES.st)
|
|
@@ -314,7 +320,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
314
320
|
# output plot results
|
|
315
321
|
pIndPlotOutput = 1
|
|
316
322
|
|
|
317
|
-
# indicators to control the
|
|
323
|
+
# indicators to control the number of output results
|
|
318
324
|
if pIndOutputResults == 1:
|
|
319
325
|
pIndDumpRawResults = 0
|
|
320
326
|
pIndInvestmentResults = 1
|
|
@@ -356,15 +362,15 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
356
362
|
InvestmentResults (DirName, CaseName, mTEPES, mTEPES, pIndTechnologyOutput, pIndPlotOutput)
|
|
357
363
|
if pIndGenerationOperationResults == 1:
|
|
358
364
|
GenerationOperationResults (DirName, CaseName, mTEPES, mTEPES, pIndTechnologyOutput, pIndAreaOutput, pIndPlotOutput)
|
|
359
|
-
if
|
|
365
|
+
if mTEPES.ch and mTEPES.pIndHeat == 1:
|
|
360
366
|
GenerationOperationHeatResults(DirName, CaseName, mTEPES, mTEPES, pIndTechnologyOutput, pIndAreaOutput, pIndPlotOutput)
|
|
361
|
-
if pIndESSOperationResults == 1 and
|
|
367
|
+
if pIndESSOperationResults == 1 and mTEPES.es:
|
|
362
368
|
ESSOperationResults (DirName, CaseName, mTEPES, mTEPES, pIndTechnologyOutput, pIndAreaOutput, pIndPlotOutput)
|
|
363
|
-
if pIndReservoirOperationResults == 1 and
|
|
369
|
+
if pIndReservoirOperationResults == 1 and mTEPES.rs and mTEPES.pIndHydroTopology == 1:
|
|
364
370
|
ReservoirOperationResults (DirName, CaseName, mTEPES, mTEPES, pIndTechnologyOutput, pIndPlotOutput)
|
|
365
|
-
if pIndNetworkH2OperationResults == 1 and
|
|
371
|
+
if pIndNetworkH2OperationResults == 1 and mTEPES.pa and mTEPES.pIndHydrogen == 1:
|
|
366
372
|
NetworkH2OperationResults (DirName, CaseName, mTEPES, mTEPES)
|
|
367
|
-
if pIndNetworkHeatOperationResults == 1 and
|
|
373
|
+
if pIndNetworkHeatOperationResults == 1 and mTEPES.ha and mTEPES.pIndHeat == 1:
|
|
368
374
|
NetworkHeatOperationResults (DirName, CaseName, mTEPES, mTEPES)
|
|
369
375
|
if pIndFlexibilityResults == 1:
|
|
370
376
|
FlexibilityResults (DirName, CaseName, mTEPES, mTEPES)
|