Skip to content

Commit

Permalink
Merge pull request remindmodel#1556 from LaviniaBaumstark/develop
Browse files Browse the repository at this point in the history
adjust tax conv. criterion and activate it
  • Loading branch information
LaviniaBaumstark authored Feb 16, 2024
2 parents 6c78edb + fe93a43 commit 7085fc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,8 @@ parameter
parameter
cm_TaxConvCheck "switch for enabling tax convergence check in nash mode"
;
cm_TaxConvCheck = 0; !! def = 0, which means tax convergence check is off !! regexp = 0|1
*' switches tax convergence check in nash mode on and off (check that tax revenue in all regions, periods be smaller than 0.01% of GDP)
cm_TaxConvCheck = 1; !! def = 1, which means tax convergence check is on !! regexp = 0|1
*' switches tax convergence check in nash mode on and off (check that tax revenue in all regions, periods be smaller than 0.1% of GDP)
*' * 0 (off)
*' * 1 (on), default
*'
Expand Down
22 changes: 9 additions & 13 deletions modules/80_optimization/nash/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ p80_taxrev0(ttot,regi)$( (ttot.val ge max(2010,cm_startyear)) and (pm_SolNonInfe
*AJS*update normalization paramaters, take values from last iteration for regions that were not solved optimally
p80_normalize0(ttot,regi,"good")$(ttot.val ge 2005) = max(vm_cons.l(ttot,regi)$(pm_SolNonInfes(regi) eq 1) + p80_normalize0(ttot,regi,"good")$(pm_SolNonInfes(regi) eq 0),sm_eps);
*ML*normalize permit trade corrections to consumption or positive cap path instead of emissions, as those may be negative
*p80_normalize0(ttot,regi,"perm")$(ttot.val ge 2005) = vm_cons.l(ttot,regi)$(pm_SolNonInfes(regi) eq 1) + p80_normalize0(ttot,regi,"good")$(pm_SolNonInfes(regi) eq 0);
*p80_normalize0(ttot,regi,"perm")$(ttot.val ge 2005) = max(abs(pm_shPerm(ttot,regi) * pm_emicapglob(ttot)) , sm_eps);
p80_normalize0(ttot,regi,"perm")$(ttot.val ge 2005) = max(abs(pm_shPerm(ttot,regi) * pm_emicapglob("2050")) , sm_eps);
***$ifi %emicapregi% == "budget" p80_normalize0(ttot,regi,"perm")$(trtot.val ge 2005) = p_emi_budget1_reg(regi)/(sm_endBudgetCO2eq - s_t_start);
p80_normalize0(ttot,regi,tradePe)$(ttot.val ge 2005) = max(0.5 * (sum(rlf, vm_fuExtr.l(ttot,regi,tradePe,rlf)) + vm_prodPe.l(ttot,regi,tradePe))$(pm_SolNonInfes(regi) eq 1)
+ p80_normalize0(ttot,regi,tradePe)$(pm_SolNonInfes(regi) eq 0) ,sm_eps);

Expand Down Expand Up @@ -119,22 +116,22 @@ if(iteration.val > 2,
loop(ttot$(ttot.val ge 2005),
loop(trade$(tradePe(trade) OR sameas(trade,"good") ),
if( abs(p80_surplus(ttot,trade,iteration)) gt p80_surplusMaxTolerance(trade),
o80_SurplusOverTolerance(ttot,trade,iteration) = Sign(p80_surplus(ttot,trade,iteration) );
);
o80_SurplusOverTolerance(ttot,trade,iteration) = Sign(p80_surplus(ttot,trade,iteration) );
);
);
);
);
);

*RP* track continued surplusses with the same sign (to show where convergence is too slow)
if(iteration.val > 2,
loop(ttot$(ttot.val ge 2005),
loop(trade$(tradePe(trade) OR sameas(trade,"good") ),
if( ( Sign(p80_surplus(ttot,trade,iteration) ) eq Sign(p80_surplus(ttot,trade,iteration-1) ) ) AND
( abs(p80_surplus(ttot,trade,iteration)) gt p80_surplusMaxTolerance(trade) ) ,
o80_trackSurplusSign(ttot,trade,iteration) = o80_trackSurplusSign(ttot,trade,iteration-1) +1;
else
o80_trackSurplusSign(ttot,trade,iteration) = 0;
);
( abs(p80_surplus(ttot,trade,iteration)) gt p80_surplusMaxTolerance(trade) ) ,
o80_trackSurplusSign(ttot,trade,iteration) = o80_trackSurplusSign(ttot,trade,iteration-1) +1;
else
o80_trackSurplusSign(ttot,trade,iteration) = 0;
);
);
);
);
Expand Down Expand Up @@ -227,7 +224,6 @@ p80_defic_sum(iteration) = sum(trade$(NOT tradeSe(trade)), p80_defic_trade(trad
p80_defic_sum_rel(iteration) = 100 * p80_defic_sum(iteration) / (p80_normalizeLT("good")/pm_pvp("2005","good"));



***adjust parameters for next iteration
***Decide on when to fade out price anticipation terms (doing this too early leads to diverging markets)
***if markets are reasonably cleared
Expand Down Expand Up @@ -324,7 +320,7 @@ loop(regi,
loop(t,
p80_convNashTaxrev_iter(iteration,t,regi) = vm_taxrev.l(t,regi) / vm_cesIO.l(t,regi,"inco");
if (cm_TaxConvCheck eq 1,
if( abs(p80_convNashTaxrev_iter(iteration,t,regi)) gt 1E-4,
if( abs(p80_convNashTaxrev_iter(iteration,t,regi)) gt 0.001,
s80_bool = 0;
p80_messageShow("taxconv") = YES;
);
Expand Down

0 comments on commit 7085fc0

Please sign in to comment.