Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unify capitalization of variables and parameters #1542

Merged
merged 13 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/bounds.gms
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ vm_costTeCapital.fx(t,regi,teNoLearn) = pm_inco0_t(t,regi,teNoLearn);
loop(pe2se(enty,enty2,te)$((not sameas(te,"biotr")) AND (not sameas(te,"biodiesel")) AND (not sameas(te,"bioeths")) AND (not sameas(te,"gasftcrec")) AND (not sameas(te,"gasftrec"))
AND (not sameas(te,"tnrs"))),
vm_cap.lo(t,regi,te,"1")$(t.val gt 2026 AND t.val le 2070) = 1e-7;
if( (NOT teccs(te)),
vm_deltacap.lo(t,regi,te,"1")$(t.val gt 2026 AND t.val le 2070) = 1e-8;
if( (NOT teCCS(te)),
vm_deltaCap.lo(t,regi,te,"1")$(t.val gt 2026 AND t.val le 2070) = 1e-8;
);
);

Expand Down Expand Up @@ -417,7 +417,7 @@ loop(regi,

*AL* fixing prodFE in 2005 to the value contained in pm_cesdata("2005",regi,in,"quantity"). This is done to ensure that the energy system will reproduce the 2005 calibration values.
*** Fixing will produce clearly attributable errors (good for debugging) when using inconsistent data, as the GAMS accuracy when comparing fixed results is very high (< 1e-8).
***vm_prodFE.fx("2005",regi,se2fe(enty,enty2,te)) = sum(fe2ppfEn(enty2,in), pm_cesdata("2005",regi,in,"quantity") );
***vm_prodFe.fx("2005",regi,se2fe(enty,enty2,te)) = sum(fe2ppfEn(enty2,in), pm_cesdata("2005",regi,in,"quantity") );

vm_deltaCap.up(t,regi,"gasftrec",rlf)$(t.val gt 2005) = 0.0;
vm_deltaCap.up(t,regi,"gasftcrec",rlf)$(t.val gt 2005) = 0.0;
Expand Down Expand Up @@ -482,7 +482,7 @@ loop ((t, regi) $ ( (sameAs(t,"2010") OR sameAs(t,"2015"))
+ pm_cesdata(t,regi,in2,"quantity") + pm_cesdata(t,regi,in2,"offset_quantity")
) eq 0)
AND
(sum(ttot$(ttot.val lt 2005), vm_deltacap.up(ttot,regi,"biochp","1")) eq 0)) ,
(sum(ttot$(ttot.val lt 2005), vm_deltaCap.up(ttot,regi,"biochp","1")) eq 0)) ,
vm_prodSe.up(t,regi,"pegas" ,"seel","gaschp") = 0;
vm_prodSe.up(t,regi,"pecoal" ,"seel","coalchp") = 0;
vm_prodSe.up(t,regi,"pecoal" ,"sehe","coalhp") = 0;
Expand Down
2 changes: 1 addition & 1 deletion core/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ sm_globalBudget_dev = 1;
*' load production values from reference gdx to allow penalizing changes vs reference run in the first time step via q_changeProdStartyearCost/q21_taxrevChProdStartYear
if (cm_startyear gt 2005,
execute_load "input_ref.gdx", p_prodSeReference = vm_prodSe.l;
execute_load "input_ref.gdx", p_prodFEReference = vm_prodFE.l;
execute_load "input_ref.gdx", p_prodFEReference = vm_prodFe.l;
execute_load "input_ref.gdx", p_prodUeReference = v_prodUe.l;
execute_load "input_ref.gdx", p_co2CCSReference = vm_co2CCS.l;
);
Expand Down
30 changes: 15 additions & 15 deletions core/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ q_balPe(t,regi,entyPe(enty))..
*' 3. Couple production is modeled as own consumption, but with a positive coefficient.
*' 4. Secondary energy can be demanded to produce final or (another type of) secondary energy.
***---------------------------------------------------------------------------
q_balSe(t,regi,enty2)$( entySE(enty2) AND (NOT (sameas(enty2,"seel"))) )..
q_balSe(t,regi,enty2)$( entySe(enty2) AND (NOT (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),
+ 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),
+ sum(pc2te(enty4,entyFe(enty5),te,enty2),
pm_prodCouple(regi,enty4,enty5,te,enty2)
* vm_prodFe(t,regi,enty4,enty5,te)
)
Expand Down Expand Up @@ -218,8 +218,8 @@ q_transSe2se(t,regi,se2se(enty,enty2,te))..
q_balFe(t,regi,entySe,entyFe,te)$se2fe(entySe,entyFe,te)..
vm_prodFe(t,regi,entySe,entyFe,te)
=e=
sum((sector2emiMkt(sector,emiMkt),entyFE2sector(entyFE,sector)),
vm_demFEsector(t,regi,entySE,entyFE,sector,emiMkt)
sum((sector2emiMkt(sector,emiMkt),entyFe2Sector(entyFe,sector)),
vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt)
)
;

Expand Down Expand Up @@ -522,7 +522,7 @@ q_emiTeDetailMkt(t,regi,enty,enty2,te,enty3,emiMkt)$(
sum(emi2te(enty,enty2,te,enty3),
( sum(pe2se(enty,enty2,te),
pm_emifac(t,regi,enty,enty2,te,enty3)
* vm_demPE(t,regi,enty,enty2,te)
* vm_demPe(t,regi,enty,enty2,te)
)
+ sum((ccs2Leak(enty,enty2,te,enty3),teCCS2rlf(te,rlf)),
pm_emifac(t,regi,enty,enty2,te,enty3)
Expand All @@ -536,7 +536,7 @@ q_emiTeDetailMkt(t,regi,enty,enty2,te,enty3,emiMkt)$(
vm_demFeSector(t,regi,enty,enty2,sector,emiMkt)
!! substract FE used for non-energy purposes (as feedstocks) so it does
!! not create energy-related emissions
- sum(entyFe2sector2emiMkt_NonEn(enty2,sector,emiMkt),
- sum(entyFE2sector2emiMkt_NonEn(enty2,sector,emiMkt),
vm_demFENonEnergySector(t,regi,enty,enty2,sector,emiMkt))
)
)
Expand Down Expand Up @@ -583,19 +583,19 @@ q_emiTeMkt(t,regi,emiTe(enty),emiMkt) ..
)$( sameas(enty,"co2") AND sameas(emiMkt,"ETS"))
!! substract carbon from biogenic or synthetic origin contained in
!! plastics that don't get incinerated ("plastic removals")
- sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
- sum(entyFE2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
sum(se2fe(entySe,entyFe,te)$( entySeBio(entySe) OR entySeSyn(entySe) ),
vm_nonIncineratedPlastics(t,regi,entySe,entyFe,emiMkt)
)
)$( sameas(enty,"co2") )
!! add emissions from plastics incineration. CHECK FOR DOUBLE-COUNTING RISK
+ sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
+ sum(entyFE2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
sum(se2fe(entySe,entyFe,te),
vm_incinerationEmi(t,regi,entySe,entyFe,emiMkt)
)
)$( sameas(enty,"co2") )
!! add emissions from chemical feedstock with unknown fate
+ sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
+ sum(entyFE2sector2emiMkt_NonEn(entyFe,"indst",emiMkt),
sum(se2fe(entySe,entyFe,te),
vm_feedstockEmiUnknownFate(t,regi,entySe,entyFe,emiMkt)
)
Expand Down Expand Up @@ -629,7 +629,7 @@ q_emiAllMkt(t,regi,emi,emiMkt) ..
!! Exogenous emissions
+ pm_emiExog(t,regi,emi)$( sameas(emiMkt,"other") )
!! non energy emi from chem sector (process emissions from feedstocks):
+ sum((entyFe2sector2emiMkt_NonEn(entyFe,sector,emiMkt),
+ sum((entyFE2sector2emiMkt_NonEn(entyFe,sector,emiMkt),
se2fe(entySe,entyFe,te)),
vm_demFENonEnergySector(t,regi,entySe,entyFe,sector,emiMkt)
* pm_emifacNonEnergy(t,regi,entySe,entyFe,sector,emi)
Expand Down Expand Up @@ -814,7 +814,7 @@ q_budgetCO2eqGlob$(cm_emiscen=6)..
***---------------------------------------------------------------------------
*' Definition of carbon capture :
***---------------------------------------------------------------------------
q_balcapture(t,regi,ccs2te(ccsCO2(enty),enty2,te)) ..
q_balcapture(t,regi,ccs2te(ccsCo2(enty),enty2,te)) ..
sum(teCCS2rlf(te,rlf),vm_co2capture(t,regi,enty,enty2,te,rlf))
=e=
*** Carbon captured in energy sector
Expand Down Expand Up @@ -893,7 +893,7 @@ q_changeProdStartyear(t,regi,te)$( (t.val gt 2005) AND (t.val eq cm_startyear )
=e=
sum(pe2se(enty,enty2,te), vm_prodSe(t,regi,enty,enty2,te) - p_prodSeReference(t,regi,enty,enty2,te) )
+ sum(se2se(enty,enty2,te), vm_prodSe(t,regi,enty,enty2,te) - p_prodSeReference(t,regi,enty,enty2,te) )
+ sum(se2fe(enty,enty2,te), vm_prodFE(t,regi,enty,enty2,te) - p_prodFEReference(t,regi,enty,enty2,te) )
+ sum(se2fe(enty,enty2,te), vm_prodFe(t,regi,enty,enty2,te) - p_prodFEReference(t,regi,enty,enty2,te) )
+ sum(fe2ue(enty,enty2,te), v_prodUe (t,regi,enty,enty2,te) - p_prodUeReference(t,regi,enty,enty2,te) )
+ sum(ccs2te(enty,enty2,te), sum(teCCS2rlf(te,rlf), vm_co2CCS(t,regi,enty,enty2,te,rlf) - p_co2CCSReference(t,regi,enty,enty2,te,rlf) ) )
;
Expand Down Expand Up @@ -1096,15 +1096,15 @@ q_limitCapFeH2BI(t,regi,sector)$(SAMEAS(sector,"build") OR SAMEAS(sector,"indst"
*' Enforce historical data biomass share per carrier in sector final energy for buildings and industry (+- 2%)
***---------------------------------------------------------------------------

q_shbiofe_up(t,regi,entyFe,sector,emiMkt)$((sameas(entyFE,"fegas") or sameas(entyFE,"fehos") or sameas(entyFE,"fesos")) and entyFe2Sector(entyFe,sector) and sector2emiMkt(sector,emiMkt) and (t.val le 2015))..
q_shbiofe_up(t,regi,entyFe,sector,emiMkt)$((sameas(entyFe,"fegas") or sameas(entyFe,"fehos") or sameas(entyFe,"fesos")) and entyFe2Sector(entyFe,sector) and sector2emiMkt(sector,emiMkt) and (t.val le 2015))..
(pm_secBioShare(t,regi,entyFe,sector) + 0.02)
*
sum((entySe,te)$se2fe(entySe,entyFe,te), vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt))
=g=
sum((entySeBio,te)$se2fe(entySeBio,entyFe,te), vm_demFeSector(t,regi,entySeBio,entyFe,sector,emiMkt))
;

q_shbiofe_lo(t,regi,entyFe,sector,emiMkt)$((sameas(entyFE,"fegas") or sameas(entyFE,"fehos") or sameas(entyFE,"fesos")) and entyFe2Sector(entyFe,sector) and sector2emiMkt(sector,emiMkt) and (t.val le 2015))..
q_shbiofe_lo(t,regi,entyFe,sector,emiMkt)$((sameas(entyFe,"fegas") or sameas(entyFe,"fehos") or sameas(entyFe,"fesos")) and entyFe2Sector(entyFe,sector) and sector2emiMkt(sector,emiMkt) and (t.val le 2015))..
(pm_secBioShare(t,regi,entyFe,sector) - 0.02)
*
sum((entySe,te)$se2fe(entySe,entyFe,te), vm_demFeSector(t,regi,entySe,entyFe,sector,emiMkt))
Expand Down
14 changes: 7 additions & 7 deletions core/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ o_avgAdjCostInv(ttot,regi,te)$(ttot.val ge 2010 AND teAdj(te) AND (sum(te2rlf(te
o_avgAdjCost_2_InvCost_ratioPc(ttot,regi,te)$(vm_costInvTeDir.l(ttot,regi,te) ge 1E-22) = vm_costInvTeAdj.l(ttot,regi,te)/vm_costInvTeDir.l(ttot,regi,te) * 100;

*** calculation of PE and SE Prices (useful for internal use and reporting purposes)
pm_SEPrice(ttot,regi,entySE)$(abs (qm_budget.m(ttot,regi)) gt sm_eps AND (NOT (sameas(entySE,"seel")))) =
q_balSe.m(ttot,regi,entySE) / qm_budget.m(ttot,regi);
pm_SEPrice(ttot,regi,entySe)$(abs (qm_budget.m(ttot,regi)) gt sm_eps AND (NOT (sameas(entySe,"seel")))) =
q_balSe.m(ttot,regi,entySe) / qm_budget.m(ttot,regi);

pm_PEPrice(ttot,regi,entyPe)$(abs (qm_budget.m(ttot,regi)) gt sm_eps) =
q_balPe.m(ttot,regi,entyPe) / qm_budget.m(ttot,regi);
Expand Down Expand Up @@ -710,7 +710,7 @@ o_emissions_energy_extraction(ttot,regi,emi,entyPe)$(ttot.val ge 2005) =
o_emissions_energy_supply_gross(ttot,regi,emi)$(ttot.val ge 2005) =
sum(pe2se(entyPe,entySe,te)$(pm_emifac(ttot,regi,entyPe,entySe,te,emi)>0),
pm_emifac(ttot,regi,entyPe,entySe,te,emi)
* vm_demPE.l(ttot,regi,entyPe,entySe,te)
* vm_demPe.l(ttot,regi,entyPe,entySe,te)
)*o_emi_conv(emi)
+
sum(entyPe, o_emissions_energy_extraction(ttot,regi,emi,entyPe))
Expand All @@ -719,7 +719,7 @@ o_emissions_energy_supply_gross(ttot,regi,emi)$(ttot.val ge 2005) =
o_emissions_energy_supply_gross_carrier(ttot,regi,emi,entySe)$(ttot.val ge 2005) =
sum((entyPe,te)$(pe2se(entyPe,entySe,te) AND (pm_emifac(ttot,regi,entyPe,entySe,te,emi)>0)),
pm_emifac(ttot,regi,entyPe,entySe,te,emi)
* vm_demPE.l(ttot,regi,entyPe,entySe,te)
* vm_demPe.l(ttot,regi,entyPe,entySe,te)
)*o_emi_conv(emi)
+
(
Expand All @@ -739,7 +739,7 @@ o_emissions_energy_negative(ttot,regi,emi)$(ttot.val ge 2005) =
(
sum(pe2se(entyPe,entySe,te)$(pm_emifac(ttot,regi,entyPe,entySe,te,emi)<0),
pm_emifac(ttot,regi,entyPe,entySe,te,emi)
* vm_demPE.l(ttot,regi,entyPe,entySe,te)
* vm_demPe.l(ttot,regi,entyPe,entySe,te)
)
+
sum((ccs2Leak(enty,enty2,te,emi),teCCS2rlf(te,rlf)),
Expand Down Expand Up @@ -810,15 +810,15 @@ o_capture_industry(ttot,regi,"co2")$(ttot.val ge 2005) =

***Carbon Management|Carbon Capture|Primary Energy|Biomass (Mt CO2/yr)
o_capture_energy_bio(ttot,regi,"co2")$(ttot.val ge 2005) =
sum(enty3$pebio(enty3),
sum(enty3$peBio(enty3),
sum(emi2te(enty3,enty4,te2,"cco2"),
vm_emiTeDetail.l(ttot,regi,enty3,enty4,te2,"cco2")
)
)*o_emi_conv("co2");

***Carbon Management|Carbon Capture|Primary Energy|Fossil (Mt CO2/yr)
o_capture_energy_fos(ttot,regi,"co2")$(ttot.val ge 2005) =
sum(enty3$(NOT(pebio(enty3))),
sum(enty3$(NOT(peBio(enty3))),
sum(emi2te(enty3,enty4,te2,"cco2"),
vm_emiTeDetail.l(ttot,regi,enty3,enty4,te2,"cco2")
)
Expand Down
22 changes: 11 additions & 11 deletions core/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ display p_emineg_econometric;
*** calculate some emission factors
***--------------------------------------
*** calculate global emission factor
loop (emi2fuel(entyPE,enty),
p_efFossilFuelExtrGlo(entyPE,enty)
= sum(regi, p_emiFossilFuelExtr(regi,entyPE))
/ sum((rlf,regi), vm_fuExtr.l("2005",regi,entyPE,rlf));
loop (emi2fuel(entyPe,enty),
p_efFossilFuelExtrGlo(entyPe,enty)
= sum(regi, p_emiFossilFuelExtr(regi,entyPe))
/ sum((rlf,regi), vm_fuExtr.l("2005",regi,entyPe,rlf));

loop (regi,
sm_tmp = sum(rlf, vm_fuExtr.l("2005",regi,entyPE,rlf));
sm_tmp = sum(rlf, vm_fuExtr.l("2005",regi,entyPe,rlf));

p_efFossilFuelExtr(regi,entyPE,enty)$( sm_tmp )
= p_emiFossilFuelExtr(regi,entyPE) / sm_tmp;
p_efFossilFuelExtr(regi,entyPe,enty)$( sm_tmp )
= p_emiFossilFuelExtr(regi,entyPe) / sm_tmp;

p_efFossilFuelExtr(regi,entyPE,enty)$( NOT sm_tmp )
= p_efFossilFuelExtrGlo(entyPE,enty);
p_efFossilFuelExtr(regi,entyPe,enty)$( NOT sm_tmp )
= p_efFossilFuelExtrGlo(entyPe,enty);
);
);

Expand Down Expand Up @@ -194,7 +194,7 @@ if ( NOT (cm_IndCCSscen eq 1 AND cm_CCS_cement eq 1),
*** pricing leads to significant price markups.

pm_CementAbatementPrice(ttot,regi)$( ttot.val ge 2005 )
= pm_priceCO2forMAC(ttot,regi,"co2cement") / sm_C_2_CO2;
= pm_priceCO2forMAC(ttot,regi,"co2cement") / sm_c_2_co2;

display "CO2 price for computing Cement Demand Reduction [$/tC]",
pm_CementAbatementPrice;
Expand Down Expand Up @@ -377,7 +377,7 @@ pm_macAbatLev("2020",regi,"co2luc") = 0;

*** Limit MAC abatement level increase to sm_macChange (default: 5 % p.a.)
loop (ttot$( ttot.val ge 2015 ),
pm_macAbatLev(ttot,regi,MACsector(enty))
pm_macAbatLev(ttot,regi,MacSector(enty))
= min(
pm_macAbatLev(ttot,regi,enty),

Expand Down
4 changes: 2 additions & 2 deletions core/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -2341,8 +2341,8 @@ alias(all_te,all_te2);
alias(te,te2,te3);
alias(all_enty,all_enty2);
alias(enty,enty2,enty3,enty4,enty5,enty6,enty7);
alias(entyPE,entyPE2);
alias(entySE,entySE2);
alias(entyPe,entyPE2);
alias(entySe,entySE2);
alias(entyFe,entyFe2);
alias(teEs,teEs2);
alias(esty,esty2);
Expand Down
8 changes: 4 additions & 4 deletions core/sets_calculations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ loop (fe2ppfEn(entyFe,ppfEn),
display "production function sets", cesOut2cesIn, cesOut2cesIn2, cesLevel2cesIO, cesRev2cesIO, ppf, ppfEn, ipf;

*** Energy service layer sets
loop(es2ppfen(esty,ppfen),
ppfenFromEs(ppfen) = yes;
loop(es2ppfen(esty,ppfEn),
ppfenFromEs(ppfEn) = yes;
);

loop (fe2es(entyFe,esty,teEs),
feForEs(entyFe) = YES;
);

loop (fe2es(entyFe,esty,teEs),
loop(es2ppfen(esty,ppfen),
feViaEs2ppfen(entyFe,ppfen,teEs) = YES;
loop(es2ppfen(esty,ppfEn),
feViaEs2ppfen(entyFe,ppfEn,teEs) = YES;
);
);

Expand Down
2 changes: 1 addition & 1 deletion modules/01_macro/singleSectorGr/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ loop ((cesLevel2cesIO(counter,in),cesOut2cesIn(in,in2),cesOut2cesIn2(in2,in3)),
*** compute marginal rate of substitution between primary production factors as
*** ratio of CES prices provides the amount of in2 needed to subsitute one unit
*** of in to generate the same economic value
loop ((ttot,regi,cesOut2cesIn(out,ppfen(in)),cesOut2cesIn2(out,in2))$(
loop ((ttot,regi,cesOut2cesIn(out,ppfEn(in)),cesOut2cesIn2(out,in2))$(
o01_CESderivatives(ttot,regi,"inco",in2) ),
o01_CESmrs(ttot,regi,in,in2)$(o01_CESderivatives(ttot,regi,"inco",in2) gt 0)
= o01_CESderivatives(ttot,regi,"inco",in)
Expand Down
2 changes: 1 addition & 1 deletion modules/02_welfare/ineqLognormal/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ q02_energyExp(ttot,regi)$(ttot.val ge max(2015,cm_startyear))..
v02_energyExp(ttot,regi)
=e=
sum(se2fe(entySe,entyFe,te),
sum((sector2emiMkt(sector,emiMkt),entyFE2sector(entyFE,sector)),
sum((sector2emiMkt(sector,emiMkt),entyFe2Sector(entyFe,sector)),
vm_demFeSector(ttot,regi,entySe,entyFe,sector,emiMkt)*pm_FEPrice(ttot,regi,entyFe,sector,emiMkt))
)
;
Expand Down
2 changes: 1 addition & 1 deletion modules/02_welfare/ineqLognormal/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ p02_inconvPen_Switch_Track(t,regi)
$ENDIF.INCONV_bioSwitch

*for use in the SCC calculation
pm_sccIneq(ttot,regi)$((pm_SolNonInfes(regi) eq 1)) = exp(-1*(2*cm_distrAlphaDam-(pm_ies(regi)+1))*0.5*pm_ies(regi)*v02_distrFinal_SigmaSq_postDam.l(ttot,regi));
pm_sccIneq(ttot,regi)$((pm_SolNonInfes(regi) eq 1)) = exp(-1*(2*cm_distrAlphaDam-(pm_ies(regi)+1))*0.5*pm_ies(regi)*v02_distrFinal_sigmaSq_postDam.l(ttot,regi));

*interpolate sigma
loop(ttot$(ttot.val ge 2005),
Expand Down
8 changes: 4 additions & 4 deletions modules/04_PE_FE_parameters/iea2014/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (smin((t,regi,pe2se(entyPe,entySe,te)), f04_IO_input(t,regi,entyPe,entySe,te)
loop ((t,regi,pe2se(entyPe,entySe,te)),
if (f04_IO_input(t,regi,entyPe,entySe,te) lt 0,
put_utility "msg" /
f04_IO_input.tn(t,regi,entyPE,entySE,te), " = ",
f04_IO_input.tn(t,regi,entyPe,entySe,te), " = ",
f04_IO_input(t,regi,entyPe,entySe,te):10:8;
);
);
Expand All @@ -47,7 +47,7 @@ if (smin((t,regi,pe2se(entyPe,entySe,te)), f04_IO_output(t,regi,entyPe,entySe,te
loop ((t,regi,pe2se(entyPe,entySe,te)),
if (f04_IO_output(t,regi,entyPe,entySe,te) lt 0,
put_utility "msg" /
f04_IO_output.tn(t,regi,entyPE,entySE, te), " = ",
f04_IO_output.tn(t,regi,entyPe,entySe, te), " = ",
f04_IO_output(t,regi,entyPe,entySe,te):10:8;
);
);
Expand Down Expand Up @@ -165,7 +165,7 @@ f04_IO_input(ttot,regi,all_enty,all_enty2,all_te) = f04_IO_input(ttot,regi,all_e
f04_IO_output(ttot,regi,all_enty,all_enty2,all_te) = f04_IO_output(ttot,regi,all_enty,all_enty2,all_te) * sm_EJ_2_TWa;

*** calculate bio share per carrier for buildings and industry (only for historically available years)
pm_secBioShare(ttot,regi,entyFe,sector)$((sameas(entyFE,"fegas") or sameas(entyFE,"fehos") or sameas(entyFE,"fesos")) and entyFe2Sector(entyFe,sector) and (ttot.val ge 2005 and ttot.val le 2015) and (sum((entySe,all_enty,all_te)$entyFeSec2entyFeDetail(entyFe,sector,all_enty), f04_IO_output(ttot,regi,entySe,all_enty,all_te) ) gt 0)) =
pm_secBioShare(ttot,regi,entyFe,sector)$((sameas(entyFe,"fegas") or sameas(entyFe,"fehos") or sameas(entyFe,"fesos")) and entyFe2Sector(entyFe,sector) and (ttot.val ge 2005 and ttot.val le 2015) and (sum((entySe,all_enty,all_te)$entyFeSec2entyFeDetail(entyFe,sector,all_enty), f04_IO_output(ttot,regi,entySe,all_enty,all_te) ) gt 0)) =
sum((entySeBio,all_enty,all_te)$entyFeSec2entyFeDetail(entyFe,sector,all_enty), f04_IO_output(ttot,regi,entySeBio,all_enty,all_te) )
/
sum((entySe,all_enty,all_te)$entyFeSec2entyFeDetail(entyFe,sector,all_enty), f04_IO_output(ttot,regi,entySe,all_enty,all_te) )
Expand Down Expand Up @@ -325,7 +325,7 @@ loop(en2en(enty,enty2,te), !! this sum does not include couple production, only
);

*RP* adjust pm_prodCouple values to default of 0.9 if technology is not used in the initial time step
loop(teCHP(te),
loop(teChp(te),
loop(regi,
if( pm_data(regi,"mix0",te) eq 0 ,
loop(pc2te(enty,"seel",te,"sehe"),
Expand Down
4 changes: 2 additions & 2 deletions modules/05_initialCap/on/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ display p05_inital_eta, p05_corrected_inital_eta, pm_data, pm_dataeta;
*** (values in pm_data("eta") for the whole time horizon. For these technologies, the etas are not vintage-dependent, but rather etas change FOR ALL STANDING CAPACITIES in each time step.
*** We therefore fade out the 2005 etas until 2050 to the initial values that are read-in from generisdata_tech (now in fm_dataglob("eta")).
loop(regi,
loop(teEtaConst(te)$(NOT teCHP(te)),
loop(teEtaConst(te)$(NOT teChp(te)),
loop(ttot$(ttot.val < 2010),
pm_eta_conv(ttot,regi,te) = pm_data(regi,"eta",te) ;
)
Expand All @@ -401,7 +401,7 @@ loop(regi,
)
);
);
pm_eta_conv(ttot,regi,teCHP) = pm_data(regi,"eta",teCHP);
pm_eta_conv(ttot,regi,teChp) = pm_data(regi,"eta",teChp);

*AD* It looks like the dynamic etas in pm_dataeta are not used in pm_eta_conv, i.e.,
*** they are not relevant for se->se or se->fe conversion.
Expand Down
Loading
Loading