Skip to content

Commit

Permalink
fix error in computing pDemandElecPeak in InputData
Browse files Browse the repository at this point in the history
  • Loading branch information
arght committed Nov 12, 2024
1 parent e504a22 commit acf5d5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions openTEPES/openTEPES_InputData.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion openTEPES/openTEPES_Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit acf5d5e

Please sign in to comment.