Skip to content

Commit

Permalink
adjusting pm_capCumForeign calculation to consider that learning para…
Browse files Browse the repository at this point in the history
…meters are calibrated in relation to 2020 regional costs and 2020 GLOBAL capacity
  • Loading branch information
Renato-Rodrigues committed Sep 6, 2023
1 parent c69133b commit cfbc646
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions modules/22_subsidizeLearning/globallyOptimal/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,37 @@
p22_deltacap0(ttot,regi,teLearn,rlf)$( (ttot.val ge 2005) and (pm_SolNonInfes(regi) eq 1)) = vm_deltaCap.l(ttot,regi,teLearn,rlf);

$ifthen.altLearnRegiSet not "%cm_altLearnRegiSet%" == "off"
loop((ttot,regi,teLearn),
loop((regi,teLearn),
if(altLearnRegi22(regi,teLearn),
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) = sum(regi2$((not sameas(regi2,regi)) and (altLearnRegi22(regi2,teLearn))), pm_capCum0(ttot,regi2,teLearn) );
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) =
*** global cumulative capacity excluding region for years before 2025
sum(regi2$((not sameas(regi2,regi)) and (ttot.val ge 2005) and (ttot.val le 2020)),
pm_capCum0(ttot,regi2,teLearn)
)
+
*** 2020 cumulative capacity for other regions plus sub-region cumulative capacity for years after 2020
sum((regi2,ttot)$((not sameas(regi2,regi)) and (NOT(altLearnRegi22(regi2,teLearn))) and (ttot.val ge 2025)),
pm_capCum0("2020",regi2,teLearn)
)
+
sum((regi2,ttot)$((not sameas(regi2,regi)) and (altLearnRegi22(regi2,teLearn)) and (ttot.val ge 2025)),
pm_capCum0(ttot,regi2,teLearn)
)
;
else
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) = sum(regi2$((not sameas(regi2,regi)) and (not altLearnRegi22(regi2,teLearn))), pm_capCum0(ttot,regi2,teLearn) );
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) =
sum(regi2$((not sameas(regi2,regi)) and (not altLearnRegi22(regi2,teLearn))),
pm_capCum0(ttot,regi2,teLearn)
);
);
);
$else.altLearnRegiSet
loop((ttot,regi,teLearn),
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) = sum(regi2$(not sameas(regi2,regi)), pm_capCum0(ttot,regi2,teLearn) );
);
pm_capCumForeign(ttot,regi,teLearn)$(ttot.val ge 2005) = sum(regi2$(not sameas(regi2,regi)), pm_capCum0(ttot,regi2,teLearn) );
$endif.altLearnRegiSet

display pm_capCumForeign;


* calculate marginal benefit of spillovers in each region. This expression for the subsidy can be derived analytically.
loop(regi$(pm_SolNonInfes(regi) eq 1),
p22_marginalCapcumBenefit(ttot,regi,teLearn) =
Expand Down

0 comments on commit cfbc646

Please sign in to comment.