Skip to content

Commit

Permalink
fix elapsed time file
Browse files Browse the repository at this point in the history
  • Loading branch information
arght committed Dec 23, 2024
1 parent 9fa3ab5 commit 3b5b8dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/rst/Download.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Download & Installation
=======================
The **openTEPES** model has been developed using `Python 3.12.3 <https://www.python.org/>`_ and `Pyomo 6.8.2 <https://pyomo.readthedocs.io/en/stable/>`_ and it uses `Gurobi 12.0.0 <https://www.gurobi.com/products/gurobi-optimizer/>`_ as commercial MIP solver for which a free academic license is available.
It uses Pyomo so that it is independent of the preferred solver. You can alternatively use one of the free solvers `HiGHS 1.8.1 <https://ergo-code.github.io/HiGHS/dev/interfaces/python/#python-getting-started>`_, `SCIP 9.2.0 <https://www.scipopt.org/>`_, `GLPK 5.0 <https://www.gnu.org/software/glpk/>`_,
It uses Pyomo so that it is independent of the preferred solver. You can alternatively use one of the free solvers `HiGHS 1.9.0 <https://ergo-code.github.io/HiGHS/dev/interfaces/python/#python-getting-started>`_, `SCIP 9.2.0 <https://www.scipopt.org/>`_, `GLPK 5.0 <https://www.gnu.org/software/glpk/>`_,
and `CBC 2.10.12 <https://github.com/coin-or/Cbc/releases>`_. List the serial solver interfaces under Pyomo with this call::

pyomo help -s
Expand Down
6 changes: 3 additions & 3 deletions openTEPES/openTEPES.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) - December 19, 2024
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - December 23, 2024
"""

# import dill as pickle
Expand Down Expand Up @@ -39,8 +39,8 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
idxDict['y' ] = 1

#%% model declaration
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.1 - December 19, 2024')
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.1 - December 19, 2024', file=open(f'{_path}/openTEPES_version_{CaseName}.log','w'))
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.1 - December 23, 2024')
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.1 - December 23, 2024', file=open(f'{_path}/openTEPES_version_{CaseName}.log','w'))

pIndOutputResults = [j for i,j in idxDict.items() if i == pIndOutputResults][0]
pIndLogConsole = [j for i,j in idxDict.items() if i == pIndLogConsole ][0]
Expand Down
6 changes: 3 additions & 3 deletions openTEPES/openTEPES_Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@
# For more information on this, and how to apply and follow the GNU AGPL, see
# <https://www.gnu.org/licenses/>.

# Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - December 19, 2024
# Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - December 23, 2024
# simplicity and transparency in power systems planning

# Developed by
Expand Down Expand Up @@ -737,9 +737,9 @@ 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,f'openTEPES_time_{args.case}.log')
path_to_write_time = os.path.join(args.dir,args.case,f'openTEPES_time_{CASE}.log')
with open(path_to_write_time, 'w') as f:
f'Elapsed time {ElapsedTime} s'
f.write('Elapsed time '+str(ElapsedTime)+' s')
# Final message
print('End of the run ************')
print('\033[34m#### Academic research license - for non-commercial use only ####\033[0m')
Expand Down

0 comments on commit 3b5b8dd

Please sign in to comment.