diff --git a/base/addons/hydrogen/bb4/hydrogen_balbase4.inc b/base/addons/hydrogen/bb4/hydrogen_balbase4.inc index 5af303d1..faea6d28 100644 --- a/base/addons/hydrogen/bb4/hydrogen_balbase4.inc +++ b/base/addons/hydrogen/bb4/hydrogen_balbase4.inc @@ -1,40 +1,40 @@ - - - QHYDROGEN_HGEHTOH2 - QHYDROGEN_HGETOHH2 - QHYDROGEN_H2TOEH - QHYDROGEN_EQ - QHYDROGEN_EQ_AREA - QHYDROGEN_STOMAXCON - QHYDROGEN_STOMAXLOAD - QHYDROGEN_STOMAXUNLD - QHYDROGEN_STOVOL - QHYDROGEN_GCH4KT_UP -$ifi %COMBTECH%==yes QHYDROGENGKE_UP_ADD - QBIOMETHANE_EQ - QBIOMETHANE_STOVOLTS - QGKBIOMETHANE_UP - QGKBIOGASUPGRADING_UP - QGKBIOGASMETHANATION_UP - - - - QXH2K_UP -$ifi %H2TransInvest%==yes QXH2KNACCUMNET -$ifi %H2TransInvest%==yes QXH2KNACCUMNET_NGTOH2 -$ifi %H2TransInvest%==yes QXH2INVSYMMETRY -$ifi %H2TransInvest%==yes QXH2INVSYMMETRY_NGTOH2 -$ifi %H2TransInvest%==yes QXH2KMAX_NGTOH2 -$ifi %H2TransInvest%==yes QVXH2KN_ES -$ifi %H2TransInvest%==yes QXH2LAMBDA_ES - -* Flexible hydrogen demand in space by Ioannis -$ifi not %flexible_h2_space%==yes $goto no_flexible_h2_space -QSYNTHETIC_EQ_PRODUCTION -QSYNTHETIC_EQ_SHIFT -QSYNTHETIC_EQ_SHIFT_UP -QSYNTHETIC_EQ_SHIFT_DOWN -QSYNTHETIC_EQ_SHIFT_BALANCE_MOVE -QSYNTHETIC_EQ_SHIFT_BALANCE_OVERALL -$label no_flexible_h2_space - + + + QHYDROGEN_HGEHTOH2 + QHYDROGEN_HGETOHH2 + QHYDROGEN_H2TOEH + QHYDROGEN_EQ + QHYDROGEN_EQ_AREA + QHYDROGEN_STOMAXCON + QHYDROGEN_STOMAXLOAD + QHYDROGEN_STOMAXUNLD + QHYDROGEN_STOVOL + QHYDROGEN_GCH4KT_UP +$ifi %COMBTECH%==yes QHYDROGENGKE_UP_ADD + QBIOMETHANE_EQ + QBIOMETHANE_STOVOLTS + QGKBIOMETHANE_UP + QGKBIOGASUPGRADING_UP + QGKBIOGASMETHANATION_UP + + + + QXH2K_UP +$ifi %H2TransInvest%==yes QXH2KNACCUMNET +$ifi %H2TransInvest%==yes QXH2KNACCUMNET_NGTOH2 +$ifi %H2TransInvest%==yes QXH2INVSYMMETRY +$ifi %H2TransInvest%==yes QXH2INVSYMMETRY_NGTOH2 +$ifi %H2TransInvest%==yes QXH2KMAX_NGTOH2 +$ifi %H2TransInvest%==yes $ifi %ES_H2TRANS%==yes QVXH2KN_ES +$ifi %H2TransInvest%==yes $ifi %ES_H2TRANS%==yes QXH2LAMBDA_ES + +* Flexible hydrogen demand in space by Ioannis +$ifi not %flexible_h2_space%==yes $goto no_flexible_h2_space +QSYNTHETIC_EQ_PRODUCTION +QSYNTHETIC_EQ_SHIFT +QSYNTHETIC_EQ_SHIFT_UP +QSYNTHETIC_EQ_SHIFT_DOWN +QSYNTHETIC_EQ_SHIFT_BALANCE_MOVE +QSYNTHETIC_EQ_SHIFT_BALANCE_OVERALL +$label no_flexible_h2_space + diff --git a/base/addons/hydrogen/bb4/hydrogen_qobj.inc b/base/addons/hydrogen/bb4/hydrogen_qobj.inc index 8099b08e..9e29ccb5 100644 --- a/base/addons/hydrogen/bb4/hydrogen_qobj.inc +++ b/base/addons/hydrogen/bb4/hydrogen_qobj.inc @@ -1,88 +1,89 @@ -* -------- HYDROGEN COSTS -------- * - -* Change in revenue when deviating from producing the fixed hydrogen demand -* in the transport sector specified by DH2_T_Y(AAA,S,T). Introduced to make -* it possible to specify more advanced hydrogen supply functions. -* SHOULD THE SUPPLY FUNCTION BE YEAR DEPENDANT? -*No steam reforming plants considered -$ontext - + SUM(IA, - SUM((IS3,T), IHOURSINST(IS3,T) - * (SUM(DH2F_D,VDH2F_T(IA,IS3,T,DH2F_D)* IDEFP_T(IR,IS3,T,DEF_D1) ) - - - ) - - ) - ) - - - SUM(IR, - SUM((IS3,T), IHOURSINST(IS3,T) - * (SUM(DEF_U1, VDEF_T(IR,IS3,T,DEF_U1)* IDEFP_T(IR,IS3,T,DEF_U1) ) - + SUM(DEF_U2, VDEF_T(IR,IS3,T,DEF_U2)* IDEFP_T(IR,IS3,T,DEF_U2) )) - ) - ) - -revenue sale of hydrogen to the transport sector -+ SUM(DH2F_U,VDH2F_T(IA,IS3,T,DH2F_U) ) -* - SUM(DH2F_D,VDH2F_T(IA,IS3,T,DH2F_D) ) -* -$offtext - -* Variable Operation and maintainance cost of steam reforming: - - + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GCH4TOH2), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GCH4TOH2) * SUM((IS3,T), IHOURSINST(IS3,T)*VHYDROGEN_GH2_T(Y,IA,IHYDROGEN_GCH4TOH2,IS3,T))) - -* Variable Operation and maintainance cost of hydrogen storage: - - + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GH2STO), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GH2STO) * SUM((IS3,T), IHOURSINST(IS3,T)*VHYDROGEN_GH2_T(Y,IA,IHYDROGEN_GH2STO,IS3,T))) - -* Variable Operation and maintainance cost of methanation-DAC: - - + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GH2TOBIOMETH), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GH2TOBIOMETH) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOMETH_T(Y,IA,IHYDROGEN_GH2TOBIOMETH,IS3,T))) - -* Variable Operation and maintainance cost of biogas methanation: - - + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GBIOGASMETHANATION), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GBIOGASMETHANATION) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOGASMETHANATION_T(Y,IA,IHYDROGEN_GBIOGASMETHANATION,IS3,T))) - -* Variable Operation and maintainance cost of biogas upgrading: - - + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GBIOGASUPGRADING), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GBIOGASUPGRADING) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOGASUPGRADING_T(Y,IA,IHYDROGEN_GBIOGASUPGRADING,IS3,T))) - - -* Fixed O&M and investment costs are included in -* Balmorel.gms - - -* H2 transmission cost: -+ SUM((IRE,IRI)$IXH2K_HASORPOT(Y,IRE,IRI), - SUM((IS3,T), IHOURFRAC*IHOURSINST(IS3,T) * (VXH2_T(Y,IRE,IRI,IS3,T) * XH2COST(IRE,IRI)))) - -* Investment costs, new H2 transmission capacity -* (the average of the annuities for the two countries in question is used for international transmission): - + SUM((IRE,IRI)$((IXH2KN(Y,IRI,IRE) OR IXH2KN(Y,IRE,IRI)) AND (NOT (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE)))),IOF05*VXH2KN(Y,IRE,IRI)*XH2INVCOST(Y,IRE,IRI)* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) - - + SUM((IRE,IRI)$(IXH2KN_NGTOH2(Y,IRI,IRE) OR IXH2KN_NGTOH2(Y,IRE,IRI)),IOF05*VXH2KN_NGTOH2(Y,IRE,IRI)*XH2INVCOST_NGTOH2(Y,IRE,IRI)* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) - -*Investment costs, H2 transmission capacity invested in previous years - + SUM((IYALIAS2,IRE,IRI)$((IXH2KN(IYALIAS2,IRI,IRE) OR IXH2KN(IYALIAS2,IRE,IRI)) AND (NOT (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE))) AND (ORD(IYALIAS2) LT ORD(Y))),IOF05*VXH2KN(IYALIAS2,IRE,IRI)*XH2INVCOST(IYALIAS2,IRE,IRI)* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) - - + SUM((IYALIAS2,IRE,IRI)$((IXH2KN_NGTOH2(IYALIAS2,IRI,IRE) OR IXH2KN_NGTOH2(IYALIAS2,IRE,IRI)) AND (ORD(IYALIAS2) LT ORD(Y))),IOF05*VXH2KN_NGTOH2(IYALIAS2,IRE,IRI)*XH2INVCOST_NGTOH2(IYALIAS2,IRE,IRI)* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) - - -*ECONOMIES OF SCALE -* Investment costs, new transmission capacity - - + SUM((IRE,IRI,XES)$((IXH2KN(Y,IRI,IRE) OR IXH2KN(Y,IRE,IRI)) AND (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE))), - VXH2LAMBDA(Y,IRE,IRI,XES)*XH2INVCOST_ES(Y,IRE,IRI,XES)*IOF05* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) - -*Investment costs, transmission capacity invested in previous years - - + SUM((IYALIAS2,IRE,IRI,XES)$((IXH2KN(IYALIAS2,IRI,IRE) OR IXH2KN(IYALIAS2,IRE,IRI)) AND (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE)) AND (ORD(IYALIAS2) LT ORD(Y))), - VXH2LAMBDA(IYALIAS2,IRE,IRI,XES)*XH2INVCOST_ES(IYALIAS2,IRE,IRI,XES)*IOF05* - (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) +* -------- HYDROGEN COSTS -------- * + +* Change in revenue when deviating from producing the fixed hydrogen demand +* in the transport sector specified by DH2_T_Y(AAA,S,T). Introduced to make +* it possible to specify more advanced hydrogen supply functions. +* SHOULD THE SUPPLY FUNCTION BE YEAR DEPENDANT? +*No steam reforming plants considered +$ontext + + SUM(IA, + SUM((IS3,T), IHOURSINST(IS3,T) + * (SUM(DH2F_D,VDH2F_T(IA,IS3,T,DH2F_D)* IDEFP_T(IR,IS3,T,DEF_D1) ) + + + ) + + ) + ) + + - SUM(IR, + SUM((IS3,T), IHOURSINST(IS3,T) + * (SUM(DEF_U1, VDEF_T(IR,IS3,T,DEF_U1)* IDEFP_T(IR,IS3,T,DEF_U1) ) + + SUM(DEF_U2, VDEF_T(IR,IS3,T,DEF_U2)* IDEFP_T(IR,IS3,T,DEF_U2) )) + ) + ) + +revenue sale of hydrogen to the transport sector ++ SUM(DH2F_U,VDH2F_T(IA,IS3,T,DH2F_U) ) +* - SUM(DH2F_D,VDH2F_T(IA,IS3,T,DH2F_D) ) +* +$offtext + +* Variable Operation and maintainance cost of steam reforming: + + + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GCH4TOH2), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GCH4TOH2) * SUM((IS3,T), IHOURSINST(IS3,T)*VHYDROGEN_GH2_T(Y,IA,IHYDROGEN_GCH4TOH2,IS3,T))) + +* Variable Operation and maintainance cost of hydrogen storage: + + + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GH2STO), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GH2STO) * SUM((IS3,T), IHOURSINST(IS3,T)*VHYDROGEN_GH2_T(Y,IA,IHYDROGEN_GH2STO,IS3,T))) + +* Variable Operation and maintainance cost of methanation-DAC: + + + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GH2TOBIOMETH), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GH2TOBIOMETH) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOMETH_T(Y,IA,IHYDROGEN_GH2TOBIOMETH,IS3,T))) + +* Variable Operation and maintainance cost of biogas methanation: + + + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GBIOGASMETHANATION), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GBIOGASMETHANATION) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOGASMETHANATION_T(Y,IA,IHYDROGEN_GBIOGASMETHANATION,IS3,T))) + +* Variable Operation and maintainance cost of biogas upgrading: + + + SUM(IAGK_HASORPOT(Y,IA,IHYDROGEN_GBIOGASUPGRADING), IHOURFRAC*GOMVCOSTO(IA,IHYDROGEN_GBIOGASUPGRADING) * SUM((IS3,T), IHOURSINST(IS3,T)*VGBIOGASUPGRADING_T(Y,IA,IHYDROGEN_GBIOGASUPGRADING,IS3,T))) + + +* Fixed O&M and investment costs are included in +* Balmorel.gms + + +* H2 transmission cost: ++ SUM((IRE,IRI)$IXH2K_HASORPOT(Y,IRE,IRI), + SUM((IS3,T), IHOURFRAC*IHOURSINST(IS3,T) * (VXH2_T(Y,IRE,IRI,IS3,T) * XH2COST(IRE,IRI)))) + +* Investment costs, new H2 transmission capacity +* (the average of the annuities for the two countries in question is used for international transmission): + + SUM((IRE,IRI)$((IXH2KN(Y,IRI,IRE) OR IXH2KN(Y,IRE,IRI)) AND (NOT (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE)))),IOF05*VXH2KN(Y,IRE,IRI)*XH2INVCOST(Y,IRE,IRI)* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) + + + SUM((IRE,IRI)$(IXH2KN_NGTOH2(Y,IRI,IRE) OR IXH2KN_NGTOH2(Y,IRE,IRI)),IOF05*VXH2KN_NGTOH2(Y,IRE,IRI)*XH2INVCOST_NGTOH2(Y,IRE,IRI)* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) + +*Investment costs, H2 transmission capacity invested in previous years + + SUM((IYALIAS2,IRE,IRI)$((IXH2KN(IYALIAS2,IRI,IRE) OR IXH2KN(IYALIAS2,IRE,IRI)) AND (NOT (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE))) AND (ORD(IYALIAS2) LT ORD(Y))),IOF05*VXH2KN(IYALIAS2,IRE,IRI)*XH2INVCOST(IYALIAS2,IRE,IRI)* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) + + + SUM((IYALIAS2,IRE,IRI)$((IXH2KN_NGTOH2(IYALIAS2,IRI,IRE) OR IXH2KN_NGTOH2(IYALIAS2,IRE,IRI)) AND (ORD(IYALIAS2) LT ORD(Y))),IOF05*VXH2KN_NGTOH2(IYALIAS2,IRE,IRI)*XH2INVCOST_NGTOH2(IYALIAS2,IRE,IRI)* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) + + +*ECONOMIES OF SCALE +* Investment costs, new transmission capacity +$ifi not %ES_H2TRANS%==yes $goto no_economy_of_scale + + SUM((IRE,IRI,XES)$((IXH2KN(Y,IRI,IRE) OR IXH2KN(Y,IRE,IRI)) AND (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE))), + VXH2LAMBDA(Y,IRE,IRI,XES)*XH2INVCOST_ES(Y,IRE,IRI,XES)*IOF05* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*SUM(IYALIAS2$(ORD(IYALIAS2) EQ ORD(Y)),IYHASANNUITYXH2(IYALIAS2,Y))) + +*Investment costs, transmission capacity invested in previous years + + + SUM((IYALIAS2,IRE,IRI,XES)$((IXH2KN(IYALIAS2,IRI,IRE) OR IXH2KN(IYALIAS2,IRE,IRI)) AND (IXH2KN_ES(IRE,IRI) OR IXH2KN_ES(IRI,IRE)) AND (ORD(IYALIAS2) LT ORD(Y))), + VXH2LAMBDA(IYALIAS2,IRE,IRI,XES)*XH2INVCOST_ES(IYALIAS2,IRE,IRI,XES)*IOF05* + (IOF05* (SUM(C$CCCRRR(C,IRE),ANNUITYCXH2(C))+SUM(C$CCCRRR(C,IRI),ANNUITYCXH2(C))))*IYHASANNUITYXH2(IYALIAS2,Y)) +$label no_economy_of_scale \ No newline at end of file diff --git a/base/addons/hydrogen/bb4/hydrogen_varassign.inc b/base/addons/hydrogen/bb4/hydrogen_varassign.inc index b1e30b7d..4f84e495 100644 --- a/base/addons/hydrogen/bb4/hydrogen_varassign.inc +++ b/base/addons/hydrogen/bb4/hydrogen_varassign.inc @@ -1,7 +1,7 @@ -* File hydrogen_varassign.inc for addon hydrogen. - -$ifi %H2TransInvest%==yes VXH2KN.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI))= VXH2KN.L(IY411FIRST,IRE,IRI); -$ifi %H2TransInvest%==yes VXH2KNACCUMNET.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI))= VXH2KNACCUMNET.L(IY411FIRST,IRE,IRI); -$ifi %H2TransInvest%==yes VXH2KN_NGTOH2.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN_NGTOH2(Y,IRE,IRI))= VXH2KN_NGTOH2.L(IY411FIRST,IRE,IRI); -$ifi %H2TransInvest%==yes VXH2KNACCUMNET_NGTOH2.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN_NGTOH2(Y,IRE,IRI))= VXH2KNACCUMNET_NGTOH2.L(IY411FIRST,IRE,IRI); -$ifi %H2TransInvest%==yes VXH2LAMBDA.FX(IY411FIRST,IRE,IRI,XES)$(SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI)) AND IXH2KN_ES(IRE,IRI))=VXH2LAMBDA.L(IY411FIRST,IRE,IRI,XES); \ No newline at end of file +* File hydrogen_varassign.inc for addon hydrogen. + +$ifi %H2TransInvest%==yes VXH2KN.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI))= VXH2KN.L(IY411FIRST,IRE,IRI); +$ifi %H2TransInvest%==yes VXH2KNACCUMNET.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI))= VXH2KNACCUMNET.L(IY411FIRST,IRE,IRI); +$ifi %H2TransInvest%==yes VXH2KN_NGTOH2.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN_NGTOH2(Y,IRE,IRI))= VXH2KN_NGTOH2.L(IY411FIRST,IRE,IRI); +$ifi %H2TransInvest%==yes VXH2KNACCUMNET_NGTOH2.FX(IY411FIRST,IRE,IRI)$SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN_NGTOH2(Y,IRE,IRI))= VXH2KNACCUMNET_NGTOH2.L(IY411FIRST,IRE,IRI); +$ifi %H2TransInvest%==yes $ifi %ES_H2TRANS%==yes VXH2LAMBDA.FX(IY411FIRST,IRE,IRI,XES)$(SUM(Y$(YVALUE(Y) LE YVALUE(IY411FIRST)),IXH2KN(Y,IRE,IRI)) AND IXH2KN_ES(IRE,IRI))=VXH2LAMBDA.L(IY411FIRST,IRE,IRI,XES); \ No newline at end of file diff --git a/base/model/balopt.opt b/base/model/balopt.opt index 8fd23f17..cf730b6d 100644 --- a/base/model/balopt.opt +++ b/base/model/balopt.opt @@ -1,1044 +1,1044 @@ -* This file holds options that are used to control model functionality, -* including extentions in the form of addons, and interplay between models. - -* Note: in final version all relevant control settings will be indicated -* by an *!option statement, e.g. "*!option yes" and other instructions. - -* Note: If you work with BUI, the above is mandatory. -* Moreover, the only way to enter a comment in this file -* is to use a '*' as the first character on the line; -* thus, you can not use e.g., $ontext..$offtext or /*..*/ or // or !!. -* Further, if you work with BUI, this file will not be $included into Balmorel.gms, -* instead the file Balopt.bui will be $included. See the description elsewhere. - -*---- START: VQDEBUG ------------------------------------------------ -*----------------------------------------------------------------- -* overall control variable vqdebug must be 'yes' if any of the other vqdebug controls are: -* Debugging hints are available if you include feasiblity-ensuring variables. -* However, adding more variables will increase calculation time. -* Hence, if calculation time is an issue, it is recommended as default to not use them, -* and then, if the solver declares the problem infeasible, use them and resolve. -* Information of ... in the .log file? -$setglobal vqdebug -*!option yes - -*Reduce number of infeasibility variables. By default, infeasibility variables are added to many equations, which is not always required. -$setglobal reduced_vqdebug -*!option yes -*----------------------------------------------------------------- -*---- END: VQDEBUG ------------------------------------------------ - - -*=============================================================================== -*=============================================================================== -* Project and Case ID: -*=============================================================================== -*=============================================================================== - -* PROJECTID is the identification of the Project. -* Convenient, and additioanally needed if results shall be compared among projects. -* -$setglobal PROJECTID -*!option !fixedvalue -* -* -* CASEID is the Case identification string. It can be assigned freely, however, if -* the case is a base case to which other cases should be compared the name should be -* BASE. Normally the model in the base directory will be called BASE while -* any variants will have names as appropriate. Model results in the form of GDX files -* (or Access MDBs) will have the CASEID as filename with the appropriate extension. -* Note that CASEID MUST be identical to folder name of the diretory holding the case. -* -$setglobal CASEID BASE -*!option !fixedvalue - - -*=============================================================================== -*=============================================================================== -* Model choices: -*=============================================================================== -*=============================================================================== - -*------------------------------------------------------------------------------- -* The following global variables concern the choice of model. -* If $Setglobal bb4 yes, BB4 is chosen. -$setglobal bb4 yes -*!option yes - -*=============================================================================== -*=============================================================================== -* Basic models details and Addon modules: -*=============================================================================== -*=============================================================================== - -*------------------------------------------------------------------------------- -* The following global variables concern the choice of details in some of the models. -* Note that some of the choices are mutually dependent. - -*-------- Seasonal rolling horizon --------- -* Optimize seasons with a rolling horizon approach instead of all together. -*NOTE: This option is supposed to be combined with the option "import_results", which must contain information for all S and at least the first element in T -$setglobal RollingSeasons -*!option yes - -SCALAR ROLLINGSEASONSNUMBER 'Number of seasons to be optimized at a time in each rolling season optimization'; -ROLLINGSEASONSNUMBER= 1; - -*-------- END: Seasonal rolling horizon --------- - -*-------- QDENET --------- -* Introduces the calculation of the net demand of different users (e.g. households, industry, etc). Relevant for taxes, grid tariffs, demand response, etc. -$setglobal NETDEMAND -*!option yes -*-------- END: QDENET --------- - -*----------------------------------------------------------------- -*---- Investments ------------------------------------------------ - -*---- Generation investments options---- - -* Permit investments in generation and storage capacity: -$setglobal TechInvest yes -*!option yes - -SCALAR GINVESTSTART 'Year from which endogenous decisions in generation capacities are allowed' ; -GINVESTSTART= 2025; - -*---- End: Generation investments options---- - -*---- Transmission investments options---- - -* Permit investments in transmission capacity: -$setglobal TransInvest YES -*!option yes - -SCALAR XINVESTSTART 'Year from which endogenous decisions in transmission capacities are allowed' ; -XINVESTSTART= 2035; - -*---- End: Transmission investments options---- - -*----END: Investments--------------------------------------------------- -*----------------------------------------------------------------------- - -*-----------------------HEAT TRANSFER-------------------------------------------------------- -*overall control variable HEATTRANS must be 'yes' if any of the other heat trans controls are. - -* Permit heat transmission between areas. -$setglobal HEATTRANS YES -*!option yes - -* Permit heat transmission investments between areas. -$setglobal HeatTransInvest -*!option yes - -SCALAR XHINVESTSTART 'Year from which endogenous decisions in heat transmission capacities are allowed' ; -XHINVESTSTART= 2025; - -* Permit temperature lift from heat pumps to move energy from low temperature areas to high temperature ones (NOT WORKING, TO BE CHECKED). -$setglobal HeatTempLift -*!option yes -*-----------------------END OF: HEAT TRANSFER-------------------------------------------------------- - -* Include industry data in the optimization. Requires HEATTRANSFER add-on to be activated. -$setglobal INDUSTRY YES -*!option yes - -*--------------------INDIVIDUAL USERS-------------------------------------------------------------- -* overall control variable INDIVUSERS must be 'yes' if any of the other INDIVUSERS controls are: - -* Include individual users data in the optimization. Requires HEATTRANSFER add-on to be activated. -$setglobal INDIVUSERS YES -*!option yes - -* Include the possibility to shift exogenous heat demand between technology groups. -$setglobal GROUP_DEMAND_SHIFT -*!option yes -*-----------------END: INDIVIDUAL USERS-------------------------------------------------------------- - -* Include seasonal variation of heat pump's COP. If not activated, heat pumps will have a constant COP during the year. -$setglobal SEASONALCOP -*!option yes - -*------------START OF: OFFSHORE GRIDS-------------------------- -* overall control variable OFFSHOREGRID must be 'yes' if any of the other OFFSHOREGRID controls are: -* Allow to build a complicated offshore grid with hubs in the sea. Requires MIP to work as intended since technologies are modelled with economies of scale via SOS variables. If RMIP is used, it will become a linear problem. -$setglobal OFFSHOREGRID NO -*!option yes - -*Adds Economies of Scale in generation elements that are part of offshore grids. It requires to use the MIP solver, so remember to activate it. -$setglobal OFFSHOREGRID_ES_GEN -*!option yes - -*Adds Economies of Scale in electricity transmission elements that are part of offshore grids. It requires to use the MIP solver, so remember to activate it. -$setglobal OFFSHOREGRID_ES_ELTRANS -*!option yes -*------------END OF: OFFSHORE GRIDS-------------------------- - - -* Allow Carbon Capture Storage (CCS) technologies. -$setglobal CCS YES -*!option yes - -* Allow curtailment of variable renewable energy generators (BB4) -$setglobal VRESHUTDOWN yes -*!option yes - -*------------------------------EV ADDON------------------------------------------------- -* overall control variable EV must be 'yes' if any of the other EV controls are: - -$setglobal EV -*!option YES - -* Adds DUMB charging: -$setglobal DUMB -*!option yes - -* Adds smart charging. Only smart charging, without V2G!: -$setglobal SMART -*!option yes - -* Adds V2G charging: -$setglobal V2G YES -*!option yes - -* Restricts PHEV vehicles from doing V2G (only relevant if V2G is activated): -$setglobal NO_PHEV_V2G yes -*!option yes - -* Adds step charging scheme (NOT SURE IT IS WORKING ANY MORE): -$setglobal STEPCHARGSCHEME -*!option yes - -* Adds cycle degradation (NOT SURE IT IS WORKING ANY MORE, COSTS SHOULD BE ANNUALIZED): -$setglobal DEGCYCLE -*!option yes - -* Adds calendar degradation (NOT SURE IT IS WORKING ANY MORE, COSTS SHOULD BE ANNUALIZED): -$setglobal DEGCAL -*!option yes - -* EV timeseries will be averaged (relevant if less than all time steps in TTT are used). -* NOTE: It currently only works if T are equally distanced from each other and if the first T chosen is equal to the first element int TTT). If this is not desired, one can replace the timeseries with new averaged-with-another-procedude timeseries -* NOTE: It might lead to infeasibilities though -$setglobal EV_PROFILE_AVG yes -*!option yes - -*Adds EV infeasibility variables (added here on purpose, since if not all TTT are used it is very likely to run into small infeasibilities) -*Note: The value of the parameter PENALTQ should be in line with the cost assumptions in the model to obtain meaninful results -$setglobal EV_infeas yes -*!option - -* Models EV as inter-seasonal storage (if it is not activated, then EVs are model as intra-seasonal storage): -$setglobal EV_INTERSEASONAL -*!option yes -*------------------------------END: EV ADDON------------------------------------------------- - -*------------------------------TRANSPORT ADDON------------------------------------------------- -* overall control variable TRANSPORT must be 'yes' if any of the other TRANSPORT controls are: -* Include transport data in the optimization (it is supposed to complement the EV addon, so check consistency of data before using it). -$setglobal TRANSPORT YES -*!option yes - -* Defines the commodity used to model synthetic fuel generation. -$setglobal TRANSPORT_SYNTHFUEL_COMMODITY HYDROGEN -*!option ELECTRICITY !Text "The demand for synthetic fuel generation is modelled as electricity demand" -*!option HYDROGEN !Text "The demand for synthetic fuel generation is modelled as hydrogen demand (requires hydrogen addon to be activated)" - -* Defines the possibility for the transport demand of synthetic fuels to be aggregated internationally instead of having to satisfy it regionally. -$setglobal TRANSPORT_DEMAND_AGGREGATED - - -*------------------------------END:TRANSPORT ADDON------------------------------------------------- - -*----------------------------------------------------------- -*---------------HYDRO RESERVOIRS OPTIONS-------------------- -*Interpretation of the seasonal level of hydro reservoirs (QHYRSSEQ) -$setglobal HYRS_AGG hydro_year_agg -*!option hydro_year_agg !Text "The storage level of hydro reservoirs (QHYRSSEQ) will be scaled so the Seasons included in the optimization represent an annual behaviour" -*!option hydro_season_agg !Text "The storage level of hydro reservoirs (QHYRSSEQ) will be scaled so the Seasons included in the optimization represent a seasonal behaviour" - -* Relax seasonal limits for hydropower storages when running the model with less than 26 seasons (in HYRSDATA.inc) -$setglobal RELAX_HYDROSTORAGE yes -*!option yes -*---------------END: HYDRO RESERVOIRS OPTIONS-------------- -*---------------------------------------------------------- - -*------------------------------------------------- -*---- Timeseries scaling ------ -*Allows to modify the time series scaling approach -$setglobal timeseries_scaling usedtimesteps_timseries_scaling -*!option usedtimesteps_timseries_scaling !Text "Timeseries values are scaled linearly by the following factor: scaling factor = annual energy content / sum of the energy in the used part of the timeseries" -*!option full_timeseries_scaling !Text "Timeseries values are scaled linearly by the following factor: scaling factor = annual energy content / sum of the energy in the full timeseries" - -*----END: Timeseries scaling -*------------------------------------------------- - -*------------------------------------------------- -*---- IGKRATE data ------ -*Includes stochastic outages. If activated, IGKRATE will take the values in file IGKRATE.gdx, else it will be built based on GKRATE -$setglobal IGKRATE_STOCHASTIC -*!option yes -*---- end: IGKRATE calculation ------ -*------------------------------------------------- - -*-------- Balancing market --------- -* overall control variable BalancingMarket must be 'yes' if any of the other BalancingMarket controls are: -* Peforms the balancing market optimization -*Note: it is meant to be combined with Unit Commitment and import_results add-ons. It can also be combined with ancilliary services -$setglobal BalancingMarket -*!option yes - -*Define the purpose of the balancing run. -$setglobal BALANCINGRUNPURPOSE TSOREDISPATCH -*!option INTRADAYMARKET !Text "The run will simulate INTRADAY markets" -*!option TSOREDISPATCH !Text "The run will simulate the re-dispatch optimization from the TSO perspective (congetion management), adding penalties to compensate for forced re-dispatch of the units based on the TSO needs" - -*If activated the TSO will also compensate generators for the forced down re-dispatch due to forecast errors, ramping limits, etc. (only relevant if BALANCINGRUNPURPOSE=TSOREDISPATCH) (to be finished) -$setglobal FORCEDDOWNREDISPATCH -*!option yes - -*Define which units will be allowed to change their commitment status (on/off) (requires Unit Commitment addon to be on) -$setglobal CommitmentStatus NoChange -*!option NoChange !Text "The units will not be allowed to change their commitment, which will be taken from previous runs " -*!option FastUnitsChange !Text "The slow units will not be allowed to change their commitment, which will be taken from previous runs " -*!option None !Text "All the units will be allowed to change their commitment with respect to previous runs" - -*Restricts heat market from participating in the balancing market by restricting relevant heat generation variables from previous runs and not including the heat balance equation -$setglobal NOHEATMARKET -*!option yes -*-------- END: Balancing market --------- - -*------------------------------------------------------------------------------- -* The following global variables concern the choice of add-on modules to include. -* Include a module by assigning yes . -* Note that some of the choices are mutually dependent. - -* Presently some of the addons are commented out - -* they may or may not be working (at least with an appropriate data set), -* however, it has not been checked. Please take contact if problems. - -* Combine two technologies to one to achieve e.g. multifuel characteristics. -$setglobal COMBTECH -*!option yes - -*-----------------HYDROGEN ADDON--------------------------------------- -* overall control variable HYDROGEN must be 'yes' if any of the other HYDROGEN controls are: -* Set demands for hydrogen consumption and enable hydrogen technologies (some options require COMBTECH to be activated too). -$Setglobal HYDROGEN YES -*!option yes - -* Allows investments in hydrogen transport -$Setglobal H2TransInvest YES -*!option yes - -SCALAR XH2INVESTSTART 'Year from which endogenous decisions in H2 transmission capacities are allowed' ; -XH2INVESTSTART= 2030; - -*Adds Economies of Scale in H2 transmission. It requires to use the MIP solver, so remember to activate it (Dataset not updated for new countries in pan-European system) -$setglobal ES_H2TRANS - -* Allows import of Hydrogen from 3rd countries outside Balmorel -$Setglobal IMPORT_H2 YES -*!option yes - -* Allows flexible demand of H2 in regions (set ratio of flexible demand in HYDROGEN_FLEXDH2 with the scalar THETA_FLEX_DH2) -$setglobal flexible_h2_space -*!option yes - -*-----------------END: HYDROGEN ADDON--------------------------------------- - -* Use stepwise linear fuel prices -$Setglobal STEPWISEPRICE - -* Set a common maximum for fuels. (it should be checked before using it) -$Setglobal LIMITSFORFUELS -*!option yes - -* Allow demand elasticity (it should be checked before using it) -$setglobal DFLEXQUANT -*!option yes - -* Allow demand response (requires NETDEMAND) (it should be checked before using it) -$setglobal DEMANDRESPONSE -*!option yes - -* Permit exchange of electricity with third regions using a price interface (in contrast to X3FX) (it should be checked before using it) -$setglobal X3V -*!option yes - -* Grid tariffs on electricity use (requires NETDEMAND) -$setglobal GRIDTARIFFS -*!option yes - -* Taxes addon (requires NETDEMAND) -$setglobal TAXES -*!option yes - -* Transmission ramping addon (it asssumes seasonal linking) -$setglobal TRANS_RAMP -*!option yes - -*-----------------------ANCILLARY SERVICES---------------------------------------------------------------------------------------------------- -* Ancillary services addon (it requires UnitComm to be active). The other options require this one to be activated. -$setglobal ANC_SERV -*!option yes - -* FCR reserve requirement activated -$setglobal FCR -*!option yes - -* AFRR reserve requirement activated -$setglobal AFRR yes -*!option yes - -* MFRR reserve requirement activated (NOT FINISHED) -$setglobal MFRR -*!option yes - -* MRR reserve requirement activated (NOT FINISHED) -$setglobal MRR -*!option yes - -* Allow VRE to provide for reserves -$setglobal ANC_SERV_VRE YES -*!option yes - -*Include down regulation reserves. For simplification, down regulation of spinning reserves can be disactivated, since they are generally less expensive than up regulation. -$setglobal DOWN_REGULATION_INCLUDED -*!option yes -*-----------------------END: ANCILLIARY SERVICES---------------------------------------------------------------------------------------------------- - -* Make investments in technologies only at specified capacities. (it should be checked before using it) -$setglobal AGKNDISC -*!option yes -*!onlyif %BB2%==yes -*!onlyif %solvetype%==MIP - - -* Use the flow-based capacity allocation methodology -$Setglobal FlowBased -*!option yes - -* Set short storages to be inter- or intra-seasonal -* according to GDSTOINTERS in GDATA (default) or all or none -$setglobal stointers -*! option default Use as specified by GDSTOINTERS in GDATA -*! option all Let all storage technologies be inter-seasonal -*! option none Let no storage technologies be inter-seasonal (i.e., let all be intra-seasonal) - - -* Bypass of 'turbine' (electricity production) on CHP units. -$setglobal bypass yes -*!option yes - - -*-----------------------TECHNOLOGY DECOMMISSIONING-------------------------------------------------------- -* overall control variable DECOM must be 'yes' if any of the other decommissioning controls are. -$setglobal DECOM yes -*!option yes - -*-------ENDOGENOUS CAPACITIES---------- -* Note: If no option for endogenous capacities is activated, endogenous investments will not be decommissioned - -* Adds Endogenous capacities will maximum stay in the system as much as their lifetimes: -$setglobal LIFETIME_DECOM_ENDO_G YES -*!option yes - -* Adds Endogenous capacities can be decommissioned based on their profitability: -$setglobal ECONOMIC_DECOM_ENDO_G yes -*!option yes - -* Adds Endogenous decommissioned endogenous capacities can be brought back to the energy system. To be combined with the other decommissioning options: -$setglobal REVERT_DECOM_ENDO_G yes -*!option yes - -*--------END OF ENDOGENOUS CAPACITIES----- - -*--------EXOGENOUS CAPACITIES------------ -* Note: If either NO_DECOM_EXO_G, or LIFETIME_DECOM_EXO_G, or ECONOMIC_DECOM_EXO_Gor is activated, then the parameter GKFX will be recalculated so capacities only increase in the system. - -SCALAR GDECOMEXOSTART 'Year from which endogenous decisions in decommissioning of exogenous generation capacities are allowed'; -GDECOMEXOSTART= 2025; - -SCALAR GDECOMEXOPOTSTART 'Starting year to calculate the yearly decommissioning capacity potential, i.e. exogenous decommissioning occuring before this year will not be considered' ; -GDECOMEXOPOTSTART= 2016; - -* Adds No decommissioning of exogenous capacities will take place at all. The capacities in the recalculated GKFX will take place in the optimization -* Note: This option is not compatible with the other exogenous capacities decommissioning options. -$setglobal NO_DECOM_EXO_G -*!option yes - -* Adds Exogenous capacities will maximum stay in the system as much as their lifetimes (or as much as political decissions suggest it, for instance), which should be represented in the yearly development of capacities of the input parameter GKFX: -$setglobal LIFETIME_DECOM_EXO_G YES -*!option yes - -* Adds Exogenous capacities can be decommissioned based on their profitability: -$setglobal ECONOMIC_DECOM_EXO_G yes -*!option yes - -* Adds Endogenous decommissioned exogenous capacities can be brought back to the energy system. To be combined with the other decommissioning options: -$setglobal REVERT_DECOM_EXO_G yes -*!option yes -*--------END OF ENDOGENOUS CAPACITIES----- -*-----------------------End of TECHNOLOGY DECOMMISSIONING-------------------------------------------------------- - - -*-------------------- UNIT COMMITMENT ----------------------------------------------------------- -* overall control variable UnitComm must be 'yes' if any of the other unit commitment controls are: - -$setglobal UnitComm -*!option yes - -* Adds minimal production-when-on: -$setglobal MINFUELCONS YES -*!option yes -* Adds respecting minimum off time of the capacities: -$setglobal MINSTARTUPTIME yes -*!option yes -* Adds respecting minimum on time of the capacities: -$setglobal MINSHUTDOWNTIME yes -*!option yes -* Adds ramping technical limitations and stepwise costs to the Power plants when-on: -$setglobal STEPWISE_RAMPING_UC ramp_const -*!option ramp_const_cost !Text "With ramping constraints and ramping costs" -*!option ramp_const !Text "With ramping constraints but without ramping costs" -*!option no_ramping !Text "Neither ramping constraints nor ramping costs" -* Adds optimisation of planned maintenance of the generation and storage technologies -$setglobal PLANNED_MAINTENANCE -*!option yes - -* Seasonal link is on for all UC options activated. This means that past seasons will influence future seasons. -* This option increases computanional time but assures continuity in the fuel consumption profile. -$setglobal SEASONALLINKUC -*!option yes - -* The production interval is segmented into a number of disjunct pieces, each with its own costs: NOT IMPLEMENTED -$setglobal UnitCseg -*!option yes -*-------------------- End of UNIT COMMITMENT ----------------------------------------------------------- - -*--------------------STEPWISE RAMPING (LINEAR VERSION)----------------------------------------------------------- -* overall control variable Stepwise_ramping must be 'yes' if any of the other stepwise ramping controls are: -* This add-on is an alternative to Unit Commitment to model ramping constraints without using MIP. This add-on uses currently the relevant data and sets from the Unit Commitment add-on -* This add-on is not compatible with the Unit Commitment stepwiseramping option -* The use of this add-on togeter with the rest of options of Unit Commitment add-on has not been tested, so, unless tested, this add-on should not be activated if UnitComm is on. - -$setglobal STEPWISE_RAMPING -*!option yes - -* Seasonal ramping link is on. This means that the fuel consumption of the last element ot the set T of the set S will be linked to the first element of the set T of the set S+1. -* This option increases computanional time but assures continuity in the fuel consumption profile. -$setglobal SEASONALLINKRAMPING -*!option yes - -*----------------END OF STEPWISE RAMPING (LINEAR VERSION)---------------------------------------------------------- - -* Options timeaggr control automatic aggregation of time (it should be checked before using it). -$setglobal timeaggr -*!option yes - - -*------------------------------------------------------------------------------- -* OptiFlow model. -*------------------------------------------------------------------------------- -$setglobal OPTIFLOW -*!option yes -* Addon APKNdisc: discrete size investments in PROC. -$setglobal APKNdisc -*!option yes -*Investments in Optiflow technologies -$setglobal inv yes -*! option yes -*Model solved as MIP -$setglobal solveOptiFlowmip -*! option yes - -* Debug possibilities: -$Setglobal addEPStoL -*! option yes -* Not needed if there are no capacity bounds on internal proc -* It will be needed if there are capacity bounds on some internal proc, therefore add them only in that case (requires some coding, TODO). -* With such minimal use the infeasibilities will be moved to SOSIBU proc whenever possible. -$Setglobal useQNODEslack -*! option -$Setglobal useSSBslack -*! option yes -$Setglobal useShareSlack -*! option yes -* Option uniquesol permit to use quadratic terms in QOBJ in order to attain unique solution. -* Should be used for debug on small systems only. -$Setglobal uniquesol -*! option yes -* Testing ONLY: -$setglobal singlearea -*! option yes -* Testing ONLY: -$setglobal addUP -*! option yes -*------------------------------------------------------------------------------- -*Optiflow end -*------------------------------------------------------------------------------- - -* In model Balbase4 (BB4) indicate the strategy for relative weighting of years -$setglobal bb4weighty shareYYY -*!option same !Text "Use same weights for all Y" -*!option shareYYY !Text "Years in YYY but not in Y are shared between two nearest (first and last years double the shared weight contribution)" - -*=============================================================================== -*=============================================================================== -* Relative paths -*=============================================================================== -*=============================================================================== -* No choices, they must be set as shown. Note the format. -* They are to be used as illustrated below and elsewhere in the code. -* -$ifi not %system.filesys%==UNIX $goto endofUNIXrelpaths -$setglobal relpathModel "" -*!fixedvalue -$setglobal relpathoutput "../output/" -*!fixedvalue -$setglobal relpathInputdata2GDX "../output/inputout/" -*!fixedvalue -$setglobal relpathtemp "../output/temp/" -*!fixedvalue -$label endofUNIXrelpaths - -$ifi not %system.filesys%==MSNT $goto endofMSNTrelpaths -$setglobal relpathModel "" -*!fixedvalue -$setglobal relpathoutput "..\output\" -*!fixedvalue -$setglobal relpathInputdata2GDX "..\output\inputout\" -*!fixedvalue -$setglobal relpathtemp "..\output\temp\" -*!fixedvalue -$label endofMSNTrelpaths - -*=============================================================================== -*=============================================================================== -* Some interaction between models: -*=============================================================================== -*=============================================================================== - -* The following options are related to interplay between models, -* e.g. one model output serving as input to another model. - -* Overall control to export results so they can be used in future runs : -$Setglobal export_results yes -*!option yes - -*-------------------------------------------- -*--------------IMPORT OF RESULTS---------------- -*-------------------------------------------- -* Overall control to import results so they can be used in future runs: -*NOTE: In order for results to work fine, the set S used in the runs should be contained in the import results. -*NOTE: In order for results to work fine, the first element in set T of the import results should match the one used in the current run. -$Setglobal import_results -*!option yes - -*------------ IMPORT OPTIONS ---------------- - -* -----------------ENERGY DISPATCH-------------------------- - -*Adds energy dispatch (demand, generation, transmission) from previous runs -$setglobal ADDENERGYDISPATCH -*!option yes -* -----------------END OF ENERGY DISPATCH-------------------------- - -* ------------------HYDRO--------------------------------- -* For this model run it is possible to use values found from previuos solutions to specify use of hydro power -$setglobal HYRSBB123 none -*!option quant !Text "Use seasonal quantities of hydro generation (from HYRSG.gdx??) in this run ('primal decomposition')(not implemented in BB4)" -*!option price !Text "Use seasonal prices for hydro generation (from WATERVAL.gdx) in this run ('dual decomposition')" -*!option quantprice !Text "Use seasonal quantities and prices for hydro generation (from HYRSG.gdx?? and WATERVAL.gdx) in in this run (not implemented in BB4)" -*!option cont !Text "Use seasonal content for hydro generation (from VHYRS_SL.gdx) in in this run" -*!option none !Text "Do not not use this hydro addon" -* ------------------ END OF HYDRO--------------------------------- - -*--------------------INTERSEASONAL STORAGE----------------------------------------------------------- -*Import inter-seasonal electricity storage data from previous runs -$Setglobal ADDESTOVOLTS none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "Import electricity storage contents at beginning of time segment (ESTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with ESTOVOLTSVAL.gdx from previous runs. " -*!option none !Text "Do not not use this addon" - -*Import inter-seasonal heat storage data from previous runs -$Setglobal ADDHSTOVOLTS none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "Import Heat storage contents at beginning of time segment (HSTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with HSTOVOLTSVAL.gdx from previous runs." -*!option none !Text "Do not not use this addon" - -*Import intra-seasonal electricity storage data from previous runs -$Setglobal ADDESTOVOLT none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "(to be finished) Import electricity storage contents at beginning of time segment (ESTOVOLT.gdx) for the first element in set T and S, and puts a price to generation (ESTOVOLTVAL) from previous runs." -*!option none !Text "Do not not use this addon" - -*Import intra-seasonal heat storage data from previous runs -$Setglobal ADDHSTOVOLT none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "(to be finished) Import Heat storage contents at beginning of time segment (HSTOVOLT.gdx) for the first element in set T and S, and puts a price to generation (HSTOVOLTVAL) from previous runs" -*!option none !Text "Do not not use this addon" - -*Import inter-seasonal hydrogen storage data from previous runs (requires HYDROGEN addon) -$Setglobal ADDH2STOVOLTS none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "Import hydrogen storage contents at beginning of time segment (H2STOVOLTS.gdx) for the first element in set T and S, and puts a price to use with H2STOVOLTSVAL.gdx from previous runs." -*!option none !Text "Do not not use this addon" - -*Import inter-seasonal biomethane storage data from previous runs (requires HYDROGEN addon) -$Setglobal ADDBIOMETHSTOVOLTS none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" -*!option price !Text "Import biomethane storage contents at beginning of time segment (BIOMETHSTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with BIOMETHSTOVOLTSVAL.gdx from previous runs." -*!option none !Text "Do not not use this addon" - -*Import EV state of charge from previous runs (requires EV addon) -$Setglobal ADDEVSTOS none -*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition') (only works if EV_INTERSEASONAL is activated)" -*!option netcharging !Text "Use seasonal net charging of EV in this run ('primal decomposition') (only works if EV_INTERSEASONAL is NOT activated)" -*!option none !Text "Do not not use this addon" - - - -*--------------------END OF INTERSEASONAL STORAGE----------------------------------------------------------- - -*--------------------INVESTMENTS AND DECOMMISSIONING----------------------------------------------------------- -*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. - -*Import generation and storage technology capacity development from previous runs -$setglobal ADDTECHDEV -*!option yes - -*Add expensive to operate backup generation technologies (electricity, heat, ...). It often occurs that the investment optimization underestimates the need for power. -$setglobal ADDBACKUPGEN -*!option yes - -*Import transmission development from previous runs -$setglobal ADDTRANSDEV -*!option yes - -*Import heat transmission development from previous runs -$setglobal ADDHEATTRANSDEV -*!option yes - -*Import H2 transmission development from previous runs -$setglobal ADDH2TRANSDEV -*!option yes -*--------------------END OF INVESTMENTS AND DECOMMISSIONING----------------------------------------------------------- - -*--------------------FUEL PRICES----------------------------------------------------------- -*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. -*Import fuel prices development from previous runs -$setglobal ADDFUELPRICE -*!option yes -*--------------------END OF FUEL PRICES----------------------------------------------------------- - -*--------------------FUEL USE----------------------------------------------------------- -*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. -*Import seasonal fuel use upper limit from previous runs -$setglobal ADDMAXFUELUSES -*!option yes -*--------------------END OF FUEL USE----------------------------------------------------------- - -*--------------------PLANNED MAINTENANCE----------------------------------------------------------- -*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. -*Import optimized planned maintenance from previous runs (investments and/or decomissioning must not be allowed if this option is activated) -$setglobal ADDPLANNEDMAINTENANCE -*!option yes -*--------------------END OF PLANNED MAINTENANCE----------------------------------------------------------- - -*--------------------TRANSPORT DEMAND----------------------------------------------------------- -*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. -*Import demand per term (T) from the transport sector -$setglobal ADDTERMTRANSPORTDEMAND -*!option yes - -*Import seasonal demand from the transport sector -$setglobal ADDSEASONALTRANSPORTDEMAND -*!option yes - -*Import peak demand from the transport sector -$setglobal ADDPEAKTRANSPORTDEMAND -*!option yes -*--------------------END OF TRANSPORT DEMAND----------------------------------------------------------- - -*--------------------INDIVIDUAL USERS----------------------------------------------------------- -*Import Share of heat demand in an individual user group. Requires GROUP_DEMAND_SHIFT to be activated -$setglobal ADDGROUP_DEMAND_SHIFT -*!option yes -*--------------------END OF INDIVIDUAL USERS----------------------------------------------------------- - - -*------------- END OF IMPORT OPTIONS ---------------- -*-------------------------------------------- -*--------------END OF IMPORT OF RESULTS---------------- -*-------------------------------------------- - - - - -*=============================================================================== -*=============================================================================== -* Output: -*=============================================================================== -*=============================================================================== - -* ------------------------------------------------------------------------------ -* Alternative presentations of input data -* ------------------------------------------------------------------------------ - -* It may be convenient under some circumstances to have the applied input data in other forms, -* this may be achieved by the following mechanism. - -* Make a summary of the input data in text format to file inputout.out: -$setglobal inputdatatxt "" -*!option "" !text do not make it -*!option yes !text make it when solving -*!option yesnosolve !text make it but do not solve - - -* Save the input data in gdx format for further processing by Gdx utilities, -* e.g. viewing (Gdxviewer), comparing (Gdxdiff), or transferring to other data formats like Excel or Access. -* Note that this will be done as a compile time operation, -* such that only the 'direct' data definitions (and no assignments) are reflected. -$setglobal INPUTDATA2GDX YES -*!option yes - - -* Transfer the input data in gdx format to a Microsoft Access database ../output/inputout/inputdataout.mdb: -$setglobal INPUTDATAGDX2MDB -*!option yes !onlyif %INPUTDATA2GDX%==yes -* Note: if you have established a link from another Access database to inputdataout.mdb -* close all tables in it before executing Balmorel in order to ensure updating of the links. - -* Merge input data with the output into the gdx file %CASEID%.gdx -$setglobal MERGEINPUTDATA -*!option yes - - -* Transfer the input data in gdx format to Microsoft Excel format: -* NOTWORKING: presently. -$setglobal INPUTDATAGDX2XLS -*!option yes - - -*------------------------------------------------------------------------------- -* Output from model solutions: -*------------------------------------------------------------------------------- - -* A quick way to get (some of) the relevant information is to make a gdx file with all information. -* This option will provide unloading of all that is available at the end of Balmorel.gms. -* -$setglobal all_endofmodelgdx yes -*!option yes !Save the file all_endofmodel.gdx to the model folder - - - - -* Make some output in text format to show some results of an execution. -* The detailed code for the writing of the files is given in /output/printout/printinc. -* Setting "yes" for PRINTFILES will make some standard printout files to folder /output/printout/. -$setglobal PRINTFILES -*!option yes - -$setglobal OUTPUT_SUMMARY yes -*!option yes - -* PRINTSEPARATOR is a single character used for separating columns in printfiles, -* convenient e.g. to use ';' for copy-paste to Excel. -$setglobal PRINTSEPARATOR ';' -*!option ' ' -*!option ';' -*!option ',' - -*------------------------------------------------------------------------------- -* Results collection for the present case -*------------------------------------------------------------------------------- - -* The following will establish a mechanism that will save annual optimization results -* from bb1 and bb2 (seasonal for bb3) as gdx files; at the end they may be merged to one gdx file. -* This merged file may then be transferred to an Access database or to Excel. -* It is to be seen in conjunction with saving annual results in file bb123.sim, -* which is accomplished using savepoint with value 1, cf '$Setglobal SAVEPOINTVALUE'. -* -* The following closely linked controls are used: -* SAVEPOINTVALUE, cf. above -* MERGESAVEPOINTRESULTS yes -* MERGEDSAVEPOINTRESULTS2MDB -* MERGEDSAVEPOINTRESULTS2SQLITE -* MERGEDSAVEPOINTRESULTS2XLS: presently not working, we are waiting for GAMS version 22.7, which has better support for this. -* MERGECASE/MERGEWITH -* DIFFCASE/DIFFWITH -* -* Savepoint: the GAMS command "Modelname.Savepoint=number;" -* The savepoint attribute tells GAMS to save a GDX file that contains the information on the current solution point. -* One can save the information from just the last solve or from every solve. -* The points that are saved can be used to provide an advanced basis, an integer program starting point or a NLP starting point. -* Numeric input is expected with the allowable numeric values being: -* 0 no point gdx file is to be saved -* 1 a point gdx file is to be saved from the last solve in the GAMS model -* 2 a point gdx file is to be saved from every solve in the GAMS model -* The value specified by $Setglobal SAVEPOINTVALUE will be used for savepoint. -* To be used with subsequent handling of output. -* -$setglobal SAVEPOINTVALUE 0 -*!option 0 -*!option 1 !mustif %MERGESAVEPOINTRESULTS%==yes !mustif %MERGEDSAVEPOINTRESULTS2GDX%==yes !mustif %MERGEDSAVEPOINTRESULTS2XLS%==yes !mustif not %MERGECASE%==none !mustif not %DIFFCASE%==none -*!option 2 !text Note: nothing implemented nor tested, so do not use it. - -* Use the $setglobal MERGESAVEPOINTRESULTS to choose whether to merge annual/seasonal results or not: -$setglobal MERGESAVEPOINTRESULTS -*!option yes !onlyif %SAVEPOINTVALUE%==1 -* Note: make sure that it is possible to make the new merged gdx file, -* e.g. make sure that the file *.gdx is not open in another application (like GAMD IDE). -* -* Then prepare for the necessary details: -$ifi %system.filesys%==MSNT -$setglobal batfileMERGESAVEPOINTRESULTS %relpathModel%MERGESAVEPOINTRESULTS.bat -*!option !fixedvalue -$ifi %system.filesys%==MSNT -file fileMERGESAVEPOINTRESULTSbat / %batfileMERGESAVEPOINTRESULTS% /; -$ifi %system.filesys%==MSNT -putclose fileMERGESAVEPOINTRESULTSbat; - -$ifi %system.filesys%==UNIX -$setglobal bashfileMERGESAVEPOINTRESULTS %relpathModel%MERGESAVEPOINTRESULTS.sh -*!option !fixedvalue -$ifi %system.filesys%==UNIX -file fileMERGESAVEPOINTRESULTSbash / %bashfileMERGESAVEPOINTRESULTS% /; -$ifi %system.filesys%==UNIX -putclose fileMERGESAVEPOINTRESULTSbash; - -$setglobal MERGEDSAVEPOINTRESULTS2MDB -*!option yes !onlyif %SAVEPOINTVALUE%==1 !onlyif %MERGESAVEPOINTRESULTS%==yes - -$setglobal MERGEDSAVEPOINTRESULTS2SQLITE -*!option yes !onlyif %SAVEPOINTVALUE%==1 !onlyif %MERGESAVEPOINTRESULTS%==yes - - -*------------------------------------------------------------------------------- -* Comparison between Cases: -*------------------------------------------------------------------------------- - -* The following will merge and/or compare two results. -* With option MERGECASE is set to NONE this will be not be done, otherwise it will. -* If done, the result will be in the output folder of the present case in the form of a GDX file. -* With option MERGEDSAVEPOINTRESULTS2MDB" this may then be transferred to a MDB file. -* All output go to the output folder of the present case. -* Similar considerations for DIFFCASE. - -$setglobal MERGECASE none -*!option none !text Comparison will not be made -*!option -* MERGEWITH defines the case with which to merge results. -$setglobal MERGEWITH CaseNonversioned -*!option !mustif not %MERGECASE%==none - -* The diff uses gdxdiff. The diffile only shows items that meaningfull can be compared, -* non-compared items are reported in the Balmorel.log file. -$setglobal DIFFCASE none -*!option none !text Comparison will not be made -*!option - -$setglobal DIFFWITH CaseNonversioned -*!option none !text Comparison will not be made -*!option !mustif not %DIFFCASE%==none - -* Then prepare for the necessary details: TODO -file fileMERGEWITHBASEbat / %batfileMERGEWITHBASE% /; -putclose fileMERGEWITHBASEbat; - - - - -*=============================================================================== -*=============================================================================== -* The model type's implication for solver type -*=============================================================================== -*=============================================================================== - -* The model type has implications for the solver type. -* Classical model types are LP (Linear Programming), QP (Quadratic Programming), MIP (Mixed Integer Programming). -$setglobal SOLVETYPE RMIP -*!option LP "Linear Programming" -*!option RMIP "Relaxed Mixed Integer Programming" -*!option MIP "Mixed Integer Programming" - -*!option yes -*!mustif %AGKNDISC%==yes -*!mustif %UnitComm%==yes - - - -*=============================================================================== -*=============================================================================== -* Input data: -*=============================================================================== -*=============================================================================== - -*------------------------------------------------------------------------------- -*------------------------------------------------------------------------------- -* Option semislash is used to control input data format for text files. -* With "$Setglobal semislash ;" the input files must include -* the declaration statement initially and must terminate with a "/;". -* With "$Setglobal semislash /" the input files do not contain this, but only data. -* Note that parameters and tables are identical declarations, however, -* when using "$Setglobal semislash /" make sure -* that the use of either "parameter" or "table" in Balmorel.gms for any data file -* corresponds to the data format used in the file. -* NOTE: Rev.3.03: Not fully implemented yet, you MUST use "$Setglobal semislash ;". -$setglobal semislash ";" -*!fixedvalue ; -**!option ; - - - - -* Domain overloading: The options specify the domain (indexes) that the identifiyer is declared on. -$setglobal GMINF_DOL YYY_CCCRRRAAA_FFF -*!option CCCRRRAAA_FFF -*!option YYY_CCCRRRAAA_FFF -* -$setglobal GMAXF_DOL YYY_CCCRRRAAA_FFF -*!option CCCRRRAAA_FFF -*!option YYY_CCCRRRAAA_FFF -* -$setglobal GEQF_DOL YYY_CCCRRRAAA_FFF -*!option CCCRRRAAA_FFF -*!option YYY_CCCRRRAAA_FFF -* -$setglobal XKRATE_DOL IRRRE_IRRRI_SSS -*!option IRRRE_IRRRI -*!option IRRRE_IRRRI_SSS -*!option IRRRE_IRRRI_SSS_TTT -* -$setglobal GKRATE_DOL AAA_GGG_SSS -*!option AAA_GGG_SSS -*!option AAA_GGG_SSS_TTT - -$setglobal WNDFLH_DOL AAA -*!option AAA_GGG -*!option AAA - -$setglobal SOLEFLH_DOL AAA -*!option AAA_GGG -*!option AAA - -$setglobal SOLHFLH_DOL AAA -*!option AAA_GGG -*!option AAA - -$setglobal GWAVE_DOL AAA -*!option AAA_GGG -*!option AAA - - - -*------------------------------------------------------------------------------- -* Active options will be reported to log file via file hellolog.inc -*------------------------------------------------------------------------------- - - -*------------------------------------------------------------------------------- -* End of Balopt.opt -*------------------------------------------------------------------------------- +* This file holds options that are used to control model functionality, +* including extentions in the form of addons, and interplay between models. + +* Note: in final version all relevant control settings will be indicated +* by an *!option statement, e.g. "*!option yes" and other instructions. + +* Note: If you work with BUI, the above is mandatory. +* Moreover, the only way to enter a comment in this file +* is to use a '*' as the first character on the line; +* thus, you can not use e.g., $ontext..$offtext or /*..*/ or // or !!. +* Further, if you work with BUI, this file will not be $included into Balmorel.gms, +* instead the file Balopt.bui will be $included. See the description elsewhere. + +*---- START: VQDEBUG ------------------------------------------------ +*----------------------------------------------------------------- +* overall control variable vqdebug must be 'yes' if any of the other vqdebug controls are: +* Debugging hints are available if you include feasiblity-ensuring variables. +* However, adding more variables will increase calculation time. +* Hence, if calculation time is an issue, it is recommended as default to not use them, +* and then, if the solver declares the problem infeasible, use them and resolve. +* Information of ... in the .log file? +$setglobal vqdebug +*!option yes + +*Reduce number of infeasibility variables. By default, infeasibility variables are added to many equations, which is not always required. +$setglobal reduced_vqdebug +*!option yes +*----------------------------------------------------------------- +*---- END: VQDEBUG ------------------------------------------------ + + +*=============================================================================== +*=============================================================================== +* Project and Case ID: +*=============================================================================== +*=============================================================================== + +* PROJECTID is the identification of the Project. +* Convenient, and additioanally needed if results shall be compared among projects. +* +$setglobal PROJECTID +*!option !fixedvalue +* +* +* CASEID is the Case identification string. It can be assigned freely, however, if +* the case is a base case to which other cases should be compared the name should be +* BASE. Normally the model in the base directory will be called BASE while +* any variants will have names as appropriate. Model results in the form of GDX files +* (or Access MDBs) will have the CASEID as filename with the appropriate extension. +* Note that CASEID MUST be identical to folder name of the diretory holding the case. +* +$setglobal CASEID BASE +*!option !fixedvalue + + +*=============================================================================== +*=============================================================================== +* Model choices: +*=============================================================================== +*=============================================================================== + +*------------------------------------------------------------------------------- +* The following global variables concern the choice of model. +* If $Setglobal bb4 yes, BB4 is chosen. +$setglobal bb4 yes +*!option yes + +*=============================================================================== +*=============================================================================== +* Basic models details and Addon modules: +*=============================================================================== +*=============================================================================== + +*------------------------------------------------------------------------------- +* The following global variables concern the choice of details in some of the models. +* Note that some of the choices are mutually dependent. + +*-------- Seasonal rolling horizon --------- +* Optimize seasons with a rolling horizon approach instead of all together. +*NOTE: This option is supposed to be combined with the option "import_results", which must contain information for all S and at least the first element in T +$setglobal RollingSeasons +*!option yes + +SCALAR ROLLINGSEASONSNUMBER 'Number of seasons to be optimized at a time in each rolling season optimization'; +ROLLINGSEASONSNUMBER= 1; + +*-------- END: Seasonal rolling horizon --------- + +*-------- QDENET --------- +* Introduces the calculation of the net demand of different users (e.g. households, industry, etc). Relevant for taxes, grid tariffs, demand response, etc. +$setglobal NETDEMAND +*!option yes +*-------- END: QDENET --------- + +*----------------------------------------------------------------- +*---- Investments ------------------------------------------------ + +*---- Generation investments options---- + +* Permit investments in generation and storage capacity: +$setglobal TechInvest yes +*!option yes + +SCALAR GINVESTSTART 'Year from which endogenous decisions in generation capacities are allowed' ; +GINVESTSTART= 2025; + +*---- End: Generation investments options---- + +*---- Transmission investments options---- + +* Permit investments in transmission capacity: +$setglobal TransInvest YES +*!option yes + +SCALAR XINVESTSTART 'Year from which endogenous decisions in transmission capacities are allowed' ; +XINVESTSTART= 2035; + +*---- End: Transmission investments options---- + +*----END: Investments--------------------------------------------------- +*----------------------------------------------------------------------- + +*-----------------------HEAT TRANSFER-------------------------------------------------------- +*overall control variable HEATTRANS must be 'yes' if any of the other heat trans controls are. + +* Permit heat transmission between areas. +$setglobal HEATTRANS YES +*!option yes + +* Permit heat transmission investments between areas. +$setglobal HeatTransInvest +*!option yes + +SCALAR XHINVESTSTART 'Year from which endogenous decisions in heat transmission capacities are allowed' ; +XHINVESTSTART= 2025; + +* Permit temperature lift from heat pumps to move energy from low temperature areas to high temperature ones (NOT WORKING, TO BE CHECKED). +$setglobal HeatTempLift +*!option yes +*-----------------------END OF: HEAT TRANSFER-------------------------------------------------------- + +* Include industry data in the optimization. Requires HEATTRANSFER add-on to be activated. +$setglobal INDUSTRY YES +*!option yes + +*--------------------INDIVIDUAL USERS-------------------------------------------------------------- +* overall control variable INDIVUSERS must be 'yes' if any of the other INDIVUSERS controls are: + +* Include individual users data in the optimization. Requires HEATTRANSFER add-on to be activated. +$setglobal INDIVUSERS YES +*!option yes + +* Include the possibility to shift exogenous heat demand between technology groups. +$setglobal GROUP_DEMAND_SHIFT +*!option yes +*-----------------END: INDIVIDUAL USERS-------------------------------------------------------------- + +* Include seasonal variation of heat pump's COP. If not activated, heat pumps will have a constant COP during the year. +$setglobal SEASONALCOP +*!option yes + +*------------START OF: OFFSHORE GRIDS-------------------------- +* overall control variable OFFSHOREGRID must be 'yes' if any of the other OFFSHOREGRID controls are: +* Allow to build a complicated offshore grid with hubs in the sea. Requires MIP to work as intended since technologies are modelled with economies of scale via SOS variables. If RMIP is used, it will become a linear problem. +$setglobal OFFSHOREGRID NO +*!option yes + +*Adds Economies of Scale in generation elements that are part of offshore grids. It requires to use the MIP solver, so remember to activate it. +$setglobal OFFSHOREGRID_ES_GEN +*!option yes + +*Adds Economies of Scale in electricity transmission elements that are part of offshore grids. It requires to use the MIP solver, so remember to activate it. +$setglobal OFFSHOREGRID_ES_ELTRANS +*!option yes +*------------END OF: OFFSHORE GRIDS-------------------------- + + +* Allow Carbon Capture Storage (CCS) technologies. +$setglobal CCS YES +*!option yes + +* Allow curtailment of variable renewable energy generators (BB4) +$setglobal VRESHUTDOWN yes +*!option yes + +*------------------------------EV ADDON------------------------------------------------- +* overall control variable EV must be 'yes' if any of the other EV controls are: + +$setglobal EV +*!option YES + +* Adds DUMB charging: +$setglobal DUMB +*!option yes + +* Adds smart charging. Only smart charging, without V2G!: +$setglobal SMART +*!option yes + +* Adds V2G charging: +$setglobal V2G YES +*!option yes + +* Restricts PHEV vehicles from doing V2G (only relevant if V2G is activated): +$setglobal NO_PHEV_V2G yes +*!option yes + +* Adds step charging scheme (NOT SURE IT IS WORKING ANY MORE): +$setglobal STEPCHARGSCHEME +*!option yes + +* Adds cycle degradation (NOT SURE IT IS WORKING ANY MORE, COSTS SHOULD BE ANNUALIZED): +$setglobal DEGCYCLE +*!option yes + +* Adds calendar degradation (NOT SURE IT IS WORKING ANY MORE, COSTS SHOULD BE ANNUALIZED): +$setglobal DEGCAL +*!option yes + +* EV timeseries will be averaged (relevant if less than all time steps in TTT are used). +* NOTE: It currently only works if T are equally distanced from each other and if the first T chosen is equal to the first element int TTT). If this is not desired, one can replace the timeseries with new averaged-with-another-procedude timeseries +* NOTE: It might lead to infeasibilities though +$setglobal EV_PROFILE_AVG yes +*!option yes + +*Adds EV infeasibility variables (added here on purpose, since if not all TTT are used it is very likely to run into small infeasibilities) +*Note: The value of the parameter PENALTQ should be in line with the cost assumptions in the model to obtain meaninful results +$setglobal EV_infeas yes +*!option + +* Models EV as inter-seasonal storage (if it is not activated, then EVs are model as intra-seasonal storage): +$setglobal EV_INTERSEASONAL +*!option yes +*------------------------------END: EV ADDON------------------------------------------------- + +*------------------------------TRANSPORT ADDON------------------------------------------------- +* overall control variable TRANSPORT must be 'yes' if any of the other TRANSPORT controls are: +* Include transport data in the optimization (it is supposed to complement the EV addon, so check consistency of data before using it). +$setglobal TRANSPORT YES +*!option yes + +* Defines the commodity used to model synthetic fuel generation. +$setglobal TRANSPORT_SYNTHFUEL_COMMODITY HYDROGEN +*!option ELECTRICITY !Text "The demand for synthetic fuel generation is modelled as electricity demand" +*!option HYDROGEN !Text "The demand for synthetic fuel generation is modelled as hydrogen demand (requires hydrogen addon to be activated)" + +* Defines the possibility for the transport demand of synthetic fuels to be aggregated internationally instead of having to satisfy it regionally. +$setglobal TRANSPORT_DEMAND_AGGREGATED + + +*------------------------------END:TRANSPORT ADDON------------------------------------------------- + +*----------------------------------------------------------- +*---------------HYDRO RESERVOIRS OPTIONS-------------------- +*Interpretation of the seasonal level of hydro reservoirs (QHYRSSEQ) +$setglobal HYRS_AGG hydro_year_agg +*!option hydro_year_agg !Text "The storage level of hydro reservoirs (QHYRSSEQ) will be scaled so the Seasons included in the optimization represent an annual behaviour" +*!option hydro_season_agg !Text "The storage level of hydro reservoirs (QHYRSSEQ) will be scaled so the Seasons included in the optimization represent a seasonal behaviour" + +* Relax seasonal limits for hydropower storages when running the model with less than 26 seasons (in HYRSDATA.inc) +$setglobal RELAX_HYDROSTORAGE yes +*!option yes +*---------------END: HYDRO RESERVOIRS OPTIONS-------------- +*---------------------------------------------------------- + +*------------------------------------------------- +*---- Timeseries scaling ------ +*Allows to modify the time series scaling approach +$setglobal timeseries_scaling usedtimesteps_timseries_scaling +*!option usedtimesteps_timseries_scaling !Text "Timeseries values are scaled linearly by the following factor: scaling factor = annual energy content / sum of the energy in the used part of the timeseries" +*!option full_timeseries_scaling !Text "Timeseries values are scaled linearly by the following factor: scaling factor = annual energy content / sum of the energy in the full timeseries" + +*----END: Timeseries scaling +*------------------------------------------------- + +*------------------------------------------------- +*---- IGKRATE data ------ +*Includes stochastic outages. If activated, IGKRATE will take the values in file IGKRATE.gdx, else it will be built based on GKRATE +$setglobal IGKRATE_STOCHASTIC +*!option yes +*---- end: IGKRATE calculation ------ +*------------------------------------------------- + +*-------- Balancing market --------- +* overall control variable BalancingMarket must be 'yes' if any of the other BalancingMarket controls are: +* Peforms the balancing market optimization +*Note: it is meant to be combined with Unit Commitment and import_results add-ons. It can also be combined with ancilliary services +$setglobal BalancingMarket +*!option yes + +*Define the purpose of the balancing run. +$setglobal BALANCINGRUNPURPOSE TSOREDISPATCH +*!option INTRADAYMARKET !Text "The run will simulate INTRADAY markets" +*!option TSOREDISPATCH !Text "The run will simulate the re-dispatch optimization from the TSO perspective (congetion management), adding penalties to compensate for forced re-dispatch of the units based on the TSO needs" + +*If activated the TSO will also compensate generators for the forced down re-dispatch due to forecast errors, ramping limits, etc. (only relevant if BALANCINGRUNPURPOSE=TSOREDISPATCH) (to be finished) +$setglobal FORCEDDOWNREDISPATCH +*!option yes + +*Define which units will be allowed to change their commitment status (on/off) (requires Unit Commitment addon to be on) +$setglobal CommitmentStatus NoChange +*!option NoChange !Text "The units will not be allowed to change their commitment, which will be taken from previous runs " +*!option FastUnitsChange !Text "The slow units will not be allowed to change their commitment, which will be taken from previous runs " +*!option None !Text "All the units will be allowed to change their commitment with respect to previous runs" + +*Restricts heat market from participating in the balancing market by restricting relevant heat generation variables from previous runs and not including the heat balance equation +$setglobal NOHEATMARKET +*!option yes +*-------- END: Balancing market --------- + +*------------------------------------------------------------------------------- +* The following global variables concern the choice of add-on modules to include. +* Include a module by assigning yes . +* Note that some of the choices are mutually dependent. + +* Presently some of the addons are commented out - +* they may or may not be working (at least with an appropriate data set), +* however, it has not been checked. Please take contact if problems. + +* Combine two technologies to one to achieve e.g. multifuel characteristics. +$setglobal COMBTECH +*!option yes + +*-----------------HYDROGEN ADDON--------------------------------------- +* overall control variable HYDROGEN must be 'yes' if any of the other HYDROGEN controls are: +* Set demands for hydrogen consumption and enable hydrogen technologies (some options require COMBTECH to be activated too). +$Setglobal HYDROGEN YES +*!option yes + +* Allows investments in hydrogen transport +$Setglobal H2TransInvest YES +*!option yes + +SCALAR XH2INVESTSTART 'Year from which endogenous decisions in H2 transmission capacities are allowed' ; +XH2INVESTSTART= 2030; + +*Adds Economies of Scale in H2 transmission. It requires to use the MIP solver, so remember to activate it (Dataset not updated for new countries in pan-European system) +$setglobal ES_H2TRANS + +* Allows import of Hydrogen from 3rd countries outside Balmorel +$Setglobal IMPORT_H2 YES +*!option yes + +* Allows flexible demand of H2 in regions (set ratio of flexible demand in HYDROGEN_FLEXDH2 with the scalar THETA_FLEX_DH2) +$setglobal flexible_h2_space +*!option yes + +*-----------------END: HYDROGEN ADDON--------------------------------------- + +* Use stepwise linear fuel prices +$Setglobal STEPWISEPRICE + +* Set a common maximum for fuels. (it should be checked before using it) +$Setglobal LIMITSFORFUELS +*!option yes + +* Allow demand elasticity (it should be checked before using it) +$setglobal DFLEXQUANT +*!option yes + +* Allow demand response (requires NETDEMAND) (it should be checked before using it) +$setglobal DEMANDRESPONSE +*!option yes + +* Permit exchange of electricity with third regions using a price interface (in contrast to X3FX) (it should be checked before using it) +$setglobal X3V +*!option yes + +* Grid tariffs on electricity use (requires NETDEMAND) +$setglobal GRIDTARIFFS +*!option yes + +* Taxes addon (requires NETDEMAND) +$setglobal TAXES +*!option yes + +* Transmission ramping addon (it asssumes seasonal linking) +$setglobal TRANS_RAMP +*!option yes + +*-----------------------ANCILLARY SERVICES---------------------------------------------------------------------------------------------------- +* Ancillary services addon (it requires UnitComm to be active). The other options require this one to be activated. +$setglobal ANC_SERV +*!option yes + +* FCR reserve requirement activated +$setglobal FCR +*!option yes + +* AFRR reserve requirement activated +$setglobal AFRR yes +*!option yes + +* MFRR reserve requirement activated (NOT FINISHED) +$setglobal MFRR +*!option yes + +* MRR reserve requirement activated (NOT FINISHED) +$setglobal MRR +*!option yes + +* Allow VRE to provide for reserves +$setglobal ANC_SERV_VRE YES +*!option yes + +*Include down regulation reserves. For simplification, down regulation of spinning reserves can be disactivated, since they are generally less expensive than up regulation. +$setglobal DOWN_REGULATION_INCLUDED +*!option yes +*-----------------------END: ANCILLIARY SERVICES---------------------------------------------------------------------------------------------------- + +* Make investments in technologies only at specified capacities. (it should be checked before using it) +$setglobal AGKNDISC +*!option yes +*!onlyif %BB2%==yes +*!onlyif %solvetype%==MIP + + +* Use the flow-based capacity allocation methodology +$Setglobal FlowBased +*!option yes + +* Set short storages to be inter- or intra-seasonal +* according to GDSTOINTERS in GDATA (default) or all or none +$setglobal stointers +*! option default Use as specified by GDSTOINTERS in GDATA +*! option all Let all storage technologies be inter-seasonal +*! option none Let no storage technologies be inter-seasonal (i.e., let all be intra-seasonal) + + +* Bypass of 'turbine' (electricity production) on CHP units. +$setglobal bypass yes +*!option yes + + +*-----------------------TECHNOLOGY DECOMMISSIONING-------------------------------------------------------- +* overall control variable DECOM must be 'yes' if any of the other decommissioning controls are. +$setglobal DECOM yes +*!option yes + +*-------ENDOGENOUS CAPACITIES---------- +* Note: If no option for endogenous capacities is activated, endogenous investments will not be decommissioned + +* Adds Endogenous capacities will maximum stay in the system as much as their lifetimes: +$setglobal LIFETIME_DECOM_ENDO_G YES +*!option yes + +* Adds Endogenous capacities can be decommissioned based on their profitability: +$setglobal ECONOMIC_DECOM_ENDO_G yes +*!option yes + +* Adds Endogenous decommissioned endogenous capacities can be brought back to the energy system. To be combined with the other decommissioning options: +$setglobal REVERT_DECOM_ENDO_G yes +*!option yes + +*--------END OF ENDOGENOUS CAPACITIES----- + +*--------EXOGENOUS CAPACITIES------------ +* Note: If either NO_DECOM_EXO_G, or LIFETIME_DECOM_EXO_G, or ECONOMIC_DECOM_EXO_Gor is activated, then the parameter GKFX will be recalculated so capacities only increase in the system. + +SCALAR GDECOMEXOSTART 'Year from which endogenous decisions in decommissioning of exogenous generation capacities are allowed'; +GDECOMEXOSTART= 2025; + +SCALAR GDECOMEXOPOTSTART 'Starting year to calculate the yearly decommissioning capacity potential, i.e. exogenous decommissioning occuring before this year will not be considered' ; +GDECOMEXOPOTSTART= 2016; + +* Adds No decommissioning of exogenous capacities will take place at all. The capacities in the recalculated GKFX will take place in the optimization +* Note: This option is not compatible with the other exogenous capacities decommissioning options. +$setglobal NO_DECOM_EXO_G +*!option yes + +* Adds Exogenous capacities will maximum stay in the system as much as their lifetimes (or as much as political decissions suggest it, for instance), which should be represented in the yearly development of capacities of the input parameter GKFX: +$setglobal LIFETIME_DECOM_EXO_G YES +*!option yes + +* Adds Exogenous capacities can be decommissioned based on their profitability: +$setglobal ECONOMIC_DECOM_EXO_G yes +*!option yes + +* Adds Endogenous decommissioned exogenous capacities can be brought back to the energy system. To be combined with the other decommissioning options: +$setglobal REVERT_DECOM_EXO_G yes +*!option yes +*--------END OF ENDOGENOUS CAPACITIES----- +*-----------------------End of TECHNOLOGY DECOMMISSIONING-------------------------------------------------------- + + +*-------------------- UNIT COMMITMENT ----------------------------------------------------------- +* overall control variable UnitComm must be 'yes' if any of the other unit commitment controls are: + +$setglobal UnitComm +*!option yes + +* Adds minimal production-when-on: +$setglobal MINFUELCONS YES +*!option yes +* Adds respecting minimum off time of the capacities: +$setglobal MINSTARTUPTIME yes +*!option yes +* Adds respecting minimum on time of the capacities: +$setglobal MINSHUTDOWNTIME yes +*!option yes +* Adds ramping technical limitations and stepwise costs to the Power plants when-on: +$setglobal STEPWISE_RAMPING_UC ramp_const +*!option ramp_const_cost !Text "With ramping constraints and ramping costs" +*!option ramp_const !Text "With ramping constraints but without ramping costs" +*!option no_ramping !Text "Neither ramping constraints nor ramping costs" +* Adds optimisation of planned maintenance of the generation and storage technologies +$setglobal PLANNED_MAINTENANCE +*!option yes + +* Seasonal link is on for all UC options activated. This means that past seasons will influence future seasons. +* This option increases computanional time but assures continuity in the fuel consumption profile. +$setglobal SEASONALLINKUC +*!option yes + +* The production interval is segmented into a number of disjunct pieces, each with its own costs: NOT IMPLEMENTED +$setglobal UnitCseg +*!option yes +*-------------------- End of UNIT COMMITMENT ----------------------------------------------------------- + +*--------------------STEPWISE RAMPING (LINEAR VERSION)----------------------------------------------------------- +* overall control variable Stepwise_ramping must be 'yes' if any of the other stepwise ramping controls are: +* This add-on is an alternative to Unit Commitment to model ramping constraints without using MIP. This add-on uses currently the relevant data and sets from the Unit Commitment add-on +* This add-on is not compatible with the Unit Commitment stepwiseramping option +* The use of this add-on togeter with the rest of options of Unit Commitment add-on has not been tested, so, unless tested, this add-on should not be activated if UnitComm is on. + +$setglobal STEPWISE_RAMPING +*!option yes + +* Seasonal ramping link is on. This means that the fuel consumption of the last element ot the set T of the set S will be linked to the first element of the set T of the set S+1. +* This option increases computanional time but assures continuity in the fuel consumption profile. +$setglobal SEASONALLINKRAMPING +*!option yes + +*----------------END OF STEPWISE RAMPING (LINEAR VERSION)---------------------------------------------------------- + +* Options timeaggr control automatic aggregation of time (it should be checked before using it). +$setglobal timeaggr +*!option yes + + +*------------------------------------------------------------------------------- +* OptiFlow model. +*------------------------------------------------------------------------------- +$setglobal OPTIFLOW +*!option yes +* Addon APKNdisc: discrete size investments in PROC. +$setglobal APKNdisc +*!option yes +*Investments in Optiflow technologies +$setglobal inv yes +*! option yes +*Model solved as MIP +$setglobal solveOptiFlowmip +*! option yes + +* Debug possibilities: +$Setglobal addEPStoL +*! option yes +* Not needed if there are no capacity bounds on internal proc +* It will be needed if there are capacity bounds on some internal proc, therefore add them only in that case (requires some coding, TODO). +* With such minimal use the infeasibilities will be moved to SOSIBU proc whenever possible. +$Setglobal useQNODEslack +*! option +$Setglobal useSSBslack +*! option yes +$Setglobal useShareSlack +*! option yes +* Option uniquesol permit to use quadratic terms in QOBJ in order to attain unique solution. +* Should be used for debug on small systems only. +$Setglobal uniquesol +*! option yes +* Testing ONLY: +$setglobal singlearea +*! option yes +* Testing ONLY: +$setglobal addUP +*! option yes +*------------------------------------------------------------------------------- +*Optiflow end +*------------------------------------------------------------------------------- + +* In model Balbase4 (BB4) indicate the strategy for relative weighting of years +$setglobal bb4weighty shareYYY +*!option same !Text "Use same weights for all Y" +*!option shareYYY !Text "Years in YYY but not in Y are shared between two nearest (first and last years double the shared weight contribution)" + +*=============================================================================== +*=============================================================================== +* Relative paths +*=============================================================================== +*=============================================================================== +* No choices, they must be set as shown. Note the format. +* They are to be used as illustrated below and elsewhere in the code. +* +$ifi not %system.filesys%==UNIX $goto endofUNIXrelpaths +$setglobal relpathModel "" +*!fixedvalue +$setglobal relpathoutput "../output/" +*!fixedvalue +$setglobal relpathInputdata2GDX "../output/inputout/" +*!fixedvalue +$setglobal relpathtemp "../output/temp/" +*!fixedvalue +$label endofUNIXrelpaths + +$ifi not %system.filesys%==MSNT $goto endofMSNTrelpaths +$setglobal relpathModel "" +*!fixedvalue +$setglobal relpathoutput "..\output\" +*!fixedvalue +$setglobal relpathInputdata2GDX "..\output\inputout\" +*!fixedvalue +$setglobal relpathtemp "..\output\temp\" +*!fixedvalue +$label endofMSNTrelpaths + +*=============================================================================== +*=============================================================================== +* Some interaction between models: +*=============================================================================== +*=============================================================================== + +* The following options are related to interplay between models, +* e.g. one model output serving as input to another model. + +* Overall control to export results so they can be used in future runs : +$Setglobal export_results yes +*!option yes + +*-------------------------------------------- +*--------------IMPORT OF RESULTS---------------- +*-------------------------------------------- +* Overall control to import results so they can be used in future runs: +*NOTE: In order for results to work fine, the set S used in the runs should be contained in the import results. +*NOTE: In order for results to work fine, the first element in set T of the import results should match the one used in the current run. +$Setglobal import_results +*!option yes + +*------------ IMPORT OPTIONS ---------------- + +* -----------------ENERGY DISPATCH-------------------------- + +*Adds energy dispatch (demand, generation, transmission) from previous runs +$setglobal ADDENERGYDISPATCH +*!option yes +* -----------------END OF ENERGY DISPATCH-------------------------- + +* ------------------HYDRO--------------------------------- +* For this model run it is possible to use values found from previuos solutions to specify use of hydro power +$setglobal HYRSBB123 none +*!option quant !Text "Use seasonal quantities of hydro generation (from HYRSG.gdx??) in this run ('primal decomposition')(not implemented in BB4)" +*!option price !Text "Use seasonal prices for hydro generation (from WATERVAL.gdx) in this run ('dual decomposition')" +*!option quantprice !Text "Use seasonal quantities and prices for hydro generation (from HYRSG.gdx?? and WATERVAL.gdx) in in this run (not implemented in BB4)" +*!option cont !Text "Use seasonal content for hydro generation (from VHYRS_SL.gdx) in in this run" +*!option none !Text "Do not not use this hydro addon" +* ------------------ END OF HYDRO--------------------------------- + +*--------------------INTERSEASONAL STORAGE----------------------------------------------------------- +*Import inter-seasonal electricity storage data from previous runs +$Setglobal ADDESTOVOLTS none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "Import electricity storage contents at beginning of time segment (ESTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with ESTOVOLTSVAL.gdx from previous runs. " +*!option none !Text "Do not not use this addon" + +*Import inter-seasonal heat storage data from previous runs +$Setglobal ADDHSTOVOLTS none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "Import Heat storage contents at beginning of time segment (HSTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with HSTOVOLTSVAL.gdx from previous runs." +*!option none !Text "Do not not use this addon" + +*Import intra-seasonal electricity storage data from previous runs +$Setglobal ADDESTOVOLT none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "(to be finished) Import electricity storage contents at beginning of time segment (ESTOVOLT.gdx) for the first element in set T and S, and puts a price to generation (ESTOVOLTVAL) from previous runs." +*!option none !Text "Do not not use this addon" + +*Import intra-seasonal heat storage data from previous runs +$Setglobal ADDHSTOVOLT none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "(to be finished) Import Heat storage contents at beginning of time segment (HSTOVOLT.gdx) for the first element in set T and S, and puts a price to generation (HSTOVOLTVAL) from previous runs" +*!option none !Text "Do not not use this addon" + +*Import inter-seasonal hydrogen storage data from previous runs (requires HYDROGEN addon) +$Setglobal ADDH2STOVOLTS none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "Import hydrogen storage contents at beginning of time segment (H2STOVOLTS.gdx) for the first element in set T and S, and puts a price to use with H2STOVOLTSVAL.gdx from previous runs." +*!option none !Text "Do not not use this addon" + +*Import inter-seasonal biomethane storage data from previous runs (requires HYDROGEN addon) +$Setglobal ADDBIOMETHSTOVOLTS none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition')" +*!option price !Text "Import biomethane storage contents at beginning of time segment (BIOMETHSTOVOLTS.gdx) for the first element in set T and S, and puts a price to use with BIOMETHSTOVOLTSVAL.gdx from previous runs." +*!option none !Text "Do not not use this addon" + +*Import EV state of charge from previous runs (requires EV addon) +$Setglobal ADDEVSTOS none +*!option cont !Text "Use seasonal content from previous runs in this run ('primal decomposition') (only works if EV_INTERSEASONAL is activated)" +*!option netcharging !Text "Use seasonal net charging of EV in this run ('primal decomposition') (only works if EV_INTERSEASONAL is NOT activated)" +*!option none !Text "Do not not use this addon" + + + +*--------------------END OF INTERSEASONAL STORAGE----------------------------------------------------------- + +*--------------------INVESTMENTS AND DECOMMISSIONING----------------------------------------------------------- +*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. + +*Import generation and storage technology capacity development from previous runs +$setglobal ADDTECHDEV +*!option yes + +*Add expensive to operate backup generation technologies (electricity, heat, ...). It often occurs that the investment optimization underestimates the need for power. +$setglobal ADDBACKUPGEN +*!option yes + +*Import transmission development from previous runs +$setglobal ADDTRANSDEV +*!option yes + +*Import heat transmission development from previous runs +$setglobal ADDHEATTRANSDEV +*!option yes + +*Import H2 transmission development from previous runs +$setglobal ADDH2TRANSDEV +*!option yes +*--------------------END OF INVESTMENTS AND DECOMMISSIONING----------------------------------------------------------- + +*--------------------FUEL PRICES----------------------------------------------------------- +*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. +*Import fuel prices development from previous runs +$setglobal ADDFUELPRICE +*!option yes +*--------------------END OF FUEL PRICES----------------------------------------------------------- + +*--------------------FUEL USE----------------------------------------------------------- +*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. +*Import seasonal fuel use upper limit from previous runs +$setglobal ADDMAXFUELUSES +*!option yes +*--------------------END OF FUEL USE----------------------------------------------------------- + +*--------------------PLANNED MAINTENANCE----------------------------------------------------------- +*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. +*Import optimized planned maintenance from previous runs (investments and/or decomissioning must not be allowed if this option is activated) +$setglobal ADDPLANNEDMAINTENANCE +*!option yes +*--------------------END OF PLANNED MAINTENANCE----------------------------------------------------------- + +*--------------------TRANSPORT DEMAND----------------------------------------------------------- +*NOTE: The set Y should be the same in the optimization should be the same as the one in the import results. +*Import demand per term (T) from the transport sector +$setglobal ADDTERMTRANSPORTDEMAND +*!option yes + +*Import seasonal demand from the transport sector +$setglobal ADDSEASONALTRANSPORTDEMAND +*!option yes + +*Import peak demand from the transport sector +$setglobal ADDPEAKTRANSPORTDEMAND +*!option yes +*--------------------END OF TRANSPORT DEMAND----------------------------------------------------------- + +*--------------------INDIVIDUAL USERS----------------------------------------------------------- +*Import Share of heat demand in an individual user group. Requires GROUP_DEMAND_SHIFT to be activated +$setglobal ADDGROUP_DEMAND_SHIFT +*!option yes +*--------------------END OF INDIVIDUAL USERS----------------------------------------------------------- + + +*------------- END OF IMPORT OPTIONS ---------------- +*-------------------------------------------- +*--------------END OF IMPORT OF RESULTS---------------- +*-------------------------------------------- + + + + +*=============================================================================== +*=============================================================================== +* Output: +*=============================================================================== +*=============================================================================== + +* ------------------------------------------------------------------------------ +* Alternative presentations of input data +* ------------------------------------------------------------------------------ + +* It may be convenient under some circumstances to have the applied input data in other forms, +* this may be achieved by the following mechanism. + +* Make a summary of the input data in text format to file inputout.out: +$setglobal inputdatatxt "" +*!option "" !text do not make it +*!option yes !text make it when solving +*!option yesnosolve !text make it but do not solve + + +* Save the input data in gdx format for further processing by Gdx utilities, +* e.g. viewing (Gdxviewer), comparing (Gdxdiff), or transferring to other data formats like Excel or Access. +* Note that this will be done as a compile time operation, +* such that only the 'direct' data definitions (and no assignments) are reflected. +$setglobal INPUTDATA2GDX YES +*!option yes + + +* Transfer the input data in gdx format to a Microsoft Access database ../output/inputout/inputdataout.mdb: +$setglobal INPUTDATAGDX2MDB +*!option yes !onlyif %INPUTDATA2GDX%==yes +* Note: if you have established a link from another Access database to inputdataout.mdb +* close all tables in it before executing Balmorel in order to ensure updating of the links. + +* Merge input data with the output into the gdx file %CASEID%.gdx +$setglobal MERGEINPUTDATA +*!option yes + + +* Transfer the input data in gdx format to Microsoft Excel format: +* NOTWORKING: presently. +$setglobal INPUTDATAGDX2XLS +*!option yes + + +*------------------------------------------------------------------------------- +* Output from model solutions: +*------------------------------------------------------------------------------- + +* A quick way to get (some of) the relevant information is to make a gdx file with all information. +* This option will provide unloading of all that is available at the end of Balmorel.gms. +* +$setglobal all_endofmodelgdx yes +*!option yes !Save the file all_endofmodel.gdx to the model folder + + + + +* Make some output in text format to show some results of an execution. +* The detailed code for the writing of the files is given in /output/printout/printinc. +* Setting "yes" for PRINTFILES will make some standard printout files to folder /output/printout/. +$setglobal PRINTFILES +*!option yes + +$setglobal OUTPUT_SUMMARY yes +*!option yes + +* PRINTSEPARATOR is a single character used for separating columns in printfiles, +* convenient e.g. to use ';' for copy-paste to Excel. +$setglobal PRINTSEPARATOR ';' +*!option ' ' +*!option ';' +*!option ',' + +*------------------------------------------------------------------------------- +* Results collection for the present case +*------------------------------------------------------------------------------- + +* The following will establish a mechanism that will save annual optimization results +* from bb1 and bb2 (seasonal for bb3) as gdx files; at the end they may be merged to one gdx file. +* This merged file may then be transferred to an Access database or to Excel. +* It is to be seen in conjunction with saving annual results in file bb123.sim, +* which is accomplished using savepoint with value 1, cf '$Setglobal SAVEPOINTVALUE'. +* +* The following closely linked controls are used: +* SAVEPOINTVALUE, cf. above +* MERGESAVEPOINTRESULTS yes +* MERGEDSAVEPOINTRESULTS2MDB +* MERGEDSAVEPOINTRESULTS2SQLITE +* MERGEDSAVEPOINTRESULTS2XLS: presently not working, we are waiting for GAMS version 22.7, which has better support for this. +* MERGECASE/MERGEWITH +* DIFFCASE/DIFFWITH +* +* Savepoint: the GAMS command "Modelname.Savepoint=number;" +* The savepoint attribute tells GAMS to save a GDX file that contains the information on the current solution point. +* One can save the information from just the last solve or from every solve. +* The points that are saved can be used to provide an advanced basis, an integer program starting point or a NLP starting point. +* Numeric input is expected with the allowable numeric values being: +* 0 no point gdx file is to be saved +* 1 a point gdx file is to be saved from the last solve in the GAMS model +* 2 a point gdx file is to be saved from every solve in the GAMS model +* The value specified by $Setglobal SAVEPOINTVALUE will be used for savepoint. +* To be used with subsequent handling of output. +* +$setglobal SAVEPOINTVALUE 0 +*!option 0 +*!option 1 !mustif %MERGESAVEPOINTRESULTS%==yes !mustif %MERGEDSAVEPOINTRESULTS2GDX%==yes !mustif %MERGEDSAVEPOINTRESULTS2XLS%==yes !mustif not %MERGECASE%==none !mustif not %DIFFCASE%==none +*!option 2 !text Note: nothing implemented nor tested, so do not use it. + +* Use the $setglobal MERGESAVEPOINTRESULTS to choose whether to merge annual/seasonal results or not: +$setglobal MERGESAVEPOINTRESULTS +*!option yes !onlyif %SAVEPOINTVALUE%==1 +* Note: make sure that it is possible to make the new merged gdx file, +* e.g. make sure that the file *.gdx is not open in another application (like GAMD IDE). +* +* Then prepare for the necessary details: +$ifi %system.filesys%==MSNT +$setglobal batfileMERGESAVEPOINTRESULTS %relpathModel%MERGESAVEPOINTRESULTS.bat +*!option !fixedvalue +$ifi %system.filesys%==MSNT +file fileMERGESAVEPOINTRESULTSbat / %batfileMERGESAVEPOINTRESULTS% /; +$ifi %system.filesys%==MSNT +putclose fileMERGESAVEPOINTRESULTSbat; + +$ifi %system.filesys%==UNIX +$setglobal bashfileMERGESAVEPOINTRESULTS %relpathModel%MERGESAVEPOINTRESULTS.sh +*!option !fixedvalue +$ifi %system.filesys%==UNIX +file fileMERGESAVEPOINTRESULTSbash / %bashfileMERGESAVEPOINTRESULTS% /; +$ifi %system.filesys%==UNIX +putclose fileMERGESAVEPOINTRESULTSbash; + +$setglobal MERGEDSAVEPOINTRESULTS2MDB +*!option yes !onlyif %SAVEPOINTVALUE%==1 !onlyif %MERGESAVEPOINTRESULTS%==yes + +$setglobal MERGEDSAVEPOINTRESULTS2SQLITE +*!option yes !onlyif %SAVEPOINTVALUE%==1 !onlyif %MERGESAVEPOINTRESULTS%==yes + + +*------------------------------------------------------------------------------- +* Comparison between Cases: +*------------------------------------------------------------------------------- + +* The following will merge and/or compare two results. +* With option MERGECASE is set to NONE this will be not be done, otherwise it will. +* If done, the result will be in the output folder of the present case in the form of a GDX file. +* With option MERGEDSAVEPOINTRESULTS2MDB" this may then be transferred to a MDB file. +* All output go to the output folder of the present case. +* Similar considerations for DIFFCASE. + +$setglobal MERGECASE none +*!option none !text Comparison will not be made +*!option +* MERGEWITH defines the case with which to merge results. +$setglobal MERGEWITH CaseNonversioned +*!option !mustif not %MERGECASE%==none + +* The diff uses gdxdiff. The diffile only shows items that meaningfull can be compared, +* non-compared items are reported in the Balmorel.log file. +$setglobal DIFFCASE none +*!option none !text Comparison will not be made +*!option + +$setglobal DIFFWITH CaseNonversioned +*!option none !text Comparison will not be made +*!option !mustif not %DIFFCASE%==none + +* Then prepare for the necessary details: TODO +file fileMERGEWITHBASEbat / %batfileMERGEWITHBASE% /; +putclose fileMERGEWITHBASEbat; + + + + +*=============================================================================== +*=============================================================================== +* The model type's implication for solver type +*=============================================================================== +*=============================================================================== + +* The model type has implications for the solver type. +* Classical model types are LP (Linear Programming), QP (Quadratic Programming), MIP (Mixed Integer Programming). +$setglobal SOLVETYPE LP +*!option LP "Linear Programming" +*!option RMIP "Relaxed Mixed Integer Programming" +*!option MIP "Mixed Integer Programming" + +*!option yes +*!mustif %AGKNDISC%==yes +*!mustif %UnitComm%==yes + + + +*=============================================================================== +*=============================================================================== +* Input data: +*=============================================================================== +*=============================================================================== + +*------------------------------------------------------------------------------- +*------------------------------------------------------------------------------- +* Option semislash is used to control input data format for text files. +* With "$Setglobal semislash ;" the input files must include +* the declaration statement initially and must terminate with a "/;". +* With "$Setglobal semislash /" the input files do not contain this, but only data. +* Note that parameters and tables are identical declarations, however, +* when using "$Setglobal semislash /" make sure +* that the use of either "parameter" or "table" in Balmorel.gms for any data file +* corresponds to the data format used in the file. +* NOTE: Rev.3.03: Not fully implemented yet, you MUST use "$Setglobal semislash ;". +$setglobal semislash ";" +*!fixedvalue ; +**!option ; + + + + +* Domain overloading: The options specify the domain (indexes) that the identifiyer is declared on. +$setglobal GMINF_DOL YYY_CCCRRRAAA_FFF +*!option CCCRRRAAA_FFF +*!option YYY_CCCRRRAAA_FFF +* +$setglobal GMAXF_DOL YYY_CCCRRRAAA_FFF +*!option CCCRRRAAA_FFF +*!option YYY_CCCRRRAAA_FFF +* +$setglobal GEQF_DOL YYY_CCCRRRAAA_FFF +*!option CCCRRRAAA_FFF +*!option YYY_CCCRRRAAA_FFF +* +$setglobal XKRATE_DOL IRRRE_IRRRI_SSS +*!option IRRRE_IRRRI +*!option IRRRE_IRRRI_SSS +*!option IRRRE_IRRRI_SSS_TTT +* +$setglobal GKRATE_DOL AAA_GGG_SSS +*!option AAA_GGG_SSS +*!option AAA_GGG_SSS_TTT + +$setglobal WNDFLH_DOL AAA +*!option AAA_GGG +*!option AAA + +$setglobal SOLEFLH_DOL AAA +*!option AAA_GGG +*!option AAA + +$setglobal SOLHFLH_DOL AAA +*!option AAA_GGG +*!option AAA + +$setglobal GWAVE_DOL AAA +*!option AAA_GGG +*!option AAA + + + +*------------------------------------------------------------------------------- +* Active options will be reported to log file via file hellolog.inc +*------------------------------------------------------------------------------- + + +*------------------------------------------------------------------------------- +* End of Balopt.opt +*------------------------------------------------------------------------------- diff --git a/base/output/OUTPUT_SUMMARY.inc b/base/output/OUTPUT_SUMMARY.inc index 2e7133e3..bfdaba32 100644 --- a/base/output/OUTPUT_SUMMARY.inc +++ b/base/output/OUTPUT_SUMMARY.inc @@ -340,7 +340,7 @@ F_CONS_YCRA(Y,C,IR,IA,G,FFF,TECH_TYPE,'TWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and * ---------------- ENERGY CURTAILMENT ----------------------- *HOURLY CURTAILMENT -CURT_YCRAGFST(Y,C,IR,IA,IGHYRR,FFF,S,T,'ELECTRICITY','HYDRO-RUN-OF-RIVER','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGHYRR) AND IGF(IGHYRR,FFF) AND GTECH_TYPE(IGHYRR,'HYDRO-RUN-OF-RIVER'))= +CURT_YCRAGFST(Y,C,IR,IA,IGHYRR,FFF,S,T,'ELECTRICITY','HYDRO-RUN-OF-RIVER','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGHYRR) AND IGF(IGHYRR,FFF) AND GTECH_TYPE(IGHYRR,'HYDRO-RUN-OF-RIVER') AND IWTRRRSUM(IA) > 0)= (WTRRRFLH(IA) * ( GKFX(Y,IA,IGHYRR) $ifi %DECOM%==yes -VDECOM_EXO_ACCUM.L(Y,IA,IGHYRR) @@ -348,7 +348,7 @@ $ifi %DECOM%==yes -VDECOM_EXO_ACCUM.L(Y,IA,IGHYRR) ) * WTRRRVAR_T(IA,S,T) * (1$(NOT IGKRATE(IA,IGHYRR,S,T)) + IGKRATE(IA,IGHYRR,S,T))) / IWTRRRSUM(IA) -VGE_T.L(Y,IA,IGHYRR,S,T); -CURT_YCRAGFST(Y,C,IR,IA,IGWND,FFF,S,T,'ELECTRICITY','WIND-ON','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGWND) AND IGF(IGWND,FFF) AND GTECH_TYPE(IGWND,'WIND-ON'))= +CURT_YCRAGFST(Y,C,IR,IA,IGWND,FFF,S,T,'ELECTRICITY','WIND-ON','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGWND) AND IGF(IGWND,FFF) AND GTECH_TYPE(IGWND,'WIND-ON') AND IWND_SUMST(IA) > 0)= $ifi %WNDFLH_DOL%==AAA (WNDFLH(IA) * ( $ifi %WNDFLH_DOL%==AAA_GGG (WNDFLH(IA,IGWND) * ( GKFX(Y,IA,IGWND) @@ -357,7 +357,7 @@ $ifi %DECOM%==yes -VDECOM_EXO_ACCUM.L(Y,IA,IGWND) ) * WND_VAR_T(IA,S,T) * (1$(NOT IGKRATE(IA,IGWND,S,T)) + IGKRATE(IA,IGWND,S,T))) / IWND_SUMST(IA) -VGE_T.L(Y,IA,IGWND,S,T); -CURT_YCRAGFST(Y,C,IR,IA,IGWND,FFF,S,T,'ELECTRICITY','WIND-OFF','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGWND) AND IGF(IGWND,FFF) AND GTECH_TYPE(IGWND,'WIND-OFF'))= +CURT_YCRAGFST(Y,C,IR,IA,IGWND,FFF,S,T,'ELECTRICITY','WIND-OFF','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGWND) AND IGF(IGWND,FFF) AND GTECH_TYPE(IGWND,'WIND-OFF') AND IWND_SUMST(IA) > 0)= $ifi %WNDFLH_DOL%==AAA (WNDFLH(IA) * ( $ifi %WNDFLH_DOL%==AAA_GGG (WNDFLH(IA,IGWND) * ( GKFX(Y,IA,IGWND) @@ -366,7 +366,7 @@ $ifi %DECOM%==yes -VDECOM_EXO_ACCUM.L(Y,IA,IGWND) ) * WND_VAR_T(IA,S,T) * (1$(NOT IGKRATE(IA,IGWND,S,T)) + IGKRATE(IA,IGWND,S,T))) / IWND_SUMST(IA) -VGE_T.L(Y,IA,IGWND,S,T); -CURT_YCRAGFST(Y,C,IR,IA,IGSOLE,FFF,S,T,'ELECTRICITY','SOLAR-PV','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGSOLE) AND IGF(IGSOLE,FFF) AND GTECH_TYPE(IGSOLE,'SOLAR-PV'))= +CURT_YCRAGFST(Y,C,IR,IA,IGSOLE,FFF,S,T,'ELECTRICITY','SOLAR-PV','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGSOLE) AND IGF(IGSOLE,FFF) AND GTECH_TYPE(IGSOLE,'SOLAR-PV') AND ISOLESUMST(IA) > 0)= $ifi %SOLEFLH_DOL%==AAA (SOLEFLH(IA) * ( $ifi %SOLEFLH_DOL%==AAA_GGG (SOLEFLH(IA,IGSOLE) * ( GKFX(Y,IA,IGSOLE) @@ -375,7 +375,7 @@ $ifi %DECOM%==yes -VDECOM_EXO_ACCUM.L(Y,IA,IGSOLE) ) * SOLE_VAR_T(IA,S,T) * (1$(NOT IGKRATE(IA,IGSOLE,S,T)) + IGKRATE(IA,IGSOLE,S,T))) / ISOLESUMST(IA) -VGE_T.L(Y,IA,IGSOLE,S,T); -CURT_YCRAGFST(Y,C,IR,IA,IGSOLH,FFF,S,T,'HEAT','SOLAR-HEATING','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGSOLH) AND IGF(IGSOLH,FFF) AND GTECH_TYPE(IGSOLH,'SOLAR-HEATING'))= +CURT_YCRAGFST(Y,C,IR,IA,IGSOLH,FFF,S,T,'HEAT','SOLAR-HEATING','MWh')$(CCCRRR(C,IR) and RRRAAA(IR,IA) and IAGK_HASORPOT(Y,IA,IGSOLH) AND IGF(IGSOLH,FFF) AND GTECH_TYPE(IGSOLH,'SOLAR-HEATING') AND ISOLHSUMST(IA) > 0)= $ifi %SOLHFLH_DOL%==AAA (SOLHFLH(IA) * ( $ifi %SOLHFLH_DOL%==AAA_GGG (SOLHFLH(IA,IGSOLH) * ( GKFX(Y,IA,IGSOLH) @@ -1246,9 +1246,10 @@ ECO_XH2_YCR(Y,C,IR,IRI,'COSTS','H2_TRANSMISSION_CAPITAL_COSTS','Mmoney')$(CCCRRR IOF05*ANNUITYCXH2(C)*IYHASANNUITYXH2(IYALIAS2,Y)*VXH2KN.L(IYALIAS2,IR,IRI)*XH2INVCOST(IYALIAS2,IR,IRI)) + SUM((IYALIAS2)$((IXH2KN_NGTOH2(IYALIAS2,IRI,IR) OR IXH2KN_NGTOH2(IYALIAS2,IR,IRI)) AND ORD(IYALIAS2) LE ORD(Y)) , IOF05*ANNUITYCXH2(C)*IYHASANNUITYXH2(IYALIAS2,Y)*VXH2KN_NGTOH2.L(IYALIAS2,IR,IRI)*XH2INVCOST_NGTOH2(IYALIAS2,IR,IRI)) - +SUM((IYALIAS2)$((IXH2KN(IYALIAS2,IRI,IR) OR IXH2KN(IYALIAS2,IR,IRI)) AND (ORD(IYALIAS2) LE ORD(Y)) AND (IXH2KN_ES(IR,IRI) OR IXH2KN_ES(IRI,IR))), - IOF05*ANNUITYCXH2(C)*IYHASANNUITYXH2(IYALIAS2,Y)*SUM(XES,VXH2LAMBDA.L(IYALIAS2,IR,IRI,XES)*XH2INVCOST_ES(IYALIAS2,IR,IRI,XES))) - ) +$ifi %ES_H2TRANS%==yes +SUM((IYALIAS2)$((IXH2KN(IYALIAS2,IRI,IR) OR IXH2KN(IYALIAS2,IR,IRI)) AND (ORD(IYALIAS2) LE ORD(Y)) AND (IXH2KN_ES(IR,IRI) OR IXH2KN_ES(IRI,IR))), +$ifi %ES_H2TRANS%==yes IOF05*ANNUITYCXH2(C)*IYHASANNUITYXH2(IYALIAS2,Y)*SUM(XES,VXH2LAMBDA.L(IYALIAS2,IR,IRI,XES)*XH2INVCOST_ES(IYALIAS2,IR,IRI,XES))) +$ifi %ES_H2TRANS%==yes ) + ) ; ** TRANSMISSION FLOW