diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 34445778..6a9eb4f9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,7 @@ Change Log [4.17.9] - 2024-11-12 ----------------------- +- [FIXED] fix error in computing pDemandElecPeak in InputData - [CHANGED] keep the model in memory - [CHANGED] default values of minimum output results - [CHANGED] concatenation of strings diff --git a/openTEPES/openTEPES_InputData.py b/openTEPES/openTEPES_InputData.py index 08ed2d9f..b35f7721 100644 --- a/openTEPES/openTEPES_InputData.py +++ b/openTEPES/openTEPES_InputData.py @@ -1,5 +1,5 @@ """ -Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - October 30, 2024 +Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - November 12, 2024 """ import datetime @@ -1076,7 +1076,7 @@ def Create_ESS_RES_Sets(mTEPES) -> None: pDemandElecPeak = pd.Series([0.0 for p,ar in mTEPES.par], index=mTEPES.par) for p,ar in mTEPES.par: # values < 1e-5 times the maximum demand for each area (an area is related to operating reserves procurement, i.e., country) are converted to 0 - pDemandElecPeak[p,ar] = pDemandElec[[nd for nd in d2a[ar]]].sum(axis=1).max() + pDemandElecPeak[p,ar] = pDemandElec.loc[p, [nd for nd in d2a[ar]]].sum(axis=1).max() pEpsilon = pDemandElecPeak[p,ar]*1e-5 # these parameters are in GW diff --git a/openTEPES/openTEPES_Main.py b/openTEPES/openTEPES_Main.py index bda35930..07083361 100644 --- a/openTEPES/openTEPES_Main.py +++ b/openTEPES/openTEPES_Main.py @@ -737,7 +737,7 @@ def main(): # Computing the elapsed time ElapsedTime = round(time.time() - StartTime) print('Total time ... {} s'.format(ElapsedTime)) - path_to_write_time = os.path.join(args.dir,args.case,'openTEPES_time_'+args.case+'.log') + path_to_write_time = os.path.join(args.dir,args.case,f'openTEPES_time_{args.case}.log') with open(path_to_write_time, 'w') as f: f'Elapsed time {ElapsedTime} s' # Final message