Skip to content

Commit

Permalink
Merge pull request #1430 from orichters/fixOnRef
Browse files Browse the repository at this point in the history
fix Internal/CES values on reference run
  • Loading branch information
orichters authored Oct 16, 2023
2 parents 5187a5e + 03f913a commit 7cf9a55
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
38 changes: 19 additions & 19 deletions modules/01_macro/singleSectorGr/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,38 @@ pm_consPC(tall,regi)$(tall.val gt 2150) = pm_consPC("2150",regi);
*** output parameter for diagnostics

*** Compute ppf prices from CES derivatives
o01_CESderivatives(t,regi,cesOut2cesIn(out,in))$( vm_cesIO.l(t,regi,in) gt 1e-6 AND
vm_cesIO.l(t,regi,out) gt 1e-6 )
o01_CESderivatives(ttot,regi,cesOut2cesIn(out,in))$( vm_cesIO.l(ttot,regi,in) gt 1e-6 AND
vm_cesIO.l(ttot,regi,out) gt 1e-6 )
=
pm_cesdata(t,regi,in,"xi")
* pm_cesdata(t,regi,in,"eff")
* vm_effGr.l(t,regi,in)
pm_cesdata(ttot,regi,in,"xi")
* pm_cesdata(ttot,regi,in,"eff")
* vm_effGr.l(ttot,regi,in)

* vm_cesIO.l(t,regi,out)
** (1 - pm_cesdata(t,regi,out,"rho"))
* vm_cesIO.l(ttot,regi,out)
** (1 - pm_cesdata(ttot,regi,out,"rho"))

* ( pm_cesdata(t,regi,in,"eff")
* vm_effGr.l(t,regi,in)
* vm_cesIO.l(t,regi,in)
* ( pm_cesdata(ttot,regi,in,"eff")
* vm_effGr.l(ttot,regi,in)
* vm_cesIO.l(ttot,regi,in)
)
** (pm_cesdata(t,regi,out,"rho") - 1)
** (pm_cesdata(ttot,regi,out,"rho") - 1)
;

loop ((cesLevel2cesIO(counter,in),cesOut2cesIn(in,in2),cesOut2cesIn2(in2,in3)),
o01_CESderivatives(t,regi,"inco",in3)
= o01_CESderivatives(t,regi,"inco",in2)
* o01_CESderivatives(t,regi,in2,in3);
o01_CESderivatives(ttot,regi,"inco",in3)
= o01_CESderivatives(ttot,regi,"inco",in2)
* o01_CESderivatives(ttot,regi,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 ((t,regi,cesOut2cesIn(out,ppfen(in)),cesOut2cesIn2(out,in2))$(
o01_CESderivatives(t,regi,"inco",in2) ),
o01_CESmrs(t,regi,in,in2)$(o01_CESderivatives(t,regi,"inco",in2) gt 0)
= o01_CESderivatives(t,regi,"inco",in)
/ o01_CESderivatives(t,regi,"inco",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)
/ o01_CESderivatives(ttot,regi,"inco",in2)
);

*** total CES efficiency as diagnostic output parameter
Expand Down
10 changes: 5 additions & 5 deletions modules/36_buildings/simple/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ $endif.feShareScenario
*` are given by the marginal rate of subsitution (MRS) in the parameter o01_CESmrs.

*` There are two types of CES mark-up cost:
*` (a) Mark-up cost on inputs in ppfen_MkupCost37: Those are counted as expenses in the budget and set by the parameter p37_CESMkup.
*` (a) Mark-up cost on inputs in ppfen_MkupCost36: Those are counted as expenses in the budget and set by the parameter p36_CESMkup.
*` (b) Mark-up cost on other inputs: Those are budget-neutral and implemented as a tax. They are set by the parameter pm_tau_ces_tax.

*` Mark-up cost in buildings are modeled with budget-effect (a).

*` default values of CES mark-up with budget effect:
p36_CESMkup(t,regi,in) = 0;
p36_CESMkup(ttot,regi,in) = 0;
*` mark-up cost on heat pumps and district heating are incurred as actual cost to the budget (see option (a) above)
*` place markup cost on heat pumps electricity of 200 USD/MWh(el) to represent demand-side cost of electrification
*` and reach higher efficiency during calibration to model higher energy efficiency of heat pumps
p36_CESMkup(t,regi,"feelhpb") = 200 * sm_TWa_2_MWh * 1e-12;
p36_CESMkup(ttot,regi,"feelhpb") = 200 * sm_TWa_2_MWh * 1e-12;
*` place markup cost on district heating of 25 USD/MWh(heat) to represent additional t&d cost of expanding district heating networks for buildings
*` which makes district heating in buildings more expensive than in industry
p36_CESMkup(t,regi,"feheb") = 25 * sm_TWa_2_MWh * 1e-12;
p36_CESMkup(ttot,regi,"feheb") = 25 * sm_TWa_2_MWh * 1e-12;

*` overwrite or extent CES markup cost if specified by switch
$ifThen.CESMkup not "%cm_CESMkup_build%" == "standard"
p36_CESMkup(t,regi,in)$(p36_CESMkup_input(in)
p36_CESMkup(ttot,regi,in)$(p36_CESMkup_input(in)
AND ppfen_MkupCost36(in)) =
p36_CESMkup_input(in);
pm_tau_ces_tax(t,regi,in)$(p36_CESMkup_input(in)
Expand Down
6 changes: 3 additions & 3 deletions modules/37_industry/fixed_shares/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ $endif.feShareScenario
$ENDIF.feShare

*** FS: CES markup cost industry
p37_CESMkup(t,regi,in) = 0;
p37_CESMkup(ttot,regi,in) = 0;
*** in standard case, apply markup-cost of 0.5 trUSD/TWa to feeli to represent demand-side cost of electrification and
*** obtain a higher efficiency in calibration to mimic energy efficiency gains with increasing electricity share
p37_CESMkup(t,regi,"feeli") = 0.5;
p37_CESMkup(ttot,regi,"feeli") = 0.5;

*** overwrite or extent CES markup cost if specified by switch
$ifThen.CESMkup not "%cm_CESMkup_ind%" == "standard"
p37_CESMkup(t,regi,in)$(p37_CESMkup_input(in)) = p37_CESMkup_input(in);
p37_CESMkup(ttot,regi,in)$(p37_CESMkup_input(in)) = p37_CESMkup_input(in);
$endIf.CESMkup

display p37_CESMkup;
Expand Down
6 changes: 3 additions & 3 deletions modules/37_industry/subsectors/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ pm_ue_eff_target("ue_otherInd") = 0.008;
*` Mark-up cost in industry are modeled without budget-effect (b).

*` Default industry mark-up cost with budget effect:
p37_CESMkup(t,regi,in) = 0;
p37_CESMkup(ttot,regi,in) = 0;

*` Default industry mark-up cost without budget effect:
*` mark-up cost on electrification (hth_electricity inputs), to reach >1 MRS to gas/liquids as technical efficiency gains from electrification
Expand All @@ -447,8 +447,8 @@ pm_tau_ces_tax(t,regi,"feh2_cement") = 100* sm_TWa_2_MWh * 1e-12;

*` overwrite or extent CES markup cost if specified by switch
$ifThen.CESMkup not "%cm_CESMkup_ind%" == "standard"
p37_CESMkup(t,regi,in)$(p37_CESMkup_input(in) AND ppfen_MkupCost37(in)) = p37_CESMkup_input(in);
pm_tau_ces_tax(t,regi,in)$(p37_CESMkup_input(in) AND (NOT ppfen_MkupCost37(in))) = p37_CESMkup_input(in);
p37_CESMkup(ttot,regi,in)$(p37_CESMkup_input(in) AND ppfen_MkupCost37(in)) = p37_CESMkup_input(in);
pm_tau_ces_tax(ttot,regi,in)$(p37_CESMkup_input(in) AND (NOT ppfen_MkupCost37(in))) = p37_CESMkup_input(in);
$endIf.CESMkup

display p37_CESMkup;
Expand Down

0 comments on commit 7cf9a55

Please sign in to comment.