From fa2fdcc889515baf59b47b9cb3dddd799b147629 Mon Sep 17 00:00:00 2001 From: Renato-Rodrigues Date: Wed, 24 Jul 2024 13:39:45 +0200 Subject: [PATCH] adding support for scenario based quantity targets (cm_implicitQttyTargetType) --- main.gms | 12 +++++-- .../47_regipol/regiCarbonPrice/datainput.gms | 35 +++++++++++++++---- .../regiCarbonPrice/declarations.gms | 7 +++- modules/47_regipol/regiCarbonPrice/sets.gms | 17 +++++++++ 4 files changed, 62 insertions(+), 9 deletions(-) diff --git a/main.gms b/main.gms index ac7fb41e0..91ab3d353 100755 --- a/main.gms +++ b/main.gms @@ -1285,15 +1285,23 @@ $setGlobal cm_CCSRegiPol off !! def = off $setGlobal cm_vehiclesSubsidies off !! def = off *** cm_implicitQttyTarget - Define quantity target for primary, secondary, final energy or CCS (PE, SE and FE in TWa, or CCS in Mt CO2) per target group (total, biomass, fossil, VRE, renewables, synthetic, ...). *** The target is achieved by an endogenous calculated markup in the form or a tax or subsidy in between iterations. -*** Example on how to use: +*** If cm_implicitQttyTargetType is set to "config", the quantity targets will be defined directly in this switch. Check below for examples on how to do this. +*** If cm_implicitQttyTargetType is set to "scenario", you should define the list of pre-defined scenarios hard-coded in module '47_regipol' that should be active for the current run (this avoids reaching the 255 characters limit in more complex definitions). +*** Example on how to use the switch with cm_implicitQttyTargetType = config: *** cm_implicitQttyTarget "2030.EU27_regi.tax.t.FE.all 1.03263" *** Enforce a tax (tax) that guarantees that the total (t=total) Final Energy (FE.all) in 2030 (2030) is at most the Final energy target in the Fit For 55 regulation in the European Union (EU27_regi) (1.03263 Twa). *** The p47_implicitQttyTargetTax parameter will contain the tax necessary to achieve that goal. (777.8 Mtoe = 777.8 * 1e6 toe = 777.8 * 1e6 * 41.868 GJ = 777.8 * 1e6 * 41.868 * 1e-9 EJ = 777.8 * 1e6 * 41.868 * 1e-9 * 0.03171 TWa = 1.03263 TWa) -*** cm_implicitQttyTarget to "2050.GLO.sub.s.FE.electricity 0.8". The p47_implicitQttyTargetTax parameter will contain the subsidy necessary to achieve that goal. +*** cm_implicitQttyTarget "2050.GLO.sub.s.FE.electricity 0.8". The p47_implicitQttyTargetTax parameter will contain the subsidy necessary to achieve that goal. *** Enforce a subsidy (sub) that guarantees a minimum share (s) of electricity in final energy (FE.electricity) equal to 80% (0.8) from 2050 (2050) onward in all World (GLO) regions. *** The p47_implicitQttyTargetTax parameter will contain the subsidy necessary to achieve that goal. *** To limit CCS to 8 GtCO2 and BECCS to 5 GtCO2, use "2050.GLO.tax.t.CCS.all 8000, 2050.GLO.tax.t.CCS.biomass 5000" +*** Example on how to use the switch with cm_implicitQttyTargetType = scenario: +*** cm_implicitQttyTarget "EU27_RpEUEff,EU27_bio4" +*** "EU27_RpEUEff" -> Enforce a tax that guarantees total FE will be lower or equal to the RePowerEU target for 2030. +*** "EU27_bio4" -> Enforce a tax that garantees that EU27 biomass use will be lower or equal to the 4EJ in 20235 and 2050. $setGlobal cm_implicitQttyTarget off !! def = off +*** cm_implicitQttyTargetType - Define if the quantity target switch cm_implicitQttyTarget contains explicit values for defining the targets (config) or if it contains scenario names to reflect hard-coded options (scenario). +$setGlobal cm_implicitQttyTargetType config !! def = config !! regexp = config|scenario *** cm_loadFromGDX_implicitQttyTargetTax "load p47_implicitQttyTargetTax values from gdx for first iteration. Usefull for policy runs." $setGlobal cm_loadFromGDX_implicitQttyTargetTax off !! def = off !! regexp = off|on *** cm_implicitQttyTarget_delay "delay the start of the quantity target algorithm either to: diff --git a/modules/47_regipol/regiCarbonPrice/datainput.gms b/modules/47_regipol/regiCarbonPrice/datainput.gms index b6c03e10b..c21d184ab 100644 --- a/modules/47_regipol/regiCarbonPrice/datainput.gms +++ b/modules/47_regipol/regiCarbonPrice/datainput.gms @@ -13,11 +13,6 @@ option pm_taxemiMkt_iteration:3:3:1; *** initialize regipol target deviation parameter pm_emiMktTarget_dev(ttot,ttot2,ext_regi,emiMktExt) = 0; -$ifthen.cm_implicitQttyTarget not "%cm_implicitQttyTarget%" == "off" -p47_implicitQttyTargetTaxRescale_iter("1", "2030",ext_regi,qttyTarget,qttyTargetGroup) = 0; -p47_implicitQttyTargetReferenceIteration(ext_regi) = 0; -p47_implicitQttyTargetIterationCount(ext_regi) = 0; -$endIf.cm_implicitQttyTarget *** RR this should be replaced as soon as non-energy is treated endogenously in the model *** non-energy use values are calculated by taking the time path as contained in pm_fe_nechem.cs4r (where eg the 2030 value for EU27 is 91.6% of the 2020 value) and rescaling that with historic non-energy values from Eurostat @@ -129,8 +124,36 @@ $ENDIF.emiMkt *** Implicit tax/subsidy necessary to achieve quantity target for primary, secondary, final energy and/or CCS ***--------------------------------------------------------------------------- -*** intialize energy type bound implicit target parameters $ifthen.cm_implicitQttyTarget not "%cm_implicitQttyTarget%" == "off" + +*** assign cm_implicitQttyTarget values if not defined yet +$ifThen.cm_implicitQttyTargetType "%cm_implicitQttyTargetType%" == "scenario" +*** define quantity target scenario values + p47_implicitQttyTargetScenario("EU27_eedEff" ,"2030","EU27_regi","tax","t","FE_wo_b_wo_n_e","all") = 1.1235; + p47_implicitQttyTargetScenario("EU27_ff55Eff","2030","EU27_regi","tax","t","FE_wo_b_wo_n_e","all") = 1.0452; + p47_implicitQttyTargetScenario("EU27_RpEUEff","2030","EU27_regi","tax","t","FE_wo_b_wo_n_e","all") = 0.9960; + + p47_implicitQttyTargetScenario("EU27_bio4" ,"2035","EU27_regi","tax","t","PE","biomass") = 0.19; + p47_implicitQttyTargetScenario("EU27_bio4" ,"2050","EU27_regi","tax","t","PE","biomass") = 0.126667; + p47_implicitQttyTargetScenario("EU27_bio7p5",t ,"EU27_regi","tax","t","PE","biomass")$((t.val ge 2035) AND (t.val le 2050)) = 0.237825; + p47_implicitQttyTargetScenario("EU27_bio12" ,t ,"EU27_regi","tax","t","PE","biomass")$((t.val ge 2035) AND (t.val le 2050)) = 0.38; + + p47_implicitQttyTargetScenario("EU27_limVRE" ,"2025","EU27_regi","tax","t","PE","wind") = 0.072; + p47_implicitQttyTargetScenario("EU27_limVRE" ,"2050","EU27_regi","tax","t","PE","wind") = 0.201; + p47_implicitQttyTargetScenario("EU27_limVRE" ,"2025","EU27_regi","tax","t","PE","solar") = 0.04; + p47_implicitQttyTargetScenario("EU27_limVRE" ,"2050","EU27_regi","tax","t","PE","solar") = 0.168; +*** assign active scenarios to the current run +loop(qttyTargetActiveScenario, + pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup)$p47_implicitQttyTargetScenario(qttyTargetActiveScenario,ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup) = p47_implicitQttyTargetScenario(qttyTargetActiveScenario,ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup); +); +display pm_implicitQttyTarget; +$endif.cm_implicitQttyTargetType + +*** intialize auxiliar parameters + p47_implicitQttyTargetTaxRescale_iter("1", "2030",ext_regi,qttyTarget,qttyTargetGroup) = 0; + p47_implicitQttyTargetReferenceIteration(ext_regi) = 0; + p47_implicitQttyTargetIterationCount(ext_regi) = 0; +*** intialize energy type bound implicit target parameters pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,"CCS",qttyTargetGroup)$pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,"CCS",qttyTargetGroup) = pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,"CCS",qttyTargetGroup)/(sm_c_2_co2*1000); p47_implicitQttyTargetTax0(t,all_regi) = 0; $endIf.cm_implicitQttyTarget diff --git a/modules/47_regipol/regiCarbonPrice/declarations.gms b/modules/47_regipol/regiCarbonPrice/declarations.gms index b56c8d0d4..b1c84da5e 100644 --- a/modules/47_regipol/regiCarbonPrice/declarations.gms +++ b/modules/47_regipol/regiCarbonPrice/declarations.gms @@ -112,8 +112,13 @@ Parameter p47_implicitQttyTargetTaxRescale_iter(iteration,ttot,ext_regi,qttyTarget,qttyTargetGroup) "rescale factor for current implicit quantity target tax after the given iteration" p47_implicitQttyTargetCurrent_iter(iteration,ttot,ext_regi,qttyTarget,qttyTargetGroup) "current iteration total value for an specific quantity target per iteration" +$ifThen.cm_implicitQttyTargetType "%cm_implicitQttyTargetType%" == "config" pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup) "quantity target [absolute: TWa or GtC; or percentage: 0.1]" / %cm_implicitQttyTarget% / - +$else.cm_implicitQttyTargetType + pm_implicitQttyTarget(ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup) "quantity target [absolute: TWa or GtC; or percentage: 0.1]" + p47_implicitQttyTargetScenario(qttyTargetScenario,ttot,ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup) "hard-coded quantity scenarios types [absolute: TWa or GtC; or percentage: 0.1]" +$endif.cm_implicitQttyTargetType + pm_implicitQttyTarget_isLimited(iteration,ttot,ext_regi,qttyTarget,qttyTargetGroup) "1 (one) if there is a hard bound on the model that does not allow the tax to change further the quantity" p47_implicitQttyTarget_initialYear(ext_regi,taxType,targetType,qttyTarget,qttyTargetGroup) "initial year of quantity target for a given region [year]" diff --git a/modules/47_regipol/regiCarbonPrice/sets.gms b/modules/47_regipol/regiCarbonPrice/sets.gms index 1c084bca7..af36b34a1 100644 --- a/modules/47_regipol/regiCarbonPrice/sets.gms +++ b/modules/47_regipol/regiCarbonPrice/sets.gms @@ -107,6 +107,23 @@ qttyDelayType_47 "options to define different delay rules for starting the quant emiConv "quantity targets are only active after emission targets defined at the carbon price modules and at the regipol modules converged" emiRegiConv "quantity targets are only active after regional emission targets achieved given deviation levels" / + +$ifThen.cm_implicitQttyTargetType "%cm_implicitQttyTargetType%" == "scenario" +qttyTargetScenario "hard-coded quantity scenarios" +/ + EU27_eedEff "2018 energy efficiency directive (846 Mtoe final energy by 2030)" + EU27_ff55Eff "Fit for 55 energy efficiency target (787 Mtoe final energy by 2030)" + EU27_RpEUEff "RePowerEU energy efficiency target (750 Mtoe final energy by 2030)" + + EU27_bio4 "EU-27 primary energy biomass limited to 6 EJ by 2035 and 4 EJ by 2050" + EU27_bio7p5 "EU-27 primary energy biomass limited to 7.5 EJ by 2035 and 2050" + EU27_bio12 "EU-27 primary energy biomass limited to 12 EJ by 2035 and 2050" + + EU27_limVRE "wind and solar limited to linear extrapolation of 2021-2022 growth of generation capacity by 2025 and 2050" +/ +qttyTargetActiveScenario(qttyTargetScenario) "current run active quantity scenarios" / %cm_implicitQttyTarget% / +$endif.cm_implicitQttyTargetType + $endIf.cm_implicitQttyTarget $ifthen.cm_implicitPriceTarget not "%cm_implicitPriceTarget%" == "off"