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

avoiding infeasibilities for years defined at c_H2InBuildOnlyAfter #1860

Merged
merged 4 commits into from
Oct 21, 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
4 changes: 2 additions & 2 deletions core/bounds.gms
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ v_shfe.lo(t,regi,entyFe,sector)$pm_shfe_lo(t,regi,entyFe,sector) = pm_shfe_lo(t,
v_shGasLiq_fe.up(t,regi,sector)$pm_shGasLiq_fe_up(t,regi,sector) = pm_shGasLiq_fe_up(t,regi,sector);
v_shGasLiq_fe.lo(t,regi,sector)$pm_shGasLiq_fe_lo(t,regi,sector) = pm_shGasLiq_fe_lo(t,regi,sector);

*** RH: Fix H2 in buildings to zero until given year (always zero by default)
vm_demFeSector.up(t,regi,"seh2","feh2s","build",emiMkt)$(t.val le c_H2InBuildOnlyAfter) = 0;
*** Set H2 upper bound in buildings for years defined at cm_H2InBuildOnlyAfter
vm_demFeSector.up(t,regi,"seh2","feh2s","build",emiMkt)$(t.val le cm_H2InBuildOnlyAfter) = 1e-6;

***----------------------------------------------------------------------------
*** Controlling if active, dampening factor to align edge-t non-energy transportation costs with historical GDP data
Expand Down
4 changes: 2 additions & 2 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1001,9 +1001,9 @@ parameter
*' * (4) Energy Efficiency policy: higher discount rate until cm_startyear, decreasing to 25% value linearly until 2030.
*'
parameter
c_H2InBuildOnlyAfter "Switch to fix H2 in buildings to zero until given year"
cm_H2InBuildOnlyAfter "Switch to fix H2 in buildings to zero until given year"
;
c_H2InBuildOnlyAfter = 2150; !! def = 2150 (rule out H2 in buildings)
cm_H2InBuildOnlyAfter = 2150; !! def = 2150 (rule out H2 in buildings)
*' For all years until the given year, FE demand for H2 in buildings is set to zero
parameter
cm_peakBudgYr "date of net-zero CO2 emissions for peak budget runs without overshoot"
Expand Down
21 changes: 12 additions & 9 deletions modules/29_CES_parameters/calibrate/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,18 @@ $ifthen.build_H2_offset "%buildings%" == "simple"
*);

*** RK: feh2b offset scaled from 1% in 2025 to 50% in 2050 of fegab quantity
loop ((t,regi),
pm_cesdata(t,regi,"feh2b","offset_quantity")
= - (0.05 + 0.45 * min(1, max(0, (t.val - 2025) / (2050 - 2025))))
* pm_cesdata(t,regi,"fegab","quantity")
- pm_cesdata(t,regi,"feh2b","quantity");
pm_cesdata(t,regi,"feh2b","quantity")
= (0.05 + 0.45 * min(1, max(0, (t.val - 2025) / (2050 - 2025))))
* pm_cesdata(t,regi,"fegab","quantity");
);
pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val gt cm_H2InBuildOnlyAfter) =
- (0.05 + 0.45 * min(1, max(0, (t.val - 2025) / (2050 - 2025))))
* pm_cesdata(t,regi,"fegab","quantity")
- pm_cesdata(t,regi,"feh2b","quantity");
pm_cesdata(t,regi,"feh2b","quantity")$(t.val gt cm_H2InBuildOnlyAfter) =
(0.05 + 0.45 * min(1, max(0, (t.val - 2025) / (2050 - 2025))))
* pm_cesdata(t,regi,"fegab","quantity");

*** for the years that H2 buildings is fixed to zero, set offset to the exact value of the calibrated quantity to ignore it after calibration
pm_cesdata(t,regi,"feh2b","quantity")$(t.val le cm_H2InBuildOnlyAfter) = 1e-6;
pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val le cm_H2InBuildOnlyAfter) = - pm_cesdata(t,regi,"feh2b","quantity");

$endif.build_H2_offset

*** Add an epsilon to the values which are 0 so that they can fit in the CES
Expand Down
1 change: 1 addition & 0 deletions modules/29_CES_parameters/load/not_used.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ pm_calibrate_eff_scale,parameter,not needed
pm_fedemand,parameter,not needed
pm_energy_limit,,
sm_CES_calibration_iteration,scalar,only applicable during calibration
cm_H2InBuildOnlyAfter,parameter,???
2 changes: 1 addition & 1 deletion modules/36_buildings/simple/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ q36_auxCostAddTeInv(t,regi)..


*' Hydrogen fe share in buildings gases use (natural gas + hydrogen)
q36_H2Share(t,regi)..
q36_H2Share(t,regi)$(t.val ge 2020)..
v36_H2share(t,regi)
* sum(se2fe(entySe,entyFe,te)$(SAMEAS(entyFe,"feh2s")
OR SAMEAS(entyFe,"fegas")),
Expand Down
Loading