Skip to content

Commit

Permalink
fix the condition to solve the complete problem
Browse files Browse the repository at this point in the history
  • Loading branch information
arght committed Oct 26, 2023
1 parent 7f1993e commit 5568f02
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
=============

[4.14.7] - 2023-10-26
----------------------
- [FIXED] fix the condition to solve the complete problem

[4.14.6] - 2023-10-22
----------------------
- [FIXED] fix some pandas warnings
Expand Down
6 changes: 3 additions & 3 deletions doc/rst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
author = 'Andres Ramos'

# The short X.Y version
version = 'version 4.14.6'
version = 'version 4.14.7'
# The full version, including alpha/beta/rc tags
release = ''

Expand Down Expand Up @@ -84,13 +84,13 @@
#
# html_sidebars = {}
html_theme = 'alabaster'
html_title = 'version 4.14.6'
html_title = 'version 4.14.7'
html_logo = '../img/openTEPES.png'
html_last_updated_fmt = ''
html_show_sphinx = False
html_theme_options = {
'analytics_id': 'UA-515200-2', # Provided by Google in your dashboard
'description': 'version 4.14.6',
'description': 'version 4.14.7',
'page_width': 'auto',
'font_family': 'Georgia'
}
Expand Down
2 changes: 1 addition & 1 deletion openTEPES/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
>>> import openTEPES as oT
>>> oT.routine("9n", "C:\\Users\\UserName\\Documents\\GitHub\\openTEPES", "glpk")
"""
__version__ = "4.14.6"
__version__ = "4.14.7"

from .openTEPES_Main import main
from .openTEPES import *
Expand Down
8 changes: 4 additions & 4 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) - October 22, 2023
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - October 26, 2023
"""

import math
Expand Down Expand Up @@ -38,8 +38,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.14.6 - October 22, 2023')
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.14.6 - October 22, 2023', file=open(_path+'/openTEPES_version_'+CaseName+'.log','a'))
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.14.7 - October 26, 2023')
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.14.7 - October 26, 2023', file=open(_path+'/openTEPES_version_'+CaseName+'.log','a'))

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 Expand Up @@ -101,7 +101,7 @@ def openTEPES_run(DirName, CaseName, SolverName, pIndOutputResults, pIndLogConso
if c.name.find(str(p)) != -1 and c.name.find(str(sc)) != -1:
c.deactivate()
else:
if mTEPES.p.ord(p)*mTEPES.sc.ord(sc) == len(mTEPES.ps) and mTEPES.st.last() == mTEPES.stt.last():
if mTEPES.p.last() == mTEPES.pp.last() and mTEPES.sc.last() == mTEPES.scc.last() and mTEPES.st.last() == mTEPES.stt.last():

if pIndLogConsole == 1:
StartTime = time.time()
Expand Down
4 changes: 2 additions & 2 deletions openTEPES/openTEPES_ProblemSolving.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) - September 18, 2023
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - October 26, 2023
"""

import time
Expand Down Expand Up @@ -110,7 +110,7 @@ def ProblemSolving(DirName, CaseName, SolverName, OptModel, mTEPES, pIndLogConso
if sum(1 for g in mTEPES.nr if (nr,g) in mTEPES.g2g or (g,nr) in mTEPES.g2g):
OptModel.vMaxCommitment[nr].fix(round(OptModel.vMaxCommitment[nr]()))

if mTEPES.p.ord(p)*mTEPES.sc.ord(sc) == 1:
if mTEPES.p.last() == mTEPES.pp.last() and mTEPES.sc.last() == mTEPES.scc.last() and mTEPES.st.last() == mTEPES.stt.last():
OptModel.dual = Suffix(direction=Suffix.IMPORT_EXPORT)
OptModel.rc = Suffix(direction=Suffix.IMPORT_EXPORT)

Expand Down

0 comments on commit 5568f02

Please sign in to comment.