vein (version 0.7.8)

emis_cold_td: Estimation of cold start emissions with top-down approach

Description

emis_cold_td estimates cld start emissions with a top-down appraoch. This is, annual or monthly emissions or region. Especifically, the emissions are esitmated for row of the simple feature (row of the spatial feature).

In general was designed so that each simple feature is a region with different average monthly temperature. This funcion, as other in this package, adapts to the class of the input data. providing flexibility to the user.

Usage

emis_cold_td(veh, lkm, ef, efcold, beta, pro_month, params,
  verbose = FALSE)

Arguments

veh

"Vehicles" data-frame or spatial feature, wwhere columns are the age distribution of that vehicle. and rows each simple feature or region. The number of rows is equal to the number of streets link

lkm

Numeric; mileage by the age of use of each vehicle.

ef

Numeric; emission factor with

efcold

Data.frame. When it is a data.frame, each column is for each type of vehicle by age of use, rows are are each simple feature. When you have emission factors for each month, the order should a data.frame ina long format, as rurned by ef_ldv_cold.

beta

Data.frame with the fraction of cold starts. The rows are the fraction for each spatial feature or subregion, the columns are the age of use of vehicle.

pro_month

Numeric; montly profile to distribuite annual mileage in each month.

params

List of parameters; Add columns with information to returning data.frame

verbose

Logical; To show more information

Value

Emissions data.frame

See Also

ef_ldv_cold

Examples

Run this code
# NOT RUN {
# Do not run
euros <- c("V", "V", "IV", "III", "II", "I", "PRE", "PRE")
dt <- matrix(rep(2:25,5), ncol = 12, nrow = 10) # 12 months, 10 rows
row.names(dt) <- paste0("Simple_Feature_", 1:10)
efc <- ef_ldv_cold(ta = dt, cc = "<=1400", f ="G", eu = euros, p = "CO", speed = Speed(34))
efh <- ef_ldv_speed(v = "PC", t = "4S", cc = "<=1400", f = "G",
          eu = euros, p = "CO", speed = Speed(34))
lkm <- units::as_units(18:10, "km")*1000
cold_lkm <- cold_mileage(ltrip = units::as_units(20, "km"), ta = celsius(dt))
names(cold_lkm) <- paste0("Month_", 1:12)
veh_month <- c(rep(8, 1), rep(10, 5), 9, rep(10, 5))
veh <- age_ldv(1:10, agemax = 8)
emis_cold_td(veh = veh, lkm = lkm, ef = efh, efcold = efc[1:10, ],
beta = cold_lkm[,1], verbose = TRUE,)
emis_cold_td(veh = veh, lkm = lkm, ef = efh, efcold = efc[1:10, ],
beta = cold_lkm[,1], verbose = TRUE,
params = list(paste0("data_", 1:10), "moredata"))
aa <- emis_cold_td(veh = veh, lkm = lkm, ef = efh, efcold = efc,
beta = cold_lkm, pro_month = veh_month, verbose = T)
aa <- emis_cold_td(veh = veh, lkm = lkm, ef = efh, efcold = efc,
beta = cold_lkm, pro_month = veh_month, verbose = FALSE,
params = list(paste0("data_", 1:10), "moredata"))
# }

Run the code above in your browser using DataCamp Workspace