From 6a1f2ab0b2b13e04714ba13ca6c0a4f42a71f3be Mon Sep 17 00:00:00 2001 From: lecfab Date: Fri, 19 Jul 2024 11:34:14 +0200 Subject: [PATCH 1/5] Removed alternative 32_power realizations that are not used anymore --- core/bounds.gms | 1 + core/declarations.gms | 1 + core/equations.gms | 43 ++- core/sets.gms | 24 +- main.gms | 4 +- modules/32_power/DTcoup/bounds.gms | 59 ---- modules/32_power/DTcoup/declarations.gms | 55 ---- modules/32_power/DTcoup/equations.gms | 236 ---------------- modules/32_power/DTcoup/not_used.txt | 18 -- modules/32_power/DTcoup/postsolve.gms | 14 - modules/32_power/DTcoup/preloop.gms | 15 - modules/32_power/DTcoup/presolve.gms | 14 - modules/32_power/DTcoup/realization.gms | 43 --- modules/32_power/RLDC/bounds.gms | 184 ------------ modules/32_power/RLDC/datainput.gms | 105 ------- modules/32_power/RLDC/declarations.gms | 78 ------ modules/32_power/RLDC/equations.gms | 343 ----------------------- modules/32_power/RLDC/input/files | 5 - modules/32_power/RLDC/postsolve.gms | 14 - modules/32_power/RLDC/preloop.gms | 15 - modules/32_power/RLDC/presolve.gms | 11 - modules/32_power/RLDC/realization.gms | 55 ---- modules/32_power/RLDC/sets.gms | 127 --------- modules/32_power/module.gms | 10 +- 24 files changed, 38 insertions(+), 1436 deletions(-) delete mode 100644 modules/32_power/DTcoup/bounds.gms delete mode 100644 modules/32_power/DTcoup/declarations.gms delete mode 100644 modules/32_power/DTcoup/equations.gms delete mode 100644 modules/32_power/DTcoup/not_used.txt delete mode 100644 modules/32_power/DTcoup/postsolve.gms delete mode 100644 modules/32_power/DTcoup/preloop.gms delete mode 100644 modules/32_power/DTcoup/presolve.gms delete mode 100644 modules/32_power/DTcoup/realization.gms delete mode 100644 modules/32_power/RLDC/bounds.gms delete mode 100644 modules/32_power/RLDC/datainput.gms delete mode 100644 modules/32_power/RLDC/declarations.gms delete mode 100644 modules/32_power/RLDC/equations.gms delete mode 100644 modules/32_power/RLDC/input/files delete mode 100644 modules/32_power/RLDC/postsolve.gms delete mode 100644 modules/32_power/RLDC/preloop.gms delete mode 100644 modules/32_power/RLDC/presolve.gms delete mode 100644 modules/32_power/RLDC/realization.gms delete mode 100644 modules/32_power/RLDC/sets.gms diff --git a/core/bounds.gms b/core/bounds.gms index 1b0221828..58d83760a 100755 --- a/core/bounds.gms +++ b/core/bounds.gms @@ -443,6 +443,7 @@ $if %c_SSP_forcing_adjust% == "forcing_SSP1" vm_deltaCap.up(t,regi,"coalgas" *** ------------------------------------------------------------- *** H2 Curtailment *** ------------------------------------------------------------- +*** RLDC removal ***Fixing h2curt value to zero to avoid the model to generate SE out of nothing. ***Models that have additional se production channels should release this variable (eg. RLDC power module). loop(prodSeOth2te(enty,te), diff --git a/core/declarations.gms b/core/declarations.gms index d9589e508..5a6e60e58 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -412,6 +412,7 @@ v_prodUe (ttot,all_regi,all_enty,all_enty,all_te) "Useful energy production [ vm_capEarlyReti(tall,all_regi,all_te) "fraction of early retired capital" +*** RLDC removal vm_demSeOth(ttot,all_regi,all_enty,all_te) "other sety demand from certain technologies, have to calculated in additional equations [TWa]" vm_prodSeOth(ttot,all_regi,all_enty,all_te) "other sety production from certain technologies, have to be calculated in additional equations [TWa]" diff --git a/core/equations.gms b/core/equations.gms index cc6a4a1c0..1e17b533e 100644 --- a/core/equations.gms +++ b/core/equations.gms @@ -156,12 +156,12 @@ q_balSe(t,regi,enty2)$( entySe(enty2) AND (NOT (sameas(enty2,"seel"))) ).. - vm_emiMacSector(t,regi,"ch4wstl") ) )$( sameas(enty2,"segabio") AND t.val gt 2005 ) - + sum(prodSeOth2te(enty2,te), vm_prodSeOth(t,regi,enty2,te) ) + + sum(prodSeOth2te(enty2,te), vm_prodSeOth(t,regi,enty2,te) ) !! *** RLDC removal + vm_Mport(t,regi,enty2) =e= sum(se2fe(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te)) + sum(se2se(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te)) - + sum(demSeOth2te(enty2,te), vm_demSeOth(t,regi,enty2,te) ) + + sum(demSeOth2te(enty2,te), vm_demSeOth(t,regi,enty2,te) ) !! *** RLDC removal + vm_Xport(t,regi,enty2) ; @@ -259,37 +259,34 @@ q_shFeCes(t,regi,entyFe,in,teEs)$feViaEs2ppfen(entyFe,in,teEs).. *' Definition of capacity constraints for primary energy to secondary energy transformation: ***-------------------------------------------------------------------------- q_limitCapSe(t,regi,pe2se(enty,enty2,te)).. - vm_prodSe(t,regi,enty,enty2,te) - =e= - sum(teSe2rlf(te,rlf), - vm_capFac(t,regi,te) * pm_dataren(regi,"nur",rlf,te) - * vm_cap(t,regi,te,rlf) - )$(NOT teReNoBio(te)) - + - sum(teRe2rlfDetail(te,rlf), - ( 1$teRLDCDisp(te) + pm_dataren(regi,"nur",rlf,te)$(NOT teRLDCDisp(te)) ) * vm_capFac(t,regi,te) - * vm_capDistr(t,regi,te,rlf) - )$(teReNoBio(te)) + vm_prodSe(t,regi,enty,enty2,te) + =e= + sum(teSe2rlf(te,rlf), + vm_capFac(t,regi,te) * pm_dataren(regi,"nur",rlf,te) * vm_cap(t,regi,te,rlf) + )$(NOT teReNoBio(te)) + + + sum(teRe2rlfDetail(te,rlf), + pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * vm_capDistr(t,regi,te,rlf) + )$(teReNoBio(te)) ; ***---------------------------------------------------------------------------- *' Definition of capacity constraints for secondary energy to secondary energy transformation: ***--------------------------------------------------------------------------- q_limitCapSe2se(t,regi,se2se(enty,enty2,te)).. - vm_prodSe(t,regi,enty,enty2,te) - =e= - sum(teSe2rlf(te,rlf), - vm_capFac(t,regi,te) * pm_dataren(regi,"nur",rlf,te) - * vm_cap(t,regi,te,rlf) - ); + vm_prodSe(t,regi,enty,enty2,te) + =e= + sum(teSe2rlf(te,rlf), + vm_capFac(t,regi,te) * pm_dataren(regi,"nur",rlf,te) * vm_cap(t,regi,te,rlf) + ); ***--------------------------------------------------------------------------- *' Definition of capacity constraints for secondary energy to final energy transformation: ***--------------------------------------------------------------------------- q_limitCapFe(t,regi,te).. - sum((entySe,entyFe)$(se2fe(entySe,entyFe,te)), vm_prodFe(t,regi,entySe,entyFe,te)) - =l= - sum(teFe2rlf(te,rlf), vm_capFac(t,regi,te) * vm_cap(t,regi,te,rlf)); + sum((entySe,entyFe)$(se2fe(entySe,entyFe,te)), vm_prodFe(t,regi,entySe,entyFe,te)) + =l= + sum(teFe2rlf(te,rlf), vm_capFac(t,regi,te) * vm_cap(t,regi,te,rlf)); ***--------------------------------------------------------------------------- *' Definition of capacity constraints for CCS technologies: @@ -408,7 +405,7 @@ qm_fuel2pe(t,regi,peRicardian(enty)).. q_limitProd(t,regi,teRe2rlfDetail(teReNoBio(te),rlf)).. pm_dataren(regi,"maxprod",rlf,te) =g= - ( 1$teRLDCDisp(te) + pm_dataren(regi,"nur",rlf,te)$(NOT teRLDCDisp(te)) ) * vm_capFac(t,regi,te) * vm_capDistr(t,regi,te,rlf); + pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * vm_capDistr(t,regi,te,rlf); ***----------------------------------------------------------------------------- *' Definition of competition for geographical potential for renewable energy types: diff --git a/core/sets.gms b/core/sets.gms index dd972a068..0482fc9f7 100755 --- a/core/sets.gms +++ b/core/sets.gms @@ -163,7 +163,7 @@ all_te "all energy technologies, including from modules" gash2c "gas to hydrogen with capture" gasftrec "gas based fischer-tropsch recycle" gasftcrec "gas based fischer-tropsch with capture recycle" - refliq "refinery oil to se liquids" + refliq "refinery oil to SE liquids" dot "diesel oil turbine" dhp "diesel oil heating plant" igcc "integrated coal gasification combined cycle" @@ -359,14 +359,14 @@ all_enty "all types of quantities" pebioil "PE biomass sunflowers, palm oil, etc" all_seso "all to SE solids" - sesofos "SE solids from fossil pe" + sesofos "SE solids from fossil PE" sesobio "SE solids from biomass" all_seliq "all to SE liquids" - seliqfos "SE liquids from fossil pe (ex. petrol and diesel)" + seliqfos "SE liquids from fossil PE (ex. petrol and diesel)" seliqbio "SE liquids from biomass (ex. ethanol)" seliqsyn "SE synthetic liquids from H2 (ex. petrol and diesel)" all_sega "all to SE gas" - segafos "SE gas from fossil pe" + segafos "SE gas from fossil PE" segabio "SE gas from biomass" segasyn "SE synthetic gas from H2" seh2 "SE hydrogen" @@ -406,7 +406,7 @@ all_enty "all types of quantities" fetf "FE transport fuels" fehoi_cs "final energy in industry diesel - carbon stored" fegai_cs "final energy in industry natural gas - carbon stored " - entydummy "dummy fe for process based industry implementation" + entydummy "dummy FE for process based industry implementation" ueHDVt "transport useful energy heavy duty vehicles" ueLDVt "transport useful energy light duty vehicles" @@ -1320,9 +1320,6 @@ $endif.cm_subsec_model_steel *** Definition of subsets of 'te': ***----------------------------------------------------------------------------- -teRLDCDisp(all_te) "RLDC Dispatchable technologies that produce seel" -/ -/ *** Note: technologies without endogenous learning can also have decreasing (or increasing) capital cost over time, due to for example convergence to global value teLearn(all_te) "Learning technologies (for which investment costs are reduced endogenously through capacity deployment)." / @@ -1620,7 +1617,7 @@ enty(all_enty) "all types of quantities" fetf "final energy transport fuels" feh2t "final energy hydrogen transport" fegat "final energy nat. gas for transport" - entydummy "dummy fe for process based industry implementation" + entydummy "dummy FE for process based industry implementation" co2 "carbon dioxide emissions" ch4 "methane emissions" @@ -1731,7 +1728,7 @@ peExPol(all_enty) "primary energy fuels with polynomial" peur "PE uranium" / -peExGrade(all_enty) "exhaustible pe with step as entyPe ex-peExPol - s.b." +peExGrade(all_enty) "exhaustible PE with step as entyPe ex-peExPol - s.b." peRicardian(all_enty) "Ricardian PE" @@ -2436,7 +2433,7 @@ seAgg(all_enty) "secondary energy aggregations" all_sega / -seAgg2se(all_enty,all_enty) "map secondary energy aggregation to se" +seAgg2se(all_enty,all_enty) "map secondary energy aggregation to SE" / all_seliq.seliqbio all_seliq.seliqfos @@ -2791,7 +2788,8 @@ teReComp2pe(all_enty,all_te,rlf) "map competing technologies to primary energy pesol.csp.(1*9) / -demSeOth2te(all_enty,all_te) "map other se demands not directly following the sedem-route through technologies" +*** RLDC removal: should we remove demSeOth like prodSeOth, although it's used in remind2? +demSeOth2te(all_enty,all_te) "map other SE demands not directly following the sedem-route through technologies" / seh2.csp segabio.csp @@ -2816,7 +2814,7 @@ $ENDIF.WindOff ) . 1 / -teRe2rlfDetail(all_te,rlf) "mapping for se techologies to grades" +teRe2rlfDetail(all_te,rlf) "mapping for SE techologies to grades" / wind.(1*9) $IFTHEN.WindOff %cm_wind_offshore% == "1" diff --git a/main.gms b/main.gms index 4294f8f27..f71020b45 100755 --- a/main.gms +++ b/main.gms @@ -317,10 +317,8 @@ $setglobal biomass magpie_40 !! def = magpie_40 *' * (MOFEX) : contains the standalone version of MOFEX (Model Of Fossil EXtraction), which minimizes the discounted extraction and trade costs of fossils while balancing trade for each time step. Not to be run within a REMIND run but instead through the standalone architecture or soft-linked with REMIND (not yet implemented) $setglobal fossil grades2poly !! def = grades2poly *'--------------------- 32_power ---------------------------------------- -*' +*' *' * (IntC) : Power sector formulation with Integration Cost (IntC) markups and curtailment for VRE integration - linearly increasing with VRE share -, and fixed capacity factors for dispatchable power plants -*' * (RLDC) : Power sector formulation with Residual Load Duration Curve (RLDC) formulation for VRE power integration, and flexible capacity factors for dispatchable power plants -*' * (DTcoup) : (currently not merged, only a copy of IntC) Power sector formulation with iterative coupling to hourly power-sector model DIETER: REMIND gives DIETER costs of technologies, power demand, CO2 price and capacity bounds; DIETER gives REMIND markups of generation, capacity factors, peak hourly residual demand $setglobal power IntC !! def = IntC *'--------------------- 33_CDR ---------------------------------------- *' diff --git a/modules/32_power/DTcoup/bounds.gms b/modules/32_power/DTcoup/bounds.gms deleted file mode 100644 index 05bae18a5..000000000 --- a/modules/32_power/DTcoup/bounds.gms +++ /dev/null @@ -1,59 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/bounds.gms - -***----------------------------------------------------------- -*** module specific bounds -***------------------------------------------------------------ - -*** Fix capacity factors to the standard value from data -vm_capFac.fx(t,regi,te) = pm_cf(t,regi,te); - -*** FS: if flexibility tax on, let capacity factor be endogenuously determined between 0.1 and 1 -*** for technologies that get flexibility tax/subsity (teFlexTax) -if ( cm_flex_tax eq 1, - if ( cm_FlexTaxFeedback eq 1, -*** if flexibility tax feedback is on, let model choose capacity factor of flexible technologies freely - vm_capFac.lo(t,regi,teFlexTax)$(t.val ge 2010) = 0.1; - vm_capFac.up(t,regi,teFlexTax)$(t.val ge 2010) = pm_cf(t,regi,teFlexTax); - else -*** if flexibility tax feedback is off, only flexibliity tax benefit for flexible technologies and 0.5 capacity factor - vm_capFac.fx(t,regi,teFlex)$(t.val ge 2010) = 0.5; -*** electricity price of inflexible technologies the same w/o feedback - v32_flexPriceShare.fx(t,regi,te)$(teFlexTax(te) AND NOT(teFlex(te))) = 1; - ); -); - -*** Lower bounds on VRE use (more than 0.01% of electricity demand) after 2015 to prevent the model from overlooking solar and wind -loop(regi, - loop(te$(teVRE(te)), - if ( (sum(rlf, pm_dataren(regi,"maxprod",rlf,te)) > 0.01 * pm_IO_input(regi,"seel","feels","tdels")) , - vm_shSeEl.lo(t,regi,te)$(t.val>2020) = 0.01; - ); - ); -); - -*RP* upper bound of 90% on share of electricity produced by a single VRE technology, and lower bound on usablese to prevent the solver from dividing by 0 -vm_shSeEl.up(t,regi,teVRE) = 90; - -vm_usableSe.lo(t,regi,"seel") = 1e-6; - -*** Fix capacity for h2curt technology (modeled only in RLDC) -vm_cap.fx(t,regi,"h2curt",rlf) = 0; - - -*RP To ensure that the REMIND model doesn't overlook CSP due to gdx effects, ensure some minimum use in regions with good solar insolation, here proxied from the csp storage factor: -loop(regi$(p32_factorStorage(regi,"csp") < 1), - vm_shSeEl.lo(t,regi,"csp")$(t.val > 2025) = 0.5; - vm_shSeEl.lo(t,regi,"csp")$(t.val > 2050) = 1; - vm_shSeEl.lo(t,regi,"csp")$(t.val > 2100) = 2; -); - -*** Fix capacity to 0 for elh2VRE now that the equation q32_elh2VREcapfromTestor pushes elh2, not anymore elh2VRE, and capital costs are 1 -vm_cap.fx(t,regi,"elh2VRE",rlf) = 0; - -*** EOF ./modules/32_power/DTcoup/bounds.gms diff --git a/modules/32_power/DTcoup/declarations.gms b/modules/32_power/DTcoup/declarations.gms deleted file mode 100644 index 7776e381a..000000000 --- a/modules/32_power/DTcoup/declarations.gms +++ /dev/null @@ -1,55 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/declarations.gms - -parameters - p32_grid_factor(all_regi) "multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India" - p32_gridexp(all_regi,all_te) "exponent that determines how grid requirement per kW increases with market share of wind and solar. 1 means specific marginal costs increase linearly" - p32_storexp(all_regi,all_te) "exponent that determines how curtailment and storage requirements per kW increase with market share of wind and solar. 1 means specific marginal costs increase linearly" - p32_shCHP(ttot,all_regi) "upper boundary of chp electricity generation" - p32_factorStorage(all_regi,all_te) "multiplicative factor that scales total curtailment and storage requirements up or down in different regions for different technologies (e.g. down for PV in regions where high solar radiation coincides with high electricity demand)" - f32_storageCap(char, all_te) "multiplicative factor between dummy seel<-->h2 technologies and storXXX technologies" - p32_storageCap(all_te,char) "multiplicative factor between dummy seel<-->h2 technologies and storXXX technologies" - p32_PriceDurSlope(all_regi,all_te) "slope of price duration curve used for calculation of electricity price for flexible technologies, determines how fast electricity price declines at lower capacity factors" -; - -scalars -s32_storlink "how strong is the influence of two similar renewable energies on each other's storage requirements (1= complete, 4= rather small)" /3/ -; - -positive variables - v32_shStor(ttot,all_regi,all_te) "share of seel production from renewables that needs to be stored, range 0..1 [0,1]" - v32_storloss(ttot,all_regi,all_te) "total energy loss from storage for a given technology [TWa]" - vm_shSeEl(ttot,all_regi,all_te) "new share of electricity production in % [%]" - v32_testdemSeShare(ttot,all_regi,all_te) "test variable for tech share of SE electricity demand" -; - -equations - q32_balSe(ttot,all_regi,all_enty) "balance equation for electricity secondary energy" - q32_usableSe(ttot,all_regi,all_enty) "calculate usable se before se2se and MP/XP (without storage)" - q32_usableSeTe(ttot,all_regi,entySe,all_te) "calculate usable se produced by one technology (vm_usableSeTe)" - q32_limitCapTeStor(ttot,all_regi,teStor) "calculate the storage capacity required by vm_storloss" - q32_limitCapTeChp(ttot,all_regi) "capacitiy constraint for chp electricity generation" - q32_limitCapTeGrid(ttot,all_regi) "calculate the additional grid capacity required by VRE" - q32_shSeEl(ttot,all_regi,all_te) "calculate share of electricity production of a technology (vm_shSeEl)" - q32_shStor(ttot,all_regi,all_te) "equation to calculate v32_shStor" - q32_storloss(ttot,all_regi,all_te) "equation to calculate vm_storloss" - q32_operatingReserve(ttot,all_regi) "operating reserve for necessary flexibility" - q32_h2turbVREcapfromTestor(tall,all_regi) "calculate capacities of dummy seel<--h2 technology from storXXX technologies" - q32_elh2VREcapfromTestor(tall,all_regi) "calculate capacities of dummy seel-->h2 technology from storXXX technologies" - q32_flexAdj(tall,all_regi,all_te) "calculate flexibility used in flexibility tax for technologies with electricity input" - q32_flexPriceShareMin "calculatae miniumum share of average electricity that flexible technologies can see" - q32_flexPriceShare(tall,all_regi,all_te) "calculate share of average electricity price that flexible technologies see" - q32_flexPriceBalance(tall,all_regi) "constraint such that flexible electricity prices balanance to average electricity price" -; - -variables -v32_flexPriceShare(tall,all_regi,all_te) "share of average electricity price that flexible technologies see [share: 0...1]" -v32_flexPriceShareMin(tall,all_regi,all_te) "possible minimum of share of average electricity price that flexible technologies see [share: 0...1]" -; - -*** EOF ./modules/32_power/DTcoup/declarations.gms diff --git a/modules/32_power/DTcoup/equations.gms b/modules/32_power/DTcoup/equations.gms deleted file mode 100644 index fcaa37f62..000000000 --- a/modules/32_power/DTcoup/equations.gms +++ /dev/null @@ -1,236 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/equations.gms - -*' @equations - -***--------------------------------------------------------------------------- -*' Balance equation for electricity secondary energy type: -***--------------------------------------------------------------------------- -q32_balSe(t,regi,enty2)$(sameas(enty2,"seel")).. - sum(pe2se(enty,enty2,te), vm_prodSe(t,regi,enty,enty2,te) ) - + sum(se2se(enty,enty2,te), vm_prodSe(t,regi,enty,enty2,te) ) - + sum(pc2te(enty,entySe(enty3),te,enty2), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_prodSe(t,regi,enty,enty3,te) ) - + sum(pc2te(enty4,entyFe(enty5),te,enty2), - pm_prodCouple(regi,enty4,enty5,te,enty2) * vm_prodFe(t,regi,enty4,enty5,te) ) - + sum(pc2te(enty,enty3,te,enty2), - sum(teCCS2rlf(te,rlf), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_co2CCS(t,regi,enty,enty3,te,rlf) ) ) - + vm_Mport(t,regi,enty2) - =e= - sum(se2fe(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te) ) - + sum(se2se(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te) ) - + sum(teVRE, v32_storloss(t,regi,teVRE) ) - + sum(pe2rlf(enty3,rlf2), (pm_fuExtrOwnCons(regi, enty2, enty3) * vm_fuExtr(t,regi,enty3,rlf2))$(pm_fuExtrOwnCons(regi, enty2, enty3) gt 0))$(t.val > 2005) !! do not use in 2005 because this demand is not contained in 05_initialCap - + vm_Xport(t,regi,enty2) -; - -q32_usableSe(t,regi,entySe)$(sameas(entySe,"seel")).. - vm_usableSe(t,regi,entySe) - =e= - sum(pe2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(se2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(pc2te(entyPe,entySe(enty3),te,entySe)$(pm_prodCouple(regi,entyPe,enty3,te,entySe) gt 0), - pm_prodCouple(regi,entyPe,enty3,te,entySe)*vm_prodSe(t,regi,entyPe,enty3,te) ) - - sum(teVRE, v32_storloss(t,regi,teVRE) ) -; - -q32_usableSeTe(t,regi,entySe,te)$(sameas(entySe,"seel") AND teVRE(te)).. - vm_usableSeTe(t,regi,entySe,te) - =e= - sum(pe2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(se2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(pc2te(enty,entySe(enty3),te,entySe)$(pm_prodCouple(regi,enty,enty3,te,entySe) gt 0), - pm_prodCouple(regi,enty,enty3,te,entySe) * vm_prodSe(t,regi,enty,enty3,te) ) - - sum(teVRE$sameas(te,teVRE), v32_storloss(t,regi,teVRE) ) -; - -***--------------------------------------------------------------------------- -*' Definition of capacity constraints for storage: -***--------------------------------------------------------------------------- -q32_limitCapTeStor(t,regi,teStor)$( t.val ge 2015 ) .. - ( 0.5$( cm_VRE_supply_assumptions eq 1 ) - + 1$( cm_VRE_supply_assumptions ne 1 ) - ) - * sum(VRE2teStor(teVRE,teStor), v32_storloss(t,regi,teVRE)) - * pm_eta_conv(t,regi,teStor) - / (1 - pm_eta_conv(t,regi,teStor)) - =l= - sum(te2rlf(teStor,rlf), - vm_capFac(t,regi,teStor) - * pm_dataren(regi,"nur",rlf,teStor) - * vm_cap(t,regi,teStor,rlf) - ) -; - - -*** H2 storage implementation: Storage technologies (storspv, storwind etc.) also -*** represent H2 storage. This is implemented by automatically scaling up capacities of -*** elh2VRE (electrolysis from VRE, seel -> seh2) and H2 turbines (h2turbVRE, seh2 -> seel) -*** with VRE capacities which require storage (according to q32_limitCapTeStor): - -*** build additional electrolysis capacities with stored VRE electricity -q32_elh2VREcapfromTestor(t,regi).. - vm_cap(t,regi,"elh2","1") - =g= - sum(te$teStor(te), p32_storageCap(te,"elh2VREcapratio") * vm_cap(t,regi,te,"1") ) -; - -*** build additional h2 to seel capacities to use stored hydrogen -q32_h2turbVREcapfromTestor(t,regi).. - vm_cap(t,regi,"h2turbVRE","1") - =e= - sum(te$teStor(te), p32_storageCap(te,"h2turbVREcapratio") * vm_cap(t,regi,te,"1") ) -; - -***--------------------------------------------------------------------------- -*' Definition of capacity constraints for CHP technologies: -***--------------------------------------------------------------------------- -q32_limitCapTeChp(t,regi).. - sum(pe2se(enty,"seel",teChp(te)), vm_prodSe(t,regi,enty,"seel",te) ) - =l= - p32_shCHP(t,regi) - * sum(pe2se(enty,"seel",te), vm_prodSe(t,regi,enty,"seel",te) ) -; - -***--------------------------------------------------------------------------- -*' Calculation of necessary grid installations for centralized renewables: -***--------------------------------------------------------------------------- -q32_limitCapTeGrid(t,regi)$( t.val ge 2015 ) .. - vm_cap(t,regi,"gridwind",'1') !! Technology is now parameterized to yield marginal costs of ~3.5$/MWh VRE electricity - / p32_grid_factor(regi) !! It is assumed that large regions require higher grid investment - =g= - vm_prodSe(t,regi,"pesol","seel","spv") - + vm_prodSe(t,regi,"pesol","seel","csp") - + 1.5 * vm_prodSe(t,regi,"pewin","seel","wind") !! wind has larger variations accross space, so adding grid is more important for wind (result of REMIX runs for ADVANCE project) -$IFTHEN.WindOff %cm_wind_offshore% == "1" - + 3 * vm_prodSe(t,regi,"pewin","seel","windoff") -$ENDIF.WindOff -; - -***--------------------------------------------------------------------------- -*' Calculation of share of electricity production of a technology: -***--------------------------------------------------------------------------- -q32_shSeEl(t,regi,teVRE).. - vm_shSeEl(t,regi,teVRE) / 100 * vm_usableSe(t,regi,"seel") - =e= - vm_usableSeTe(t,regi,"seel",teVRE) -; - -***--------------------------------------------------------------------------- -*' Calculation of necessary storage electricity production: -***--------------------------------------------------------------------------- -q32_shStor(t,regi,teVRE)$(t.val ge 2015).. - v32_shStor(t,regi,teVRE) - =g= - p32_factorStorage(regi,teVRE) * 100 - * ( - (1.e-10 + (vm_shSeEl(t,regi,teVRE)+ sum(VRE2teVRElinked(teVRE,teVRE2), vm_shSeEl(t,regi,teVRE2)) /s32_storlink)/100 ) ** p32_storexp(regi,teVRE) !! offset of 1.e-10 for numerical reasons: gams doesn't like 0 if the exponent is not integer - - (1.e-10 ** p32_storexp(regi,teVRE) ) !! offset correction - - 0.07 !! first 7% of VRE share bring no negative effects - ) -; - -q32_storloss(t,regi,teVRE)$(t.val ge 2015).. - v32_storloss(t,regi,teVRE) - =e= - v32_shStor(t,regi,teVRE) / 93 !! corrects for the 7%-shift in v32_shStor: at 100% the value is correct again - * sum(VRE2teStor(teVRE,teStor), (1 - pm_eta_conv(t,regi,teStor) ) / pm_eta_conv(t,regi,teStor) ) - * vm_usableSeTe(t,regi,"seel",teVRE) -; - -***--------------------------------------------------------------------------- -*' Operating reserve constraint -***--------------------------------------------------------------------------- -q32_operatingReserve(t,regi)$(t.val ge 2010).. -***1 is the chosen load coefficient - vm_usableSe(t,regi,"seel") - =l= -*** Variable renewable coefficients could be expected to be negative because they are variable. -*** However they are modeled positive because storage conditions make variable renewables controllable. - sum(pe2se(enty,"seel",te)$(NOT teVRE(te)), - pm_data(regi,"flexibility",te) * vm_prodSe(t,regi,enty,"seel",te) ) - + sum(se2se(enty,"seel",te)$(NOT teVRE(te)), - pm_data(regi,"flexibility",te) * vm_prodSe(t,regi,enty,"seel",te) ) - + sum(pe2se(enty,"seel",teVRE), - pm_data(regi,"flexibility",teVRE) * (vm_prodSe(t,regi,enty,"seel",teVRE)-v32_storloss(t,regi,teVRE)) ) - + - sum(pe2se(enty,"seel",teVRE), - sum(VRE2teStor(teVRE,teStor), - pm_data(regi,"flexibility",teStor) * (vm_prodSe(t,regi,enty,"seel",teVRE)-v32_storloss(t,regi,teVRE)) ) ) -; - -*** FS: calculate flexibility adjustment used in flexibility tax for technologies with electricity input -***---------------------------------------------------------------------------- - -*** This equation calculates the minimal flexible electricity price that flexible technologies (like elh2) can see. It is reached when the VRE share is 100%. -*** It depends on the capacity factor with a hyperbolic function. The equation ensures that by decreasing -*** capacity factor of flexible technologies (teFlex) these technologies see lower electricity prices given that there is a high VRE share in the power system. - -*** On the derivation of the equation: -*** The formulation assumes a cubic price duration curve. That is, the effective electricity price the flexible technologies sees -*** depends on the capacity factor (CF) with a cubic function centered at (0.5,1): -*** p32_PriceDurSlope * (CF-0.5)^3 + 1, -*** Hence, at CF = 0.5, the REMIND average price pm_SEPrice(t,regi,"seel") is paid. -*** To get the average electricity price that a flexible technology sees at a certain CF, -*** we need to integrate this function with respect to CF and divide by CF. This gives the formulation below: -*** v32_flexPriceShareMin = p32_PriceDurSlope * ((CF-0.5)^4-0.5^4) / (4*CF) + 1. -*** This is the new average electricity price a technology sees if it runs on (a possibly lower than one) capacity factor CF -*** and deliberately uses hours of low-cost electricity. - q32_flexPriceShareMin(t,regi,te)$(teFlex(te)).. - v32_flexPriceShareMin(t,regi,te) * 4 * vm_capFac(t,regi,te) - =e= - p32_PriceDurSlope(regi,te) * (power(vm_capFac(t,regi,te) - 0.5,4) - 0.5**4) + - 4 * vm_capFac(t,regi,te) -; - -*** Calculates the electricity price of flexible technologies: -*** The effective flexible price linearly decreases with VRE share -*** from 1 (at 0% VRE share) to v32_flexPriceShareMin (at 100% VRE). -q32_flexPriceShare(t,regi,te)$(teFlex(te)).. - v32_flexPriceShare(t,regi,te) - =e= - 1 - (1-v32_flexPriceShareMin(t,regi,te)) * sum(teVRE, vm_shSeEl(t,regi,teVRE))/100 -; - -*** This balance ensures that the lower electricity prices of flexible technologies are compensated -*** by higher electricity prices of inflexible technologies. Inflexible technologies are all technologies -*** which are part of teFlexTax but not of teFlex. The weighted sum of -*** flexible/inflexible electricity prices (v32_flexPriceShare) and electricity demand must be one. -*** Note: this is only on if cm_FlexTaxFeedback = 1. Otherwise, there is no change in electricity prices for inflexible technologies. -q32_flexPriceBalance(t,regi)$(cm_FlexTaxFeedback eq 1).. - sum(en2en(enty,enty2,te)$(teFlexTax(te)), - vm_demSe(t,regi,enty,enty2,te)) - =e= - sum(en2en(enty,enty2,te)$(teFlexTax(te)), - vm_demSe(t,regi,enty,enty2,te) * v32_flexPriceShare(t,regi,te)) -; - - -*** This calculates the flexibility benefit or cost per unit electricity input -*** of flexibile or inflexible technology. Flexible technologies benefit -*** (v32_flexPriceShare < 1), while inflexible technologies are penalized -*** (v32_flexPriceShare > 1). -*** In the tax module, vm_flexAdj is then deduced from the electricity price via -*** the flexibility tax formulation. -*** Below, pm_SEPrice(t,regi,"seel") is the (average) electricity price from the -*** last iteration, limited between 0 and 230 $/MWh (= 2 T$/TWa) to prevent -*** unreasonable FE prices caused by meaningless marginals in infeasible Nash -*** iterations from propagating through the model. -*** Fixed to 0 if cm_flex_tax != 1, and before 2025. -q32_flexAdj(t,regi,te)$(teFlexTax(te)).. - vm_flexAdj(t,regi,te) - =e= - ( (1 - v32_flexPriceShare(t,regi,te)) - * max(0, min(2, pm_SEPrice(t,regi,"seel"))) - )$( cm_flex_tax eq 1 AND t.val ge 2025 ) -; - -*' @stop - -*** EOF ./modules/32_power/DTcoup/equations.gms diff --git a/modules/32_power/DTcoup/not_used.txt b/modules/32_power/DTcoup/not_used.txt deleted file mode 100644 index 8ddfa6f74..000000000 --- a/modules/32_power/DTcoup/not_used.txt +++ /dev/null @@ -1,18 +0,0 @@ -# | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -# | authors, and contributors see CITATION.cff file. This file is part -# | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -# | AGPL-3.0, you are granted additional permissions described in the -# | REMIND License Exception, version 1.0 (see LICENSE file). -# | Contact: remind@pik-potsdam.de -name,type,reason -vm_capDistr, variable, ??? -vm_demSeOth, variable, ??? -vm_prodSeOth, variable, ??? -pm_emifac, parameter, ??? -cm_nucscen, switch, ??? -vm_deltaCap,input,questionnaire -cm_emiscen,input,questionnaire -cm_ccapturescen,input,questionnaire -pm_boundCapCCS,input,questionnaire -pm_cap0,input,questionnaire -vm_shDemSeel,input,only used in IntC realization diff --git a/modules/32_power/DTcoup/postsolve.gms b/modules/32_power/DTcoup/postsolve.gms deleted file mode 100644 index 7ee28a95e..000000000 --- a/modules/32_power/DTcoup/postsolve.gms +++ /dev/null @@ -1,14 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/postsolve.gms - -*** calculation of SE electricity price (useful for internal use and reporting purposes) -pm_SEPrice(ttot,regi,entySe)$(abs (qm_budget.m(ttot,regi)) gt sm_eps AND sameas(entySe,"seel")) = - q32_balSe.m(ttot,regi,entySe) / qm_budget.m(ttot,regi); - -*** EOF ./modules/32_power/DTcoup/postsolve.gms - diff --git a/modules/32_power/DTcoup/preloop.gms b/modules/32_power/DTcoup/preloop.gms deleted file mode 100644 index d496d54cd..000000000 --- a/modules/32_power/DTcoup/preloop.gms +++ /dev/null @@ -1,15 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de - -*** SOF ./modules/32_power/DTcoup/preloop.gms - -*** read marginal of seel balance equation -Execute_Loadpoint 'input' q32_balSe.m = q32_balSe.m; - - - -*** EOF ./modules/32_power/DTcoup/preloop.gms diff --git a/modules/32_power/DTcoup/presolve.gms b/modules/32_power/DTcoup/presolve.gms deleted file mode 100644 index 054158db1..000000000 --- a/modules/32_power/DTcoup/presolve.gms +++ /dev/null @@ -1,14 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/presolve.gms - - -*** calculation of SE electricity price (useful for internal use and reporting purposes) -pm_SEPrice(t,regi,entySe)$(abs (qm_budget.m(t,regi)) gt sm_eps AND sameas(entySe,"seel")) = - q32_balSe.m(t,regi,entySe) / qm_budget.m(t,regi); - -*** EOF ./modules/32_power/DTcoup/presolve.gms diff --git a/modules/32_power/DTcoup/realization.gms b/modules/32_power/DTcoup/realization.gms deleted file mode 100644 index 47ac083a2..000000000 --- a/modules/32_power/DTcoup/realization.gms +++ /dev/null @@ -1,43 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/realization.gms - -*' @description -*' -*'The `IntC` realization (Integrated Costs) assumes a single electricity market balance. -*' -*'This module determines power system supply specific technology behavior, which sums up to the general core capacity equations to define the power sector operation and investment decisions. -*' -*'Contrary to other secondary energy types in REMIND, this requires to move the electricity secondary energy balance (supply = demand) from the core to the module code. -*' -*' -*'In summary, the specific power technology equations found in this module reflect the points below. -*' -*' -*'Storage requirements are based on intermittent renewables share, synergies between different renewables production profiles and curtailment. -*' -*'Additional grid capacities are calculated for high intermittent renewable capacity (solar and wind) and regional spatial differences. -*' -*'Combined heat and power technologies flexibility is limited to technology and spatial observed data. -*' -*'Operation reserve requirements are enforced to provide enough flexibility to the power system frequency regulation. -*' -*'Hydrogen can be used to reduce renewable power curtailment and provide flexibility to the system future generation. -*' -*' @authors Robert Pietzcker, Falko Ueckerdt, Renato Rodrigues - -*####################### R SECTION START (PHASES) ############################## -$Ifi "%phase%" == "declarations" $include "./modules/32_power/DTcoup/declarations.gms" -$Ifi "%phase%" == "datainput" $include "./modules/32_power/DTcoup/datainput.gms" -$Ifi "%phase%" == "equations" $include "./modules/32_power/DTcoup/equations.gms" -$Ifi "%phase%" == "preloop" $include "./modules/32_power/DTcoup/preloop.gms" -$Ifi "%phase%" == "bounds" $include "./modules/32_power/DTcoup/bounds.gms" -$Ifi "%phase%" == "presolve" $include "./modules/32_power/DTcoup/presolve.gms" -$Ifi "%phase%" == "postsolve" $include "./modules/32_power/DTcoup/postsolve.gms" -*######################## R SECTION END (PHASES) ############################### - -*** EOF ./modules/32_power/DTcoup/realization.gms diff --git a/modules/32_power/RLDC/bounds.gms b/modules/32_power/RLDC/bounds.gms deleted file mode 100644 index 1babb500d..000000000 --- a/modules/32_power/RLDC/bounds.gms +++ /dev/null @@ -1,184 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/bounds.gms - -***----------------------------------------------------------- -*** module specific bounds -***------------------------------------------------------------ - -vm_usableSe.lo(t,regi,"seel") = 1e-6; - -v32_capLoB.up(t,regi,te,LoB) = 2; !! The total power system has maximum demand of 1 -v32_LoBheight.up(t,regi,LoB) = 2; !! The total power system has maximum demand of 1 -v32_LoBheightCum.up(t,regi,LoB) = 2; !! The total power system has maximum demand of 1.5 (should be one, but the reforming of the baseload band leads to -v32_shTh.up(t,regi,teVRE) = 2; !! Worlds with higher than twice the total energy demand coming from either wind or solar (before curtailment) are unrealistic - -v32_scaleCap.up(t,regi) = 100; !! no power system will be larger than 100 TW -v32_scaleCap.up(t,regi) = 20; -v32_scaleCap.lo(t,regi) = 1e-4; !! Make sure REMIND does not try to shrink a power system to zero -v32_scaleCap.lo(t,regi) = 0.01; - -loop(te$(NOT teRLDCDisp(te)), - vm_capFac.fx(t,regi,te) = pm_cf(t,regi,te); -); - -vm_capFac.up(t,regi,teRLDCDisp) = 1.00; -vm_capFac.l(t,regi,teRLDCDisp) = pm_cf("2005",regi,teRLDCDisp) * pm_dataren(regi,"nur","1",teRLDCDisp); - -v32_capLoB.lo(t,regi,teRLDCDisp,LoB)$(t.val>2015) = 1e-6; !!Lower bound to capacity to avoid infeasibility -*v32_capLoB.lo("2005",regi,"geohdr",LoB) = 1e-6; !!Necessary to avoid infeasibility due to geohdr being zero in all LoB except for the 4th LoB, making impossible to the vm_capFac to match the v32_capLoB sum, with the lack of v32_capER in the initial year and a p32_capFacLoB != 1 - -*RP* CCS technologies can make a problem if the caps are fixed to 0, but the capLoBs left free -loop(regi, - if ( (cm_ccapturescen eq 2) OR (cm_emiscen eq 1) , !! in no-CCS and BAU scenarios, no CCS is allowed - loop(emi2te(enty,"seel",te,"cco2")$( pm_emifac("2020",regi,enty,"seel",te,"cco2") >0 ), !! use 2020 as proxy - only limit the seel technologies - the others don't have a capFac and capLob and capER - loop(te2rlf(te,rlf), - vm_capFac.fx(ttot,regi,te) = 0; - v32_capLoB.fx(t,regi,te,LoB) = 0; - v32_capER.fx(t,regi,te) = 0; - ); - ); - elseif (cm_ccapturescen eq 5), !! noElecCCS - loop(emi2te(enty,"seel",te,"cco2")$( pm_emifac("2020",regi,enty,"seel",te,"cco2") >0 ), - loop(te2rlf(te,rlf), - vm_capFac.fx(ttot,regi,te) = 0; - v32_capLoB.fx(t,regi,te,LoB) = 0; - v32_capER.fx(t,regi,te) = 0; - ); - ); - ); -); - -*Avoiding infeasibilities from upper limit on CCS deployment in 2020 -loop(regi, - loop(t$(t.val le 2030), - if( ( pm_boundCapCCS(t,regi,"up") eq 0), - vm_capFac.fx(t,regi,teCCS) = 0; - v32_capLoB.fx(t,regi,teCCS,LoB) = 0; - v32_capER.fx(t,regi,teCCS) = 0; - ); - ); -); - - -*RP same for nuc: -if ( (cm_nucscen eq 5) , !! in no-Nuc scenarios, no tnrs is allowed - loop(pe2se("peur",enty,te), - vm_capFac.fx(t,regi,te)$(t.val > 2060) = 0; - v32_capLoB.fx(t,regi,te,LoB)$(t.val > 2060) = 0; - v32_capER.fx(t,regi,te)$(t.val > 2060) = 0; - ); -); - -vm_capFac.fx(t,regi,"fnrs")= 0; -v32_capLoB.fx(t,regi,"fnrs",LoB)= 0; -v32_capER.fx(t,regi,"fnrs")= 0; - -v32_curt.lo(t,regi)$(t.val>2010) = 0; - -*RP* CHP technologies should not have larger CFs than 0.6, as heat is not always needed. They can still contribute to -*** baseload, but then some other part of the total capacity needs to be underutilized - this could represent costs for thermal storage -loop(te$teChp(te), - vm_capFac.up(t,regi,te)$(t.val > 2005) = 0.6; -); - -***---------------------------------------------- -*RP: bounds to make the first runs more feasible -***---------------------------------------------- -loop(regi, - loop(te$( (teRLDCDisp(te)) ), - if( ( pm_cap0(regi,te) > 0 ) , - vm_capFac.up("2005",regi,te) = 1.01 * pm_cf("2005",regi,te); - vm_capFac.lo("2005",regi,te) = 0.98 * pm_cf("2005",regi,te); - vm_capFac.lo("2010",regi,te) = 0.009; - vm_capFac.lo("2015",regi,te) = 0.009; - if( teReNoBio(te), - vm_capFac.up("2005",regi,te) = 1.01 * pm_dataren(regi,"nur","1",te) * pm_cf("2005",regi,te); - vm_capFac.lo("2005",regi,te) = 0.4 * pm_dataren(regi,"nur","1",te) * pm_cf("2005",regi,te); - ); - else - vm_capFac.fx("2005",regi,te) = 0; - ); - ); -); - -vm_capFac.up(t,regi,"hydro")$(t.val > 2005) = 0.25; !! Japan has quite low hydro CFs, so the rule "0.4 * pm_dataren(regi,"nur","1",te)" produces infeasibilities - -vm_capFac.lo("2005",regi,"hydro") = 0.2; !! Japan has quite low hydro CFs, so the rule "0.4 * pm_dataren(regi,"nur","1",te)" produces infeasibilities. As the 2005 bounds are anyway only there to facilitate that the model finds an initial solution, set this limit for all regions - -***----------------------------------------------------- -*** -***----------------------------------------------------- - -***v32_LoBheightCum.lo(t,regi,LoB) = 0.01; -v32_LoBheightCum.lo("2010",regi,"1") = 0.82; -v32_LoBheightCum.lo("2010",regi,"2") = 0.48; -v32_LoBheightCum.lo("2010",regi,"3") = 0.38; -v32_LoBheightCum.lo("2010",regi,"4") = 0.26; - -v32_shTh.lo(t,regi,"spv")$(t.val > 2020) = 0.01; -v32_shTh.lo(t,regi,"wind")$(t.val > 2020) = 0.01; - -v32_curt.up(t,regi) = 100; -$if %cm_Full_Integration% == "on" v32_curt.fx(t,regi) = 0; - -*** Advanced technologies can't be build prior to 2015/2020 -loop(regi, - loop(teNoLearn(te), - if( (pm_data(regi,"tech_stat",te) eq 2), - v32_capLoB.fx("2010",regi,te,LoB) = 0; - elseif (pm_data(regi,"tech_stat",te) eq 3), - v32_capLoB.fx("2010",regi,te,LoB) = 0; - v32_capLoB.fx("2015",regi,te,LoB) = 0; - ); - ); -); - -*** nuclear only as baseload -v32_capLoB.fx(t,regi,"tnrs","1")$(t.val > 2010) = 0; -v32_capLoB.fx(t,regi,"tnrs","2")$(t.val > 2010) = 0; -v32_capLoB.fx(t,regi,"tnrs","3")$(t.val > 2010) = 0; - - -*** facilitiate finding sulutions in the ADVANCE Full_Integration run -$if %cm_Full_Integration% == "on" v32_capLoB.lo(t,regi,"spv",LoB)$(t.val > 2030) = 1e-6; -$if %cm_Full_Integration% == "on" v32_capLoB.lo(t,regi,"wind",LoB)$(t.val > 2030) = 1e-6; -$if %cm_Full_Integration% == "on" vm_cap.lo(t,regi,"spv",LoB)$(t.val > 2030) = 1e-3; -$if %cm_Full_Integration% == "on" vm_cap.lo(t,regi,"wind",LoB)$(t.val > 2030) = 1e-3; - -***No slow ramping technologies as peaking plants -v32_capLoB.fx(t,regi,te,"1")$teNotLoB1(te) = 0; -***Technologies that can not run for 7500 FLh, and therefore cannot be considered at baseload -v32_capLoB.fx(t,regi,te,"4")$teNotBase(te) = 0; - -***Make sure the model sees the h2-el connections -vm_cap.lo(t,regi,"h2turb","1")$(t.val > 2050) = 1e-6; -vm_cap.lo(t,regi,"elh2","1")$(t.val > 2050) = 1e-6; -vm_cap.lo(t,regi,"h2curt","1")$(t.val > 2090) = 1e-5; -$if %cm_Full_Integration% == "on" vm_cap.fx(t,regi,"h2curt","1") = 0; -$if %cm_Full_Integration% == "on" vm_deltaCap.fx(t,regi,"h2curt","1") = 0; - -*** Allow the curtailment->H2 channel: -vm_prodSeOth.up(t,regi,"seh2","h2curt") = 1e6; -vm_prodSeOth.lo(t,regi,"seh2","h2curt")$(t.val > 2090) = 1e-6; - -$if %cm_Full_Integration% == "on" vm_prodSeOth.fx(t,regi,"seh2","h2curt") = 0; !! no curtailment if all VRE are treated as dispatchable - -vm_cap.fx(t,regi,"gridspv","1")$(t.val > 2070) = 0; -vm_cap.fx(t,regi,"gridcsp","1")$(t.val > 2070) = 0; -vm_cap.fx(t,regi,"storcsp","1")$(t.val > 2070) = 0; -vm_cap.fx(t,regi,"storwind","1")$(t.val > 2070) = 0; -$IFTHEN.WindOff %cm_wind_offshore% == "1" -vm_cap.fx(t,regi,"storwindoff","1")$(t.val > 2070) = 0; -$ENDIF.WindOff - -$if %cm_Full_Integration% == "on" vm_cap.fx(t,regi,"storspv","1") = 0; -$if %cm_Full_Integration% == "on" vm_deltaCap.fx(t,regi,"storspv","1") = 0; - -vm_deltaCap.up(t,regi,"dot",rlf)$(t.val > 2040) = 1e-5; - -*** EOF ./modules/32_power/RLDC/bounds.gms diff --git a/modules/32_power/RLDC/datainput.gms b/modules/32_power/RLDC/datainput.gms deleted file mode 100644 index f9bcd8f2a..000000000 --- a/modules/32_power/RLDC/datainput.gms +++ /dev/null @@ -1,105 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/datainput.gms - -*------------------------------------------------------------------------------------ -*** RLDC specific data input -*------------------------------------------------------------------------------------ - -parameter f32_shCHP(ttot,all_regi) "upper boundary of chp electricity generation" -/ -$ondelim -$include "./modules/32_power/RLDC/input/f32_shCHP.cs4r" -$offdelim -/ -; -p32_shCHP(ttot,all_regi) = f32_shCHP(ttot,all_regi) + 0.05; -p32_shCHP(ttot,all_regi)$(ttot.val ge 2050) = min(p32_shCHP("2020",all_regi) + 0.15, 0.75); -p32_shCHP(ttot,all_regi)$((ttot.val gt 2020) and (ttot.val lt 2050)) = p32_shCHP("2020",all_regi) + ((p32_shCHP("2050",all_regi) - p32_shCHP("2020",all_regi)) / 30 * (ttot.val - 2020)); - - -***parameter p32_grid_factor(all_regi) - multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India -parameter p32_grid_factor(all_regi) "multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India" -/ -$ondelim -$include "./modules/32_power/RLDC/input/p32_grid_factor.cs4r" -$offdelim -/ -; - -***parameter p32_capFacLoB(LoB) - Capacity factor of a load band (Unit 0..1) -p32_capFacLoB("1") = 0.08; -p32_capFacLoB("2") = 0.25; -p32_capFacLoB("3") = 0.50; -p32_capFacLoB("4") = 0.86; !! no plant runs longer than 7500 hours - accordingly the height of the base load band is rescaled in q32_LoBheight - -***parameter p32_ResMarg(ttot,all_regi) - reserve margin as markup on actual peak capacity. Unit [0..1] -p32_ResMarg(ttot,regi) = 0.30; - -***parameter p32_RLDCcoeff(all_regi,PolyCoeff,RLDCbands) - Coefficients for the non-separable wind/solar-cross-product polynomial RLDC fit -table f32_RLDC_Coeff_LoB(all_regi,RLDCbands,PolyCoeff) "RLDC coefficients for combined Wind-Solar Polynomial" -$ondelim -$include "./modules/32_power/RLDC/input/f32_RLDC_Coeff_LoB.cs3r" -$offdelim -; -table f32_RLDC_Coeff_Peak(all_regi,RLDCbands,PolyCoeff) "RLDC coefficients for combined Wind-Solar Polynomial" -$ondelim -$include "./modules/32_power/RLDC/input/f32_RLDC_Coeff_Peak.cs3r" -$offdelim -; - -loop(regi, - loop(RLDCbands, - if( PeakDep(RLDCbands), - p32_RLDCcoeff(regi,PolyCoeff,RLDCbands) = (f32_RLDC_Coeff_LoB(regi,RLDCbands,PolyCoeff)+f32_RLDC_Coeff_Peak(regi,RLDCbands,PolyCoeff)) / f32_RLDC_Coeff_Peak(regi,"peak","p00"); - else - p32_RLDCcoeff(regi,PolyCoeff,RLDCbands) = (f32_RLDC_Coeff_LoB(regi,RLDCbands,PolyCoeff)+f32_RLDC_Coeff_Peak(regi,RLDCbands,PolyCoeff)) ; - ) - ); -); - -***parameter p32_LoBheight0(all_regi,LoB) - Load band heights at 0% VRE share (Unit 0..1) -loop(LoB, - p32_LoBheight0(regi,LoB) = p32_RLDCcoeff(regi,"p00",LoB) - p32_RLDCcoeff(regi,"p00",LoB+1)$( LoB.val < card(LoB) ); - if ( ( LoB.val eq card(LoB) ), - p32_LoBheight0(regi,LoB) = p32_LoBheight0(regi,LoB) * ( 1 / p32_capFacLoB(LoB) ); !! upscale the height of the base-load band to represent the fact that the fit was done with 8760 hours ( = 1), while no plant runs longer than 7500 hours (CF = 0.86) - ) -); - -***parameter p32_capFacDem(all_regi) - Average demand factor of a power sector (Unit 0..1) -p32_capFacDem(regi) = sum(LoB, p32_LoBheight0(regi,LoB) * p32_capFacLoB(LoB) ); - -loop(regi, - loop(te$(teReNoBio(te)), - p32_avCapFac(t,regi,te) = - sum(rlf, pm_dataren(regi,"nur",rlf,te) * pm_dataren(regi,"maxprod",rlf,te) ) - / ( sum(rlf, pm_dataren(regi,"maxprod",rlf,te) ) + 1e-8) - ; - ); -); - -$ontext -loop(regi, - loop(te$(teReNoBio(te)), - p32_avCapFac(t,regi,te) = -* sum(rlf$(UsedGrades2070(regi,te,rlf)), - sum(rlf, - pm_dataren(regi,"nur",rlf,te) * pm_dataren(regi,"maxprod",rlf,te) - ) -* / ( sum(rlf$UsedGrades2070(regi,te,rlf), pm_dataren(regi,"maxprod",rlf,te) ) - / ( sum(rlf, pm_dataren(regi,"maxprod",rlf,te) ) - + 1e-8) ; - ); -); -$offtext - -***parameter p32_curtOn(all_regi) - control variable for curtailment fitted from the DIMES-Results -p32_curtOn(regi) = 1; - -***display p32_capFacDem, p32_capFacLoB, p32_RLDCcoeff, p32_avCapFac, p32_ResMarg, p32_curtOn, p32_shCHP, p32_grid_factor; - -*** EOF ./modules/32_power/RLDC/datainput.gms diff --git a/modules/32_power/RLDC/declarations.gms b/modules/32_power/RLDC/declarations.gms deleted file mode 100644 index 5b3699993..000000000 --- a/modules/32_power/RLDC/declarations.gms +++ /dev/null @@ -1,78 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/declarations.gms - -parameters - p32_capFacDem(all_regi) "Average demand factor of a power sector [0,1]" - p32_capFacLoB(LoB) "Capacity factor of a load band [0,1]" - p32_RLDCcoeff(all_regi,PolyCoeff,RLDCbands) "Coefficients for the non-separable wind/solar-cross-product polynomial RLDC fit" - p32_avCapFac(ttot,all_regi,all_te) "Average load factor (Nur) of the first 5 grades of a technology" - p32_ResMarg(ttot,all_regi) "Reserve margin as markup on actual peak capacity [0,1]" - p32_curtOn(all_regi) "Control variable for curtailment fitted from the DIMES-Results" - p32_shCHP(ttot,all_regi) "Upper boundary of chp electricity generation" - p32_grid_factor(all_regi) "Multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India" - p32_LoBheight0(all_regi,LoB) "Load band heights at 0% VRE share (declared here, on the data input file, because it is only used for the p32_capFacDem definition) [0,1]" -; - -positive variables - v32_scaleCap(ttot,all_regi) "Scale Factor to scale the power capacitites from 'relative to Peak Demand' up to total system level [TW]" - v32_shTh(ttot,all_regi,all_te) "Theoretical share of variable renewable energies [0,1]" - v32_capLoB(ttot,all_regi,all_te,LoB) "Capacity of a technology within one load band relative to peak demand [0,1]" - v32_capER(ttot,all_regi,all_te) "Early retired capacities [0,1]" - v32_curt(ttot,all_regi) "Curtailment of power in the RLDC formulation of the power sector [TWa]" - v32_LoBheight(ttot,all_regi,LoB) "Height of each load band relative to Peak Demand [0,1]" - v32_overProdCF(ttot,all_regi,all_te) "Overproduction CF from dispatchable renewable energies (csp and hydro) [0,1]" - v32_CurtModelminusFit(ttot,all_regi) "Difference between model curtailment and fitted curtailment" - v32_LoBheightCum(ttot,all_regi,LoB) "Cumulative height of each load band relative to Peak Demand [0,1]" - v32_peakCap(ttot,all_regi) "Peak capacity after RLDC [0,1]" - v32_H2cof_PVsh(ttot,all_regi) "Amount of cofiring of gas/H2 to CSP needed due to correlation with PV" - v32_H2cof_Lob4(ttot,all_regi) "Amount of cofiring of gas/H2 to CSP needed due to use of CSP in LoB 4, which has a high CF" - v32_H2cof_Lob3(ttot,all_regi) "Amount of cofiring of gas/H2 to CSP needed due to use of CSP in LoB 3, which has a high CF" - v32_H2cof_CSPsh(ttot,all_regi) "Amount of cofiring of gas/H2 to CSP needed due to self-correlation of CSP" - v32_sqrtCurt(ttot,all_regi) "Helper variable: share of the year for which curtailment is higher than 1/3 of maximum curtailment - this is the amount that we assume we can use for producing H2. Because we assume a 1-to-3 ratio of time to capacity for curtailment, it is also used to calculate the curtailed capacity" - vm_shSeEl(ttot,all_regi,all_te) "new share of electricity production in % [%]" -; - -variables - v32_curtFit(ttot,all_regi) "Curtailment as fitted from the DIMES-Results" - v32_FullIntegrationSlack(ttot,all_regi) "Slack variable that allows implementation of the 'Full Integration' ADVANCE scenario variation, where we assume no integration challenges for wind and solar, thus no curtailment" - v32_LoBheightCumExact(ttot,all_regi,LoB) "Cumulative height of load bands, calculated from theoretical wind and solar share based on the DIMES fits " -; - -equations - q32_balSe(ttot,all_regi,all_enty) "Balance equation for electricity secondary energy" - q32_usableSe(ttot,all_regi,all_enty) "Calculate usable se before se2se and MP/XP (without storage)" - q32_usableSeTe(ttot,all_regi,entySe,all_te) "Calculate usable se produced by one technology (vm_usableSeTe)" - q32_shTheo(ttot,all_regi,all_te) "Calculate theoretical share of wind and solar in power production" - q32_scaleCapTe(ttot,all_regi,all_te) "Calculate upscaled power capacitites from 'relative to peak demand' up to total system level" - q32_curt(ttot,all_regi) "Calculate total curtailment" - q32_curtFit(ttot,all_regi) "Calculate curtailment from DIMES-fit" - q32_curtFitwCSP(ttot,all_regi) "Calculate curtailment from DIMES-fit, including 0.3 CSP" - q32_LoBheightCumExact(ttot,all_regi,LoB) "Calculate height of load bands from theoretical wind and solar share" - q32_LoBheightCumExactNEW(ttot,all_regi,LoB) "Calculate the model-used height of load bands, which need to have some slack (=g=) compared to the exact calulcation of v32_LoBheightCumExact to keep v32_LoBheightCum > 0" - q32_LoBheightExact(ttot,all_regi,LoB) "Calculate height of load bands from theoretical wind and solar share" - q32_fillLoB(ttot,all_regi,LoB) "Fill Load Bands with power production" - q32_capFac(ttot,all_regi,all_te) "Calculate resulting capacity factor for all power technologies" - q32_capFacTER(ttot,all_regi,all_te) "Make sure that the non-bio renewables observe the limited capacity Factor" - q32_stor_pv(ttot,all_regi) "Calculate the short term storage requirements due to renewables" - q32_peakCap(ttot,all_regi) "Calculate peak capacity after RLDC" - q32_capAdeq(ttot,all_regi) "Make sure dispatchable capacities > peak capacity" - q32_H2cofiring(ttot,all_regi) "Calculate co-firing needs" - q32_H2cof_PVsh(ttot,all_regi) "Cofiring CSP due to correlation with PV" - q32_H2cof_LoB4(ttot,all_regi) "Cofiring CSP due to use in LoB 4" - q32_H2cof_LoB3(ttot,all_regi) "Cofiring CSP due to use in LoB 3" - q32_H2cof_CSPsh(ttot,all_regi) "Cofiring CSP due to self-correlation with CSP" - q32_curtCapH2(ttot,all_regi) "Calculate the H2 capacity from curtailed electricity" - q32_curtProdH2(ttot,all_regi) "Calculate the H2 production from curtailed electricity" - q32_sqrtCurt(ttot,all_regi) "Calculate helper variable: share of the year for which curtailment is higher than 1/3 of maximum curtailment" - q32_hydroROR(ttot,all_regi) "Represent Run-Of-River Hydro by requiring that 20% of produced hydro electricity comes from baseload" - q32_limitCapTeChp(ttot,all_regi) "Capacitiy constraint for chp electricity generation" - q32_limitCapTeGrid(ttot,all_regi) "Calculate the additional grid capacity required by VRE" - q32_shSeEl(ttot,all_regi,all_te) "calculate share of electricity production of a technology (vm_shSeEl)" -; - -*** EOF ./modules/32_power/RLDC/declarations.gms diff --git a/modules/32_power/RLDC/equations.gms b/modules/32_power/RLDC/equations.gms deleted file mode 100644 index 428c83760..000000000 --- a/modules/32_power/RLDC/equations.gms +++ /dev/null @@ -1,343 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/equations.gms - -*' @equations - -***--------------------------------------------------------------------------- -*' Balance equation for electricity secondary energy type: -***--------------------------------------------------------------------------- -q32_balSe(t,regi,enty2)$(sameas(enty2,"seel")).. - v32_scaleCap(t,regi) * p32_capFacDem(regi) - + sum(pc2te(enty,entySe(enty3),te,enty2), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_prodSe(t,regi,enty,enty3,te) ) - + sum(pc2te(enty4,entyFe(enty5),te,enty2), - pm_prodCouple(regi,enty4,enty5,te,enty2) * vm_prodFe(t,regi,enty4,enty5,te) ) - + sum(pc2te(enty,enty3,te,enty2), - sum(teCCS2rlf(te,rlf), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_co2CCS(t,regi,enty,enty3,te,rlf) ) ) - + vm_Mport(t,regi,enty2) - =e= - sum(se2fe(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te) ) - + sum(se2se(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te) ) - + sum(pe2rlf(enty3,rlf2), (pm_fuExtrOwnCons(regi, enty2, enty3) * vm_fuExtr(t,regi,enty3,rlf2))$(pm_fuExtrOwnCons(regi, enty2, enty3) gt 0))$(t.val > 2005) !! do not use in 2005 because this demand is not contained in 05_initialCap - + vm_Xport(t,regi,enty2) - ; - -q32_usableSe(t,regi,entySe)$(sameas(entySe,"seel")).. - vm_usableSe(t,regi,entySe) - =e= - sum(pe2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(se2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(pc2te(entyPe,entySe(enty3),te,entySe)$(pm_prodCouple(regi,entyPe,enty3,te,entySe) gt 0), - pm_prodCouple(regi,entyPe,enty3,te,entySe)*vm_prodSe(t,regi,entyPe,enty3,te) ) -; - -q32_usableSeTe(t,regi,entySe,te)$(sameas(entySe,"seel") AND teVRE(te)).. - vm_usableSeTe(t,regi,entySe,te) - =e= - sum(pe2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(se2se(enty,entySe,te), vm_prodSe(t,regi,enty,entySe,te) ) - + sum(pc2te(enty,entySe(enty3),te,entySe)$(pm_prodCouple(regi,enty,enty3,te,entySe) gt 0), - pm_prodCouple(regi,enty,enty3,te,entySe) * vm_prodSe(t,regi,enty,enty3,te) ) -; - -***--------------------------------------------------------------------------- -*' VRE Shares - theoretical VRE shares: scale the total VRE production down to "RLDC level", then compare it to the size of the RLDC at 0% -***--------------------------------------------------------------------------- -q32_shTheo(t,regi,teVRE).. - v32_shTh(t,regi,teVRE) - =e= - sum(pe2se(entyPe,"seel",teVRE), vm_prodSe(t,regi,entyPe,"seel",teVRE) ) - / ( - v32_scaleCap(t,regi) * p32_capFacDem(regi) - + sum(pc2te(enty,entySe(enty3),te,enty2), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_prodSe(t,regi,enty,enty3,te) ) - + sum(pc2te(enty4,entyFe(enty5),te,enty2), - pm_prodCouple(regi,enty4,enty5,te,enty2) * vm_prodFe(t,regi,enty4,enty5,te) ) - + sum(pc2te(enty,enty3,te,enty2), - sum(teCCS2rlf(te,rlf), - pm_prodCouple(regi,enty,enty3,te,enty2) * vm_co2CCS(t,regi,enty,enty3,te,rlf) ) ) - ) -; - -***--------------------------------------------------------------------------- -*' Transform the RLDC normalized capacities (0-1) to real world magnitudes -***--------------------------------------------------------------------------- -q32_scaleCapTe(t,regi,te)$( (t.val > 2000) AND teRLDCDisp(te) ).. !! scale the capacities of all technologies explicitly represented in the RLDCs - sum(teSe2rlf(te,rlf), vm_cap(t,regi,te,rlf) ) - =e= - v32_scaleCap(t,regi) * ( sum(LoB, v32_capLoB(t,regi,te,LoB) ) + v32_capER(t,regi,te) ) -; - -***--------------------------------------------------------------------------- -*' Curtailment -***--------------------------------------------------------------------------- -q32_curt(t,regi).. - v32_curt(t,regi) - =e= - sum(pe2se(entyPe,"seel",teVRE), vm_prodSe(t,regi,entyPe,"seel",teVRE) ) !! total theoretical VRE production - - v32_scaleCap(t,regi) * ( p32_capFacDem(regi) - sum(LoB, p32_capFacLoB(LoB) * v32_LoBheight(t,regi,LoB) ) ) !! minus the actually used VRE production, namely the difference between a system without and a system with VRE - + v32_overProdCF(t,regi,"csp") * vm_cap(t,regi,"csp","1") !! add the unused CSP production that is not reflected in seprod -; - -q32_curtFit(t,regi).. !! calculate curtailment as fitted from the DIMES-Results - v32_curtFit(t,regi) !! v32_curtFit can go below 0 - =e= - p32_curtOn(regi) - * ( - p32_RLDCcoeff(regi,"p00","curtShVRE") - + p32_RLDCcoeff(regi,"p10","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") - + p32_RLDCcoeff(regi,"p01","curtShVRE") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p20","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 - + p32_RLDCcoeff(regi,"p11","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p02","curtShVRE") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p30","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 3 - + p32_RLDCcoeff(regi,"p21","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p12","curtShVRE") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p03","curtShVRE") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 3 - ) -; - -q32_curtFitwCSP(t,regi).. - v32_curt(t,regi) - =e= - ( v32_curtFit(t,regi) + 0.02 ) * sum(pe2se(entyPe,"seel",teVRE), vm_prodSe(t,regi,entyPe,"seel",teVRE) ) !! add 2% of VRE prod. ot curtailment to represent grid losses - comes from the comparison with REMIX - + v32_overProdCF(t,regi,"csp") * vm_cap(t,regi,"csp","1") - + v32_CurtModelminusFit(t,regi) * sum(pe2se(entyPe,"seel",teVRE), vm_prodSe(t,regi,entyPe,"seel",teVRE) ) !! this is a positive slack variable that shows how much curtailment due to discretization of RLDC boxes is larger than fitted curtailment -> to move to ex-post -$if %cm_Full_Integration% == "on" + v32_FullIntegrationSlack(t,regi) -; - -***--------------------------------------------------------------------------- -*' Load Band -***--------------------------------------------------------------------------- -q32_LoBheightCumExact(t,regi,LoB).. - v32_LoBheightCumExact(t,regi,LoB) - =e= - p32_RLDCcoeff(regi,"p00",LoB) - + p32_RLDCcoeff(regi,"p10",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") - + p32_RLDCcoeff(regi,"p01",LoB) * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p20",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 - + p32_RLDCcoeff(regi,"p11",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p02",LoB) * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p30",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") ** 3 - + p32_RLDCcoeff(regi,"p21",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p12",LoB) * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p03",LoB) * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 3 -; - -q32_LoBheightCumExactNEW(t,regi,LoB).. !! introduce slack so that v32_LoBheightCum stay > 0 - v32_LoBheightCum(t,regi,LoB) - =g= - v32_LoBheightCumExact(t,regi,LoB) -; - -q32_LoBheightExact(t,regi,LoB).. !! individual load band height - the difference between the cumulated heights - v32_LoBheight(t,regi,LoB) - =g= - ( v32_LoBheightCum(t,regi,LoB) - v32_LoBheightCum(t,regi,LoB+1)$(LoB.val < card(LoB)) ) - * ( 1$(LoB.val < card(LoB)) + ( 1 / p32_capFacLoB(LoB) )$(LoB.val = card(LoB)) ) !! upscale the height of the base-load band to represent the fact that the fit was done with 8760 hours, while no plant runs longer than 7500 hours (CF = 0.86) -; - -q32_fillLoB(t,regi,LoB)$(t.val > 2005).. - sum(teRLDCDisp, v32_capLoB(t,regi,teRLDCDisp,LoB) ) - =e= - v32_LoBheight(t,regi,LoB) -; - -***--------------------------------------------------------------------------- -*' Capacity factor for dispatchable power plants -***--------------------------------------------------------------------------- -q32_capFac(t,regi,te)$( teRLDCDisp(te) AND (t.val > 2000) ).. - vm_capFac(t,regi,te) - =e= - ( sum(LoB, - ( p32_capFacLoB(LoB)$( (LoB.val <> 4) OR NOT sameas(te,"csp") ) - + (4/3 * p32_avCapFac(t,regi,"csp"))$( (LoB.val eq 4) AND sameas(te,"csp") ) !! 4/3 is a factor for the upscaling from SM3/12h to SM4/16h storage - ) - * v32_capLoB(t,regi,te,LoB) - ) - + v32_capER(t,regi,te) * 0.01 !! the early retired capacities (v32_capER) are weighted with 1% to represent that they run at least 100h per year - ) - / (sum(LoB, v32_capLoB(t,regi,te,LoB) ) + v32_capER(t,regi,te) + 1e-9) -; - -q32_capFacTER(t,regi,te)$( teReNoBio(te) AND teRLDCDisp(te) AND t.val > 2000).. !! make sure that for dispatchable renewable plants, the average nur is larger than the resulting capFac - sum(teRe2rlfDetail(te,rlf), - pm_dataren(regi,"nur",rlf,te) * vm_capDistr(t,regi,te,rlf) ) - / ( vm_cap(t,regi,te,"1") + 1e-10 ) + 3e-5 !! the 1e-5 allows for slightly larger capacity factors, but does not have a large influence, and prevents some infeasibilities - =g= - vm_capFac(t,regi,te) - + v32_overProdCF(t,regi,te) -; - -***--------------------------------------------------------------------------- -*' Short Term Storage Requirements (from RLDC Fit) -***--------------------------------------------------------------------------- -q32_stor_pv(t,regi)$(t.val > 2010).. - vm_cap(t,regi,"storspv","1") - =g= - v32_scaleCap(t,regi) * - ( - p32_RLDCcoeff(regi,"p00","STScost") - + p32_RLDCcoeff(regi,"p10","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") - + p32_RLDCcoeff(regi,"p01","STScost") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p20","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 - + p32_RLDCcoeff(regi,"p11","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p02","STScost") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p30","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 3 - + p32_RLDCcoeff(regi,"p21","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p12","STScost") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p03","STScost") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 3 - ) -; - -***--------------------------------------------------------------------------- -*' Peak capacity equations -***--------------------------------------------------------------------------- - -q32_peakCap(t,regi).. - v32_peakCap(t,regi) - =e= - p32_RLDCcoeff(regi,"p00","peak") - + p32_RLDCcoeff(regi,"p10","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") - + p32_RLDCcoeff(regi,"p01","peak") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p20","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 - + p32_RLDCcoeff(regi,"p11","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p02","peak") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p30","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 3 - + p32_RLDCcoeff(regi,"p21","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") ** 2 * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) - + p32_RLDCcoeff(regi,"p12","peak") * v32_shTh(t,regi,"wind")$teVRE("wind") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 2 - + p32_RLDCcoeff(regi,"p03","peak") * ( v32_shTh(t,regi,"spv")$teVRE("spv") + v32_shTh(t,regi,"csp")$teVRE("csp") ) ** 3 -; - -q32_capAdeq(t,regi)$(t.val > 2005).. - sum(teRLDCDisp(te)$(NOT sameas(te,"hydro")), - sum(teSe2rlf(te,rlf), vm_cap(t,regi,te,rlf) ) - ) - + 0.8 * vm_cap(t,regi,"hydro","1") !! to represent that it is not fully dispatchable, hydro counts only with 80% of its installed capacity towards peak capacity - =g= - v32_scaleCap(t,regi) * ( v32_peakCap(t,regi) + p32_ResMarg(t,regi) ) -; - -***--------------------------------------------------------------------------- -*' CSP - including co-firing -***--------------------------------------------------------------------------- -q32_H2cofiring(t,regi)$(t.val > 2010).. - vm_demSeOth(t,regi,"seh2","csp") !! cofiring of h2 to csp - + vm_demSeOth(t,regi,"segabio","csp") !! cofiring of gas to csp - + vm_demSeOth(t,regi,"segafos","csp") -$if %cm_Full_Integration% == "on" + 1e6 - =g= - v32_H2cof_PVsh(t,regi) - + v32_H2cof_Lob4(t,regi) - + v32_H2cof_Lob3(t,regi) - + v32_H2cof_CSPsh(t,regi) -; - -q32_H2cof_LoB3(t,regi)$(t.val > 2005).. - v32_H2cof_Lob3(t,regi) - =g= - 1/0.4 !! 1/0.4 is the efficiency of the H2 turbine - to convert from produced electricity to used H2 - * v32_scaleCap(t,regi) !! all the later numbers are relative to peak, and need to be rescaled to full system size - * v32_capLoB(t,regi,"csp","3") !! each unit of csp in baseload needs H2 cofiring - * ( p32_capFacLoB("3") - p32_avCapFac(t,regi,"csp") ) !! the co-firing is only needed for the residual of baseload after avCapFac. CapLob * DiffCapfac = produced electricity -; - -q32_H2cof_LoB4(t,regi)$(t.val > 2005).. - v32_H2cof_Lob4(t,regi) - =g= - 1/0.4 !! 1/0.4 is the efficiency of the H2 turbine - to convert from produced electricity to used H2 - * v32_scaleCap(t,regi) - * v32_capLoB(t,regi,"csp","4") !! each unit of csp in baseload needs H2 cofiring - * ( p32_capFacLoB("4") - 4/3 * p32_avCapFac(t,regi,"csp") ) !! 4/3 is the factor for the upscaling from SM3/12h to SM4/16h storage -; - -q32_H2cof_PVsh(t,regi)$(t.val > 2005).. !! more CSP cofiring if lots of PV is used (correlation between PV and CSP) - v32_H2cof_PVsh(t,regi) - =e= - 1/0.4 !! 1/0.4 is the efficiency of the H2 turbine - to convert from produced electricity to used H2 - * v32_scaleCap(t,regi) - * 0.5 * vm_cap(t,regi,"csp","1") * (0.65 - p32_avCapFac(t,regi,"csp") ) * v32_shTh(t,regi,"spv") -; - -q32_H2cof_CSPsh(t,regi)$(t.val > 2005).. !! more CSP cofiring if lots of CSP is used (self-correlation of CSP) - v32_H2cof_CSPsh(t,regi) - =e= - 1/0.4 !! 1/0.4 is the efficiency of the H2 turbine - to convert from produced electricity to used H2 - * v32_scaleCap(t,regi) - * vm_cap(t,regi,"csp","1") * (0.65 - p32_avCapFac(t,regi,"csp") ) * v32_shTh(t,regi,"csp") -; - -***--------------------------------------------------------------------------- -*' produce H2 from curtailed electricity, using a curtailment-dependent load factor -***--------------------------------------------------------------------------- -q32_curtCapH2(t,regi)$(t.val > 2005).. - vm_cap(t,regi,"h2curt","1") / v32_scaleCap(t,regi) !! 0.5 for area of a triangle - =l= - v32_sqrtCurt(t,regi) !! 0.5 as only half of the curtailment can be used -; - -q32_curtProdH2(t,regi)$(t.val > 2005).. - pm_eta_conv(t,regi,"h2curt") * vm_cap(t,regi,"h2curt","1") * 2/3 * v32_sqrtCurt(t,regi) - =g= - vm_prodSeOth(t,regi,"seh2","h2curt") -; - -q32_sqrtCurt(t,regi)$(t.val > 2005).. - v32_sqrtCurt(t,regi) - =e= - sqrt( 2/3 * ( ( v32_curt(t,regi) ) / v32_scaleCap(t,regi) / p32_capFacDem(regi) + 1e-6 ) ) -; -!! Assuming curtailment has a triangle shape, 1x wide, 3x high => 3x^2 would be the area of the rectangle. The area of the triangle = 1/2 times this. -!! Area = 3/2 x^2 = curt. ==> x = 2/3 curt ^ 0.5 - -***--------------------------------------------------------------------------- -*' special constraints on hydropower to prevent hydro being completely flexibily only used for peaking -***--------------------------------------------------------------------------- -q32_hydroROR(t,regi)$(t.val > 2005).. !! require that at least 20% of the hydro are in baseload (counting as run-of-river). This may lead to Baseload being higher than required by the RLDC, and therefore (realistic) curtailment - p32_capFacLoB("4") * v32_capLoB(t,regi,"hydro","4") - =g= - 0.2 * sum(LoB, p32_capFacLoB(LoB) * v32_capLoB(t,regi,"hydro",LoB) ) -; - -***--------------------------------------------------------------------------- -*' Definition of capacity constraints for CHP technologies: -***--------------------------------------------------------------------------- -q32_limitCapTeChp(t,regi).. - sum(pe2se(enty,"seel",teChp(te)), vm_prodSe(t,regi,enty,"seel",te) ) - =l= - p32_shCHP(t,regi) - * sum(pe2se(enty,"seel",te), vm_prodSe(t,regi,enty,"seel",te) ); - -***--------------------------------------------------------------------------- -*' Calculation of necessary grid installations for centralized renewables: -***--------------------------------------------------------------------------- -q32_limitCapTeGrid(t,regi)$( t.val ge 2015 ) .. - vm_cap(t,regi,"gridwind",'1') !! Technology is now parameterized to yield marginal costs of ~3.5$/MWh VRE electricity - / p32_grid_factor(regi) !! It is assumed that large regions require higher grid investment - =g= - vm_prodSe(t,regi,"pesol","seel","spv") - + vm_prodSe(t,regi,"pesol","seel","csp") - + 1.5 * vm_prodSe(t,regi,"pewin","seel","wind") !! wind has larger variations accross space, so adding grid is more important for wind (result of REMIX runs for ADVANCE project) -$IFTHEN.WindOff %cm_wind_offshore% == "1" - + 1.5 * vm_prodSe(t,regi,"pewin","seel","windoff") -$ENDIF.WindOff -; - -***--------------------------------------------------------------------------- -*' Calculation of share of electricity production of a technology: -***--------------------------------------------------------------------------- -q32_shSeEl(t,regi,teVRE).. - vm_shSeEl(t,regi,teVRE) / 100 * vm_usableSe(t,regi,"seel") - =e= - vm_usableSeTe(t,regi,"seel",teVRE) -; - -*' @stop - -*** EOF ./modules/32_power/RLDC/equations.gms diff --git a/modules/32_power/RLDC/input/files b/modules/32_power/RLDC/input/files deleted file mode 100644 index 3af7a0dc8..000000000 --- a/modules/32_power/RLDC/input/files +++ /dev/null @@ -1,5 +0,0 @@ -f32_RLDC_Coeff_LoB.cs3r -f32_RLDC_Coeff_Peak.cs3r -f32_shCHP.cs4r -p32_grid_factor.cs4r - diff --git a/modules/32_power/RLDC/postsolve.gms b/modules/32_power/RLDC/postsolve.gms deleted file mode 100644 index 5833c3662..000000000 --- a/modules/32_power/RLDC/postsolve.gms +++ /dev/null @@ -1,14 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/postsolve.gms - -*** calculation of SE electricity price (useful for internal use and reporting purposes) -pm_SEPrice(ttot,regi,entySe)$(abs (qm_budget.m(ttot,regi)) gt sm_eps AND sameas(entySe,"seel")) = - q32_balSe.m(ttot,regi,entySe) / qm_budget.m(ttot,regi); - -*** EOF ./modules/32_power/RLDC/postsolve.gms - diff --git a/modules/32_power/RLDC/preloop.gms b/modules/32_power/RLDC/preloop.gms deleted file mode 100644 index a6610c45b..000000000 --- a/modules/32_power/RLDC/preloop.gms +++ /dev/null @@ -1,15 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de - -*** SOF ./modules/32_power/RLDC/preloop.gms - -*** read marginal of seel balance equation -Execute_Loadpoint 'input' q32_balSe.m = q32_balSe.m; - - - -*** EOF ./modules/32_power/RLDC/preloop.gms diff --git a/modules/32_power/RLDC/presolve.gms b/modules/32_power/RLDC/presolve.gms deleted file mode 100644 index b4791358a..000000000 --- a/modules/32_power/RLDC/presolve.gms +++ /dev/null @@ -1,11 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/presolve.gms - - - -*** EOF ./modules/32_power/RLDC/presolve.gms diff --git a/modules/32_power/RLDC/realization.gms b/modules/32_power/RLDC/realization.gms deleted file mode 100644 index 788739c72..000000000 --- a/modules/32_power/RLDC/realization.gms +++ /dev/null @@ -1,55 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de - -*** SOF ./modules/32_power/RLDC/realization.gms - -*' @description -*' -*'The `RLDC` realization (Residual Load Duration Curve) distinguish different operation electricity supply decisions under four distinct load bands, plus additional peak capacity requirements. -*' -*'This module determine power system supply specific technology behavior, which summs up to the general core capacity equations to define the power sector operation and investment decisions. -*' -*'Contrary to other secondary energies in REMIND, this requires to move the electricity secondary energy balance (supply = demand) from the core to the module code. -*' -*' -*'The residual load duration curve is obtained after discounting intermittent renewables generation (solar and wind) from the total demand. -*' -*'An exogenous unit commitment model (DIMES) is used to estimate a third degree fitting curve for each load band representing the intermittent renewables generation contribution at different renewable penetration shares in the system. -*' -*'Curtailament is defined using the same process - a per load band third degree fitting curve that determines the curtailment based on the renewables share. -*' -*'Dispatchable power generation technologies have their capacity factor endogenously determined by the use in the distinct load bands. -*' -*'Short term storage is dependable of wind and solar penetration shares and estimated exogenously to a third degree fitting curve. -*' -*'A reserve margin capacity is required to be provided by dispatchable technologies only. The reserve margin size is determined by the peak capacity that is also estimated exogenously for different levels of renewables penetration in the system. -*' -*'CSP co-firing with H2 or other gases is included. Self-correlation and PV correlation inside each load bands are considered. -*' -*'Hydrogen can be used to reduce renewable power curtailment and provide flexibility to the system future generation. -*' -*'Hydropower load band flexibility is limited due to run-of-river power plants and water use regulation constraints. -*' -*'Combined heat and power technologies flexibility is limited to technology and spatial observed data. -*' -*'Additional grid capacities are calculated for high intermittent renewable capacity (solar and wind) and regional spatial differences. -*' -*' @authors Robert Pietzcker, Falko Ueckerdt, Renato Rodrigues - -*####################### R SECTION START (PHASES) ############################## -$Ifi "%phase%" == "sets" $include "./modules/32_power/RLDC/sets.gms" -$Ifi "%phase%" == "declarations" $include "./modules/32_power/RLDC/declarations.gms" -$Ifi "%phase%" == "datainput" $include "./modules/32_power/RLDC/datainput.gms" -$Ifi "%phase%" == "equations" $include "./modules/32_power/RLDC/equations.gms" -$Ifi "%phase%" == "preloop" $include "./modules/32_power/RLDC/preloop.gms" -$Ifi "%phase%" == "bounds" $include "./modules/32_power/RLDC/bounds.gms" -$Ifi "%phase%" == "presolve" $include "./modules/32_power/RLDC/presolve.gms" -$Ifi "%phase%" == "postsolve" $include "./modules/32_power/RLDC/postsolve.gms" -*######################## R SECTION END (PHASES) ############################### - -*** EOF ./modules/32_power/RLDC/realization.gms - diff --git a/modules/32_power/RLDC/sets.gms b/modules/32_power/RLDC/sets.gms deleted file mode 100644 index ed3a69439..000000000 --- a/modules/32_power/RLDC/sets.gms +++ /dev/null @@ -1,127 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/RLDC/sets.gms - -***----------------------------------------------------------- -*** module specific sets -***------------------------------------------------------------ -SETS - PolyCoeff "Which coefficients exist for the RLDC formulation" - / - p00 - p10 "wind ^1, solar ^0" - p01 "wind ^0, solar ^1" - p20 - p11 - p02 - p30 - p21 - p12 - p03 - / - - RLDCbands "???" - / - 1*4, - curt - peak - curtShVRE - shtStor - STScost - STSRes2Cap - / - - LoB(RLDCbands) "Electricity load band" - /1 * 4/ -; - -teVRE(all_te) = no; - - -*RLDC dispatchable technologies -teRLDCDisp("ngcc") = yes; -teRLDCDisp("ngccc") = yes; -teRLDCDisp("ngt") = yes; -teRLDCDisp("gaschp") = yes; -teRLDCDisp("dot") = yes; -teRLDCDisp("igcc") = yes; -teRLDCDisp("igccc") = yes; -teRLDCDisp("pc") = yes; -teRLDCDisp("coalchp") = yes; -teRLDCDisp("tnrs") = yes; -teRLDCDisp("fnrs") = yes; -teRLDCDisp("biochp") = yes; -teRLDCDisp("bioigcc") = yes; -teRLDCDisp("bioigccc") = yes; -teRLDCDisp("geohdr") = yes; -teRLDCDisp("hydro") = yes; -teRLDCDisp("h2turb") = yes; -teRLDCDisp("csp") = yes; - - -*Sets used on data input assignments -SETS - PeakDep(RLDCbands) "RLDC elements that scale with peak (not curtailment, storage)" - / - 1 * 4 - peak - / - -$ontext - UsedGrades2070(all_regi,all_te,rlf) - / - ROW.csp.(1*2) - EUR.csp.(1*4) - CHN.csp.(1*3) - IND.csp.(1*6) - JPN.csp.(1*6) - RUS.csp.(1*2) - USA.csp.(1*4) - OAS.csp.(1*5) - MEA.csp.(1*2) - LAM.csp.(1*2) - AFR.csp.(1*3) - ROW.hydro.(1*4) - EUR.hydro.(1*4) - CHN.hydro.(1*4) - IND.hydro.(1*4) - JPN.hydro.(1*4) - RUS.hydro.(1*4) - USA.hydro.(1*4) - OAS.hydro.(1*4) - MEA.hydro.(1*4) - LAM.hydro.(1*4) - AFR.hydro.(1*4) - / -$offtext - - teNotLoB1(all_te) "Technologies that can't go into the first LoB as they are difficult to cycle continuously & quickly" - / - tnrs - pc - ngcc - ngccc - igccc - igcc - bioigcc - bioigccc - coalchp - gaschp - biochp - / - - teNotBase(all_te) "Technologies that can't go into the last LoB (baseload) as they can't run for 7500 FLh" - / -*** hydro -*** csp -*** coalchp -*** gaschp -*** biochp - / -; - -*** EOF ./modules/32_power/RLDC/sets.gms diff --git a/modules/32_power/module.gms b/modules/32_power/module.gms index 93972e180..31d19f4ef 100644 --- a/modules/32_power/module.gms +++ b/modules/32_power/module.gms @@ -10,18 +10,16 @@ *' *' @description The 32_power module determines the operation production decisions for the electricity supply. *' -*' *' The `IntC` realization (Integrated Costs) assumes a single electricity market balance. *' -*' The `RLDC` realization (Residual Load Duration Curve) distinguishes different operation electricity supply decisions under four distinct load bands, plus additional peak capacity requirements. -*' -*' The `DTcoup` realization (DIETER-coupled) soft-couples REMIND to DIETER (an hourly power sector model), and is currently only at conceptual stage and not merged (it is only a copy of IntC) *' *' @authors Robert Pietzcker, Falko Ueckerdt, Renato Rodrigues, Chen Chris Gong +*** Other realizations were removed in July 2024: +*** - The `RLDC` realization (Residual Load Duration Curve) distinguishes different operation electricity supply decisions under four distinct load bands, plus additional peak capacity requirements. +*** - The `DTcoup` realization (DIETER-coupled) soft-couples REMIND to DIETER (an hourly power sector model), and is currently only at conceptual stage and not merged (it is only a copy of IntC) + *###################### R SECTION START (MODULETYPES) ########################## -$Ifi "%power%" == "DTcoup" $include "./modules/32_power/DTcoup/realization.gms" $Ifi "%power%" == "IntC" $include "./modules/32_power/IntC/realization.gms" -$Ifi "%power%" == "RLDC" $include "./modules/32_power/RLDC/realization.gms" *###################### R SECTION END (MODULETYPES) ############################ *** EOF ./modules/32_power/module.gms From 77a8666150c7bbfab3acebb4e65dd2acafeff8b4 Mon Sep 17 00:00:00 2001 From: lecfab Date: Wed, 24 Jul 2024 12:26:05 +0200 Subject: [PATCH 2/5] rename vm_capDistr, vm_demSeOth, vm_prodSeOth, pm_boundCapCCS, pm_cap0 --- core/bounds.gms | 16 +++---- core/datainput.gms | 22 ++++----- core/declarations.gms | 6 +-- core/equations.gms | 54 ++++++++++++----------- core/preloop.gms | 2 +- main.gms | 6 ++- modules/05_initialCap/on/declarations.gms | 2 +- modules/05_initialCap/on/preloop.gms | 30 ++++++------- modules/32_power/IntC/not_used.txt | 10 ----- 9 files changed, 72 insertions(+), 76 deletions(-) diff --git a/core/bounds.gms b/core/bounds.gms index 58d83760a..3307443a5 100755 --- a/core/bounds.gms +++ b/core/bounds.gms @@ -43,16 +43,16 @@ loop(se2se(enty,enty2,te), loop(regi, loop(teRe2rlfDetail(te,rlf), if( (pm_dataren(regi,"maxprod",rlf,te) gt 0), - vm_capDistr.lo(t,regi,te,rlf)$(t.val gt 2011) = 1e-8; + v_capDistr.lo(t,regi,te,rlf)$(t.val gt 2011) = 1e-8; *cb* make sure that grade distribution in early time steps with capacity fixing is close to optimal one assumed for vm_capFac calibration, divide by p_aux_capacityFactorHistOverREMIND to correct for deviation of REMIND capacity factors from historic capacity factors - vm_capDistr.lo("2015",regi,te,rlf) = 0.90 / max(1, p_aux_capacityFactorHistOverREMIND(regi,te)) * p_aux_capThisGrade(regi,te,rlf); - vm_capDistr.lo("2020",regi,te,rlf) = 0.90 / max(1, p_aux_capacityFactorHistOverREMIND(regi,te)) * p_aux_capThisGrade(regi,te,rlf); + v_capDistr.lo("2015",regi,te,rlf) = 0.90 / max(1, p_aux_capacityFactorHistOverREMIND(regi,te)) * p_aux_capThisGrade(regi,te,rlf); + v_capDistr.lo("2020",regi,te,rlf) = 0.90 / max(1, p_aux_capacityFactorHistOverREMIND(regi,te)) * p_aux_capThisGrade(regi,te,rlf); ); ); ); *' Make sure no grades > 9 are used. Only cosmetic to avoid entries in lst file -vm_capDistr.fx(t,regi,te,rlf)$(rlf.val gt 9) = 0; +v_capDistr.fx(t,regi,te,rlf)$(rlf.val gt 9) = 0; *' No battery storage in 2010: vm_cap.up("2010",regi,teStor,"1") = 0; @@ -404,13 +404,13 @@ $endif *** ------------------------------------------------------------------------------------------------------------- if ( (c_ccsinjecratescen gt 0) AND (NOT cm_emiscen eq 1), - vm_co2CCS.lo(t,regi,"cco2","ico2","ccsinje","1")$(t.val le 2030) = pm_boundCapCCS(t,regi,"low")$(t.val le 2030) * s_MtCO2_2_GtC; - vm_co2CCS.up(t,regi,"cco2","ico2","ccsinje","1")$(t.val le 2030) = (pm_boundCapCCS(t,regi,"low")$(t.val le 2030) + (pm_boundCapCCS(t,regi,"up")$(t.val le 2030) - pm_boundCapCCS(t,regi,"low")$(t.val le 2030)) * c_fracRealfromAnnouncedCCScap2030) * s_MtCO2_2_GtC; + vm_co2CCS.lo(t,regi,"cco2","ico2","ccsinje","1")$(t.val le 2030) = p_boundCapCCS(t,regi,"low")$(t.val le 2030) * s_MtCO2_2_GtC; + vm_co2CCS.up(t,regi,"cco2","ico2","ccsinje","1")$(t.val le 2030) = (p_boundCapCCS(t,regi,"low")$(t.val le 2030) + (p_boundCapCCS(t,regi,"up")$(t.val le 2030) - p_boundCapCCS(t,regi,"low")$(t.val le 2030)) * c_fracRealfromAnnouncedCCScap2030) * s_MtCO2_2_GtC; ); loop(regi, loop(t$(t.val le 2030), - if( ( pm_boundCapCCS(t,regi,"up") eq 0), + if( ( p_boundCapCCS(t,regi,"up") eq 0), vm_cap.fx(t,regi,teCCS,rlf) = 0; ); ); @@ -447,7 +447,7 @@ $if %c_SSP_forcing_adjust% == "forcing_SSP1" vm_deltaCap.up(t,regi,"coalgas" ***Fixing h2curt value to zero to avoid the model to generate SE out of nothing. ***Models that have additional se production channels should release this variable (eg. RLDC power module). loop(prodSeOth2te(enty,te), - vm_prodSeOth.fx(t,regi,"seh2","h2curt") = 0; + v_prodSeOth.fx(t,regi,"seh2","h2curt") = 0; ); diff --git a/core/datainput.gms b/core/datainput.gms index 56d7f2e34..b33d93f5a 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -243,23 +243,23 @@ $if not "%cm_learnRate%" == "off" parameter p_new_learnRate(all_te) / %cm_learnR $if not "%cm_learnRate%" == "off" fm_dataglob("learn",te)$p_new_learnRate(te)=p_new_learnRate(te); *RP* the new cost data in generisdata_tech is now in $2015. As long as the model runs in $2005, these values have first to be converted to D2005 by dividing by 1.2 downwards -fm_dataglob("inco0",te) = s_D2015_2_D2005 * fm_dataglob("inco0",te); -fm_dataglob("incolearn",te) = s_D2015_2_D2005 * fm_dataglob("incolearn",te); -fm_dataglob("omv",te) = s_D2015_2_D2005 * fm_dataglob("omv",te); -p_inco0(ttot,regi,te) = s_D2015_2_D2005 * p_inco0(ttot,regi,te); +fm_dataglob("inco0",te) = s_D2015_2_D2005 * fm_dataglob("inco0",te); +fm_dataglob("incolearn",te) = s_D2015_2_D2005 * fm_dataglob("incolearn",te); +fm_dataglob("omv",te) = s_D2015_2_D2005 * fm_dataglob("omv",te); +p_inco0(ttot,regi,te) = s_D2015_2_D2005 * p_inco0(ttot,regi,te); *** inco0 (and incolearn) are given in $/kW (or $/(tC/a) for ccs-related tech or $/(t/a) for process-based industry) *** convert to REMIND units, i.e., T$/TW (or T$/(GtC/a) for ccs-related tech or T$/(Gt/a) for process-based industry) *** note that factor for $/kW -> T$/TW is the same as for $/(tC/a) -> T$/(GtC/a) -fm_dataglob("inco0",te) = s_DpKW_2_TDpTW * fm_dataglob("inco0",te); -fm_dataglob("incolearn",te) = s_DpKW_2_TDpTW * fm_dataglob("incolearn",te); -fm_dataglob("omv",te) = s_DpKWa_2_TDpTWa * fm_dataglob("omv",te); -p_inco0(ttot,regi,te) = s_DpKW_2_TDpTW * p_inco0(ttot,regi,te); +fm_dataglob("inco0",te) = s_DpKW_2_TDpTW * fm_dataglob("inco0",te); +fm_dataglob("incolearn",te) = s_DpKW_2_TDpTW * fm_dataglob("incolearn",te); +fm_dataglob("omv",te) = s_DpKWa_2_TDpTWa * fm_dataglob("omv",te); +p_inco0(ttot,regi,te) = s_DpKW_2_TDpTW * p_inco0(ttot,regi,te); *RP* rescale the global CSP investment costs in REMIND: Originally we assume a SM3/12h setup, while the cost data from IEA for the short term seems rather based on a SM2/6h setup (with 40% average CF) *** Accordingly, also decrease long-term costs in REMIND to 0.7 of the current values -fm_dataglob("inco0","csp") = 0.7 * fm_dataglob("inco0","csp"); -fm_dataglob("incolearn","csp") = 0.7 * fm_dataglob("incolearn","csp"); +fm_dataglob("inco0","csp") = 0.7 * fm_dataglob("inco0","csp"); +fm_dataglob("incolearn","csp") = 0.7 * fm_dataglob("incolearn","csp"); *** -------------------------------------------------------------------------------- @@ -886,7 +886,7 @@ if(pm_NuclearConstraint("2020",regi,"tnrs")<0, ); *** read in data on CCS capacities and announced projects used as upper and lower bound on vm_co2CCS in 2025 and 2030 -parameter pm_boundCapCCS(ttot,all_regi,bounds) "installed and planned capacity of CCS" +parameter p_boundCapCCS(ttot,all_regi,bounds) "installed and planned capacity of CCS" / $ondelim $include "./core/input/p_boundCapCCS.cs4r" diff --git a/core/declarations.gms b/core/declarations.gms index 5a6e60e58..c9bc87a58 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -379,7 +379,7 @@ vm_esCapInv(ttot,all_regi,all_teEs) "investment for energy end vm_costEnergySys(ttot,all_regi) "energy system costs" vm_cap(tall,all_regi,all_te,rlf) "net total capacities" -vm_capDistr(tall,all_regi,all_te,rlf) "net capacities, distributed to the different grades for renewables" +v_capDistr(tall,all_regi,all_te,rlf) "net capacities, distributed to the different grades for renewables" vm_capTotal(ttot,all_regi,all_enty,all_enty) "total capacity without technology differentation for technologies where there exists differentation [TW]" vm_capFac(ttot,all_regi,all_te) "capacity factor of conversion technologies" vm_deltaCap(tall,all_regi,all_te,rlf) "capacity additions" @@ -413,8 +413,8 @@ v_prodUe (ttot,all_regi,all_enty,all_enty,all_te) "Useful energy production [ vm_capEarlyReti(tall,all_regi,all_te) "fraction of early retired capital" *** RLDC removal -vm_demSeOth(ttot,all_regi,all_enty,all_te) "other sety demand from certain technologies, have to calculated in additional equations [TWa]" -vm_prodSeOth(ttot,all_regi,all_enty,all_te) "other sety production from certain technologies, have to be calculated in additional equations [TWa]" +v_demSeOth(ttot,all_regi,all_enty,all_te) "other sety demand from certain technologies, have to calculated in additional equations [TWa]" +v_prodSeOth(ttot,all_regi,all_enty,all_te) "other sety production from certain technologies, have to be calculated in additional equations [TWa]" v_shGreenH2(ttot,all_regi) "share of green hydrogen in all hydrogen by 2030 [0..1]" v_shBioTrans(ttot,all_regi) "Share of biofuels in transport liquids from 2025 onwards. Value between 0 and 1." diff --git a/core/equations.gms b/core/equations.gms index 1e17b533e..3e9322d19 100644 --- a/core/equations.gms +++ b/core/equations.gms @@ -156,12 +156,12 @@ q_balSe(t,regi,enty2)$( entySe(enty2) AND (NOT (sameas(enty2,"seel"))) ).. - vm_emiMacSector(t,regi,"ch4wstl") ) )$( sameas(enty2,"segabio") AND t.val gt 2005 ) - + sum(prodSeOth2te(enty2,te), vm_prodSeOth(t,regi,enty2,te) ) !! *** RLDC removal + + sum(prodSeOth2te(enty2,te), v_prodSeOth(t,regi,enty2,te) ) !! *** RLDC removal + vm_Mport(t,regi,enty2) =e= sum(se2fe(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te)) + sum(se2se(enty2,enty3,te), vm_demSe(t,regi,enty2,enty3,te)) - + sum(demSeOth2te(enty2,te), vm_demSeOth(t,regi,enty2,te) ) !! *** RLDC removal + + sum(demSeOth2te(enty2,te), v_demSeOth(t,regi,enty2,te) ) !! *** RLDC removal + vm_Xport(t,regi,enty2) ; @@ -266,7 +266,7 @@ q_limitCapSe(t,regi,pe2se(enty,enty2,te)).. )$(NOT teReNoBio(te)) + sum(teRe2rlfDetail(te,rlf), - pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * vm_capDistr(t,regi,te,rlf) + pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * v_capDistr(t,regi,te,rlf) )$(teReNoBio(te)) ; @@ -324,7 +324,7 @@ q_cap(ttot,regi,te2rlf(te,rlf))$(ttot.val ge cm_startyear).. q_capDistr(t,regi,teReNoBio(te)).. - sum(teRe2rlfDetail(te,rlf), vm_capDistr(t,regi,te,rlf) ) + sum(teRe2rlfDetail(te,rlf), v_capDistr(t,regi,te,rlf) ) =e= vm_cap(t,regi,te,"1") ; @@ -395,9 +395,12 @@ q_capCumNet(t0,regi,teLearn)$(NOT (pm_data(regi,"tech_stat",teLearn) eq 4)).. qm_fuel2pe(t,regi,peRicardian(enty)).. vm_prodPe(t,regi,enty) =e= - sum(pe2rlf(enty,rlf2),vm_fuExtr(t,regi,enty,rlf2))-(vm_Xport(t,regi,enty)-(1-pm_costsPEtradeMp(regi,enty))*vm_Mport(t,regi,enty))$(tradePe(enty)) - - sum(pe2rlf(enty2,rlf2), (pm_fuExtrOwnCons(regi, enty, enty2) * vm_fuExtr(t,regi,enty2,rlf2))$(pm_fuExtrOwnCons(regi, enty, enty2) gt 0)); - + sum(pe2rlf(enty,rlf2), vm_fuExtr(t,regi,enty,rlf2)) + - (vm_Xport(t,regi,enty) - (1-pm_costsPEtradeMp(regi,enty)) * vm_Mport(t,regi,enty))$(tradePe(enty)) + - sum(pe2rlf(enty2,rlf2), + (pm_fuExtrOwnCons(regi, enty, enty2) * vm_fuExtr(t,regi,enty2,rlf2))$(pm_fuExtrOwnCons(regi, enty, enty2) gt 0) + ) +; ***--------------------------------------------------------------------------- *' Definition of resource constraints for renewable energy types: ***--------------------------------------------------------------------------- @@ -405,7 +408,7 @@ qm_fuel2pe(t,regi,peRicardian(enty)).. q_limitProd(t,regi,teRe2rlfDetail(teReNoBio(te),rlf)).. pm_dataren(regi,"maxprod",rlf,te) =g= - pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * vm_capDistr(t,regi,te,rlf); + pm_dataren(regi,"nur",rlf,te) * vm_capFac(t,regi,te) * v_capDistr(t,regi,te,rlf); ***----------------------------------------------------------------------------- *' Definition of competition for geographical potential for renewable energy types: @@ -414,32 +417,34 @@ q_limitProd(t,regi,teRe2rlfDetail(teReNoBio(te),rlf)).. q_limitGeopot(t,regi,peReComp(enty),rlf).. p_datapot(regi,"limitGeopot",rlf,enty) =g= - sum(te$teReComp2pe(enty,te,rlf), (vm_capDistr(t,regi,te,rlf) / (pm_data(regi,"luse",te)/1000))); + sum(te$teReComp2pe(enty,te,rlf), (v_capDistr(t,regi,te,rlf) / (pm_data(regi,"luse",te)/1000))); -*** learning curve for investment costs -*** deactivate learning for tech_stat 4 technologies before 2025 as they are not built before +***--------------------------------------------------------------------------- +*' Learning curve for investment costs: +*' (deactivate learning for tech_stat 4 technologies before 2025 as they are not built before) +***--------------------------------------------------------------------------- q_costTeCapital(t,regi,teLearn)$(NOT (pm_data(regi,"tech_stat",teLearn) eq 4 AND t.val le 2020)) .. vm_costTeCapital(t,regi,teLearn) =e= -*** special treatment for first time steps: using global estimates better -*** matches historic values - ( fm_dataglob("learnMult_wFC",teLearn) +*** floor costs defined regionally + pm_data(regi,"floorcost",teLearn) +*** until 2005: using global estimates better matches historic values + + ( fm_dataglob("learnMult_wFC",teLearn) * ( ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) ** fm_dataglob("learnExp_wFC",teLearn) ) )$( t.val le 2005 ) -*** special treatment for 2010, 2015: start divergence of regional values by using a -*** t-split of global 2005 to regional 2020 in order to phase-in the observed 2020 regional -*** variation from input-data - + ( (2020 - t.val)/15 * fm_dataglob("learnMult_wFC",teLearn) +*** 2005 to 2020: linear transition from global 2005 to regional 2020 +*** to phase-in the observed 2020 regional variation from input-data + + ( (2020 - t.val) / (2020-2015) * fm_dataglob("learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) ** fm_dataglob("learnExp_wFC",teLearn) - + (t.val - 2005)/15 * pm_data(regi,"learnMult_wFC",teLearn) + + (t.val - 2005) / (2020-2015) * pm_data(regi,"learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) @@ -447,14 +452,14 @@ q_costTeCapital(t,regi,teLearn)$(NOT (pm_data(regi,"tech_stat",teLearn) eq 4 AND )$( (t.val gt 2005) AND (t.val lt 2020) ) $ifthen.floorscen %cm_floorCostScen% == "default" -*** assuming linear convergence of regional learning curves to global values until 2050 - + ( (pm_ttot_val(t) - 2020) / 30 * fm_dataglob("learnMult_wFC",teLearn) +*** 2020 to 2050: assuming linear convergence of regional learning curves to global values + + ( (pm_ttot_val(t) - 2020) / (2050-2020) * fm_dataglob("learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) ** fm_dataglob("learnExp_wFC",teLearn) - + (2050 - pm_ttot_val(t)) / 30 * pm_data(regi,"learnMult_wFC",teLearn) + + (2050 - pm_ttot_val(t)) / (2050-2020) * pm_data(regi,"learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) @@ -481,15 +486,12 @@ $ifthen.floorscen %cm_floorCostScen% == "techtrans" $endif.floorscen $ifthen.floorscen %cm_floorCostScen% == "default" -*** globally harmonized costs after 2050 +*** after 2050: globally harmonized costs + ( fm_dataglob("learnMult_wFC",teLearn) * (sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) **(fm_dataglob("learnExp_wFC",teLearn)) )$(t.val gt 2050) $endif.floorscen - -*** floor costs - + pm_data(regi,"floorcost",teLearn) ; diff --git a/core/preloop.gms b/core/preloop.gms index 35a2a5422..9e30d7b34 100644 --- a/core/preloop.gms +++ b/core/preloop.gms @@ -28,7 +28,7 @@ vm_prodFe.l(ttot,regi,entyFe2,entyFe2,te) = 0; vm_prodSe.l(ttot,regi,enty,enty2,te) = 0; vm_demSe.l(ttot,regi,enty,enty2,te) = 0; vm_Xport.l(ttot,regi,tradePe) = 0; -vm_capDistr.l(t,regi,te,rlf) = 0; +v_capDistr.l(t,regi,te,rlf) = 0; vm_cap.l(t,regi,te,rlf) = 0; vm_fuExtr.l(ttot,regi,"pebiolc","1")$(ttot.val ge 2005) = 0; vm_pebiolc_price.l(ttot,regi)$(ttot.val ge 2005) = 0; diff --git a/main.gms b/main.gms index f71020b45..6a41a0b44 100755 --- a/main.gms +++ b/main.gms @@ -317,7 +317,11 @@ $setglobal biomass magpie_40 !! def = magpie_40 *' * (MOFEX) : contains the standalone version of MOFEX (Model Of Fossil EXtraction), which minimizes the discounted extraction and trade costs of fossils while balancing trade for each time step. Not to be run within a REMIND run but instead through the standalone architecture or soft-linked with REMIND (not yet implemented) $setglobal fossil grades2poly !! def = grades2poly *'--------------------- 32_power ---------------------------------------- -*' +*' Warning: vm_capDistr appears only in "core" even though it is supposed to be an interface! +*' Warning: vm_demSeOth appears only in "core" even though it is supposed to be an interface! +*' Warning: vm_prodSeOth appears only in "core" even though it is supposed to be an interface! +*' Warning: pm_boundCapCCS appears only in "core" even though it is supposed to be an interface! +*' Warning: pm_cap0 appears only in "initialCap" even though it is supposed to be an interface! *' * (IntC) : Power sector formulation with Integration Cost (IntC) markups and curtailment for VRE integration - linearly increasing with VRE share -, and fixed capacity factors for dispatchable power plants $setglobal power IntC !! def = IntC *'--------------------- 33_CDR ---------------------------------------- diff --git a/modules/05_initialCap/on/declarations.gms b/modules/05_initialCap/on/declarations.gms index 57397d998..6bbd523d8 100644 --- a/modules/05_initialCap/on/declarations.gms +++ b/modules/05_initialCap/on/declarations.gms @@ -7,7 +7,7 @@ *** SOF ./modules/05_initialCap/on/declarations.gms Parameter - pm_cap0(all_regi,all_te) "standing capacity in 2005 as calculated by the initialization routine generisinical. Unit: TWa" + p05_cap0(all_regi,all_te) "standing capacity in 2005 as calculated by the initialization routine generisinical. Unit: TWa" p05_emi2005_from_initialcap2(all_regi,emiTe) "regional energy emissions 2005 resulting from the initialcap routine. Unit: GtC" p05_initial_capacity(all_regi,all_te) "capacitiy at t=2005, calculated from past deltacaps" p05_inital_input(all_regi,all_te) "input in 2005, calculated from past deltacaps and initial time-variable eta" diff --git a/modules/05_initialCap/on/preloop.gms b/modules/05_initialCap/on/preloop.gms index e3ddd5b7c..3e7c9be6c 100644 --- a/modules/05_initialCap/on/preloop.gms +++ b/modules/05_initialCap/on/preloop.gms @@ -119,15 +119,15 @@ solve initialcap2 using cns; display v05_INIdemEn0.l, v05_INIcap0.l; -pm_cap0(regi,te) = v05_INIcap0.l(regi,te); +p05_cap0(regi,te) = v05_INIcap0.l(regi,te); $ifthen.cm_subsec_model_steel "%cm_subsec_model_steel%" == "processes" -pm_cap0(regi,'bof') = pm_outflowPrcIni(regi,'bof','unheated') / pm_cf("2005",regi,'bof'); -pm_cap0(regi,'bf') = pm_outflowPrcIni(regi,'bf','standard') / pm_cf("2005",regi,'bf'); -pm_cap0(regi,'eaf') = pm_outflowPrcIni(regi,'eaf','sec') / pm_cf("2005",regi,'eaf'); -pm_cap0(regi,'idr') = 0.; -pm_cap0(regi,"bfcc") =0.; -pm_cap0(regi,"idrcc") =0.; +p05_cap0(regi,'bof') = pm_outflowPrcIni(regi,'bof','unheated') / pm_cf("2005",regi,'bof'); +p05_cap0(regi,'bf') = pm_outflowPrcIni(regi,'bf','standard') / pm_cf("2005",regi,'bf'); +p05_cap0(regi,'eaf') = pm_outflowPrcIni(regi,'eaf','sec') / pm_cf("2005",regi,'eaf'); +p05_cap0(regi,'idr') = 0.; +p05_cap0(regi,"bfcc") =0.; +p05_cap0(regi,"idrcc") =0.; $endif.cm_subsec_model_steel *RP keep energy demand for the Kyoto target calibration @@ -171,7 +171,7 @@ vm_deltaCap.fx("2005",regi,te,rlf)$(te2rlf(te,rlf)) = 0; loop(regi, loop(teReNoBio(te), s05_aux_tot_prod - = pm_cap0(regi,te) + = p05_cap0(regi,te) * pm_cf("2005",regi,te) * pm_dataren(regi,"nur","1",te); @@ -211,8 +211,8 @@ loop(regi, loop(regi, loop(opTimeYr2te(te,opTimeYr)$(NOT teReNoBio(te)), loop(tsu2opTime5(ttot,opTimeYr), - loop(pe2se(entyPe,entySe,te), o_INI_DirProdSeTe(regi,entySe,te) = pm_cap0(regi,te) * pm_cf("2005",regi,te) * pm_dataren(regi,"nur","1",te) ); - sm_tmp = 1 / pm_ts(ttot) * pm_cap0(regi,te) * p05_vintage(regi,opTimeYr,te); + loop(pe2se(entyPe,entySe,te), o_INI_DirProdSeTe(regi,entySe,te) = p05_cap0(regi,te) * pm_cf("2005",regi,te) * pm_dataren(regi,"nur","1",te) ); + sm_tmp = 1 / pm_ts(ttot) * p05_cap0(regi,te) * p05_vintage(regi,opTimeYr,te); vm_deltaCap.lo(ttot,regi,te,"1") = sm_tmp; vm_deltaCap.up(ttot,regi,te,"1") = sm_tmp; @@ -257,7 +257,7 @@ display pm_aux_capLowerLimit; ***--------------------------------------------------------------------------- loop(regi, - o_INI_TotalCap(regi) = sum(pe2se(enty,"seel",te), pm_cap0(regi,te) ); + o_INI_TotalCap(regi) = sum(pe2se(enty,"seel",te), p05_cap0(regi,te) ); o_INI_TotalDirProdSe(regi,entySe) = sum(pe2se(enty,entySe,te), o_INI_DirProdSeTe(regi,entySe,te) ); o_INI_AvCapFac(regi) = o_INI_TotalDirProdSe(regi,"seel") / o_INI_TotalCap(regi); ); @@ -267,7 +267,7 @@ o_INI_DirProdSeTe o_INI_TotalCap o_INI_TotalDirProdSe o_INI_AvCapFac -pm_cap0 +p05_cap0 ; ***--------------------------------------------------------------------------- @@ -293,7 +293,7 @@ display pm_dataeta; p05_eta_correct_factor(regi,te) = 1; loop(regi, - loop(te$((teEtaIncr(te)) AND (pm_cap0(regi,te) > 1.E-8)), + loop(te$((teEtaIncr(te)) AND (p05_cap0(regi,te) > 1.E-8)), p05_initial_capacity(regi,te) = sum(ttot$sameas(ttot,"2005"), sum(teSe2rlf(te,rlf), @@ -501,11 +501,11 @@ loop(regi, p05_emi2005_from_initialcap2(regi,emiTe) = sum(pe2se(enty,enty2,te), pm_emifac("2005",regi,enty,enty2,te,emiTe) - * 1/(pm_data(regi,"eta",te)) * pm_cf("2005",regi,te) * pm_cap0(regi,te) + * 1/(pm_data(regi,"eta",te)) * pm_cf("2005",regi,te) * p05_cap0(regi,te) ) + sum(se2fe(enty,enty2,te), - pm_emifac("2005",regi,enty,enty2,te,emiTe) * pm_cf("2005",regi,te) * pm_cap0(regi,te) + pm_emifac("2005",regi,enty,enty2,te,emiTe) * pm_cf("2005",regi,te) * p05_cap0(regi,te) ); *** no CCS leakage in the first time step ); diff --git a/modules/32_power/IntC/not_used.txt b/modules/32_power/IntC/not_used.txt index 9261eeb93..85ff9312e 100644 --- a/modules/32_power/IntC/not_used.txt +++ b/modules/32_power/IntC/not_used.txt @@ -5,13 +5,3 @@ # | REMIND License Exception, version 1.0 (see LICENSE file). # | Contact: remind@pik-potsdam.de name,type,reason -vm_capDistr, variable, ??? -vm_demSeOth, variable, ??? -vm_prodSeOth, variable, ??? -pm_emifac, parameter, ??? -cm_nucscen, switch, ??? -vm_deltaCap,input,questionnaire -cm_emiscen,input,questionnaire -cm_ccapturescen,input,questionnaire -pm_boundCapCCS,input,questionnaire -pm_cap0,input,questionnaire From 4d4e905e988275c8d88d500e94893c135f507164 Mon Sep 17 00:00:00 2001 From: lecfab Date: Thu, 25 Jul 2024 16:32:06 +0200 Subject: [PATCH 3/5] Clean learning equation --- core/datainput.gms | 11 ++++++----- main.gms | 6 +----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/core/datainput.gms b/core/datainput.gms index b33d93f5a..dbe81e31e 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -367,16 +367,17 @@ $endif.REG_techcosts *** global exponent *** parameter calculation for global level, that regional values can gradually converge to -fm_dataglob("learnExp_wFC",teLearn(te)) = fm_dataglob("inco0",te)/fm_dataglob("incolearn",te) * log(1-fm_dataglob("learn", te))/log(2); +fm_dataglob("learnExp_woFC",teLearn(te)) = log(1 - fm_dataglob("learn",te)) / log(2); +*RP* adjust exponent parameter learnExp_woFC to take floor costs into account +fm_dataglob("learnExp_wFC",teLearn(te)) = fm_dataglob("inco0",te) / fm_dataglob("incolearn",te) * fm_dataglob("learnExp_woFC",te); *** regional exponent -pm_data(regi,"learnExp_woFC",teLearn(te)) = log(1-pm_data(regi,"learn", te))/log(2); -*RP* adjust exponent parameter learnExp_woFC to take floor costs into account -pm_data(regi,"learnExp_wFC",teLearn(te)) = pm_data(regi,"inco0",te) / pm_data(regi,"incolearn",te) * log(1-pm_data(regi,"learn", te))/log(2); +pm_data(regi,"learnExp_woFC",teLearn(te)) = log(1 - pm_data(regi,"learn",te)) / log(2); +pm_data(regi,"learnExp_wFC",teLearn(te)) = pm_data(regi,"inco0",te) / pm_data(regi,"incolearn",te) * pm_data(regi,"learnExp_woFC",te); *** global factor *** parameter calculation for global level, that regional values can gradually converge to -fm_dataglob("learnMult_wFC",teLearn(te)) = fm_dataglob("incolearn",te) / (fm_dataglob("ccap0",te) ** fm_dataglob("learnExp_wFC", te)); +fm_dataglob("learnMult_wFC",teLearn(te)) = fm_dataglob("incolearn",te) / (fm_dataglob("ccap0",te) ** fm_dataglob("learnExp_wFC", te)); *** regional factor *NB* read in vm_capCum(t0,regi,teLearn) from input.gdx to have info available for the recalibration of 2005 investment costs diff --git a/main.gms b/main.gms index 6a41a0b44..f71020b45 100755 --- a/main.gms +++ b/main.gms @@ -317,11 +317,7 @@ $setglobal biomass magpie_40 !! def = magpie_40 *' * (MOFEX) : contains the standalone version of MOFEX (Model Of Fossil EXtraction), which minimizes the discounted extraction and trade costs of fossils while balancing trade for each time step. Not to be run within a REMIND run but instead through the standalone architecture or soft-linked with REMIND (not yet implemented) $setglobal fossil grades2poly !! def = grades2poly *'--------------------- 32_power ---------------------------------------- -*' Warning: vm_capDistr appears only in "core" even though it is supposed to be an interface! -*' Warning: vm_demSeOth appears only in "core" even though it is supposed to be an interface! -*' Warning: vm_prodSeOth appears only in "core" even though it is supposed to be an interface! -*' Warning: pm_boundCapCCS appears only in "core" even though it is supposed to be an interface! -*' Warning: pm_cap0 appears only in "initialCap" even though it is supposed to be an interface! +*' *' * (IntC) : Power sector formulation with Integration Cost (IntC) markups and curtailment for VRE integration - linearly increasing with VRE share -, and fixed capacity factors for dispatchable power plants $setglobal power IntC !! def = IntC *'--------------------- 33_CDR ---------------------------------------- From d6d27fdb00a31f93957a112764c82134f067d19b Mon Sep 17 00:00:00 2001 From: lecfab Date: Thu, 25 Jul 2024 17:00:48 +0200 Subject: [PATCH 4/5] re-delete realizations after their resurrection due to rebase --- modules/32_power/DTcoup/datainput.gms | 97 --------------------------- modules/32_power/RLDC/not_used.txt | 13 ---- 2 files changed, 110 deletions(-) delete mode 100644 modules/32_power/DTcoup/datainput.gms delete mode 100644 modules/32_power/RLDC/not_used.txt diff --git a/modules/32_power/DTcoup/datainput.gms b/modules/32_power/DTcoup/datainput.gms deleted file mode 100644 index 0afd3e4a0..000000000 --- a/modules/32_power/DTcoup/datainput.gms +++ /dev/null @@ -1,97 +0,0 @@ -*** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | REMIND License Exception, version 1.0 (see LICENSE file). -*** | Contact: remind@pik-potsdam.de -*** SOF ./modules/32_power/DTcoup/datainput.gms - -*------------------------------------------------------------------------------------ -*** IntC specific data input -*------------------------------------------------------------------------------------ - -parameter f32_shCHP(ttot,all_regi) "upper boundary of chp electricity generation" -/ -$ondelim -$include "./modules/32_power/IntC/input/f32_shCHP.cs4r" -$offdelim -/ -; -p32_shCHP(ttot,all_regi) = f32_shCHP(ttot,all_regi) + 0.05; -p32_shCHP(ttot,all_regi)$(ttot.val ge 2050) = min(p32_shCHP("2020",all_regi) + 0.15, 0.75); -p32_shCHP(ttot,all_regi)$((ttot.val gt 2020) and (ttot.val lt 2050)) = p32_shCHP("2020",all_regi) + ((p32_shCHP("2050",all_regi) - p32_shCHP("2020",all_regi)) / 30 * (ttot.val - 2020)); - -***parameter p32_grid_factor(all_regi) - multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India -parameter p32_grid_factor(all_regi) "multiplicative factor that scales total grid requirements down in comparatively small or homogeneous regions like Japan, Europe or India" -/ -$ondelim -$include "./modules/32_power/IntC/input/p32_grid_factor.cs4r" -$offdelim -/ -; - -***parameter p32_factorStorage(all_regi,all_te) - multiplicative factor that scales total curtailment and storage requirements up or down in different regions for different technologies (e.g. down for PV in regions where high solar radiation coincides with high electricity demand) -parameter f32_factorStorage(all_regi,all_te) "multiplicative factor that scales total curtailment and storage requirements up or down in different regions for different technologies (e.g. down for PV in regions where high solar radiation coincides with high electricity demand)" -/ -$ondelim -$include "./modules/32_power/IntC/input/f32_factorStorage.cs4r" -$offdelim -/ -; -$IFTHEN.WindOff %cm_wind_offshore% == "1" -f32_factorStorage(all_regi,"windoff") = f32_factorStorage(all_regi,"wind"); -f32_factorStorage(all_regi,"wind") = 1.35 * f32_factorStorage(all_regi,"wind"); -$ENDIF.WindOff -p32_factorStorage(all_regi,all_te) = f32_factorStorage(all_regi,all_te); - -$if not "%cm_storageFactor%" == "off" p32_factorStorage(all_regi,all_te)=%cm_storageFactor%*p32_factorStorage(all_regi,all_te); - -***parameter p32_storexp(all_regi,all_te) - exponent that determines how curtailment and storage requirements per kW increase with market share of wind and solar. 1 means specific marginal costs increase linearly -p32_storexp(regi,"spv") = 1; -p32_storexp(regi,"csp") = 1; -p32_storexp(regi,"wind") = 1; -$IFTHEN.WindOff %cm_wind_offshore% == "1" -p32_storexp(regi,"windoff") = 1; -$ENDIF.WindOff - - -***parameter p32_gridexp(all_regi,all_te) - exponent that determines how grid requirement per kW increases with market share of wind and solar. 1 means specific marginal costs increase linearly -p32_gridexp(regi,"spv") = 1; -p32_gridexp(regi,"csp") = 1; -p32_gridexp(regi,"wind") = 1; - - -table f32_storageCap(char, all_te) "multiplicative factor between dummy seel<-->h2 technologies and storXXX technologies" -$include "./modules/32_power/IntC/input/f32_storageCap.prn" -; - -$IFTHEN.WindOff %cm_wind_offshore% == "1" -f32_storageCap(char,"windoff") = f32_storageCap(char,"wind"); -$ENDIF.WindOff - -p32_storageCap(te,char) = f32_storageCap(char,te); -display p32_storageCap; - -$ontext -parameter p32_flex_maxdiscount(all_regi,all_te) "maximum electricity price discount for flexible technologies reached at high VRE shares" -/ -$ondelim -$include "./modules/32_power/IntC/input/p32_flex_maxdiscount.cs4r" -$offdelim -/ -; -*** convert from USD2015/MWh to trUSD2005/TWa -p32_flex_maxdiscount(regi,te) = p32_flex_maxdiscount(regi,te) * sm_TWa_2_MWh * s_D2015_2_D2005 * 1e-12; -display p32_flex_maxdiscount; -$offtext - -*** initialize p32_PriceDurSlope parameter -parameter f32_cm_PriceDurSlope_elh2(ext_regi) "slope of price duration curve for electrolysis [#]" / %cm_PriceDurSlope_elh2% /; -p32_PriceDurSlope(regi,"elh2") = f32_cm_PriceDurSlope_elh2("GLO"); -loop(ext_regi$f32_cm_PriceDurSlope_elh2(ext_regi), - loop(regi$regi_groupExt(ext_regi,regi), - p32_PriceDurSlope(regi,"elh2") = f32_cm_PriceDurSlope_elh2(ext_regi); - ); -); - -*** EOF ./modules/32_power/DTcoup/datainput.gms diff --git a/modules/32_power/RLDC/not_used.txt b/modules/32_power/RLDC/not_used.txt deleted file mode 100644 index ad39b9f13..000000000 --- a/modules/32_power/RLDC/not_used.txt +++ /dev/null @@ -1,13 +0,0 @@ -# | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) -# | authors, and contributors see CITATION.cff file. This file is part -# | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -# | AGPL-3.0, you are granted additional permissions described in the -# | REMIND License Exception, version 1.0 (see LICENSE file). -# | Contact: remind@pik-potsdam.de -name,type,reason -pm_IO_input,input,questionnaire -vm_flexAdj,input,questionnaire -cm_VRE_supply_assumptions,input,questionnaire -cm_flex_tax,input,questionnaire -cm_FlexTaxFeedback,input,questionnaire -vm_shDemSeel,input,only used in IntC realization From 12d2efb0007f798874b650d7261cb10ccbe9ed21 Mon Sep 17 00:00:00 2001 From: lecfab Date: Tue, 6 Aug 2024 16:39:01 +0200 Subject: [PATCH 5/5] 2020-2015 is not 15 --- core/equations.gms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/equations.gms b/core/equations.gms index 3e9322d19..b0e0f8fe5 100644 --- a/core/equations.gms +++ b/core/equations.gms @@ -438,13 +438,13 @@ q_costTeCapital(t,regi,teLearn)$(NOT (pm_data(regi,"tech_stat",teLearn) eq 4 AND )$( t.val le 2005 ) *** 2005 to 2020: linear transition from global 2005 to regional 2020 *** to phase-in the observed 2020 regional variation from input-data - + ( (2020 - t.val) / (2020-2015) * fm_dataglob("learnMult_wFC",teLearn) + + ( (2020 - t.val) / (2020-2005) * fm_dataglob("learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) ) ** fm_dataglob("learnExp_wFC",teLearn) - + (t.val - 2005) / (2020-2015) * pm_data(regi,"learnMult_wFC",teLearn) + + (t.val - 2005) / (2020-2005) * pm_data(regi,"learnMult_wFC",teLearn) * ( sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn) )