Skip to content

Commit 7d46c07

Browse files
committed
changed the penalty for hydrogen surplus to 0.5 the cost of hydrogen not served
1 parent 33ea8ac commit 7d46c07

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Change Log
22
=============
33

4-
[4.18.17RC] - 2026-04-15
4+
[4.18.17RC] - 2026-04-16
55
-------------------------
6+
- [CHANGED] changed the penalty for hydrogen surplus to 0.5 the cost of hydrogen not served
67
- [FIXED] fix case with multiple independent scenarios
78
- [CHANGED] updated usage of appsi_gurobi and gurobi_persistent solvers
89
- [CHANGED] detection of generators with minimum and maximum energy constraints

doc/rst/InputData.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ A description of the system parameters included in the file ``oT_Data_Parameter.
169169
Item Description
170170
==================== ============================================================================================================= =========
171171
ENSCost Cost of energy not served (ENS). Cost of load curtailment. Value of Lost Load (VoLL) €/MWh
172-
HNSCost Cost of hydrogen not served (HNS). The cost of the H2 excess is one tenth of this value €/kgH2
172+
HNSCost Cost of hydrogen not served (HNS). The cost of the H2 surplus is **half** of this value €/kgH2
173173
HTNSCost Cost of heat not served (HTNS) €/MWh
174174
CO2Cost Cost of CO2 emissions €/tCO2
175175
UpReserveActivation Upward reserve activation (proportion of upward operating reserve deployed to produce energy, e.g., 0.15) p.u.

doc/rst/MathematicalFormulation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ They are written in **uppercase** letters.
8484
**Hydrogen demand**
8585
-----------------------------------------------------------------------------------------------------
8686
:math:`DH^p_{\omega ni}` Hydrogen demand in each node tH2
87-
:math:`CHNS` Cost of hydrogen not served. The cost of H2 surplus is `0.1 CHNS` €/tH2
87+
:math:`CHNS` Cost of hydrogen not served. The cost of H2 surplus is `0.5 CHNS` €/tH2
8888
======================== ================================================================== =======
8989

9090
========================= ==================================================== =======
@@ -343,9 +343,9 @@ Expected network operation cost [M€]. This cost penalizes with and :math:`\eps
343343

344344
Electricity, hydrogen, and heat expected reliability cost [M€] «``eTotalRElecCost``, ``eTotalRH2Cost``, ``eTotalRHeatCost``»
345345

346-
The penalty for hydrogen surplus is `0.1 CHNS`, which is a common assumption to consider that the cost of hydrogen surplus is much lower than the cost of hydrogen not served, and it is internally done by the model.
346+
The penalty for hydrogen surplus is `0.5 CHNS`, which is a common assumption to consider that the cost of hydrogen surplus is much lower than the cost of hydrogen not served, and it is internally done by the model.
347347

348-
:math:`\sum_{p \omega ni}{DF^p P^p_{\omega} DUR^p_{\omega n} CENS \; ens^p_{\omega ni}} + \sum_{p \omega ni}{DF^p P^p_{\omega} CHNS (hns^p_{\omega ni}+0.1 hex^p_{\omega ni})} + \sum_{p \omega ni}{DF^p P^p_{\omega} DUR^p_{\omega n} CHtNS \; htns^p_{\omega ni}}`
348+
:math:`\sum_{p \omega ni}{DF^p P^p_{\omega} DUR^p_{\omega n} CENS \; ens^p_{\omega ni}} + \sum_{p \omega ni}{DF^p P^p_{\omega} CHNS (hns^p_{\omega ni}+0.5 hex^p_{\omega ni})} + \sum_{p \omega ni}{DF^p P^p_{\omega} DUR^p_{\omega n} CHtNS \; htns^p_{\omega ni}}`
349349

350350
All the periodical (annual) costs of a period :math:`p` are updated considering that the period (e.g., 2030) is replicated for a number of years defined by its weight :math:`WG^p` (e.g., 5 times) and discounted to the base year :math:`T` (e.g., 2020) with this discount factor :math:`DF^p = \frac{(1+\delta)^{WG^p}-1}{\delta(1+\delta)^{WG^p-1+p-T}}`.
351351

openTEPES/openTEPES.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - April 15, 2026
2+
Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - April 16, 2026
33
"""
44

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

4141
#%% model declaration
42-
mTEPES = ConcreteModel('Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.17RC - April 15, 2026')
43-
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.17RC - April 15, 2026', file=open(f'{_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.18.17RC - April 16, 2026')
43+
print( 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.17RC - April 16, 2026', file=open(f'{_path}/openTEPES_version_{CaseName}.log','w'))
4444

4545
pIndOutputResults = [j for i,j in idxDict.items() if i == pIndOutputResults][0]
4646
pIndLogConsole = [j for i,j in idxDict.items() if i == pIndLogConsole ][0]

openTEPES/openTEPES_InputData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ def filter_rows(df, set):
14271427

14281428
mTEPES.pENSCost = Param(initialize=mTEPES.dPar['pENSCost'] , within=NonNegativeReals, doc='ENS cost' )
14291429
mTEPES.pH2NSCost = Param(initialize=mTEPES.dPar['pHNSCost'] , within=NonNegativeReals, doc='HNS cost' )
1430-
mTEPES.pH2ExcCost = Param(initialize=mTEPES.dPar['pHNSCost']*0.1 , within=NonNegativeReals, doc='H2 excess cost' )
1430+
mTEPES.pH2ExcCost = Param(initialize=mTEPES.dPar['pHNSCost']*0.5 , within=NonNegativeReals, doc='H2 excess cost' )
14311431
mTEPES.pHeatNSCost = Param(initialize=mTEPES.dPar['pHTNSCost'] , within=NonNegativeReals, doc='HTNS cost' )
14321432
mTEPES.pCO2Cost = Param(initialize=mTEPES.dPar['pCO2Cost'] , within=NonNegativeReals, doc='CO2 emission cost' )
14331433
mTEPES.pAnnualDiscRate = Param(initialize=mTEPES.dPar['pAnnualDiscountRate'] , within=UnitInterval, doc='Annual discount rate' )

openTEPES/openTEPES_Main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@
660660
# For more information on this, and how to apply and follow the GNU AGPL, see
661661
# <https://www.gnu.org/licenses/>.
662662

663-
# Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - April 15, 2026
663+
# Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - April 16, 2026
664664
# simplicity and transparency in power systems planning
665665

666666
# Developed by
@@ -693,7 +693,7 @@
693693
BLUE = "\033[34m"
694694
RESET = "\033[0m"
695695

696-
print(GREEN + 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.17RC - April 15, 2026' + RESET)
696+
print(GREEN + 'Open Generation, Storage, and Transmission Operation and Expansion Planning Model with RES and ESS (openTEPES) - Version 4.18.17RC - April 16, 2026' + RESET)
697697
print(BLUE + '#### Academic research license - for non-commercial use only ####' + RESET + '\n')
698698

699699
parser = argparse.ArgumentParser(description='Introducing main parameters...')

0 commit comments

Comments
 (0)