openTEPES 4.17.5rc1__py3-none-any.whl → 4.17.5rc2__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/.idea/workspace.xml +14 -54
- openTEPES/__init__.py +1 -1
- openTEPES/openTEPES.py +7 -7
- openTEPES/openTEPES_Main.py +1 -1
- openTEPES/openTEPES_OutputResults.py +4 -4
- openTEPES/openTEPES_ProblemSolving.py +15 -9
- {opentepes-4.17.5rc1.dist-info → opentepes-4.17.5rc2.dist-info}/METADATA +3 -3
- {opentepes-4.17.5rc1.dist-info → opentepes-4.17.5rc2.dist-info}/RECORD +11 -11
- {opentepes-4.17.5rc1.dist-info → opentepes-4.17.5rc2.dist-info}/LICENSE +0 -0
- {opentepes-4.17.5rc1.dist-info → opentepes-4.17.5rc2.dist-info}/WHEEL +0 -0
- {opentepes-4.17.5rc1.dist-info → opentepes-4.17.5rc2.dist-info}/entry_points.txt +0 -0
openTEPES/.idea/workspace.xml
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
7
|
<list default="true" id="d4dd45eb-503b-4f17-ab9c-dccb2af69f51" name="Default Changelist" comment="">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/.idea/.name" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.name" afterDir="false" />
|
|
8
9
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
9
10
|
</list>
|
|
10
11
|
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -18,56 +19,26 @@
|
|
|
18
19
|
<component name="MarkdownSettingsMigration">
|
|
19
20
|
<option name="stateVersion" value="1" />
|
|
20
21
|
</component>
|
|
21
|
-
<component name="ProjectColorInfo">{
|
|
22
|
-
"customColor": "",
|
|
23
|
-
"associatedIndex": 1
|
|
24
|
-
}</component>
|
|
25
22
|
<component name="ProjectId" id="1lvnBJlaAtiGi5odcdKm2XAaTM0" />
|
|
26
23
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
27
24
|
<component name="ProjectViewState">
|
|
28
25
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
29
26
|
<option name="showLibraryContents" value="true" />
|
|
30
27
|
</component>
|
|
31
|
-
<component name="PropertiesComponent"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}</component>
|
|
44
|
-
<component name="RunManager" selected="Python.CopyAndPasterFromFolderA">
|
|
45
|
-
<configuration name="CopyAndPasterFromFolderA" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
|
46
|
-
<module name="openTEPES" />
|
|
47
|
-
<option name="ENV_FILES" value="" />
|
|
48
|
-
<option name="INTERPRETER_OPTIONS" value="" />
|
|
49
|
-
<option name="PARENT_ENVS" value="true" />
|
|
50
|
-
<envs>
|
|
51
|
-
<env name="PYTHONUNBUFFERED" value="1" />
|
|
52
|
-
</envs>
|
|
53
|
-
<option name="SDK_HOME" value="" />
|
|
54
|
-
<option name="SDK_NAME" value="C:\Users\ealvarezq\AppData\Local\miniconda3" />
|
|
55
|
-
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../../JointResearch/05. Models/06.Benchmarking" />
|
|
56
|
-
<option name="IS_MODULE_SDK" value="false" />
|
|
57
|
-
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
58
|
-
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
59
|
-
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/../../JointResearch/05. Models/06.Benchmarking/CopyAndPasterFromFolderA.py" />
|
|
60
|
-
<option name="PARAMETERS" value="" />
|
|
61
|
-
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
62
|
-
<option name="EMULATE_TERMINAL" value="false" />
|
|
63
|
-
<option name="MODULE_MODE" value="false" />
|
|
64
|
-
<option name="REDIRECT_INPUT" value="false" />
|
|
65
|
-
<option name="INPUT_FILE" value="" />
|
|
66
|
-
<method v="2" />
|
|
67
|
-
</configuration>
|
|
28
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
29
|
+
"keyToString": {
|
|
30
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
31
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
32
|
+
"WebServerToolWindowFactoryState": "false",
|
|
33
|
+
"node.js.detected.package.eslint": "true",
|
|
34
|
+
"node.js.detected.package.tslint": "true",
|
|
35
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
36
|
+
"node.js.selected.package.tslint": "(autodetect)"
|
|
37
|
+
}
|
|
38
|
+
}]]></component>
|
|
39
|
+
<component name="RunManager" selected="Python.openTEPES_Main">
|
|
68
40
|
<configuration name="Tool_openTEPES_TO_IAMC" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
|
69
41
|
<module name="openTEPES" />
|
|
70
|
-
<option name="ENV_FILES" value="" />
|
|
71
42
|
<option name="INTERPRETER_OPTIONS" value="" />
|
|
72
43
|
<option name="PARENT_ENVS" value="true" />
|
|
73
44
|
<envs>
|
|
@@ -90,7 +61,6 @@
|
|
|
90
61
|
</configuration>
|
|
91
62
|
<configuration name="aaa" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
|
92
63
|
<module name="openTEPES" />
|
|
93
|
-
<option name="ENV_FILES" value="" />
|
|
94
64
|
<option name="INTERPRETER_OPTIONS" value="" />
|
|
95
65
|
<option name="PARENT_ENVS" value="true" />
|
|
96
66
|
<envs>
|
|
@@ -113,7 +83,6 @@
|
|
|
113
83
|
</configuration>
|
|
114
84
|
<configuration name="openTEPES" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
|
115
85
|
<module name="openTEPES" />
|
|
116
|
-
<option name="ENV_FILES" value="" />
|
|
117
86
|
<option name="INTERPRETER_OPTIONS" value="" />
|
|
118
87
|
<option name="PARENT_ENVS" value="true" />
|
|
119
88
|
<envs>
|
|
@@ -136,7 +105,6 @@
|
|
|
136
105
|
</configuration>
|
|
137
106
|
<configuration name="openTEPES_Main" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
|
138
107
|
<module name="openTEPES" />
|
|
139
|
-
<option name="ENV_FILES" value="" />
|
|
140
108
|
<option name="INTERPRETER_OPTIONS" value="" />
|
|
141
109
|
<option name="PARENT_ENVS" value="true" />
|
|
142
110
|
<envs>
|
|
@@ -158,7 +126,6 @@
|
|
|
158
126
|
<method v="2" />
|
|
159
127
|
</configuration>
|
|
160
128
|
<list>
|
|
161
|
-
<item itemvalue="Python.CopyAndPasterFromFolderA" />
|
|
162
129
|
<item itemvalue="Python.Tool_openTEPES_TO_IAMC" />
|
|
163
130
|
<item itemvalue="Python.aaa" />
|
|
164
131
|
<item itemvalue="Python.openTEPES" />
|
|
@@ -166,21 +133,14 @@
|
|
|
166
133
|
</list>
|
|
167
134
|
<recent_temporary>
|
|
168
135
|
<list>
|
|
169
|
-
<item itemvalue="Python.CopyAndPasterFromFolderA" />
|
|
170
136
|
<item itemvalue="Python.openTEPES_Main" />
|
|
171
137
|
<item itemvalue="Python.aaa" />
|
|
172
138
|
<item itemvalue="Python.openTEPES_Main" />
|
|
173
139
|
<item itemvalue="Python.aaa" />
|
|
140
|
+
<item itemvalue="Python.Tool_openTEPES_TO_IAMC" />
|
|
174
141
|
</list>
|
|
175
142
|
</recent_temporary>
|
|
176
143
|
</component>
|
|
177
|
-
<component name="SharedIndexes">
|
|
178
|
-
<attachedChunks>
|
|
179
|
-
<set>
|
|
180
|
-
<option value="bundled-python-sdk-09665e90c3a7-d3b881c8e49f-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-233.15026.15" />
|
|
181
|
-
</set>
|
|
182
|
-
</attachedChunks>
|
|
183
|
-
</component>
|
|
184
144
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
185
145
|
<component name="SvnConfiguration">
|
|
186
146
|
<configuration />
|
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.17.
|
|
17
|
+
__version__ = "4.17.5rc2"
|
|
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) - August 08, 2024
|
|
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.17.4 -
|
|
43
|
-
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.4 -
|
|
42
|
+
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.4 - August 08, 2024')
|
|
43
|
+
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.4 - August 08, 2024', file=open(_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]
|
|
@@ -142,14 +142,14 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
142
142
|
|
|
143
143
|
if pIndLogConsole == 1:
|
|
144
144
|
StartTime = time.time()
|
|
145
|
-
mTEPES.write(_path+'/openTEPES_'+CaseName+'_'+str(p)+'_'+str(sc)+'.lp', io_options={'symbolic_solver_labels': True})
|
|
145
|
+
mTEPES.write(_path+'/openTEPES_'+CaseName+'_'+str(p)+'_'+str(sc)+'_'+str(st)+'.lp', io_options={'symbolic_solver_labels': True})
|
|
146
146
|
WritingLPFileTime = time.time() - StartTime
|
|
147
147
|
StartTime = time.time()
|
|
148
148
|
print('Writing LP file ... ', round(WritingLPFileTime), 's')
|
|
149
149
|
|
|
150
150
|
# there are no expansion decisions, or they are ignored (it is an operation planning model)
|
|
151
151
|
mTEPES.pScenProb[p,sc] = 1.0
|
|
152
|
-
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc)
|
|
152
|
+
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc, st)
|
|
153
153
|
mTEPES.pScenProb[p,sc] = 0.0
|
|
154
154
|
# deactivate the constraints of the previous period and scenario
|
|
155
155
|
for c in mTEPES.component_objects(pyo.Constraint, active=True):
|
|
@@ -187,13 +187,13 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
|
|
|
187
187
|
|
|
188
188
|
if pIndLogConsole == 1:
|
|
189
189
|
StartTime = time.time()
|
|
190
|
-
mTEPES.write(_path+'/openTEPES_'+CaseName+'_'+str(p)+'_'+str(sc)+'.lp', io_options={'symbolic_solver_labels': True})
|
|
190
|
+
mTEPES.write(_path+'/openTEPES_'+CaseName+'_'+str(p)+'_'+str(sc)+'_'+str(st)+'.lp', io_options={'symbolic_solver_labels': True})
|
|
191
191
|
WritingLPFileTime = time.time() - StartTime
|
|
192
192
|
StartTime = time.time()
|
|
193
193
|
print('Writing LP file ... ', round(WritingLPFileTime), 's')
|
|
194
194
|
|
|
195
195
|
# there are investment decisions (it is an expansion and operation planning model)
|
|
196
|
-
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc)
|
|
196
|
+
ProblemSolving(DirName, CaseName, SolverName, mTEPES, mTEPES, pIndLogConsole, p, sc, st)
|
|
197
197
|
|
|
198
198
|
mTEPES.del_component(mTEPES.st)
|
|
199
199
|
mTEPES.del_component(mTEPES.n )
|
openTEPES/openTEPES_Main.py
CHANGED
|
@@ -685,7 +685,7 @@ import time
|
|
|
685
685
|
# import pkg_resources
|
|
686
686
|
from .openTEPES import openTEPES_run
|
|
687
687
|
|
|
688
|
-
print('\033[1;32mOpen Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.4 -
|
|
688
|
+
print('\033[1;32mOpen Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.4 - August 08, 2024\033[0m')
|
|
689
689
|
print('\033[34m#### Academic research license - for non-commercial use only ####\033[0m \n')
|
|
690
690
|
|
|
691
691
|
parser = argparse.ArgumentParser(description='Introducing main parameters...')
|
|
@@ -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) - August 08, 2024
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import time
|
|
@@ -1763,7 +1763,7 @@ def ReliabilityResults(DirName, CaseName, OptModel, mTEPES):
|
|
|
1763
1763
|
|
|
1764
1764
|
# Determination of the net demand
|
|
1765
1765
|
if len(mTEPES.re):
|
|
1766
|
-
OutputToFile1 = pd.Series(data=[sum(OptModel.vTotalOutput[p,sc,n,re]() for re in r2r[rt] if (p,re) in mTEPES.pre) for p,sc,n,nd in mTEPES.psnnd], index=pd.Index(mTEPES.psnnd))
|
|
1766
|
+
OutputToFile1 = pd.Series(data=[sum(OptModel.vTotalOutput[p,sc,n,re]() for rt in mTEPES.rt for re in r2r[rt] if (p,re) in mTEPES.pre) for p,sc,n,nd in mTEPES.psnnd], index=pd.Index(mTEPES.psnnd))
|
|
1767
1767
|
else:
|
|
1768
1768
|
OutputToFile1 = pd.Series(data=[0.0 for p,sc,n,nd in mTEPES.psnnd], index=pd.Index(mTEPES.psnnd))
|
|
1769
1769
|
OutputToFile2 = pd.Series(data=[ mTEPES.pDemandElec [p,sc,n,nd] for p,sc,n,nd in mTEPES.psnnd], index=pd.Index(mTEPES.psnnd))
|
|
@@ -1902,12 +1902,12 @@ def EconomicResults(DirName, CaseName, OptModel, mTEPES, pIndAreaOutput, pIndPlo
|
|
|
1902
1902
|
OutputResults02 = pd.Series(data=[ sum(OptModel.vTotalOutput [p,sc,n,re ]()*mTEPES.pLoadLevelDuration[p,sc,n]() for re in r2n[nd] if (p,re) in mTEPES.pre and re in r2r[rt] ) for p,sc,n,ar,nd,rt in sPSNARNDRT], index=pd.Index(sPSNARNDRT)).to_frame(name='Generation' ).reset_index().pivot_table(index=['level_0','level_1','level_2','level_3','level_4'], columns='level_5', values='Generation' , aggfunc='sum')
|
|
1903
1903
|
if len(mTEPES.eh):
|
|
1904
1904
|
OutputResults03 = pd.Series(data=[ sum(OptModel.vTotalOutput [p,sc,n,eh ]()*mTEPES.pLoadLevelDuration[p,sc,n]() for eh in e2n[nd] if (p,eh) in mTEPES.peh and eh in e2e[et] ) for p,sc,n,ar,nd,et in sPSNARNDET], index=pd.Index(sPSNARNDET)).to_frame(name='Generation' ).reset_index().pivot_table(index=['level_0','level_1','level_2','level_3','level_4'], columns='level_5', values='Generation' , aggfunc='sum')
|
|
1905
|
-
OutputResults04 = pd.Series(data=[-sum(OptModel.vESSTotalCharge[p,sc,n,eh ]()*mTEPES.pLoadLevelDuration[p,sc,n]() for eh in e2n[nd] if (p,eh) in mTEPES.peh and eh in e2e[et] ) for p,sc,n,ar,nd,et in sPSNARNDET], index=pd.Index(sPSNARNDET)).to_frame(name='Consumption' ).reset_index().pivot_table(index=['level_0','level_1','level_2','level_3','level_4'], columns='level_5', values='Consumption', aggfunc='sum')
|
|
1905
|
+
OutputResults04 = pd.Series(data=[-sum(OptModel.vESSTotalCharge[p,sc,n,eh ]()*mTEPES.pLoadLevelDuration[p,sc,n]() for eh in e2n[nd] if (p,eh) in mTEPES.peh and eh in e2e[et] ) for p,sc,n,ar,nd,et in sPSNARNDET], index=pd.Index(sPSNARNDET)).to_frame(name='Consumption' ).reset_index().pivot_table(index=['level_0','level_1','level_2','level_3','level_4'], columns='level_5', values='Consumption', aggfunc='sum').rename(columns={et: et+str(' -') for et in mTEPES.et})
|
|
1906
1906
|
OutputResults05 = pd.Series(data=[ OptModel.vENS [p,sc,n,nd ]()*mTEPES.pLoadLevelDuration[p,sc,n]() for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='EnergyNotServed')
|
|
1907
1907
|
OutputResults06 = pd.Series(data=[- mTEPES.pDemandElec [p,sc,n,nd ] *mTEPES.pLoadLevelDuration[p,sc,n]() for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='EnergyDemand' )
|
|
1908
1908
|
OutputResults07 = pd.Series(data=[-sum(OptModel.vFlowElec [p,sc,n,nd,nf,cc]()*mTEPES.pLoadLevelDuration[p,sc,n]() for nf,cc in lout [nd]) for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='EnergyFlowOut' )
|
|
1909
1909
|
OutputResults08 = pd.Series(data=[ sum(OptModel.vFlowElec [p,sc,n,ni,nd,cc]()*mTEPES.pLoadLevelDuration[p,sc,n]() for ni,cc in lin [nd]) for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='EnergyFlowIn' )
|
|
1910
|
-
# OutputResults09 = pd.Series(data=[ ar
|
|
1910
|
+
# OutputResults09 = pd.Series(data=[ ar for ar in mTEPES.ar for p,sc,n,ar,nd in sPSNND if (nd,ar) in mTEPES.ndar], index=pd.Index(sPSNARND )).to_frame(name='Area' )
|
|
1911
1911
|
if len(mTEPES.ll):
|
|
1912
1912
|
OutputResults09 = pd.Series(data=[-sum(OptModel.vLineLosses [p,sc,n,nd,nf,cc]()*mTEPES.pLoadLevelDuration[p,sc,n]() for nf,cc in loutl[nd]) for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='LineLossesOut' )
|
|
1913
1913
|
OutputResults10 = pd.Series(data=[-sum(OptModel.vLineLosses [p,sc,n,ni,nd,cc]()*mTEPES.pLoadLevelDuration[p,sc,n]() for ni,cc in linl [nd]) for p,sc,n,ar,nd in sPSNARND ], index=pd.Index(sPSNARND )).to_frame(name='LineLossesIn' )
|
|
@@ -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) - August 01, 2024
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import time
|
|
@@ -12,7 +12,7 @@ from pyomo.opt import SolverFactory, SolverStatus, TerminationCond
|
|
|
12
12
|
from pyomo.util.infeasible import log_infeasible_constraints
|
|
13
13
|
from pyomo.environ import Suffix
|
|
14
14
|
|
|
15
|
-
def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConsole, p, sc):
|
|
15
|
+
def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConsole, p, sc, st):
|
|
16
16
|
print('Problem solving ****')
|
|
17
17
|
_path = os.path.join(DirName, CaseName)
|
|
18
18
|
StartTime = time.time()
|
|
@@ -138,13 +138,19 @@ def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConso
|
|
|
138
138
|
for index in con:
|
|
139
139
|
pDuals[str(con.name)+str(index)] = OptModel.dual[con[index]]
|
|
140
140
|
|
|
141
|
-
# delete dual and rc suffixes if they exist
|
|
142
|
-
if idx > 0:
|
|
143
|
-
OptModel.del_component(OptModel.dual)
|
|
144
|
-
OptModel.del_component(OptModel.rc )
|
|
145
|
-
|
|
146
141
|
mTEPES.pDuals.update(pDuals)
|
|
147
142
|
|
|
143
|
+
# save values of each stage
|
|
144
|
+
for n in mTEPES.n:
|
|
145
|
+
OptModel.vTotalGCost[p,sc,n].fix(OptModel.vTotalGCost[p,sc,n]())
|
|
146
|
+
OptModel.vTotalCCost[p,sc,n].fix(OptModel.vTotalCCost[p,sc,n]())
|
|
147
|
+
OptModel.vTotalECost[p,sc,n].fix(OptModel.vTotalECost[p,sc,n]())
|
|
148
|
+
OptModel.vTotalRCost[p,sc,n].fix(OptModel.vTotalRCost[p,sc,n]())
|
|
149
|
+
|
|
150
|
+
# delete dual and rc suffixes
|
|
151
|
+
OptModel.del_component(OptModel.dual)
|
|
152
|
+
OptModel.del_component(OptModel.rc )
|
|
153
|
+
|
|
148
154
|
SolvingTime = time.time() - StartTime
|
|
149
155
|
|
|
150
156
|
#%% writing the results
|
|
@@ -153,7 +159,7 @@ def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConso
|
|
|
153
159
|
print (' Total system cost [MEUR] ', OptModel.vTotalSCost())
|
|
154
160
|
if mTEPES.NoRepetition == 1:
|
|
155
161
|
for pp,scc in mTEPES.ps:
|
|
156
|
-
print ('***** Period: '+str(pp)+', Scenario: '+str(scc)+' ******')
|
|
162
|
+
print ('***** Period: '+str(pp)+', Scenario: '+str(scc)+', Stage: '+str(st)+' ******')
|
|
157
163
|
print (' Total generation investment cost [MEUR] ', sum(mTEPES.pDiscountedWeight[pp] * mTEPES.pGenInvestCost [gc ] * OptModel.vGenerationInvest[pp,gc ]() for gc in mTEPES.gc if (pp,gc) in mTEPES.pgc))
|
|
158
164
|
print (' Total generation retirement cost [MEUR] ', sum(mTEPES.pDiscountedWeight[pp] * mTEPES.pGenRetireCost [gd ] * OptModel.vGenerationRetire[pp,gd ]() for gd in mTEPES.gd if (pp,gd) in mTEPES.pgd))
|
|
159
165
|
if mTEPES.pIndHydroTopology == 1 and len(mTEPES.rn):
|
|
@@ -174,7 +180,7 @@ def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConso
|
|
|
174
180
|
print (' Total emission cost [MEUR] ', sum(mTEPES.pDiscountedWeight[pp] * mTEPES.pScenProb [pp,scc ]() * OptModel.vTotalECost [pp,scc,n ]() for n in mTEPES.n ))
|
|
175
181
|
print (' Total reliability cost [MEUR] ', sum(mTEPES.pDiscountedWeight[pp] * mTEPES.pScenProb [pp,scc ]() * OptModel.vTotalRCost [pp,scc,n ]() for n in mTEPES.n ))
|
|
176
182
|
else:
|
|
177
|
-
print ('***** Period: '+str(p)+', Scenario: '+str(sc)+' ******')
|
|
183
|
+
print ('***** Period: '+str(p)+', Scenario: '+str(sc)+', Stage: '+str(st)+' ******')
|
|
178
184
|
print (' Total generation investment cost [MEUR] ', sum(mTEPES.pDiscountedWeight[p] * mTEPES.pGenInvestCost [gc ] * OptModel.vGenerationInvest[p,gc ]() for gc in mTEPES.gc if (p,gc) in mTEPES.pgc))
|
|
179
185
|
print (' Total generation retirement cost [MEUR] ', sum(mTEPES.pDiscountedWeight[p] * mTEPES.pGenRetireCost [gd ] * OptModel.vGenerationRetire[p,gd ]() for gd in mTEPES.gd if (p,gd) in mTEPES.pgd))
|
|
180
186
|
if mTEPES.pIndHydroTopology == 1 and len(mTEPES.rn):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: openTEPES
|
|
3
|
-
Version: 4.17.
|
|
3
|
+
Version: 4.17.5rc2
|
|
4
4
|
Summary: Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES)
|
|
5
5
|
Home-page: https://pascua.iit.comillas.edu/aramos/openTEPES/index.html
|
|
6
6
|
Author: IIT-EnergySystemModels
|
|
@@ -20,7 +20,7 @@ Requires-Dist: plotly>=5.7.0
|
|
|
20
20
|
Requires-Dist: colour>=0.1.5
|
|
21
21
|
Requires-Dist: altair>=5.0.0
|
|
22
22
|
Requires-Dist: psutil>=5.8.0
|
|
23
|
-
Requires-Dist: jsonschema
|
|
23
|
+
Requires-Dist: jsonschema>=4.16.0
|
|
24
24
|
Requires-Dist: networkx>=3.3
|
|
25
25
|
Requires-Dist: dill>=0.3.8
|
|
26
26
|
|
|
@@ -241,7 +241,7 @@ It can be run in Binder:
|
|
|
241
241
|
Expected Results
|
|
242
242
|
################
|
|
243
243
|
.. image:: doc/img/oT_Map_Network_TF2030.png
|
|
244
|
-
:
|
|
244
|
+
:width: 600px
|
|
245
245
|
:align: center
|
|
246
246
|
:alt: Network map with investment decisions
|
|
247
247
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
openTEPES/__init__.py,sha256=
|
|
1
|
+
openTEPES/__init__.py,sha256=QylSEh25tE9maUNmp4DEID30n6VIhPFyDD9uaXbcj-w,835
|
|
2
2
|
openTEPES/openTEPES.mapbox_token,sha256=xsXNkwGp2vzXqQy2zVkyLhhNcNWniK2BMeOFpc5SZHI,93
|
|
3
|
-
openTEPES/openTEPES.py,sha256=
|
|
3
|
+
openTEPES/openTEPES.py,sha256=QbA4ffGHY48kVBwG4zm8TnsXhy342YCdys2FNkECSbU,21136
|
|
4
4
|
openTEPES/openTEPES_InputData.py,sha256=izDfzCbzeytPM5XQtr6p0IbXSK2OGp2RLKKTPm_lrPA,211797
|
|
5
|
-
openTEPES/openTEPES_Main.py,sha256=
|
|
5
|
+
openTEPES/openTEPES_Main.py,sha256=z9N4CiJbUcbD5LB6mV-7legM1Yi_ZiNNKe4jTaicuH8,39831
|
|
6
6
|
openTEPES/openTEPES_ModelFormulation.py,sha256=B82tUDO3gJfAYi7VvivImsdI0qYAbDc4QtoYudIVFV4,112753
|
|
7
|
-
openTEPES/openTEPES_OutputResults.py,sha256=
|
|
8
|
-
openTEPES/openTEPES_ProblemSolving.py,sha256=
|
|
7
|
+
openTEPES/openTEPES_OutputResults.py,sha256=MxNiRVVIXlJOx9LDdEpLOMBKVf2Pe9s5_syXSk4_-M4,203160
|
|
8
|
+
openTEPES/openTEPES_ProblemSolving.py,sha256=wsFwr3gyH9vdNHstV7RwB-NRZrtftTBfXzuFf7zEg90,14722
|
|
9
9
|
openTEPES/.idea/.name,sha256=jiwfcnJ20wztcvpny4SHcqmAIWK-w5tCqN9TWf0GOkw,11
|
|
10
10
|
openTEPES/.idea/misc.xml,sha256=m4-3O284ZBS8WZSQD0QWwk8YjuQYz92w6kr7NRFNips,298
|
|
11
11
|
openTEPES/.idea/modules.xml,sha256=5XBWcjJ2MnJMJeZH6rMyzJfsThRQB2HhldeHDHucbJU,277
|
|
12
12
|
openTEPES/.idea/openTEPES.iml,sha256=VGjPvLKfujJGe8Mm8z7Q1C0Ah0VcSyr1mMGUmVcIeqE,441
|
|
13
13
|
openTEPES/.idea/vcs.xml,sha256=Bnjian1nX9rYz_tUojuaXHazN2QYgglSUnH_CG4d8c8,247
|
|
14
|
-
openTEPES/.idea/workspace.xml,sha256=
|
|
14
|
+
openTEPES/.idea/workspace.xml,sha256=hhranFjz0vMuPwrVKvJyzN9YgWRYifNqx3aeslts49o,9015
|
|
15
15
|
openTEPES/.idea/inspectionProfiles/profiles_settings.xml,sha256=AVZznobTk8uQX1ggX2YWCr1UJ0mRdBWsO1FVJhUorgs,179
|
|
16
16
|
openTEPES/9n/oT_Data_Demand_9n.csv,sha256=dPjtjKoRu6sQ7Jjwe6qpiyHh9XRoWO7ooShpBQgOyoA,1196537
|
|
17
17
|
openTEPES/9n/oT_Data_Duration_9n.csv,sha256=uduXkV_fE7Vd9cNYdik14_b7NZgm5pqusoTAC6Z1Zo4,331987
|
|
@@ -334,8 +334,8 @@ openTEPES/sSEP/oT_Dict_Storage_sSEP.csv,sha256=H2rJXZvoMuT-25sI2GpG8IuiNKD-dxuty
|
|
|
334
334
|
openTEPES/sSEP/oT_Dict_Technology_sSEP.csv,sha256=MCTpplzz7_eVPKQfOw35c86ib6CTtW6UK6JrbCJ8wls,170
|
|
335
335
|
openTEPES/sSEP/oT_Dict_ZoneToArea_sSEP.csv,sha256=AUDCs5Bg6sw9f2pVjGP1o4IJjXFF_VrokOGf_V3QsEI,24
|
|
336
336
|
openTEPES/sSEP/oT_Dict_Zone_sSEP.csv,sha256=TBud-fvbFbiAsuutxTYe8wWlv_x1P8oyWXILMpYiXJc,13
|
|
337
|
-
opentepes-4.17.
|
|
338
|
-
opentepes-4.17.
|
|
339
|
-
opentepes-4.17.
|
|
340
|
-
opentepes-4.17.
|
|
341
|
-
opentepes-4.17.
|
|
337
|
+
opentepes-4.17.5rc2.dist-info/entry_points.txt,sha256=gNNPrDaTsRuRJXI1FLNgqMX1CiJ45bEp1dEDH7ZB8Oc,49
|
|
338
|
+
opentepes-4.17.5rc2.dist-info/LICENSE,sha256=4O7bphXVzRuYavtsWzpLGuM3E-fp3HTRna7F4yIfnS4,35184
|
|
339
|
+
opentepes-4.17.5rc2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
340
|
+
opentepes-4.17.5rc2.dist-info/METADATA,sha256=C-HpF69Pm1wMPcXm3sjNQFPwYCGb-aBhgC4vGM2grhU,17844
|
|
341
|
+
opentepes-4.17.5rc2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|