Skip to content

Commit

Permalink
BEVPhaseIn reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuessel committed Aug 30, 2024
1 parent b93e9b4 commit 4487684
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 45 deletions.
24 changes: 13 additions & 11 deletions R/toolUpdateEndogenousCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,16 @@ toolUpdateEndogenousCosts <- function(dataEndoCosts,
}

applyICEban <- function(year, currentMask) {
if (year < 2030){
if (year < 2021){
floorCosts <- currentMask
} else if (year == 2030){
floorCosts <- 0.05
} else if (year > 2030 & year <= 2032){
floorCosts <- strangeICEbanFunction(year, 2030, 0.1, 2032, 0.3)
} else if(year > 2032 & year <= 2034){
floorCosts <- strangeICEbanFunction(year, 2032, 0.3, 2034, 0.5)
} else if (year == 2035){
floorCosts <- 0.6
} else if (year > 2035) {
} else if (year >= 2021 & year <= 2030){
floorCosts <- strangeICEbanFunction(year, 2025, 0.08, 2030, 0.19)
} else if (year > 2030 & year < 2035){
floorCosts <- strangeICEbanFunction(year, 2031, 0.2, 2034, 0.6)
} else if(year == 2035){
floorCosts <- 1
} else if (year > 2035) {
floorCosts <- 2
}
return(floorCosts)
}
Expand All @@ -99,6 +97,7 @@ toolUpdateEndogenousCosts <- function(dataEndoCosts,
policyMask <- rbind(policyMask, policyMaskPHEV)
policyMask <- merge(policyMask, helpers$mitigationTechMap[, c("univocalName", "FVvehvar")], all.x = TRUE, allow.cartesian = TRUE)[, FVvehvar := NULL]


# Change policy mask for ICEs when ban is activated
if (isICEban) {
#Ban is applied to EU28 or EUR in case of REMIND running on 12 regions
Expand All @@ -110,8 +109,11 @@ toolUpdateEndogenousCosts <- function(dataEndoCosts,
policyMask <- rbind(policyMask[!(technology %in% c("Gases", "Hybrid electric") & region %in% affectedRegions)],
copy(policyMaskICEban)[, technology := "Hybrid electric"], copy(policyMaskICEban)[, technology := "Gases"])
setkey(policyMask, region, period, technology)
dt <- policyMask
after <- policyMask

policyMask[technology %in% c("Liquids", "Gases", "Hybrid electric") & region %in% affectedRegions,
policyMask := applyICEban(period, policyMask), by = c("period")]
policyMask := max(policyMask, applyICEban(period, policyMask)), by = c("period")]
}

#check whether policy mask is calculated correctly for respective technologys
Expand Down
48 changes: 31 additions & 17 deletions inst/extdata/genParIncoCostStartVal.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
region;incoCostType;FVvehvar;technology;unit;1990;2005;2010;2020
GLO;Model availability;LDV|4W;BEV;US$2005/veh;100000;100000;100000;10000
GLO;Model availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;69300
GLO;Model availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;69300
GLO;Model availability;LDV|4W;Hybrid electric;US$2005/veh;100000;100000;100000;69300
GLO;Model availability;LDV|4W;BEV;US$2005/veh;100000;100000;100000;13000
GLO;Model availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;70000
GLO;Model availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;80000
GLO;Model availability;LDV|4W;Hybrid electric;US$2005/veh;100000;100000;100000;60000
GLO;ICE inconvenience ;LDV|4W;Liquids;US$2005/veh;0;0;0;0
GLO;Risk aversion;LDV|4W;BEV;US$2005/veh;3800;3800;3800;3800
GLO;Risk aversion;LDV|4W;BEV;US$2005/veh;3800;3800;3800;4000
GLO;Risk aversion;LDV|4W;FCEV;US$2005/veh;3800;3800;3800;3800
GLO;Risk aversion;LDV|4W;Gases;US$2005/veh;3800;3800;3800;3800
GLO;Risk aversion;LDV|4W;Hybrid electric;US$2005/veh;3800;3800;3800;3800
Expand All @@ -13,17 +13,31 @@ GLO;Stations availability;LDV|4W;BEV;US$2005/veh;1000;1000;1000;1000
GLO;Stations availability;LDV|4W;Hybrid electric;US$2005/veh;1000;1000;1000;1000
GLO;Stations availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;100000
GLO;Stations availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;100000
EUR;Model availability;LDV|4W;BEV;US$2005/veh;100000;100000;100000;10000
EUR;Model availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;69300
EUR;Model availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;69300
EUR;Model availability;LDV|4W;Hybrid electric;US$2005/veh;100000;100000;100000;69300
EUR;Model availability;LDV|4W;BEV;US$2005/veh;100000;100000;100000;11000
EUR;Model availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;70000
EUR;Model availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;80000
EUR;Model availability;LDV|4W;Hybrid electric;US$2005/veh;100000;100000;100000;60000
EUR;ICE inconvenience;LDV|4W;Liquids;US$2005/veh;0;0;0;0
EUR;Risk aversion;LDV|4W;BEV;US$2005/veh;3800;3800;3800;3800
EUR;Risk aversion;LDV|4W;FCEV;US$2005/veh;3800;3800;3800;3800
EUR;Risk aversion;LDV|4W;Gases;US$2005/veh;3800;3800;3800;3800
EUR;Risk aversion;LDV|4W;Hybrid electric;US$2005/veh;3800;3800;3800;3800
EUR;Range anxiety;LDV|4W;BEV;US$2005/veh;100000;100000;100000;65000
EUR;Stations availability;LDV|4W;BEV;US$2005/veh;1000;1000;1000;1000
EUR;Risk aversion;LDV|4W;BEV;US$2005/veh;3800;3800;3800;4500
EUR;Risk aversion;LDV|4W;FCEV;US$2005/veh;3800;3800;3800;5000
EUR;Risk aversion;LDV|4W;Gases;US$2005/veh;3800;3800;3800;7000
EUR;Risk aversion;LDV|4W;Hybrid electric;US$2005/veh;3800;3800;3800;3000
EUR;Range anxiety;LDV|4W;BEV;US$2005/veh;100000;100000;100000;70000
EUR;Stations availability;LDV|4W;BEV;US$2005/veh;1000;1000;1000;2000
EUR;Stations availability;LDV|4W;Hybrid electric;US$2005/veh;1000;1000;1000;1000
EUR;Stations availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;100000
EUR;Stations availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;100000
EUR;Stations availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;120000
EUR;Stations availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;160000
CHA;Model availability;LDV|4W;BEV;US$2005/veh;100000;100000;100000;9000
CHA;Model availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;70000
CHA;Model availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;80000
CHA;Model availability;LDV|4W;Hybrid electric;US$2005/veh;100000;100000;100000;50000
CHA;ICE inconvenience ;LDV|4W;Liquids;US$2005/veh;0;0;0;0
CHA;Risk aversion;LDV|4W;BEV;US$2005/veh;3800;3800;3800;3800
CHA;Risk aversion;LDV|4W;FCEV;US$2005/veh;3800;3800;3800;3800
CHA;Risk aversion;LDV|4W;Gases;US$2005/veh;3800;3800;3800;3800
CHA;Risk aversion;LDV|4W;Hybrid electric;US$2005/veh;3800;3800;3800;3800
CHA;Range anxiety;LDV|4W;BEV;US$2005/veh;100000;100000;100000;60000
CHA;Stations availability;LDV|4W;BEV;US$2005/veh;1000;1000;1000;1000
CHA;Stations availability;LDV|4W;Hybrid electric;US$2005/veh;1000;1000;1000;1000
CHA;Stations availability;LDV|4W;FCEV;US$2005/veh;100000;100000;100000;100000
CHA;Stations availability;LDV|4W;Gases;US$2005/veh;100000;100000;100000;100000
34 changes: 17 additions & 17 deletions inst/extdata/scenParIncoCost.csv
Original file line number Diff line number Diff line change
Expand Up @@ -273,36 +273,36 @@ SSP2EU;HydrHype4;LDV|4W;Liquids;targetYear;2027
SSP2EU;HydrHype4;LDV|4W;Liquids;targetValue;0.2
SSP2EU;HydrHype4;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix1;LDV|4W;BEV;startYear;2025
SSP2EU;Mix1;LDV|4W;BEV;startValue;0.5
SSP2EU;Mix1;LDV|4W;BEV;startValue;1.2
SSP2EU;Mix1;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix1;LDV|4W;BEV;targetValue;0
SSP2EU;Mix1;LDV|4W;Liquids;startYear;2020
SSP2EU;Mix1;LDV|4W;Liquids;targetYear;2027
SSP2EU;Mix1;LDV|4W;Liquids;startYear;2022
SSP2EU;Mix1;LDV|4W;Liquids;targetYear;2030
SSP2EU;Mix1;LDV|4W;Liquids;targetValue;0
SSP2EU;Mix1;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix2;LDV|4W;BEV;startYear;2025
SSP2EU;Mix2;LDV|4W;BEV;startValue;0.65
SSP2EU;Mix2;LDV|4W;BEV;startValue;0.8
SSP2EU;Mix2;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix2;LDV|4W;BEV;targetValue;0.15
SSP2EU;Mix2;LDV|4W;Liquids;startYear;2023
SSP2EU;Mix2;LDV|4W;Liquids;targetYear;2027
SSP2EU;Mix2;LDV|4W;Liquids;targetValue;0.01
SSP2EU;Mix2;LDV|4W;Liquids;startYear;2022
SSP2EU;Mix2;LDV|4W;Liquids;targetYear;2030
SSP2EU;Mix2;LDV|4W;Liquids;targetValue;0.1
SSP2EU;Mix2;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix3;LDV|4W;BEV;startYear;2025
SSP2EU;Mix3;LDV|4W;BEV;startValue;0.5
SSP2EU;Mix3;LDV|4W;BEV;startValue;0.4
SSP2EU;Mix3;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix3;LDV|4W;BEV;targetValue;0.1
SSP2EU;Mix3;LDV|4W;Liquids;startYear;2020
SSP2EU;Mix3;LDV|4W;Liquids;targetYear;2045
SSP2EU;Mix3;LDV|4W;Liquids;targetValue;0.7
SSP2EU;Mix3;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix3;LDV|4W;BEV;targetValue;0
SSP2EU;Mix3;LDV|4W;Liquids;startYear;2022
SSP2EU;Mix3;LDV|4W;Liquids;targetYear;2055
SSP2EU;Mix3;LDV|4W;Liquids;targetValue;0.5
SSP2EU;Mix3;LDV|4W;Hybrid electric;ratioPHEV;1
SSP2EU;Mix4;LDV|4W;BEV;startYear;2025
SSP2EU;Mix4;LDV|4W;BEV;startValue;1
SSP2EU;Mix4;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix4;LDV|4W;BEV;startValue;0.1
SSP2EU;Mix4;LDV|4W;BEV;targetYear;2045
SSP2EU;Mix4;LDV|4W;BEV;targetValue;0
SSP2EU;Mix4;LDV|4W;Liquids;startYear;2023
SSP2EU;Mix4;LDV|4W;Liquids;startYear;2022
SSP2EU;Mix4;LDV|4W;Liquids;targetYear;2055
SSP2EU;Mix4;LDV|4W;Liquids;targetValue;0.1
SSP2EU;Mix4;LDV|4W;Liquids;targetValue;0.8
SSP2EU;Mix4;LDV|4W;Hybrid electric;ratioPHEV;1.5
SSP2EU;NAV_act;LDV|4W;BEV;startYear;2025
SSP2EU;NAV_act;LDV|4W;BEV;startValue;0.5
Expand Down

0 comments on commit 4487684

Please sign in to comment.