| Title: | Prepare EDGE Transport Data for the REMIND model |
|---|---|
| Description: | EDGE-T is a fork of the GCAM transport module https://jgcri.github.io/gcam-doc/energy.html#transportation with a high level of detail in its representation of technological and modal options. It is a partial equilibrium model with a nested multinomial logit structure and relies on the modified logit formulation. Most of the sources are not publicly available. PIK-internal users can find the sources in the distributed file system in the folder `/p/projects/rd3mod/inputdata/sources/EDGE-Transport-Standalone`. |
| Authors: | Johanna Hoppe [aut, cre] (ORCID: <https://orcid.org/0009-0004-6753-5090>), Alois Dirnaichner [aut], Marianna Rottoli [aut], Jarusch Muessel [aut] (ORCID: <https://orcid.org/0000-0002-1857-7866>), Alex K. Hagen [aut] (ORCID: <https://orcid.org/0000-0003-4793-8664>), Robert P. Pietzcker [aut] (ORCID: <https://orcid.org/0000-0002-9403-6711>) |
| Maintainer: | Johanna Hoppe <[email protected]> |
| License: | GPL-3 |
| Version: | 3.22.0 |
| Built: | 2026-10-15 17:28:56 UTC |
| Source: | https://github.com/pik-piam/edgeTransport |
calcEdgeTransportSA() is a wrapper for toolEdgeTransportSA() to make use of
madrat caching.
calcEdgeTransportSA( SSPscen, transportPolScen, isICEban = c(FALSE, FALSE), demScen = c("default", "default"), startyear = 2021, gdxPath = NULL, outputFolder = NULL, isStored = FALSE, isTransportReported = TRUE, isTransportExtendedReported = FALSE, isREMINDinputReported = FALSE, isAnalyticsReported = FALSE, testIterative = FALSE )calcEdgeTransportSA( SSPscen, transportPolScen, isICEban = c(FALSE, FALSE), demScen = c("default", "default"), startyear = 2021, gdxPath = NULL, outputFolder = NULL, isStored = FALSE, isTransportReported = TRUE, isTransportExtendedReported = FALSE, isREMINDinputReported = FALSE, isAnalyticsReported = FALSE, testIterative = FALSE )
SSPscen |
SSP or SDP scenario |
transportPolScen |
EDGE-T transport policy scenario |
isICEban |
optional enabling of ICE ban |
demScen |
Demand scenario, used to apply reduction factors on total demands from the regression |
startyear |
Year after which policy differentiation sets in |
gdxPath |
Path to a GDX file to load price signals from a REMIND run |
outputFolder |
Path to folder for storing output data |
isStored |
Optional saving of intermediate RDS files |
isTransportReported |
Optional transport reporting in MIF format |
isTransportExtendedReported |
Optional extension of transport reporting providing more detailed variables |
isREMINDinputReported |
Optional reporting of REMIND input data |
isAnalyticsReported |
Optional reporting of analytics data (e.g. variables over iterations) |
testIterative |
development setting: make standalone and iterative scripts comparable, sets sectorESdemand = REMINDsectorESdemand and iterations = 1 (cost module) |
Transport input data for REMIND
Jarusch Muessel, Johanna Hoppe, Alex K. Hagen
Check a data.table for NAs and duplicates and throw an error if needed
checkForNAsDups(dt, varname, codePosition)checkForNAsDups(dt, varname, codePosition)
dt |
data.table to be checked |
varname |
name of the variable |
codePosition |
position in the code to find the bug |
Johanna Hoppe
List associated univocalNames for any entry of the decision tree
getFilterEntriesUnivocalName(categories, decisionTree)getFilterEntriesUnivocalName(categories, decisionTree)
categories |
vector of categories to filter |
decisionTree |
decision tree that contains the univocalNames associated to the category |
list of categories and their associated univocalNames e.g. trn_pass as list entry containing a vector c("Compact Car", "HSR", ..)
Johanna Hoppe
Run in the REMIND output folder in between iterations
iterativeEdgeTransport()iterativeEdgeTransport()
Johanna Hoppe, Alex K. Hagen
The adjustment is based on the relative differences of our FE model projections in 2020 to the FE IEA data averaged over five years. In addition, the deviation in 2020 is corrected for earlier diferences between IEA data and model projections, such that only the decrease in deviation due to covid is regarded here. The final differences used for this correction are stored in inst/extdata/IEAdemandDifferencesCovid.csv For more context, the full data and calculations can be found in /p/projects/edget/adjustmentDataFiles/IEAdemandDifferencesCovid_compHistoricREMIND.xlsx
toolAdjustDemandCovid(demandData)toolAdjustDemandCovid(demandData)
demandData |
the energy service demand on CES level: trn_aviation_intl, trn_shipping_intl, trn_freight, trn_pass |
The demand projections are constantly shifted by an absolute difference from 2020 onwards
This function is applied in toolDemandRegression() directly after the regression calculation as a default
demandData adjusted for the decrease in demand related to covid
Apply ICE ban on vehicle types that feature preference factors
toolApplyICEbanOnPreferences(preferenceTab, helpers, ICEbanYears)toolApplyICEbanOnPreferences(preferenceTab, helpers, ICEbanYears)
preferenceTab |
data.table including preferences for all levels of the decision tree |
helpers |
list of helpers |
ICEbanYears |
sequence of years in which ICEban is applied |
Preferences in accordance to the ICE ban policy
Johanna Hoppe, Alex K. Hagen
Applies two different temporal resolutions on a data.table object in the edgeTransport data structure and do a linear approximination for the highRes data that is not available
toolApplyMixedTimeRes(data, helpers, idcols = NULL)toolApplyMixedTimeRes(data, helpers, idcols = NULL)
data |
data.table containing data in in the edgeTransport data structure (at least featuring univocalName, period, value) |
helpers |
list containing several helpers used throughout the model. It includes dtTimeRes, a data.table containing the temporal resolution for different univocalNames |
idcols |
optional supply of idcols for using approx_dt |
data.table
Johanna Hoppe
Apply scenario specific adjustments to the preference trends
toolApplyScenPrefTrends( baselinePrefTrends, scenParPrefTrends, GDPpcMER, allEqYear, GDPcutoff, helpers )toolApplyScenPrefTrends( baselinePrefTrends, scenParPrefTrends, GDPpcMER, allEqYear, GDPcutoff, helpers )
baselinePrefTrends |
Baseline preference trends |
scenParPrefTrends |
Scenario parameters to be applied on the preference trends |
GDPpcMER |
Per capita GDP based on market exchange rate |
allEqYear |
Year after which scenario differentiation sets in |
GDPcutoff |
Threshold used to categorize countries into different mitigation groups based on their GDP |
helpers |
List containing several helpers used throughout the model |
Scenario specific preference trends
Johanna Hoppe, Alex K. Hagen
Apply demand scenario specific adjustments to the energy intensity
toolApplyScenSpecEnInt(enInt, scenParEnergyIntensity, allEqYear, helpers)toolApplyScenSpecEnInt(enInt, scenParEnergyIntensity, allEqYear, helpers)
enInt |
Energy intensity input data supplied by mrtransport |
scenParEnergyIntensity |
Transport policy scenario specific energy intensity improvement factors |
allEqYear |
Year after which scenario differentiation sets in |
helpers |
List with helpers |
data.table with scenario specific energy intensity input data
Johanna Hoppe, Alex K. Hagen
Apply demand scenario specific adjustments to the load Factor
toolApplyScenSpecLoadFactor(loadFactor, scenParLoadFactor, allEqYear, helpers)toolApplyScenSpecLoadFactor(loadFactor, scenParLoadFactor, allEqYear, helpers)
loadFactor |
load factor input data supplied by mrtransport |
scenParLoadFactor |
Scenario specific parameters to be applied on the baseline load factor |
allEqYear |
Year after which scenario differentiation sets in |
helpers |
List with helpers |
Scenario specific load factor
Johanna Hoppe, Alex K. Hagen
Derives filterEntries (associated univocalNames per category) and the mixed temporal resolution, then collects them together with the structural mappings into the helpers list used throughout the model. Shared by toolLoadInputs() (full input preparation) and toolReLoadInputs() (reload from RDS in iterative mode) so that the two paths cannot drift apart.
toolBuildHelpers(decisionTree, timeResDataBase)toolBuildHelpers(decisionTree, timeResDataBase)
decisionTree |
data.table of the full edgeTransport decision tree |
timeResDataBase |
data.table with univocalName and period used to derive the temporal resolution (see toolDeriveTimeRes()) |
list of helpers used throughout the model
Alex K. Hagen
Calculate annuity for different vehicle types
toolCalculateAnnuity(annuityCalc, helpers)toolCalculateAnnuity(annuityCalc, helpers)
annuityCalc |
input data for interest rate and service Life from edgeTransport |
helpers |
list with helpers |
Johanna Hoppe
This function calculates the fleet composition based on the energy service demand, the composition of new sales each year and the service life of vehicles. With the help of the annual mileage, the absolute numbers of vehicles is calculated. If the remaining stock is sufficient to meet the energy service demand, 10
toolCalculateFleetComposition( ESdemandFVsalesLevel, vehDepreciationFactors, vehSalesAndModeShares, annualMileage, loadFactor, helpers )toolCalculateFleetComposition( ESdemandFVsalesLevel, vehDepreciationFactors, vehSalesAndModeShares, annualMileage, loadFactor, helpers )
ESdemandFVsalesLevel |
Energy service demand on fuel vehicle level for new sales |
vehDepreciationFactors |
Factors for the depreciation of vehicles in each year of the maximum service Life |
vehSalesAndModeShares |
Vehicle sales and mode shares for the decision tree |
annualMileage |
Annual kilometers driven by a vehicle |
loadFactor |
Persons or tons loaded on each vehicle |
helpers |
List of helpers |
list of fleet composition data
Johanna Hoppe
Calculate eneryg service demand on fuel vehicle level
toolCalculateFVdemand( sectorESdemand, salesAndModeShares, helpers, histESdemand = NULL, baseYear = NULL )toolCalculateFVdemand( sectorESdemand, salesAndModeShares, helpers, histESdemand = NULL, baseYear = NULL )
sectorESdemand |
energy service demand on CES node level |
salesAndModeShares |
vehicle sales and mode shares |
helpers |
List with helpers |
histESdemand |
historcial energy service demand for iterative EDGE-T |
baseYear |
ned year of historical energy service demand |
data.table
Johanna Hoppe
Apply regional differences for inconvenience cost start values based on ICE cost differences
toolCalculateInitialIncoCost( combinedCost, incoCostStartVal, annuity, loadFactor, annualMileage, helpers )toolCalculateInitialIncoCost( combinedCost, incoCostStartVal, annuity, loadFactor, annualMileage, helpers )
combinedCost |
total cost of ownership |
incoCostStartVal |
start values for inconvenience costs |
annuity |
calculated annuity for different vehicle types |
loadFactor |
load factor data |
annualMileage |
annual mileage data |
helpers |
list with helpers |
data.table including initial inconvenience costs from 1990-2020 for LDV 4W US$/(p|t)km
Johanna Hoppe
Calculate vehicle depreciation factors for fleet tracking
toolCalculateVehicleDepreciationFactors(annuityCalc, helpers)toolCalculateVehicleDepreciationFactors(annuityCalc, helpers)
annuityCalc |
parameters for annualization |
helpers |
list with helpers |
data.table including vehicle depreciation factors over service life#'
Johanna Hoppe
Calibrate the logit share weights to historical data.
toolCalibratePreferences( sharesToBeCalibrated, combinedCosts, timeValueCost, lambdas, helpers )toolCalibratePreferences( sharesToBeCalibrated, combinedCosts, timeValueCost, lambdas, helpers )
sharesToBeCalibrated |
Shares at each level of the decision tree for which preferences are to be calibrated |
combinedCosts |
Annualized total cost of ownership |
timeValueCost |
Time value cost for passenger transport modes |
lambdas |
Exponents for discrete choice function |
helpers |
list with helpers |
data.table with calibrated historical preferences
Checks whether data is complete for all levels of decision tree
toolCheckAllLevelsComplete(data, decisionTree, name)toolCheckAllLevelsComplete(data, decisionTree, name)
data |
data.table containing data in all levels format that should be checked |
decisionTree |
data.table containing full edgeTransport decision Tree |
name |
name of variable to be checked |
data.table
Johanna Hoppe
Function that converts CAPEX and OPEX into US$/(p|t)km and provides them combined in a structured format
toolCombineCAPEXandOPEX( CAPEXtrackedFleet, nonFuelOPEXtrackedFleet, CAPEXother, nonFuelOPEXother, fuelCosts, subsidies, energyIntensity, loadFactor, annualMileage, annuity, helpers )toolCombineCAPEXandOPEX( CAPEXtrackedFleet, nonFuelOPEXtrackedFleet, CAPEXother, nonFuelOPEXother, fuelCosts, subsidies, energyIntensity, loadFactor, annualMileage, annuity, helpers )
CAPEXtrackedFleet |
CAPEX data for vehicle types that feature fleet tracking: Cars, trucks, busses |
nonFuelOPEXtrackedFleet |
non-fuel OPEX data for vehicle types that feature fleet tracking: Cars, trucks, busses |
CAPEXother |
CAPEX data for other vehicle types |
nonFuelOPEXother |
non-fuel OPEX data for other vehicle types |
fuelCosts |
fuel cost data |
subsidies |
purchase price subsidy data |
energyIntensity |
energy intensity data |
loadFactor |
load factor data |
annualMileage |
annual mileage data |
annuity |
calculated annuity for different vehicle types |
helpers |
list with helpers |
data.table including total costs of ownership in US$/(p|t)km
Function that converts CAPEX and OPEX into US$/(p|t)km and provides them combined in a structured format
toolCombineCAPEXandOPEXiterative( CAPEXandNonFuelOPEX, fuelCosts, energyIntensity, loadFactor, annualMileage, helpers )toolCombineCAPEXandOPEXiterative( CAPEXandNonFuelOPEX, fuelCosts, energyIntensity, loadFactor, annualMileage, helpers )
CAPEXandNonFuelOPEX |
non-fuel OPEX and CAPEX data as combined in the previous EDGET run and loaded from RDS file |
fuelCosts |
updated fuel cost from REMIND |
energyIntensity |
energy intensity data |
loadFactor |
load factor data |
annualMileage |
annual mileage data |
helpers |
list with helpers |
data.table including total costs of ownership in US$/(p|t)km
Energy service demand projection
toolDemandRegression( historicalESdemand, GDPperCapitaPPP, POP, genParDemRegression, scenParDemRegression, scenParRegionalDemRegression, scenParDemandFactors, baseYear, allEqYear, helpers )toolDemandRegression( historicalESdemand, GDPperCapitaPPP, POP, genParDemRegression, scenParDemRegression, scenParRegionalDemRegression, scenParDemandFactors, baseYear, allEqYear, helpers )
historicalESdemand |
Historical energy service demand |
GDPperCapitaPPP |
GDP per capita based on purchase power parity |
POP |
Population data |
genParDemRegression |
General regression factors |
scenParDemRegression |
Scenario specific general regression factors |
scenParRegionalDemRegression |
Scenario specific regionally differentiated regression factors |
scenParDemandFactors |
Demand scenario factors |
baseYear |
End year of historical energy service demand data |
allEqYear |
Start year of scenario differentiation |
helpers |
list with helpers |
Scenario specific energy service demand for all model years on CES level
Johanna Hoppe
Vehicle types that feature fleet tracking are resolved annually (highRes), all other modes use a coarser resolution (lowTimeRes). The split is based on which univocalNames provide data for the full set of highRes periods. Shared by toolLoadInputs() and toolReLoadInputs() so the full-load and reload paths cannot drift apart.
toolDeriveTimeRes(dt)toolDeriveTimeRes(dt)
dt |
data.table containing at least univocalName and period columns (e.g. energy intensity data) that spans the full temporal resolution of the model |
list with dtTimeRes (unique univocalName/period combinations) and lowTimeRes (the coarse resolution periods)
Johanna Hoppe, Alex K. Hagen
Function that traverses each level of the decision tree and calculates the shares according to the discrete choice approach
toolDiscreteChoice(input, lambdasDiscreteChoice, updatedEndoCosts, helpers)toolDiscreteChoice(input, lambdasDiscreteChoice, updatedEndoCosts, helpers)
input |
dataset for discrete choice module |
lambdasDiscreteChoice |
lambdas from the general model parameters |
updatedEndoCosts |
updated endogenous costs |
helpers |
list of helpers |
calculated shares
Johanna Hoppe
The Edge Transport Model includes the transport specific input data preparation, a choice model to determine transport mode and technology shares, a demand regression and a fleet tracking for cars, busses and trucks
toolEdgeTransportSA( SSPscen, transportPolScen, isICEban = c(FALSE, FALSE), demScen = c("default", "default"), startyear = 2021, gdxPath = NULL, outputFolder = NULL, isStored = TRUE, isTransportReported = TRUE, isTransportExtendedReported = FALSE, isREMINDinputReported = FALSE, isAnalyticsReported = FALSE, testIterative = FALSE )toolEdgeTransportSA( SSPscen, transportPolScen, isICEban = c(FALSE, FALSE), demScen = c("default", "default"), startyear = 2021, gdxPath = NULL, outputFolder = NULL, isStored = TRUE, isTransportReported = TRUE, isTransportExtendedReported = FALSE, isREMINDinputReported = FALSE, isAnalyticsReported = FALSE, testIterative = FALSE )
SSPscen |
SSP or SDP scenarios |
transportPolScen |
EDGE-T transport policy scenarios |
isICEban |
optional enabling of ICE ban |
demScen |
Demand scenarios, used to apply reduction factors on total demands from the regression |
startyear |
First time point in which policy differentiation sets in, cm_startyear in REMIND |
gdxPath |
Path to a GDX file to load price signals from a REMIND run |
outputFolder |
Path to folder for storing output data |
isStored |
Optional saving of intermediate RDS files |
isTransportReported |
Optional transport reporting in MIF format |
isTransportExtendedReported |
Optional extension of transport reporting providing more detailed variables |
isREMINDinputReported |
Optional reporting of REMIND input data |
isAnalyticsReported |
Optional reporting of analytics data (e.g. variables over iterations) |
testIterative |
development setting: make standalone and iterative scripts comparable, sets sectorESdemand = REMINDsectorESdemand and iterations = 1 (cost module) |
Transport input data for REMIND
Johanna Hoppe, Jarusch Müßel, Alois Dirnaichner, Marianna Rottoli, Alex K. Hagen
Distribute common parameters to standalone and iterative EDGET script
toolGetCommonParameters(startyear, ICEbanBefore = FALSE, ICEbanAfter = FALSE)toolGetCommonParameters(startyear, ICEbanBefore = FALSE, ICEbanAfter = FALSE)
startyear |
First time point in which policy differentiation sets in, cm_startyear in REMIND |
ICEbanBefore |
Boolean to determine if ICEban is in effect before startyear |
ICEbanAfter |
Boolean to determine if ICEban is in effect from startyear on |
a list of parameters: allEqYear, ICEbanYears, GDPcutoff, baseYear, hybridElecShare
Alex K. Hagen
Read and build the complete structure of the edgeTransport decision tree
toolLoadDecisionTree(regionAggregation = "iso")toolLoadDecisionTree(regionAggregation = "iso")
regionAggregation |
choose one of the different options for regional aggregation (iso|regionCode21|regionCode12) |
data.table of full spatially extended edgeTransport decision tree
Johanna Hoppe
Load all inputs that are required to run the model
toolLoadInputs(SSPscen, transportPolScen, demScen, hybridElecShare, allEqYear)toolLoadInputs(SSPscen, transportPolScen, demScen, hybridElecShare, allEqYear)
SSPscen |
SSP or SDP scenarios |
transportPolScen |
EDGE-T transport policy scenarios |
demScen |
Demand scenario, used to apply reduction factors on total demands from the regression |
hybridElecShare |
Share of electricity in Hybrid electric vehicles |
allEqYear |
Year after which scenario differentiation sets in, last year in which scenarios are the same |
list with different input data sets
Johanna Hoppe, Alex K. Hagen
Load GDP and Population data from mrdrivers
toolLoadmrdriversData(SSPscen, helpers, allEqYear)toolLoadmrdriversData(SSPscen, helpers, allEqYear)
SSPscen |
SSP scenarios for which the mrdrivers input data shall be loaded |
helpers |
list containing several helpers used throughout the model. It includes dtTimeRes, a data.table containing the temporal resolution for different univocalNames |
allEqYear |
Year after which policy differentiation sets in |
list of data.tables containing mrdrivers input data
Load input data from the mrtransport package
toolLoadmrtransportData(SSPscen = "SSP2")toolLoadmrtransportData(SSPscen = "SSP2")
SSPscen |
SSP scenario for which the mrtransport input data should be loaded |
list of data.tables with the mrtransport input data
Load input data from the edgeTransport package and choose data according to SSP and transport policy scenario
toolLoadPackageData(SSPs, transportPolS, demScenario = NULL)toolLoadPackageData(SSPs, transportPolS, demScenario = NULL)
SSPs |
SSP scenarios for which the package data should be loaded |
transportPolS |
transport policy scenarios for which the package data should be loaded |
demScenario |
demand scenario for which the package input data should be loaded |
list of data.tables with the package input data
Creates RDS files for iterative REMIND-EDGE runs from csv input files. Existing files are overwritten silently. Does not return anything.
toolLoadRDSinputs(edgeTransportFolder, inputFiles)toolLoadRDSinputs(edgeTransportFolder, inputFiles)
edgeTransportFolder |
directory in the output folder of the REMIND run that stores EDGET RDS files |
inputFiles |
list of filename strings that should be read in |
Load the energy service demand from a REMIND fulldata.gdx on sector level (CES level) in [bn (p|t)km/yr] and the requested temporal resolution
toolLoadREMINDesDemand(gdxPath, helpers)toolLoadREMINDesDemand(gdxPath, helpers)
gdxPath |
path to REMIND fulldata.gdx |
helpers |
list of helpers |
Load fuel prices from a REMIND fulldata.gdx in [US$/MJ] and map them on to the edgeTransport decision tree. The output is provided in the same spatial resolution as the transferred gdx file and the temporal resolution is set according to the param yrs.
toolLoadREMINDfuelCosts( gdxPath, hybridElecShare, helpers, transportFolder = ".", iterationNumber = NULL )toolLoadREMINDfuelCosts( gdxPath, hybridElecShare, helpers, transportFolder = ".", iterationNumber = NULL )
gdxPath |
path to REMIND fulldata.gdx |
hybridElecShare |
Share of electricity in Hybrid electric vehicles |
helpers |
list with helpers |
transportFolder |
folder to search for fuel prices from previous iterations for averaging |
iterationNumber |
iteration number to store fuel costs for later iterations |
fuel costs on technology level
Function to load a parameter set of inconvinience start costs for a specific scenario(combination) from the csv file in the package
toolLoadScenParIncoCost(SSPs, transportPolS)toolLoadScenParIncoCost(SSPs, transportPolS)
SSPs |
SSP scenarios |
transportPolS |
transport policy scenarios |
list with different parameter sets, one for each scenario
Alex K. Hagen
Normalize preferences so that the maximum in each branch of the decision tree equals 1
toolNormalizePreferences(preferenceTab)toolNormalizePreferences(preferenceTab)
preferenceTab |
data.table including preferences for all levels of the decision tree |
Normalized preferences
Johanna Hoppe
sort data.table according to edgeTransport data structure and check for NAs If checkCompletness is activated it is further checked, if the full data set is provided. In case of fleetVars == TRUE the full data set is reduced to the vehicle types that feature fleet tracking
toolOrderandCheck( data, decisionTree, yrs = NULL, checkCompleteness = FALSE, fleetVars = FALSE )toolOrderandCheck( data, decisionTree, yrs = NULL, checkCompleteness = FALSE, fleetVars = FALSE )
data |
data.table containing data in all levels format that should be checked |
decisionTree |
data.table containing full edgeTransport decision Tree |
yrs |
temporal resolution |
checkCompleteness |
if activated it is further checked, if the full data set is provided |
fleetVars |
if activated the full data set is reduced to vehicle types that feature fleet tracking |
data.table
Johanna Hoppe
Applies the scenario specific changes to the raw input data, calibrates the historical preferences from the historical energy service demand and assembles the preference trends (calibrated + scenario specific, mixed time resolution, optional ICE ban, normalized). Shared by toolEdgeTransportSA() (standalone) and iterativeEdgeTransport() (first call in a REMIND run) so that the two paths cannot drift apart.
toolPrepareAndCalibrateModelInput( genModelPar, scenModelPar, inputDataRaw, commonParams, isICEban, helpers )toolPrepareAndCalibrateModelInput( genModelPar, scenModelPar, inputDataRaw, commonParams, isICEban, helpers )
genModelPar |
General model parameters |
scenModelPar |
Transport scenario (SSPscen + demScen + polScen) specific model parameters |
inputDataRaw |
Raw input data, including the (deaggregated) REMINDfuelCosts |
commonParams |
List of common parameters from toolGetCommonParameters(), supplying allEqYear, GDPcutoff and ICEbanYears |
isICEban |
Vector of length two indicating an ICE ban before/after the startyear |
helpers |
List with helpers |
The returned inputData is complete for standalone mode. The iterative caller appends CAPEXandNonFuelOPEX, which is returned separately and is the only mode specific entry left. histPrefs is returned because both callers hand it on to storeData(), which writes it to 3_Calibration; nothing else reads it. It is a calibration artefact rather than a scenario input: the calibration runs on historical periods only, and scenario differentiation starts after allEqYear (2020 at the earliest), so in standalone mode the result does not vary with the transport policy scenario. In iterative mode it does, but only through the REMIND fuel costs, which toolLoadREMINDfuelCosts() back-extrapolates from 2025 into the calibration years.
inputData is the interface that both producers of model input must satisfy: this function on the first call, and toolReLoadInputs() on every later REMIND Nash iteration. That is why annualMileage, timeValueCosts and histESdemand travel through inputData instead of being read from inputDataRaw at the point of use - inputDataRaw does not exist on a reload iteration. Keep the members in step with the file list in toolReLoadInputs().
What belongs in inputData, and what does not:
scenario processed data consumed by the model (scenSpecPrefTrends, scenSpecLoadFactor, combinedCAPEXandOPEX, initialIncoCosts)
raw data consumed unchanged by the model (annualMileage, timeValueCosts, histESdemand)
scenSpecEnIntensity and upfrontCAPEXtrackedFleet, which no model function reads; they travel in inputData only so that storeData() writes them to 2_InputDataPolicy
CAPEXandNonFuelOPEX (iterative only), which is persisted to RDS so that the next REMIND Nash iteration can recombine it with the updated fuel costs
Raw inputs that scenario processing supersedes (energyIntensityRaw, loadFactorRaw, the CAPEX and OPEX tables, subsidies) and the driver data (GDP, population) stay out of inputData. They are read from inputDataRaw where they are needed - by toolPrepareScenInputData() inside this function and by toolDemandRegression() in the caller - and reach the output path from inputDataRaw.
Note on regional resolution: the function is agnostic to the number of regions. In iterative mode the REMIND fuel costs must already be deaggregated to 21 regions and appended to inputDataRaw before this function is called, since they enter the cost combination and thereby the preference calibration.
List with inputData, the calibrated historical preferences (histPrefs) and CAPEXandNonFuelOPEX, which only the iterative caller needs
Alex K. Hagen
Format all cost components
toolPrepareDataEndogenousCosts(inputData, lambdas, helpers)toolPrepareDataEndogenousCosts(inputData, lambdas, helpers)
inputData |
List containing inputData |
lambdas |
exponents for discrete choice calculation |
helpers |
List with helpers |
data.table including all cost components
Johanna Hoppe
Apply transport scenario specific adjustments to input data
toolPrepareScenInputData( genModelPar, scenModelPar, inputDataRaw, allEqYear, GDPcutoff, helpers )toolPrepareScenInputData( genModelPar, scenModelPar, inputDataRaw, allEqYear, GDPcutoff, helpers )
genModelPar |
General model parameters |
scenModelPar |
Transport scenario (SSPscen + demScen + polScen) specific model parameters |
inputDataRaw |
Raw input data |
allEqYear |
Year after which scenario differentiation sets in |
GDPcutoff |
GDP cutoff to differentiate between regions |
helpers |
List with helpers |
List of data.tables with scenario specific input data
Johanna Hoppe
called from iterativeEdgeTransport() reloads scenario specific inputData from RDS files in EDGE-T folder instead of generation via mrtransport
toolReLoadInputs(edgeTransportFolder)toolReLoadInputs(edgeTransportFolder)
edgeTransportFolder |
folder where the RDS files from last iterativeEdgeTransport() run are stored |
list with different input data sets
Alex K. Hagen
Function to rename scenarios between REMIND and EDGE-Transport naming conventions It is used at the interfaces REMIND-EDGETiterative, EDGETiterative-REMIND The same translations have to be done in mrremind readEDGETransport for REMIND input data generation
toolTranslateTransportScenario( demScen, transportPolScen, direction = c("EDGEtoREMIND", "REMINDtoEDGE") )toolTranslateTransportScenario( demScen, transportPolScen, direction = c("EDGEtoREMIND", "REMINDtoEDGE") )
demScen |
demand scenario, if demScen is in mapping it will be translated otherwise returned unchanged |
transportPolScen |
transport policy scenario if transportPolScen is in mapping it will be translated otherwise returned unchanged |
direction |
one of two labels indicating the direction of the translation |
list of translated demScen and transportPolScen in the desired model name logic
Alex K. Hagen
Function that aggregates the data for the next higher level of the decision tree
toolTraverseDecisionTree(data, upperLevel, decisionTree)toolTraverseDecisionTree(data, upperLevel, decisionTree)
data |
data.table containing the data of the lower level |
upperLevel |
name of the upper level in the decision tree |
decisionTree |
full edgeTransport decision tree |
data.table
Johanna Hoppe
Provides updates for endogenous cost components e.g. inconvenience costs for cars
toolUpdateEndogenousCosts( dataEndoCosts, depreciationFactors, scenParIncoCost, allEqYear, timeValue, preferences, lambdas, helpers, isICEban, ICEbanYears, vehiclesPerTech = NULL )toolUpdateEndogenousCosts( dataEndoCosts, depreciationFactors, scenParIncoCost, allEqYear, timeValue, preferences, lambdas, helpers, isICEban, ICEbanYears, vehiclesPerTech = NULL )
dataEndoCosts |
data.table containing all cost components for cars over the full range of policy years in a yearly resolution. Exogenous CAPEX and OPEX are provided over the full range. Endogenous cost components and FS3 shares are provided until 2020. Rest is filled with NA. |
depreciationFactors |
data.table containing vehicle depreciation factor for each year of service Life |
scenParIncoCost |
data.table containing scenario specific parameters for inconvenience costs policy mask |
allEqYear |
year from which scenario-specific differentiation begins |
timeValue |
data.table containing mode specific time value costs based on speed and gdp |
preferences |
preference factor trends |
lambdas |
data.table containing exponents for discrete choice calculation |
helpers |
list containing helpers like mappings, decisionTree etc. |
isICEban |
optional enabling of ICE ban |
ICEbanYears |
sequence of years in which ICEban is applied |
vehiclesPerTech |
data.table containing total number of vehicles for all years and regions |
list containing data.table with endogenous cost components over the full time span and additional data.tables for model behavior analysis
Johanna Hoppe