-
Notifications
You must be signed in to change notification settings - Fork 150
PermitTrading #2285
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
base: develop
Are you sure you want to change the base?
PermitTrading #2285
Changes from all commits
97a0b63
fefe984
ba18b2b
f4af591
3b0ad2a
da2b1a6
850ba8e
39514eb
cbe2936
fb71353
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| *** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) | ||
| *** | authors, and contributors see CITATION.cff file. This file is part | ||
| *** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
| *** | AGPL-3.0, you are granted additional permissions described in the | ||
| *** | REMIND License Exception, version 1.0 (see LICENSE file). | ||
| *** | Contact: remind@pik-potsdam.de | ||
| *** SOF ./modules/41_emicapregi/TradingOnRef/bounds.gms | ||
| *** calculate emission cap in absolute terms | ||
| vm_perm.fx(t,regi) = p41_co2eq(t,regi); | ||
|
|
||
| display vm_perm.up; | ||
|
|
||
| *** deactivate permit trade | ||
| if(cm_permittradescen eq 2, | ||
| vm_Xport.fx(t,regi,"perm") = 0; | ||
| vm_Mport.fx(t,regi,"perm") = 0; | ||
| ); | ||
| *** limited permit trade: limit in terms of share of allocated permits | ||
| if(cm_permittradescen eq 3, | ||
| vm_Xport.fx(t,regi,"perm") = 0; | ||
| vm_Xport.up(t,regi,"perm") $ (t.val > 2025 and t.val <= cm_permitTradeFinalYr) = cm_permitTradeRatio * abs(p41_co2eq(t,regi)); | ||
| vm_Mport.fx(t,regi,"perm") = 0; | ||
| vm_Mport.up(t,regi,"perm") $ (t.val > 2025 and t.val <= cm_permitTradeFinalYr) = cm_permitTradeRatio * abs(p41_co2eq(t,regi)); | ||
| ); | ||
lecfab marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| *** EOF ./modules/41_emicapregi/TradingOnRef/bounds.gms | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| *** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) | ||
| *** | authors, and contributors see CITATION.cff file. This file is part | ||
| *** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
| *** | AGPL-3.0, you are granted additional permissions described in the | ||
| *** | REMIND License Exception, version 1.0 (see LICENSE file). | ||
| *** | Contact: remind@pik-potsdam.de | ||
| *** SOF ./modules/41_emicapregi/TradingOnRef/datainput.gms | ||
|
|
||
|
|
||
| *** read in data of cost-optimal reference climate policy run | ||
| *' load CO2 emissions from reference run to assing the allocates permits | ||
|
|
||
| Execute_Loadpoint "input_ref" p41_co2eq_in = vm_emiAll.l; | ||
| p41_co2eq(t, regi) = p41_co2eq_in(t,regi,"co2"); | ||
|
|
||
|
Comment on lines
+14
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it used anywhere or come from the copy paste from AbilityToPay?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I first load the entire emission as intermediate step |
||
|
|
||
| *** initialization of pm_shPermit | ||
| pm_emicapglob(t) = sum(regi, p41_co2eq(t,regi)); | ||
| pm_shPerm(t,regi) = p41_co2eq(t,regi) / pm_emicapglob(t); | ||
|
|
||
lecfab marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| *** EOF ./modules/41_emicapregi/TradingOnRef/datainput.gms | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| *** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) | ||
| *** | authors, and contributors see CITATION.cff file. This file is part | ||
| *** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
| *** | AGPL-3.0, you are granted additional permissions described in the | ||
| *** | REMIND License Exception, version 1.0 (see LICENSE file). | ||
| *** | Contact: remind@pik-potsdam.de | ||
| *** SOF ./modules/41_emicapregi/TradingOnRef/declarations.gms | ||
|
|
||
| variables | ||
| vm_perm(ttot,all_regi) "emission allowances [GtCeq]" | ||
| ; | ||
|
|
||
| parameter | ||
| pm_shPerm(tall, all_regi) "emission permit shares [share]" | ||
| pm_emicapglob(tall) "global emission cap [GtC]" | ||
| p41_co2eq_in(ttot,all_regi,all_enty) "emissions from cost-optimal reference run" | ||
| p41_co2eq(ttot,all_regi) "emissions from cost-optimal reference run" | ||
| ; | ||
|
|
||
| *** EOF ./modules/41_emicapregi/TradingOnRef/declarations.gms |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) | ||
| # | authors, and contributors see CITATION.cff file. This file is part | ||
| # | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
| # | AGPL-3.0, you are granted additional permissions described in the | ||
| # | REMIND License Exception, version 1.0 (see LICENSE file). | ||
| # | Contact: remind@pik-potsdam.de | ||
| name, type, reason | ||
| sm_budgetCO2eqGlob, parameter, ??? | ||
| pm_gdp_gdx, parameter, ??? | ||
| pm_budgetCO2eq, parameter, ??? | ||
| vm_co2eqGlob,input,questionnaire | ||
| cm_emiscen,input,questionnaire | ||
| p41_precorrection_reduction, parameter, ??? | ||
| p41_correct_factor, parameter, ??? | ||
| pm_shPPPMER,input,questionnaire | ||
| pm_pop, parameter, ??? | ||
| pm_gdp,input,questionnaire | ||
| p41_co2eq_bau, parameter, ??? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| *** | (C) 2006-2024 Potsdam Institute for Climate Impact Research (PIK) | ||
| *** | authors, and contributors see CITATION.cff file. This file is part | ||
| *** | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
| *** | AGPL-3.0, you are granted additional permissions described in the | ||
| *** | REMIND License Exception, version 1.0 (see LICENSE file). | ||
| *** | Contact: remind@pik-potsdam.de | ||
| *** SOF ./modules/41_emicapregi/TradingOnRef/realization.gms | ||
|
|
||
| *' @description: Emission caps/permits are allocated according to a reference run | ||
| *' There are three different trade patterns currently available. | ||
| *' cm_permittradescen = 1; !! def = 1 !! regexp = [1-3] | ||
| *' * (1): full permit trade (no restrictions) | ||
| *' * (2): no permit trade (only domestic mitigation) | ||
| *' * (3): limited trade (certain percentage of regional allowances) | ||
| *' for limited trade use cm_pemittradefinalyr to set the final year until permit trading is allowed | ||
| *' with cm_pemittraderatio set the percentage of allowed trade | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see comment for main.gms
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here the switch names that have been updated in main.gms could be updated as well (and everywhere else where they appear =)) |
||
|
|
||
|
|
||
| *####################### R SECTION START (PHASES) ############################## | ||
| $Ifi "%phase%" == "declarations" $include "./modules/41_emicapregi/TradingOnRef/declarations.gms" | ||
| $Ifi "%phase%" == "datainput" $include "./modules/41_emicapregi/TradingOnRef/datainput.gms" | ||
| $Ifi "%phase%" == "bounds" $include "./modules/41_emicapregi/TradingOnRef/bounds.gms" | ||
| *######################## R SECTION END (PHASES) ############################### | ||
| *** EOF ./modules/41_emicapregi/TradingOnRef/realization.gms | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ cm_iteration_max = 100; | |
| ***convergences thresholds - very coarse | ||
| p80_surplusMaxTolerance(tradePe) = 2* 1.5 * sm_EJ_2_TWa; !! convert EJ/yr into internal unit TWa | ||
| p80_surplusMaxTolerance("good") = 2* 100/1000; !! in internal unit, trillion Dollar | ||
| p80_surplusMaxTolerance("perm") = 2* 300 * 12/44 / 1000; !! convert MtCO2eq into internal unit GtC | ||
| p80_surplusMaxTolerance("perm") = 3* 300 * 12/44 / 1000; !! convert MtCO2eq into internal unit GtC | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the actual relative residual permit surplus at convergence in the test runs? Could you share the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So an edge case is e.g. if trade is only allowed for a short period in |
||
| ); | ||
| ); | ||
|
|
||
|
|
@@ -54,12 +54,12 @@ p80_etaXp("perm") = 0.2; | |
|
|
||
| *LB* parameter for Nash price algorithm between different iterations | ||
| p80_etaLT(trade) = 0; | ||
| p80_etaLT("perm") = 0.03; | ||
| p80_etaLT("perm") = 0.04; | ||
|
|
||
| ***These parameters are pretty sensitive. If market surpluses diverge, try higher values (up to 1). If surpluses oscillate, try lower values. | ||
| p80_etaST(tradePe) = 0.3; | ||
| p80_etaST("good") = 0.25; | ||
| p80_etaST("perm") = 0.3; | ||
| p80_etaST("perm") = 0.8; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I understand these I wonder:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, I had the issue that the surplus was too high and the permit price did not change enough to motivate adjustments. I did not have the issue of oscillation in my runs. |
||
|
|
||
| $ifi %banking% == "banking" p80_etaST("perm") = 0.2; !! in banking mode, the permit market reacts more sensitively. | ||
| $ifi %emicapregi% == "budget" p80_etaST("perm") = 0.25; !! in budget mode, the permit market reacts more sensitively. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the existing names of "permit trades scenarios" a little confusing, in the sense that we would always need to refer to the main.gms to understand what they mean. The big undertaking of reactivating permit trade is possibly a good opportunity to simplify that. Two suggestions (either/or):
cm_permittradescen = 0cm_permittradescen, because it is redundant withcm_pemittraderatio(0% for no trade, 100% for full trade, and whatever in-between for limited trade)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I agree! The switch cm_permittradescen was already there and is used in other 41 realizations like PerCapitaConvergence and AbilityToPay. Changing this would require some refactoring there, and currently I don't fully understand the other realizations.
For not having to look into the
main.gmsI copied it also into the realizationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah understood thanks! Would this still make sense to ignore to ignore
cm_permittradescenin your new realisation?Also the new switch names will probably need to be changed in the other realisations too?