Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Penalty for secondary energy share deviation in sectors #1762

Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2ab0f65
add support for penalty for secondary energy share deviation in sectors
Renato-Rodrigues Aug 1, 2024
c0d6f20
improve parameter description
Renato-Rodrigues Aug 2, 2024
016be5f
fix error
Renato-Rodrigues Aug 2, 2024
7419dea
fixing uncontrolled set
Renato-Rodrigues Aug 2, 2024
78f9be9
removing set under control
Renato-Rodrigues Aug 2, 2024
6a777e3
changing the exponential function to support negative base values
Renato-Rodrigues Aug 2, 2024
21180f3
bugfixes for testing
Renato-Rodrigues Aug 2, 2024
d435ad6
revert change
Renato-Rodrigues Aug 2, 2024
6186200
improving documentation
Renato-Rodrigues Aug 2, 2024
af62339
improving documentation
Renato-Rodrigues Aug 2, 2024
5e8ba6e
initilize share parameters to help the solver
Renato-Rodrigues Aug 3, 2024
6f8ce9f
replacing reference to deprecated toolIterativeEDGETransport
Renato-Rodrigues Aug 3, 2024
fbe2f46
apply deviation penalization to entySeBio and entySeSyn
Renato-Rodrigues Aug 3, 2024
4ca8f89
adapt se dsirtibtuion incentive to use shares calculated over seAgg i…
Renato-Rodrigues Aug 5, 2024
a74fcc9
defining secondary energy share incentives in entyfe
Renato-Rodrigues Aug 16, 2024
dc3e1aa
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Aug 16, 2024
b4b9899
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Aug 20, 2024
9581f80
exclude years before or equal 2020 from bio+syn incentive shares
Renato-Rodrigues Aug 20, 2024
42f8c13
change the default method toi define the se shares incentives
Renato-Rodrigues Aug 20, 2024
fc95f9e
setting cm_INCONV_PENALTY_FESwitch to off to avoid conflict with seFe…
Renato-Rodrigues Aug 20, 2024
2511c23
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Aug 30, 2024
7c8b457
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Sep 2, 2024
6febf16
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Sep 12, 2024
2f3642f
Merge branch 'remindmodel:develop' into seFeSectorSharePenalization
Renato-Rodrigues Sep 19, 2024
72ff3b9
adding comments suggested by reviewer
Renato-Rodrigues Sep 20, 2024
b3fc126
reverting merge overwritte
Renato-Rodrigues Sep 20, 2024
a7a973b
adding comments suggested by reviewer - round 2
Renato-Rodrigues Sep 20, 2024
39c2641
additional description to consider reviewers' comments
Renato-Rodrigues Sep 20, 2024
11bb7c1
Merge branch 'develop' of https://github.com/remindmodel/remind into …
Renato-Rodrigues Oct 21, 2024
5e13d30
disabling share incentives
Renato-Rodrigues Oct 21, 2024
91af1d3
simplifiying start year for share incentives
Renato-Rodrigues Oct 23, 2024
7bf3af0
add EU 2040 paper scenario config file
Renato-Rodrigues Nov 1, 2024
250466c
fix mistype in the scenario config
Renato-Rodrigues Nov 7, 2024
b71fbed
Merge branch 'develop' of https://github.com/remindmodel/remind into …
Renato-Rodrigues Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions core/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ pm_shFeCes(ttot,all_regi,all_enty,all_in,all_teEs) "Final energy shares for CE

pm_shfe_up(ttot,all_regi,all_enty,emi_sectors) "Final energy shares exogenous upper bounds per sector"
pm_shfe_lo(ttot,all_regi,all_enty,emi_sectors) "Final energy shares exogenous lower bounds per sector"
p_shSeFe(ttot,all_regi,all_enty) "initial share of secondary energy on total secondary energy type (liquids, solids and gases) [0..1]"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
p_shSeFeSector(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "initial share of secondary energy on secondary energy type (liquids, solids and gases) per final energy, sector and emission market [0..1]"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
pm_shGasLiq_fe_up(ttot,all_regi,emi_sectors) "Final energy gases plus liquids shares exogenous upper bounds per sector"
pm_shGasLiq_fe_lo(ttot,all_regi,emi_sectors) "Final energy gases plus liquids shares exogenous lower bounds per sector"

Expand Down Expand Up @@ -424,6 +426,8 @@ v_shGreenH2(ttot,all_regi) "share of green hydrogen in all hydrogen by 2030 [0
v_shBioTrans(ttot,all_regi) "Share of biofuels in transport liquids from 2025 onwards. Value between 0 and 1."

v_shfe(ttot,all_regi,all_enty,emi_sectors) "share of final energy in sector total final energy [0..1]"
v_shSeFe(ttot,all_regi,all_enty) "share of secondary energy on total secondary energy type (liquids, solids and gases) [0..1]"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
v_shSeFeSector(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "share of secondary energy on secondary energy type (liquids, solids and gases) per final energy, sector and emission market [0..1]"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
v_shGasLiq_fe(ttot,all_regi,emi_sectors) "share of gases and liquids in sector final energy [0..1]"

vm_emiCdrAll(ttot,all_regi) "all CDR emissions"
Expand All @@ -442,7 +446,17 @@ vm_demFeForEs(ttot,all_regi,all_enty,all_esty,all_teEs) "Final energy which
vm_prodEs(ttot,all_regi,all_enty,all_esty,all_teEs) "Energy services (unit determined by conversion factor pm_fe2es)."
vm_transpGDPscale(ttot,all_regi) "dampening factor to align edge-t non-energy transportation costs with historical GDP data"

$ifthen.seFeSectorShareDev not "%cm_seFeSectorShareDevMethod%" == "off"
v_penSeFeSectorShare(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "penalty for secondary energy share deviation in sectors"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
vm_penSeFeSectorShareDevCost(ttot,all_regi) "total penalty cost for secondary energy share deviation in sectors"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
$endif.seFeSectorShareDev

$ifthen.minMaxSeFeSectorShareDev "%cm_seFeSectorShareDevMethod%" == "minMaxAvrgShare"
v_NegPenSeFeSectorShare(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "min-max negative penalty for secondary energy share deviation in sectors"
v_PosPenSeFeSectorShare(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "min-max positive penalty for secondary energy share deviation in sectors"
$endif.minMaxSeFeSectorShareDev
;

***----------------------------------------------------------------------------------------
*** EQUATIONS
***----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -548,6 +562,8 @@ q_shGreenH2(ttot,all_regi) "share of green hydrogen in all hydrogen"
q_shBioTrans(ttot,all_regi) "Define the share of biofuels in transport liquids from 2025 on."

q_shfe(ttot,all_regi,all_enty,emi_sectors) "share of final energy carrier in the sector final energy"
q_shSeFe(ttot,all_regi,all_enty) "share of secondary energy on total secondary energy type (liquids, solids and gases)"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
q_shSeFeSector(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "share of secondary energy on secondary energy type (liquids, solids and gases) per final energy, sector and emission market"
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
q_shGasLiq_fe(ttot,all_regi,emi_sectors) "share of gases and liquids in sector final energy"

q_shbiofe_up(ttot,all_regi,all_enty,emi_sectors,all_emiMkt) "share of biomass per carrier in sector final energy (upper bound)"
Expand All @@ -561,6 +577,15 @@ $IFTHEN.sehe_upper not "%cm_sehe_upper%" == "off"
q_heat_limit(ttot,all_regi) "equation to limit maximum level of secondary energy district heating and heat pumps use"
$ENDIF.sehe_upper

$ifthen.seFeSectorShareDev not "%cm_seFeSectorShareDevMethod%" == "off"
q_penSeFeSectorShareDevCost(ttot,all_regi) "total penalty cost for secondary energy share deviation in sectors"
q_penSeFeSectorShareDev(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "penalty for secondary energy share deviation in sectors"
$endif.seFeSectorShareDev

$ifthen.minMaxSeFeSectorShareDev "%cm_seFeSectorShareDevMethod%" == "minMaxAvrgShare"
q_minMaxPenSeFeSectorShareDev(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "min-max penalty balance for secondary energy share deviation in sectors"
$endif.minMaxSeFeSectorShareDev

***----------------------------------------------------------------------------------------
***----------------------------------------------trade module------------------------------

Expand Down
120 changes: 114 additions & 6 deletions core/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1054,32 +1054,52 @@ q_shBioTrans(t,regi)..
;

***---------------------------------------------------------------------------
*' Share of final energy carrier in sector
*' Shares of final energy carrier in sector
***---------------------------------------------------------------------------

q_shfe(t,regi,entyFe,sector)$(pm_shfe_up(t,regi,entyFe,sector) OR pm_shfe_lo(t,regi,entyFe,sector))..
v_shfe(t,regi,entyFe,sector)
* sum(emiMkt$sector2emiMkt(sector,emiMkt),
sum(se2fe(entySe,entyFe2,te)$(entyFe2Sector(entyFe2,sector)),
vm_demFeSector(t,regi,entySe,entyFe2,sector,emiMkt)))
vm_demFeSector_afterTax(t,regi,entySe,entyFe2,sector,emiMkt)))
=e=
sum(emiMkt$sector2emiMkt(sector,emiMkt),
sum(se2fe(entySe,entyFe,te),
vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt)))
vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt)))
;

q_shSeFe(t,regi,entySe)$(entySeBio(entySe) OR entySeSyn(entySe) OR entySeFos(entySe)).. !!secondary energy carriers shares in final energy demand calculated only for entySeBio, entySeSyn and entySeFos
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
v_shSeFe(t,regi,entySe)
* sum(seAgg$seAgg2se(seAgg,entySe), !!controlling the list of secondary energy carriers to sum up
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
sum((sector,emiMkt)$sector2emiMkt(sector,emiMkt),
sum(entySe2$seAgg2se(seAgg,entySe2),
sum(entyFe$(sefe(entySe2,entyFe) AND entyFe2Sector(entyFe,sector)),
vm_demFeSector_afterTax(t,regi,entySe2,entyFe,sector,emiMkt)))))
=e=
sum((sector,emiMkt)$sector2emiMkt(sector,emiMkt),
sum(entyFe$(sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector)),
vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt)))
;

q_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt)$((entySeBio(entySe) OR entySeSyn(entySe) OR entySeFos(entySe)) AND (sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt)))..
v_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt)
* sum(entySe2$sefe(entySe2,entyFe),
vm_demFeSector_afterTax(t,regi,entySe2,entyFe,sector,emiMkt))
=e=
vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt)
;

q_shGasLiq_fe(t,regi,sector)$(pm_shGasLiq_fe_up(t,regi,sector) OR pm_shGasLiq_fe_lo(t,regi,sector))..
v_shGasLiq_fe(t,regi,sector)
* sum(emiMkt$sector2emiMkt(sector,emiMkt),
sum(se2fe(entySe,entyFe,te)$(entyFe2Sector(entyFe,sector)),
vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt)))
vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt)))
=e=
sum(emiMkt$sector2emiMkt(sector,emiMkt),
sum(se2fe(entySe,entyFe,te)$(SAMEAS(entyFe,"fegas") OR SAMEAS(entyFe,"fehos")),
vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt)))
vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt)))
;


*limit secondary energy district heating and heat pumps
$IFTHEN.sehe_upper not "%cm_sehe_upper%" == "off"
q_heat_limit(t,regi)$(t.val gt 2020)..
Expand Down Expand Up @@ -1129,4 +1149,92 @@ q_shbiofe_lo(t,regi,entyFe,sector,emiMkt)$(pm_secBioShare(t,regi,entyFe,sector)
sum((entySeBio,te)$se2fe(entySeBio,entyFe,te), vm_demFeSector_afterTax(t,regi,entySeBio,entyFe,sector,emiMkt))
;

***---------------------------------------------------------------------------
*' Penalty for secondary energy share deviation in sectors
***---------------------------------------------------------------------------

$ifthen.seFeSectorShareDev "%cm_seFeSectorShareDevMethod%" == "sqSectorShare"
q_penSeFeSectorShareDev(t,regi,entySe,entyFe,sector,emiMkt)$(
( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ) AND !!only create the equation for valid cobinations of entySe, entyFe, sector and emiMkt
( (entySeBio(entySe) OR entySeSyn(entySe)) ) AND !!share incentives only need to be applied to n-1 secondary energy carriers
( (NOT(sameas(sector,"build") AND (t.val le 2020)))
OR (NOT(sameas(sector,"indst") AND (t.val le 2020)))
OR (NOT(sameas(sector,"cdr") AND (t.val le 2020)))
) AND !!disable historical year share incentives to buildings, industry and CDR
( NOT(sameas(sector,"build") AND (sameas(entyFE,"fesos"))) ) !!disable buildings solids share incentives
)..
v_penSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
=e=
power(v_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt) ,2)
* (1$sameas("%c_seFeSectorShareDevUnit%","share") + ( vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt) )$(sameas("%c_seFeSectorShareDevUnit%","energy")) ) !!define deviation in share or energy units
;
$elseIf.seFeSectorShareDev "%cm_seFeSectorShareDevMethod%" == "sqSectorAvrgShare"
q_penSeFeSectorShareDev(t,regi,entySe,entyFe,sector,emiMkt)$(
( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ) AND !!only create the equation for valid cobinations of entySe, entyFe, sector and emiMkt
( (entySeBio(entySe) OR entySeSyn(entySe)) ) AND !!share incentives only need to be applied to n-1 secondary energy carriers
( (NOT(sameas(sector,"build") AND (t.val le 2020)))
OR (NOT(sameas(sector,"indst") AND (t.val le 2020)))
OR (NOT(sameas(sector,"cdr") AND (t.val le 2020)))
) AND !!disable historical year share incentives to buildings, industry and CDR
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
( NOT(sameas(sector,"build") AND (sameas(entyFE,"fesos"))) ) !!disable buildings solids share incentives
)..
v_penSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
=e=
power(v_shSeFe(t,regi,entySe) - v_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt) ,2)
* (1$sameas("%c_seFeSectorShareDevUnit%","share") + ( vm_demFeSector_afterTax(t,regi,entySe,entyFe,sector,emiMkt) )$(sameas("%c_seFeSectorShareDevUnit%","energy")) ) !!define deviation in share or energy units
;
$elseIf.seFeSectorShareDev "%cm_seFeSectorShareDevMethod%" == "minMaxAvrgShare"
q_penSeFeSectorShareDev(t,regi,entySe,entyFe,sector,emiMkt)$(
( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ) AND !!only create the equation for valid cobinations of entySe, entyFe, sector and emiMkt
( (entySeBio(entySe) OR entySeSyn(entySe)) ) AND !!share incentives only need to be applied to n-1 secondary energy carriers
( (NOT(sameas(sector,"build") AND (t.val le 2020)))
OR (NOT(sameas(sector,"indst") AND (t.val le 2020)))
OR (NOT(sameas(sector,"cdr") AND (t.val le 2020)))
) AND !!disable historical year share incentives to buildings, industry and CDR
( NOT(sameas(sector,"build") AND (sameas(entyFE,"fesos"))) ) !!disable buildings solids share incentives
)..
v_penSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
=e=
v_NegPenSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
+ v_PosPenSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
;

q_minMaxPenSeFeSectorShareDev(t,regi,entySe,entyFe,sector,emiMkt)$(
( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ) AND !!only create the equation for valid cobinations of entySe, entyFe, sector and emiMkt
( (entySeBio(entySe) OR entySeSyn(entySe)) ) AND !!share incentives only need to be applied to n-1 secondary energy carriers
( (NOT(sameas(sector,"build") AND (t.val le 2020)))
OR (NOT(sameas(sector,"indst") AND (t.val le 2020)))
OR (NOT(sameas(sector,"cdr") AND (t.val le 2020)))
) AND !!disable historical year share incentives to buildings, industry and CDR
( NOT(sameas(sector,"build") AND (sameas(entyFE,"fesos"))) ) !!disable buildings solids share incentives
)..
(
v_shSeFe(t,regi,entySe)
- v_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt)
+ v_NegPenSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
- v_PosPenSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
)
* !!define deviation in share or energy units
( 1$sameas("%c_seFeSectorShareDevUnit%","share") +
(sum(seAgg$seAgg2se(seAgg,entySe),
sum(entyFe2$(seAgg2fe(seAgg,entyFe2) AND entyFe2Sector(entyFe2,sector)),
sum(entySe2$(seAgg2se(seAgg,entySe2) AND sefe(entySe2,entyFe2) AND entyFe2Sector(entyFe2,sector)),
vm_demFeSector_afterTax(t,regi,entySe2,entyFe2,sector,emiMkt))))
)$sameas("%c_seFeSectorShareDevUnit%","energy")
)
=e=
0
;
$endif.seFeSectorShareDev

$ifthen.penSeFeSectorShareDevCost not "%cm_seFeSectorShareDevMethod%" == "off"
q_penSeFeSectorShareDevCost(t,regi)..
vm_penSeFeSectorShareDevCost(t,regi)
=e=
sum((entySe,entyFe,sector,emiMkt)$( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ),
v_penSeFeSectorShare(t,regi,entySe,entyFe,sector,emiMkt)
) * c_seFeSectorShareDevScale
;
$endif.penSeFeSectorShareDevCost

*** EOF ./core/equations.gms
31 changes: 31 additions & 0 deletions core/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,35 @@ if (cm_startyear gt 2005,
Execute_Loadpoint 'input_ref' vm_capEarlyReti.l = vm_capEarlyReti.l;
);

*** initialize secondary energy shares in sectors if deviations are penalized, i.e., if cm_seFeSectorShareDevMethod is enabled
Renato-Rodrigues marked this conversation as resolved.
Show resolved Hide resolved
p_shSeFe(t,regi,entySe)$((entySeBio(entySe) OR entySeSyn(entySe) OR entySeFos(entySe)) AND sum(seAgg$seAgg2se(seAgg,entySe), sum((sector,emiMkt)$sector2emiMkt(sector,emiMkt), sum(entySe2$seAgg2se(seAgg,entySe2), sum(entyFe$(sefe(entySe2,entyFe) AND entyFe2Sector(entyFe,sector)), vm_demFeSector.l(t,regi,entySe2,entyFe,sector,emiMkt))))) ) =
sum((sector,emiMkt)$sector2emiMkt(sector,emiMkt), sum(entyFe$(sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector)), vm_demFeSector.l(t,regi,entySe,entyFe,sector,emiMkt)))
/
sum(seAgg$seAgg2se(seAgg,entySe), sum((sector,emiMkt)$sector2emiMkt(sector,emiMkt), sum(entySe2$seAgg2se(seAgg,entySe2), sum(entyFe$(sefe(entySe2,entyFe) AND entyFe2Sector(entyFe,sector)), vm_demFeSector.l(t,regi,entySe2,entyFe,sector,emiMkt)))));
v_shSeFe.l(t,regi,entySe)$p_shSeFe(t,regi,entySe) = p_shSeFe(t,regi,entySe);

$ifthen.penSeFeSectorShareDevCost not "%cm_seFeSectorShareDevMethod%" == "off"
vm_demFeSector.l(t,regi,entySe,entyFe,sector,emiMkt)$(
( p_shSeFe(t,regi,entySe) ) AND
( entySeBio(entySe) OR entySeSyn(entySe) OR entySeFos(entySe) ) AND !! only redefine vm_demFeSector for entySeBio, entySeSyn and entySeFos items
( sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt) ) AND !!only create the equation for valid cobinations of entySe, entyFe, sector and emiMkt
( (entySeBio(entySe) OR entySeSyn(entySe)) ) AND !!share incentives only need to be applied to n-1 secondary energy carriers
( (NOT(sameas(sector,"build") AND (t.val le 2020)))
OR (NOT(sameas(sector,"indst") AND (t.val le 2020)))
OR (NOT(sameas(sector,"cdr") AND (t.val le 2020)))
) AND !!disable historical year share incentives to buildings, industry and CDR
( NOT(sameas(sector,"build") AND (sameas(entyFE,"fesos"))) ) !!disable buildings solids share incentives
) =
sum(entySe2$sefe(entySe2,entyFe), vm_demFeSector.l(t,regi,entySe2,entyFe,sector,emiMkt))
* p_shSeFe(t,regi,entySe);
vm_demFeSector_afterTax.l(t,regi,entySe,entyFe,sector,emiMkt) = vm_demFeSector.l(t,regi,entySe,entyFe,sector,emiMkt);
$endif.penSeFeSectorShareDevCost

p_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt)$((entySeBio(entySe) OR entySeSyn(entySe) OR entySeFos(entySe)) AND (sefe(entySe,entyFe) AND entyFe2Sector(entyFe,sector) AND sector2emiMkt(sector,emiMkt)) AND sum(entySe2$sefe(entySe2,entyFe), vm_demFeSector.l(t,regi,entySe2,entyFe,sector,emiMkt)) ) =
vm_demFeSector.l(t,regi,entySe,entyFe,sector,emiMkt)
/
sum(entySe2$sefe(entySe2,entyFe), vm_demFeSector.l(t,regi,entySe2,entyFe,sector,emiMkt))
;
v_shSeFeSector.l(t,regi,entySe,entyFe,sector,emiMkt)$p_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt) = p_shSeFeSector(t,regi,entySe,entyFe,sector,emiMkt);

*** EOF ./core/preloop.gms
19 changes: 18 additions & 1 deletion main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,11 @@ parameter
;
c_earlyRetiValidYr = 2035; !! def = 2035
*'
parameter
c_seFeSectorShareDevScale "scale factor in the objective function of the penalization to incentive sectors to have similar shares of secondary energy fuels."
;
c_seFeSectorShareDevScale = 1e-3; !! def = 1e-3
*'
parameter
cm_TaxConvCheck "switch for enabling tax convergence check in nash mode"
;
Expand Down Expand Up @@ -1742,7 +1747,19 @@ $setglobal cm_wind_offshore 1 !! def = 1
$setglobal cm_INCONV_PENALTY on !! def = on !! regexp = off|on
*** cm_INCONV_PENALTY_FESwitch off !! def = off
*** flag to trun on inconvenience penalty to avoid switching shares on buildings, transport and industry biomass use if costs are relatively close (seLiqbio, sesobio, segabio)
$setglobal cm_INCONV_PENALTY_FESwitch on !! def = on !! regexp = off|on
$setglobal cm_INCONV_PENALTY_FESwitch off !! def = on !! regexp = off|on
*** cm_seFeSectorShareDevMethod "Switch to enable an optimization incentive for sectors to have similar shares of secondary energy fuels and determine the method used for the incentive."
*** Possible values: off or the method name (sqSectorShare, sqSectorAvrgShare, or minMaxAvrgShare)
*** off "The model can freely allocate bio/syn/fossil fuels between sectors. If not off, a penalization term is added so sectors are incentivized to apply similar shares of bio-fuels, synfuels, and fossils in each sector."
*** sqSectorShare "Square share penalty"
*** sqSectorAvrgShare "Square deviation from average share penalty"
*** minMaxAvrgShare "Min-max deviation from average share penalty"
*** The relative effect of the penalization term in the objective function is scaled to avoid affecting optimization results. This scaling factor can be defined using the switch c_seFeSectorShareDevScale.
$setglobal cm_seFeSectorShareDevMethod sqSectorAvrgShare !! def = sqSectorAvrgShare !! regexp = off|sqSectorShare|sqSectorAvrgShare|minMaxAvrgShare
*** c_seFeSectorShareDevUnit "Defines if the penalization term is applied over fuel shares or energy units."
*** share, "The square penalization is applied directly to the share values. This results in different-sized regions having varying relative penalization incentives, but the range of penalization values will be more consistent from the solver's perspective."
*** energy, "The square penalization is applied to the share values multiplied by the energy demand. This approach scales penalizations better across different-sized regions, but there is a higher risk of the penalizations being ignored and the shares not being enforced if the value range is too small."
$setglobal c_seFeSectorShareDevUnit share !! def = share !! regexp = share|energy
*** cm_MOFEX off !! def=off
*** *JH/LB* Activate MOFEX partial fossil fuel extraction cost minimization model
*** * Warning: Use a well-converged run since the model uses vm_prodPe from the input GDX
Expand Down
Loading
Loading