openTEPES 4.17.5rc3__py3-none-any.whl → 4.17.6__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.
@@ -1,2 +1,2 @@
1
- ,,RESEnergy
1
+ ,,RESEnergy
2
2
  2030,Area1,1000
@@ -1,2 +1,2 @@
1
- ,IndBinGenInvest,IndBinGenRetirement,IndBinRsrInvest,IndBinNetInvest,IndBinNetH2Invest,IndBinNetHeatInvest,IndBinGenOperat,IndBinNetLosses,IndBinLineCommit,IndBinSingleNode,IndBinGenRamps,IndBinGenMinTime
2
- Options,0,0,0,0,0,0,0,1,0,0,0,0
1
+ ,IndBinGenInvest,IndBinGenRetirement,IndBinRsrInvest,IndBinNetInvest,IndBinNetH2Invest,IndBinNetHeatInvest,IndBinGenOperat,IndBinNetLosses,IndBinLineCommit,IndBinSingleNode,IndBinGenRamps,IndBinGenMinTime
2
+ Options,0,0,0,0,0,0,0,1,0,0,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.17.5rc3"
17
+ __version__ = "4.17.6"
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) - September 02, 2024
2
+ Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - September 18, 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 - 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'))
42
+ mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.6 - September 18, 2024')
43
+ print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.6 - September 18, 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]
@@ -1,5 +1,5 @@
1
1
  """
2
- Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - July 19, 2024
2
+ Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - September 18, 2024
3
3
  """
4
4
 
5
5
  import datetime
@@ -565,7 +565,7 @@ def InputData(DirName, CaseName, mTEPES, pIndLogConsole):
565
565
  mTEPES.st = Set(initialize=mTEPES.stt, ordered=True , doc='stages' , filter=lambda mTEPES,stt : stt in mTEPES.stt and pStageWeight [stt] > 0.0)
566
566
  mTEPES.n = Set(initialize=mTEPES.nn, ordered=True , doc='load levels' , filter=lambda mTEPES,nn : nn in mTEPES.nn and sum(pDuration [p,sc,nn] for p,sc in mTEPES.ps) > 0)
567
567
  mTEPES.n2 = Set(initialize=mTEPES.nn, ordered=True , doc='load levels' , filter=lambda mTEPES,nn : nn in mTEPES.nn and sum(pDuration [p,sc,nn] for p,sc in mTEPES.ps) > 0)
568
- mTEPES.g = Set(initialize=mTEPES.gg, ordered=False, doc='generating units' , filter=lambda mTEPES,gg : gg in mTEPES.gg and (pRatedMaxPowerElec [gg] > 0.0 or pRatedMaxCharge[gg] > 0.0 or pRatedMaxPowerHeat [gg] > 0.0) and pElecGenPeriodIni[gg] <= mTEPES.p.last() and pElecGenPeriodFin[gg] >= mTEPES.p.first() and pGenToNode.reset_index().set_index(['index']).isin(mTEPES.nd)['Node'][gg]) # excludes generators with empty node
568
+ mTEPES.g = Set(initialize=mTEPES.gg, ordered=True , doc='generating units' , filter=lambda mTEPES,gg : gg in mTEPES.gg and (pRatedMaxPowerElec [gg] > 0.0 or pRatedMaxCharge[gg] > 0.0 or pRatedMaxPowerHeat [gg] > 0.0) and pElecGenPeriodIni[gg] <= mTEPES.p.last() and pElecGenPeriodFin[gg] >= mTEPES.p.first() and pGenToNode.reset_index().set_index(['index']).isin(mTEPES.nd)['Node'][gg]) # excludes generators with empty node
569
569
  mTEPES.t = Set(initialize=mTEPES.g , ordered=False, doc='thermal units' , filter=lambda mTEPES,g : g in mTEPES.g and pRatedLinearOperCost[g ] > 0.0)
570
570
  mTEPES.re = Set(initialize=mTEPES.g , ordered=False, doc='RES units' , filter=lambda mTEPES,g : g in mTEPES.g and pRatedLinearOperCost[g ] == 0.0 and pRatedMaxStorage[g] == 0.0 and pProductionFunctionH2[g ] == 0.0 and pProductionFunctionHeat[g ] == 0.0 and pProductionFunctionHydro[g ] == 0.0)
571
571
  mTEPES.es = Set(initialize=mTEPES.g , ordered=False, doc='ESS units' , filter=lambda mTEPES,g : g in mTEPES.g and (pRatedMaxCharge[g ] > 0.0 or pRatedMaxStorage[g] > 0.0 or pProductionFunctionH2[g ] > 0.0 or pProductionFunctionHeat[g ] > 0.0) and pProductionFunctionHydro[g ] == 0.0)
@@ -824,6 +824,8 @@ def InputData(DirName, CaseName, mTEPES, pIndLogConsole):
824
824
  mTEPES.a2g = Set(initialize=mTEPES.ar*mTEPES.g, ordered=False, doc='area to generator', filter=lambda mTEPES,ar,g: (ar,g) in pArea2Gen )
825
825
  mTEPES.r2g = Set(initialize=mTEPES.rg*mTEPES.g, ordered=False, doc='region to generator', filter=lambda mTEPES,rg,g: (rg,g) in pRegion2Gen)
826
826
 
827
+ # mTEPES.z2g = Set(initialize = [(zn,g) for zn,g in mTEPES.zn*mTEPES.g if (zn,g) in pZone2Gen])
828
+
827
829
  #%% inverse index generator to technology
828
830
  pTechnologyToGen = pGenToTechnology.reset_index().set_index('Technology').set_axis(['Generator'], axis=1)[['Generator']]
829
831
  pTechnologyToGen = pTechnologyToGen.loc[pTechnologyToGen['Generator'].isin(mTEPES.g)].reset_index().set_index(['Technology', 'Generator'])
@@ -1237,6 +1239,11 @@ def InputData(DirName, CaseName, mTEPES, pIndLogConsole):
1237
1239
  pStartUpCost.update (pd.Series([0.0 for nr in mTEPES.nr if pStartUpCost [nr] < pEpsilon], index=[nr for nr in mTEPES.nr if pStartUpCost [nr] < pEpsilon]))
1238
1240
  pShutDownCost.update (pd.Series([0.0 for nr in mTEPES.nr if pShutDownCost [nr] < pEpsilon], index=[nr for nr in mTEPES.nr if pShutDownCost [nr] < pEpsilon]))
1239
1241
 
1242
+ # this rated linear variable cost y going to be used to order the generating units
1243
+ # we include a small term to avoid stochastic behavior due to equal values
1244
+ for g in mTEPES.g:
1245
+ pRatedLinearVarCost[g] += 1e-3*pEpsilon*mTEPES.g.ord(g)
1246
+
1240
1247
  # BigM maximum flow to be used in the Kirchhoff's 2nd law disjunctive constraint
1241
1248
  pBigMFlowBck = pLineNTCBck*0.0
1242
1249
  pBigMFlowFrw = pLineNTCFrw*0.0
@@ -1983,9 +1990,9 @@ def SettingUpVariables(OptModel, mTEPES):
1983
1990
  nFixedVariables += nFixedGeneratorCommits
1984
1991
  # thermal and RES units ordered by increasing variable operation cost, excluding reactive generating units
1985
1992
  if len(mTEPES.tq):
1986
- mTEPES.go = [k for k in sorted(mTEPES.pRatedLinearVarCost, key=mTEPES.pRatedLinearVarCost.__getitem__) if k not in mTEPES.sq]
1993
+ mTEPES.go = Set(initialize=[g for g in sorted(mTEPES.pRatedLinearVarCost, key=mTEPES.pRatedLinearVarCost.__getitem__) if g not in mTEPES.sq])
1987
1994
  else:
1988
- mTEPES.go = [k for k in sorted(mTEPES.pRatedLinearVarCost, key=mTEPES.pRatedLinearVarCost.__getitem__) ]
1995
+ mTEPES.go = Set(initialize=[g for g in sorted(mTEPES.pRatedLinearVarCost, key=mTEPES.pRatedLinearVarCost.__getitem__) if g not in mTEPES.eh])
1989
1996
 
1990
1997
  for p,sc,st in mTEPES.ps*mTEPES.stt:
1991
1998
  # activate only period, scenario, and load levels to formulate
@@ -1995,7 +2002,7 @@ def SettingUpVariables(OptModel, mTEPES):
1995
2002
  mTEPES.n = Set(initialize=mTEPES.nn , ordered=True, doc='load levels', filter=lambda mTEPES,nn : nn in mTEPES.nn and (p,sc,st,nn) in mTEPES.s2n)
1996
2003
 
1997
2004
  if len(mTEPES.n):
1998
- mTEPES.psn1 = Set(initialize=[(p, sc, n) for p, sc, n in mTEPES.ps * mTEPES.n])
2005
+ mTEPES.psn1 = Set(initialize=[(p,sc,n) for p,sc,n in mTEPES.ps*mTEPES.n])
1999
2006
  # determine the first load level of each stage
2000
2007
  n1 = next(iter(mTEPES.psn1))
2001
2008
  # commit the units and their output at the first load level of each stage
@@ -2016,7 +2023,7 @@ def SettingUpVariables(OptModel, mTEPES):
2016
2023
  else:
2017
2024
  mTEPES.pInitialOutput[n1,go] = mTEPES.pMinPowerElec[n1,go]
2018
2025
  mTEPES.pInitialUC[n1,go] = 1
2019
- pSystemOutput = pSystemOutput + mTEPES.pInitialOutput[n1,go]()
2026
+ pSystemOutput += mTEPES.pInitialOutput[n1,go]()
2020
2027
 
2021
2028
  # determine the initial committed lines
2022
2029
  for la in mTEPES.la:
@@ -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 - September 02, 2024\033[0m')
688
+ print('\033[1;32mOpen Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.17.6 - September 18, 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...')
@@ -1056,7 +1056,7 @@ def GenerationOperationModelFormulationRampMinTime(OptModel, mTEPES, pIndLogCons
1056
1056
  if pIndLogConsole == 1:
1057
1057
  print('eRampDwChr ... ', len(getattr(OptModel, 'eRampDwChr_'+str(p)+'_'+str(sc)+'_'+str(st))), ' rows')
1058
1058
 
1059
- # the small tolerance pEpsilon=1e-5 is added to detect if the generator is ramping up/down
1059
+ # the small tolerance pEpsilon=5e-2 is added to detect if the generator is ramping up/down
1060
1060
  pEpsilon = 5e-2
1061
1061
  def eRampUpState(OptModel,n,nr):
1062
1062
  if (p,nr) in mTEPES.pnr:
@@ -1,5 +1,5 @@
1
1
  """
2
- Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - August 08, 2024
2
+ Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - September 12, 2024
3
3
  """
4
4
 
5
5
  import time
@@ -1592,7 +1592,7 @@ def MarginalResults(DirName, CaseName, OptModel, mTEPES, pIndPlotOutput):
1592
1592
  pEpsilon = 1e-6
1593
1593
 
1594
1594
  #%% outputting the incremental variable cost of each generating unit (neither ESS nor boilers) with power surplus
1595
- sPSNG = [(p,sc,n,g) for p,sc,n,g in mTEPES.psng if g not in mTEPES.es and g not in mTEPES.bo]
1595
+ sPSNG = [(p,sc,n,g) for p,sc,n,g in mTEPES.psng if g not in mTEPES.eh and g not in mTEPES.bo]
1596
1596
  OutputToFile = pd.Series(data=[(mTEPES.pLinearVarCost[p,sc,n,g]+mTEPES.pEmissionVarCost[p,sc,n,g]) if OptModel.vTotalOutput[p,sc,n,g].ub - OptModel.vTotalOutput[p,sc,n,g]() > pEpsilon else math.inf for p,sc,n,g in sPSNG], index=pd.Index(sPSNG))
1597
1597
  OutputToFile *= 1e3
1598
1598
 
@@ -0,0 +1,68 @@
1
+ import subprocess
2
+ import shlex
3
+ import os
4
+
5
+ ROOT_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
6
+
7
+
8
+ def cmd(cmd, cwd=ROOT_DIR) -> str:
9
+ """
10
+ Executes a shell command in a subprocess and returns its output as a string.
11
+
12
+ Args:
13
+ cmd (str): The shell command to execute.
14
+ cwd (str): The directory where the command should be executed. Defaults to ROOT_DIR.
15
+
16
+ Returns:
17
+ str: The output of the command, decoded to a string and stripped of trailing whitespace.
18
+ If the command fails, an empty string is returned.
19
+ """
20
+ output = ""
21
+ try:
22
+ output = (
23
+ subprocess.check_output(shlex.split(cmd), cwd=cwd, stderr=subprocess.STDOUT)
24
+ .decode()
25
+ .strip()
26
+ )
27
+ except Exception as _:
28
+ ...
29
+ return output
30
+
31
+
32
+ def last_commit_id(cwd=ROOT_DIR) -> str:
33
+ """
34
+ Retrieves the last Git commit ID for the given folder.
35
+
36
+ Args:
37
+ cwd (str): The directory where the Git command should be executed. Defaults to ROOT_DIR.
38
+
39
+ Returns:
40
+ str: The Git commit ID, or a string indicating if the working tree is dirty.
41
+ """
42
+ return cmd("git describe --always --dirty", cwd=cwd)
43
+
44
+
45
+ def branch(cwd=ROOT_DIR) -> str:
46
+ """
47
+ Retrieves the current Git branch name for the given folder.
48
+
49
+ Args:
50
+ cwd (str): The directory where the Git command should be executed. Defaults to ROOT_DIR.
51
+
52
+ Returns:
53
+ str: The current Git branch name.
54
+ """
55
+ return cmd("git rev-parse --abbrev-ref HEAD", cwd=cwd)
56
+
57
+
58
+ def get_git_version(cwd=ROOT_DIR) -> str:
59
+ """
60
+ Constructs the Git version string by combining the last commit ID and the current branch name.
61
+
62
+ Args:
63
+ cwd (str): The directory where the Git commands should be executed. Defaults to ROOT_DIR.
64
+
65
+ Returns:
66
+ str: A string in the format "<commit_id>-<branch_name>".
67
+ """
68
+ return f"{last_commit_id(cwd)}-{branch(cwd)}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openTEPES
3
- Version: 4.17.5rc3
3
+ Version: 4.17.6
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
@@ -25,7 +25,7 @@ Requires-Dist: networkx>=3.3
25
25
  Requires-Dist: dill>=0.3.8
26
26
 
27
27
 
28
- .. image:: https://github.com/IIT-EnergySystemModels/openTEPES/blob/master/doc/img/openTEPES.png
28
+ .. image:: https://pascua.iit.comillas.edu/aramos/openTEPES.png
29
29
  :target: https://pascua.iit.comillas.edu/aramos/openTEPES/index.html
30
30
  :alt: logo
31
31
  :align: center
@@ -1,11 +1,12 @@
1
- openTEPES/__init__.py,sha256=R-8V2LE1omLoAjE7Qg-Xc33zQ6Ayahuuhc9HsfeJ3IU,835
1
+ openTEPES/__init__.py,sha256=fhwOJ-2xGRRdp7yCQNdiqKmoqVEIali-zAANWXPVHho,832
2
2
  openTEPES/openTEPES.mapbox_token,sha256=xsXNkwGp2vzXqQy2zVkyLhhNcNWniK2BMeOFpc5SZHI,93
3
- openTEPES/openTEPES.py,sha256=xC1V16VMuF959VtYRmp95kJQXCeRh3A208gM8AXuE9s,21139
4
- openTEPES/openTEPES_InputData.py,sha256=izDfzCbzeytPM5XQtr6p0IbXSK2OGp2RLKKTPm_lrPA,211797
5
- openTEPES/openTEPES_Main.py,sha256=ABpSO8irtNTRRJPZloe1umMw8ErvcxIq9jFSoPiyIU4,39834
6
- openTEPES/openTEPES_ModelFormulation.py,sha256=B82tUDO3gJfAYi7VvivImsdI0qYAbDc4QtoYudIVFV4,112753
7
- openTEPES/openTEPES_OutputResults.py,sha256=MxNiRVVIXlJOx9LDdEpLOMBKVf2Pe9s5_syXSk4_-M4,203160
3
+ openTEPES/openTEPES.py,sha256=IgukztLMugmCa-ozAxZm6dAjd6Oqa-B9jAGGMC-7qrU,21145
4
+ openTEPES/openTEPES_InputData.py,sha256=zRfslChwhdqGQlESeISO5k7sYB3EKOyVtDpyQ3bgbeE,212186
5
+ openTEPES/openTEPES_Main.py,sha256=XByyTjmoyCLvfYzvJEfD6c54s6V9M8JQOxpGd9T1myM,39834
6
+ openTEPES/openTEPES_ModelFormulation.py,sha256=N9UERcDRHmH9hkXaqOLnE7015GAqg9RSdwP4GwtO8ZM,112753
7
+ openTEPES/openTEPES_OutputResults.py,sha256=W_oEYQb0L2EYFhbVlMldzXP214mJe6lggzAahrJnYtA,203163
8
8
  openTEPES/openTEPES_ProblemSolving.py,sha256=wsFwr3gyH9vdNHstV7RwB-NRZrtftTBfXzuFf7zEg90,14722
9
+ openTEPES/openTEPES_gitinfo.py,sha256=6fA1fa-JcyusSc_HcjPiCgnV9zn-fZwdG-kK0a5Fxc8,2004
9
10
  openTEPES/.idea/.name,sha256=jiwfcnJ20wztcvpny4SHcqmAIWK-w5tCqN9TWf0GOkw,11
10
11
  openTEPES/.idea/misc.xml,sha256=m4-3O284ZBS8WZSQD0QWwk8YjuQYz92w6kr7NRFNips,298
11
12
  openTEPES/.idea/modules.xml,sha256=5XBWcjJ2MnJMJeZH6rMyzJfsThRQB2HhldeHDHucbJU,277
@@ -27,7 +28,7 @@ openTEPES/9n/oT_Data_OperatingReserveUp_9n.csv,sha256=Db0lWL63oSGsdsXYDSveQYMgij
27
28
  openTEPES/9n/oT_Data_Option_9n.csv,sha256=ouGUVLRYbiqW38CbrNdfvmNiD34tLsyS0e0ft-xMVBo,239
28
29
  openTEPES/9n/oT_Data_Parameter_9n.csv,sha256=x3vVs9nElSFcTvVKCmolzhyLlMWdJOEZbM6sJs18k8o,232
29
30
  openTEPES/9n/oT_Data_Period_9n.csv,sha256=esleipBmJEKh_pPnwqfJXMy_BWFJBe88iofCBLQxnCE,20
30
- openTEPES/9n/oT_Data_RESEnergy_9n.csv,sha256=fzaMK1-C6JKMbtipPKO4Ck1uqCrdsYA1-YSSEubBdWw,33
31
+ openTEPES/9n/oT_Data_RESEnergy_9n.csv,sha256=XubGaoy8_52hEl4MmB7_bPA4bC8cwqvrLq_cPIUyWGw,30
31
32
  openTEPES/9n/oT_Data_ReserveMargin_9n.csv,sha256=5JYaMv-OSdi4WoWSSEkn6nBPUye9QxXOqOXSm2xrJN8,36
32
33
  openTEPES/9n/oT_Data_Scenario_9n.csv,sha256=G-kidq9YmyCLTWKr9wnc4vTz-2EXvnDtoVQ7Xe_0fkU,31
33
34
  openTEPES/9n/oT_Data_Stage_9n.csv,sha256=vHegWdEnTMu6EU__n3GoC7sY8dPlNJkD9maimbo1aGc,19
@@ -68,7 +69,7 @@ openTEPES/9n7y/oT_Data_Network_9n7y.csv,sha256=DeA_ywWHvwJ320cHWfypHqwCUjoH6HeF0
68
69
  openTEPES/9n7y/oT_Data_NodeLocation_9n7y.csv,sha256=muevfA9X-kL3l45Fre5Y4Jv0iH3Gj6vq6qHh4uoqjbA,299
69
70
  openTEPES/9n7y/oT_Data_OperatingReserveDown_9n7y.csv,sha256=Qn0_fW9Ly4mu4xw1XPfxcPJB4led4InaLYFXsUZ7cLs,2686680
70
71
  openTEPES/9n7y/oT_Data_OperatingReserveUp_9n7y.csv,sha256=Qn0_fW9Ly4mu4xw1XPfxcPJB4led4InaLYFXsUZ7cLs,2686680
71
- openTEPES/9n7y/oT_Data_Option_9n7y.csv,sha256=ouGUVLRYbiqW38CbrNdfvmNiD34tLsyS0e0ft-xMVBo,239
72
+ openTEPES/9n7y/oT_Data_Option_9n7y.csv,sha256=Bwa2MiQJ7pk-GEsjaE1duZkZQEIlhW2BeSdZG1dk9sA,237
72
73
  openTEPES/9n7y/oT_Data_Parameter_9n7y.csv,sha256=BSuKo6FXlJCiDRBtGbQIztLWIMfGXx9cwVFpSBQoXVk,232
73
74
  openTEPES/9n7y/oT_Data_Period_9n7y.csv,sha256=CMeEXcbYvkerdb4L50rnrKA3DV5QmbGP6h1WmdJFacw,68
74
75
  openTEPES/9n7y/oT_Data_RESEnergy_9n7y.csv,sha256=3sBOFBrRw6UiO8S2iQie5bR3aOC5xBgfYJhQucM--dI,187
@@ -217,22 +218,22 @@ openTEPES/RTS-GMLC_6y/oT_Data_VariableMinConsumption_RTS-GMLC_6y.csv,sha256=IOw8
217
218
  openTEPES/RTS-GMLC_6y/oT_Data_VariableMinEnergy_RTS-GMLC_6y.csv,sha256=IOw8FCVppeD10zitucrAFYqpZmzJoF9jK2fvvJfPo0s,12582160
218
219
  openTEPES/RTS-GMLC_6y/oT_Data_VariableMinGeneration_RTS-GMLC_6y.csv,sha256=IOw8FCVppeD10zitucrAFYqpZmzJoF9jK2fvvJfPo0s,12582160
219
220
  openTEPES/RTS-GMLC_6y/oT_Data_VariableMinStorage_RTS-GMLC_6y.csv,sha256=IOw8FCVppeD10zitucrAFYqpZmzJoF9jK2fvvJfPo0s,12582160
220
- openTEPES/RTS-GMLC_6y/oT_Dict_AreaToRegion_RTS-GMLC_6y.csv,sha256=AC7WhEMDMekOKE9-kUHV-Dy92zmWKo6-YNL9vyps_j8,64
221
- openTEPES/RTS-GMLC_6y/oT_Dict_Area_RTS-GMLC_6y.csv,sha256=VR1A8dGJ-9UcRtiyYaJwANd-7faXMtPggvkhNQ4RBf8,30
222
- openTEPES/RTS-GMLC_6y/oT_Dict_Circuit_RTS-GMLC_6y.csv,sha256=-5ia4UT_W0lrWYYVyFV9D6-q6nA93timI8MYf_XaWxY,33
221
+ openTEPES/RTS-GMLC_6y/oT_Dict_AreaToRegion_RTS-GMLC_6y.csv,sha256=eVY_4Mu1PTkNbvzIcqbYbpvT0rloVrphTB048YYDyvA,60
222
+ openTEPES/RTS-GMLC_6y/oT_Dict_Area_RTS-GMLC_6y.csv,sha256=6l13IVxPq4HJh6apld5lNtUPMerRRMgfK7odZxCpCb8,26
223
+ openTEPES/RTS-GMLC_6y/oT_Dict_Circuit_RTS-GMLC_6y.csv,sha256=YudHKDVQ2bpMRufOHYttfppzQEaqi2d3vRGmxTuMFdc,28
223
224
  openTEPES/RTS-GMLC_6y/oT_Dict_Generation_RTS-GMLC_6y.csv,sha256=w6kE1V9QiFoihhMs43minFkyFWRzwQtWnSYsF96_7WA,2535
224
- openTEPES/RTS-GMLC_6y/oT_Dict_Line_RTS-GMLC_6y.csv,sha256=xg4OpM5ldCbkhLOrAgZiJbZekkwtD5lpwxYE6dCzzLA,18
225
+ openTEPES/RTS-GMLC_6y/oT_Dict_Line_RTS-GMLC_6y.csv,sha256=rON9ZbWsiGauhkOIgBS3CDQosACOkKkJoORYT_fCGoc,15
225
226
  openTEPES/RTS-GMLC_6y/oT_Dict_LoadLevel_RTS-GMLC_6y.csv,sha256=FNuj3oD4Npror74ru-HGnm3wD8rLhJFTu2u4jMUYJ4o,192203
226
- openTEPES/RTS-GMLC_6y/oT_Dict_NodeToZone_RTS-GMLC_6y.csv,sha256=p0TKIjW16gSR5F51FnP-5E_oACrxzPo0glTt0OoglBE,1325
227
+ openTEPES/RTS-GMLC_6y/oT_Dict_NodeToZone_RTS-GMLC_6y.csv,sha256=7bnlSu5HfA1ch_58touhcvhmrCLOEjjWhH7f5G8tONw,1251
227
228
  openTEPES/RTS-GMLC_6y/oT_Dict_Node_RTS-GMLC_6y.csv,sha256=2YRl6OD1hV1lR8LiTN-PYjX8bW2v3BktmLVMRl8HW74,736
228
229
  openTEPES/RTS-GMLC_6y/oT_Dict_Period_RTS-GMLC_6y.csv,sha256=Jp7qufLCOXwJ1kSCruPE64llGaTj4wVqe79u5H4LPKg,44
229
- openTEPES/RTS-GMLC_6y/oT_Dict_Region_RTS-GMLC_6y.csv,sha256=xd-mTmEwgSbq3wu8mbiMhvW4D_h9Y9sX9-M4C7j_Jyc,18
230
- openTEPES/RTS-GMLC_6y/oT_Dict_Scenario_RTS-GMLC_6y.csv,sha256=UFD1pqOy6af_SLucKNhgs-CCcoSkZ6OB7YcxLhIpeqs,16
230
+ openTEPES/RTS-GMLC_6y/oT_Dict_Region_RTS-GMLC_6y.csv,sha256=9sUtX_OUST0EMWbhQG2bh7q4_CN0zrELH-ImI5OCAV4,16
231
+ openTEPES/RTS-GMLC_6y/oT_Dict_Scenario_RTS-GMLC_6y.csv,sha256=2ofsWknL6_xojAEk9w_ntKDc_iRFh1tY3MKWyKGlKBE,14
231
232
  openTEPES/RTS-GMLC_6y/oT_Dict_Stage_RTS-GMLC_6y.csv,sha256=cZKl_y6qUHVS8cLY2EFYwGyb8Bzw8043XqkYZJhOOr0,76
232
- openTEPES/RTS-GMLC_6y/oT_Dict_Storage_RTS-GMLC_6y.csv,sha256=GbyzeENaCG-Yx67tdPsZhF1qUY-OVDKQP2TOSbugPVk,28
233
- openTEPES/RTS-GMLC_6y/oT_Dict_Technology_RTS-GMLC_6y.csv,sha256=TpbqRLfZsKkqXtVZNRxBrmis9claViI_UQzw7zyvCuA,76
234
- openTEPES/RTS-GMLC_6y/oT_Dict_ZoneToArea_RTS-GMLC_6y.csv,sha256=lj86EH-OBqXsts32_AyCPKWtyH8aFRAnHfJls6tJI_8,347
235
- openTEPES/RTS-GMLC_6y/oT_Dict_Zone_RTS-GMLC_6y.csv,sha256=mwTHNLbVoLCLclucd4IC1p4Ui8eK7td5FYYUHb8QMxk,195
233
+ openTEPES/RTS-GMLC_6y/oT_Dict_Storage_RTS-GMLC_6y.csv,sha256=1xK85kRhPuVmBJUjdT5jxma6pft_aX3AQ4RsJyU1kLs,25
234
+ openTEPES/RTS-GMLC_6y/oT_Dict_Technology_RTS-GMLC_6y.csv,sha256=OWIqvZzabgF1OxfFkk7tSRf8hRjdGUZBF7yMz7f8g9s,66
235
+ openTEPES/RTS-GMLC_6y/oT_Dict_ZoneToArea_RTS-GMLC_6y.csv,sha256=GAxPRWF3ZLQMYrZTLOxQpJq0EnLQBxG05HDL-P3GJUE,325
236
+ openTEPES/RTS-GMLC_6y/oT_Dict_Zone_RTS-GMLC_6y.csv,sha256=qdYPgz7RLrL4A2iiNEJ5pkXMPFpwIeLK5QOyAqJ11oQ,173
236
237
  openTEPES/RTS24/oT_Data_Demand_RTS24.csv,sha256=HQ1US6fsd3iotXTlR6hpVxAy67forSUbxW8Fqzp8W0I,1824963
237
238
  openTEPES/RTS24/oT_Data_Duration_RTS24.csv,sha256=uduXkV_fE7Vd9cNYdik14_b7NZgm5pqusoTAC6Z1Zo4,331987
238
239
  openTEPES/RTS24/oT_Data_Emission_RTS24.csv,sha256=-CBlzyOIzCVs2LmAYLUwKfoRGxJMQXzmHVvcjMOOqEA,48
@@ -334,8 +335,8 @@ openTEPES/sSEP/oT_Dict_Storage_sSEP.csv,sha256=H2rJXZvoMuT-25sI2GpG8IuiNKD-dxuty
334
335
  openTEPES/sSEP/oT_Dict_Technology_sSEP.csv,sha256=MCTpplzz7_eVPKQfOw35c86ib6CTtW6UK6JrbCJ8wls,170
335
336
  openTEPES/sSEP/oT_Dict_ZoneToArea_sSEP.csv,sha256=AUDCs5Bg6sw9f2pVjGP1o4IJjXFF_VrokOGf_V3QsEI,24
336
337
  openTEPES/sSEP/oT_Dict_Zone_sSEP.csv,sha256=TBud-fvbFbiAsuutxTYe8wWlv_x1P8oyWXILMpYiXJc,13
337
- opentepes-4.17.5rc3.dist-info/entry_points.txt,sha256=gNNPrDaTsRuRJXI1FLNgqMX1CiJ45bEp1dEDH7ZB8Oc,49
338
- opentepes-4.17.5rc3.dist-info/LICENSE,sha256=4O7bphXVzRuYavtsWzpLGuM3E-fp3HTRna7F4yIfnS4,35184
339
- opentepes-4.17.5rc3.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
340
- opentepes-4.17.5rc3.dist-info/METADATA,sha256=nPcF4IHhakBU4iUpa1UD8FUE8TDGvxBKWagqu8t-ylQ,17844
341
- opentepes-4.17.5rc3.dist-info/RECORD,,
338
+ opentepes-4.17.6.dist-info/entry_points.txt,sha256=gNNPrDaTsRuRJXI1FLNgqMX1CiJ45bEp1dEDH7ZB8Oc,49
339
+ opentepes-4.17.6.dist-info/LICENSE,sha256=4O7bphXVzRuYavtsWzpLGuM3E-fp3HTRna7F4yIfnS4,35184
340
+ opentepes-4.17.6.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
341
+ opentepes-4.17.6.dist-info/METADATA,sha256=dNvl75pNhZFvaYEn0zifbz5RjDXquWKC5CIhOCINVqQ,17808
342
+ opentepes-4.17.6.dist-info/RECORD,,