Skip to content
Snippets Groups Projects
Unverified Commit c7c13595 authored by Lavinia Baumstark's avatar Lavinia Baumstark Committed by GitHub
Browse files

Merge pull request #194 from MariannaR/inconv_comp

Updates to EDGE-Transport
parents 695a7819 d0523676
No related branches found
No related tags found
No related merge requests found
Showing
with 48687 additions and 47005 deletions
# | (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK) # | (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK)
# | authors, and contributors see CITATION.cff file. This file is part # | 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 # | 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 # | AGPL-3.0, you are granted additional permissions described in the
...@@ -145,6 +145,7 @@ cfg$gms$CDR <- "DAC" # def = DAC ...@@ -145,6 +145,7 @@ cfg$gms$CDR <- "DAC" # def = DAC
# ***--------------------- 35_transport ---------------------------------------- # ***--------------------- 35_transport ----------------------------------------
# * (complex): transport realization including electricity in the transport sector (*RP*) # * (complex): transport realization including electricity in the transport sector (*RP*)
# * (edge_esm): transport realization with detailed modes/vehicles representation (*AD*, *MR*)
cfg$gms$transport <- "complex" # def = complex cfg$gms$transport <- "complex" # def = complex
# ***--------------------- 36_buildings --------------------------------- # ***--------------------- 36_buildings ---------------------------------
......
title;start;CES_parameters;cm_bioenergy_tax;cm_rcp_scen;cm_iterative_target_adj;subsidizeLearning;c_budgetCO2;carbonprice;cm_co2_tax_2020;cm_peakBudgYr;cm_taxCO2inc_after_peakBudgYr;cm_CO2priceRegConvEndYr;cm_emiscen;cm_earlyreti_rate;cm_fetaxscen;cm_co2_tax_growth;cm_bioenergymaxscen;c_ccsinjecratescen;c_ccscapratescen;techpol;cm_POPscen;cm_GDPscen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;cm_so2tax_scen;cm_multigasscen;cm_OILRETIRE;cm_LU_emi_scen;cm_tradecost_bio;cm_1stgen_phaseout;c_SSP_forcing_adjust;cm_APscen;cm_startyear;CCU;c_shBioTrans;cm_shSynTrans;c_shGreenH2;transport;cm_EDGEtr_scen;capitalMarket;buildings;path_gdx;path_gdx_ref;path_gdx_bau
NDC_ConvCase;0;load;1.5;rcp45;3;globallyOptimal;0;NDC2018;1;2100;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;3;off;SSP2;2;0;forcing_SSP2;SSP2;2015;off;0.05;0;0;edge_esm;ConvCase;perfect;simple;./config/input.gdx;./output/NDC_ConvCase_2020-06-12_15.48.10/fulldata.gdx;./output/NDC_ConvCase_2020-06-12_15.48.10/fulldata.gdx
Budg1100_ConvCase;1;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0;edge_esm;ConvCase;perfect;simple;./config/input.gdx;./output/NDC_ConvCase_2020-06-15_14.17.51/fulldata.gdx;./output/NDC_ConvCase_2020-06-15_14.17.51/fulldata.gdx
NDC_ConvCaseWise;0;load;1.5;rcp45;3;globallyOptimal;0;NDC2018;1;2100;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;3;off;SSP2;2;0;forcing_SSP2;SSP2;2015;off;0.05;0;0;edge_esm;ConvCaseWise;perfect;simple;./config/input.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx
Budg1100_ConvCaseWise;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0;edge_esm;ConvCaseWise;perfect;simple;./config/input.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx
Budg1100_ElecEra;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0;edge_esm;ElecEra;perfect;simple;./config/input.gdx;./output/NDC_ConvCase_2020-06-04_22.24.20/fulldata.gdx;./output/NDC_ConvCase_2020-06-04_22.24.20/fulldata.gdx
Budg1100_ElecEraWise;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0;edge_esm;ElecEraWise;perfect;simple;./config/input.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx
Budg1100_HydrHype;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0.95;edge_esm;HydrHype;perfect;simple;./config/input.gdx;./output/NDC_ConvCase_2020-06-04_22.24.20/fulldata.gdx;./output/NDC_ConvCase_2020-06-04_22.24.20/fulldata.gdx
Budg1100_HydrHypeWise;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;off;0.05;0;0.95;edge_esm;HydrHypeWise;perfect;simple;./config/input.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx
Budg1100_SynSurge;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;on;0.05;0.2;0.95;edge_esm;ConvCase;perfect;simple;./config/input.gdx;./output/Budg1100_SynSurge_2020-06-08_16.04.49/fulldata_39.gdx;./output/Budg1100_SynSurge_2020-06-08_16.04.49/fulldata_39.gdx
Budg1100_SynSurgeWise;0;load;1.5;rcp26;9;globallyOptimal;1100;diffCurvPhaseIn2Lin;100;2080;3;2050;9;0.09;3;1.05;0;5;1;NDC2018;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;on;SSP2;2;0;forcing_SSP2;SSP2;2025;on;0.05;0.2;0.95;edge_esm;ConvCaseWise;perfect;simple;./config/input.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx;./output/NDC_ConvCaseWise_2020-05-28_18.53.25/fulldata.gdx
SSP2-Base;0;load;1.5;none;0;off;0;none;-1;2100;3;2050;1;0.09;3;1.05;0;5;1;none;pop_SSP2;gdp_SSP2;medOil;medGas;medCoal;1;2;1;2;off;SSP2;2;0;forcing_SSP2;SSP2;2005;off;0.05;0;0;edge_esm;ConvCase;perfect;simple;./config/input.gdx;;
...@@ -596,6 +596,11 @@ display p_efFossilFuelExtr; ...@@ -596,6 +596,11 @@ display p_efFossilFuelExtr;
pm_dataren(regi,"nur",rlf,te) = f_datarenglob("nur",rlf,te); pm_dataren(regi,"nur",rlf,te) = f_datarenglob("nur",rlf,te);
pm_dataren(regi,"maxprod",rlf,te) = sm_EJ_2_TWa * f_datarenglob("maxprod",rlf,te); pm_dataren(regi,"maxprod",rlf,te) = sm_EJ_2_TWa * f_datarenglob("maxprod",rlf,te);
$ifthen.edge_esm_transport "%transport%" == "edge_esm"
*** allow for slightly higher geothermal electricity to avoid INFES
pm_dataren(regi,"maxprod","1","geohdr") = 1.01*pm_dataren(regi,"maxprod","1","geohdr");
$endif.edge_esm_transport
*RP* hydro, spv and csp get maxprod for all regions and grades from external file *RP* hydro, spv and csp get maxprod for all regions and grades from external file
table f_maxProdGradeRegiHydro(all_regi,char,rlf) "input of regionalized maximum from hydro [EJ/a]" table f_maxProdGradeRegiHydro(all_regi,char,rlf) "input of regionalized maximum from hydro [EJ/a]"
$ondelim $ondelim
......
...@@ -18,6 +18,14 @@ ...@@ -18,6 +18,14 @@
vm_fuExtr.up(t,regi,"pebios","5")$(t.val ge 2045) = p30_datapebio(regi,"pebios","5","maxprod",t); vm_fuExtr.up(t,regi,"pebios","5")$(t.val ge 2045) = p30_datapebio(regi,"pebios","5","maxprod",t);
vm_fuExtr.up(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t); vm_fuExtr.up(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t);
$ifthen.edge_esm_transport "%transport%" == "edge_esm"
*** Slightly relaxed extraction bounds for biofuels.
vm_fuExtr.up(t,regi,"pebios","5")$(t.val ge 2045) = 1.4*p30_datapebio(regi,"pebios","5","maxprod",t);
vm_fuExtr.up(t,regi,"pebios","5")$(t.val ge 2055) = p30_datapebio(regi,"pebios","5","maxprod",t);
vm_fuExtr.up(t,regi,"pebioil","5")$(t.val ge 2030) = 1.5*p30_datapebio(regi,"pebioil","5","maxprod",t);
vm_fuExtr.up(t,regi,"pebioil","5")$(t.val ge 2050) = p30_datapebio(regi,"pebioil","5","maxprod",t);
$endif.edge_esm_transport
if(cm_1stgen_phaseout=0, if(cm_1stgen_phaseout=0,
vm_fuExtr.lo(t,regi,"pebios","5")$(t.val ge 2030) = p30_datapebio(regi,"pebios","5","maxprod",t)*0.9; vm_fuExtr.lo(t,regi,"pebios","5")$(t.val ge 2030) = p30_datapebio(regi,"pebios","5","maxprod",t)*0.9;
vm_fuExtr.lo(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t)*0.9; vm_fuExtr.lo(t,regi,"pebioil","5")$(t.val ge 2030) = p30_datapebio(regi,"pebioil","5","maxprod",t)*0.9;
......
...@@ -10,7 +10,6 @@ vm_cap.lo(t,regi,"spv","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t, ...@@ -10,7 +10,6 @@ vm_cap.lo(t,regi,"spv","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t,
vm_cap.lo(t,regi,"wind","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t,regi,"wind")*0.001; vm_cap.lo(t,regi,"wind","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t,regi,"wind")*0.001;
vm_cap.lo(t,regi,"tnrs","1")$(t.val lt 2031) = p40_TechBound(t,regi,"tnrs")*0.001; vm_cap.lo(t,regi,"tnrs","1")$(t.val lt 2031) = p40_TechBound(t,regi,"tnrs")*0.001;
vm_cap.lo(t,regi,"hydro","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t,regi,"hydro")*0.001; vm_cap.lo(t,regi,"hydro","1")$(t.val lt 2031 AND t.val gt 2024) = p40_TechBound(t,regi,"hydro")*0.001;
vm_cap.lo(t,regi,"apCarElT","1")$(t.val lt 2041 AND t.val gt 2024) = p40_TechBound(t,regi,"apCarElT");
* FS: in case of a nuclear phase-out scenario (nucscen 7), nuclear lower bound from p40_techBound only up to 2025 * FS: in case of a nuclear phase-out scenario (nucscen 7), nuclear lower bound from p40_techBound only up to 2025
if(cm_nucscen eq 7, if(cm_nucscen eq 7,
...@@ -18,9 +17,10 @@ if(cm_nucscen eq 7, ...@@ -18,9 +17,10 @@ if(cm_nucscen eq 7,
); );
display vm_cap.lo;
$ifthen.complex_transport "%transport%" == "complex" $ifthen.complex_transport "%transport%" == "complex"
vm_cap.lo(t,regi,"apCarElT","1")$(t.val lt 2041 AND t.val gt 2024) = p40_TechBound(t,regi,"apCarElT");
*** additional target for electro mobility, overwriting the general bounds in 35_transport/complex/bounds.gms *** additional target for electro mobility, overwriting the general bounds in 35_transport/complex/bounds.gms
*** requiring higher EV and FC vehicle shares, to mirror efficiency mandates and EV legislation in many countries *** requiring higher EV and FC vehicle shares, to mirror efficiency mandates and EV legislation in many countries
loop(regi, loop(regi,
...@@ -53,4 +53,6 @@ $ifthen.complex_transport "%transport%" == "complex" ...@@ -53,4 +53,6 @@ $ifthen.complex_transport "%transport%" == "complex"
); );
$endif.complex_transport $endif.complex_transport
display vm_cap.lo;
*** EOF ./modules/40_techpol/NDC2018/bounds.gms *** EOF ./modules/40_techpol/NDC2018/bounds.gms
...@@ -81,7 +81,8 @@ vot_data = inputdata$vot_data ...@@ -81,7 +81,8 @@ vot_data = inputdata$vot_data
logit_params = inputdata$logit_params logit_params = inputdata$logit_params
int_dat = inputdata$int_dat int_dat = inputdata$int_dat
nonfuel_costs = inputdata$nonfuel_costs nonfuel_costs = inputdata$nonfuel_costs
capcost4W = inputdata$capcost4W
loadFactor = inputdata$loadFactor
price_nonmot = inputdata$price_nonmot price_nonmot = inputdata$price_nonmot
pref_data = inputdata$pref_data pref_data = inputdata$pref_data
...@@ -104,7 +105,6 @@ pref_data$VS1_final_pref = rbind(prefdata_nonmotV, pref_data$VS1_final_pref) ...@@ -104,7 +105,6 @@ pref_data$VS1_final_pref = rbind(prefdata_nonmotV, pref_data$VS1_final_pref)
## optional average of prices ## optional average of prices
average_prices = FALSE average_prices = FALSE
ES_demand_all = readREMINDdemand(gdx, REMIND2ISO_MAPPING, EDGE2teESmap, REMINDyears, scenario) ES_demand_all = readREMINDdemand(gdx, REMIND2ISO_MAPPING, EDGE2teESmap, REMINDyears, scenario)
## select from total demand only the passenger sm ## select from total demand only the passenger sm
ES_demand = ES_demand_all[sector == "trn_pass",] ES_demand = ES_demand_all[sector == "trn_pass",]
...@@ -131,8 +131,11 @@ if (file.exists(datapath("demand_previousiter.RDS"))) { ...@@ -131,8 +131,11 @@ if (file.exists(datapath("demand_previousiter.RDS"))) {
rebates_febatesBEV = FALSE rebates_febatesBEV = FALSE
} }
nonfuel_costs = applylearning(nonfuel_costs, gdx, REMINDmapping, EDGE2teESmap, demand_learntmp, ES_demandpr, ES_demand, rebates_febatesBEV = rebates_febatesBEV, rebates_febatesFCEV = rebates_febatesFCEV) nonfuel_costs_list = applylearning(nonfuel_costs, capcost4W, gdx, REMINDmapping, EDGE2teESmap, demand_learntmp, ES_demandpr, ES_demand, rebates_febatesBEV = rebates_febatesBEV, rebates_febatesFCEV = rebates_febatesFCEV)
saveRDS(nonfuel_costs, "nonfuel_costs_learning.RDS")} else { nonfuel_costs = nonfuel_costs_list$nonfuel_costs
capcost4W = nonfuel_costs_list$capcost4W
saveRDS(nonfuel_costs, "nonfuel_costs_learning.RDS")
saveRDS(capcost4W, "capcost_learning.RDS")} else {
stations = NULL stations = NULL
} }
...@@ -251,7 +254,6 @@ if (opt$reporting) { ...@@ -251,7 +254,6 @@ if (opt$reporting) {
saveRDS(shares, file = datapath("shares.RDS")) saveRDS(shares, file = datapath("shares.RDS"))
saveRDS(logit_data$EF_shares, file = datapath("EF_shares.RDS")) saveRDS(logit_data$EF_shares, file = datapath("EF_shares.RDS"))
saveRDS(logit_data$mj_km_data, file = datapath("mj_km_data.RDS")) saveRDS(logit_data$mj_km_data, file = datapath("mj_km_data.RDS"))
saveRDS(logit_data$inconv_cost, file=datapath("inco_costs.RDS"))
saveRDS(shares_int_dem$demandF_plot_EJ, saveRDS(shares_int_dem$demandF_plot_EJ,
file=datapath("demandF_plot_EJ.RDS")) file=datapath("demandF_plot_EJ.RDS"))
saveRDS(shares_int_dem$demandF_plot_pkm, saveRDS(shares_int_dem$demandF_plot_pkm,
...@@ -266,7 +268,8 @@ num_veh_stations = calc_num_vehicles_stations( ...@@ -266,7 +268,8 @@ num_veh_stations = calc_num_vehicles_stations(
subsector_L1 == "trn_pass_road_LDV_4W", ## only 4wheelers subsector_L1 == "trn_pass_road_LDV_4W", ## only 4wheelers
c("iso", "year", "sector", "vehicle_type", "technology", "demand_F") ], c("iso", "year", "sector", "vehicle_type", "technology", "demand_F") ],
ES_demand_all = ES_demand_all, ES_demand_all = ES_demand_all,
techswitch = techswitch) techswitch = techswitch,
loadFactor = loadFactor)
## save number of vehicles for next iteration ## save number of vehicles for next iteration
saveRDS(num_veh_stations$learntechdem, datapath("demand_learn.RDS")) saveRDS(num_veh_stations$learntechdem, datapath("demand_learn.RDS"))
...@@ -312,7 +315,16 @@ for (i in names(finalInputs)) { ...@@ -312,7 +315,16 @@ for (i in names(finalInputs)) {
## calculate shares ## calculate shares
finalInputs$shFeCes = finalInputs$demByTech[, value := value/sum(value), by = c("tall", "all_regi", "all_in")] finalInputs$shFeCes = finalInputs$demByTech[, value := value/sum(value), by = c("tall", "all_regi", "all_in")]
## 7 decimals the lowest accepted value
finalInputs$shFeCes[, value := round(value, digits = 7)]
finalInputs$shFeCes[, value := ifelse(value == 0, 1e-7, value)]
finalInputs$shFeCes[, sumvalue := sum(value), by = c("tall", "all_regi", "all_in")]
finalInputs$shFeCes[, maxtech := ifelse(value == max(value), TRUE, FALSE), by =c("tall", "all_regi", "all_in")]
## attribute the variation to the maximum share value
finalInputs$shFeCes[sumvalue!=1 & maxtech==TRUE, value := value + (1-sumvalue), by = c("tall", "all_regi")]
## remove temporary columns
finalInputs$shFeCes[, c("sumvalue", "maxtech") := NULL]
## CapCosts ## CapCosts
writegdx.parameter("p35_esCapCost.gdx", finalInputs$capCost, "p35_esCapCost", writegdx.parameter("p35_esCapCost.gdx", finalInputs$capCost, "p35_esCapCost",
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment