age_moto returns amount of vehicles at each age

age_moto(
x,
name = "age",
a = 0.2,
b = 17,
agemin = 1,
agemax = 50,
k = 1,
bystreet = FALSE,
net,
verbose = FALSE,
namerows,
time
)

## Arguments

x

Numeric; numerical vector of vehicles with length equal to lines features of road network

name

Character; of vehicle assigned to columns of dataframe

a

Numeric; parameter of survival equation

b

Numeric; parameter of survival equation

agemin

Integer; age of newest vehicles for that category

agemax

Integer; age of oldest vehicles for that category

k

Numeric; multiplication factor. If its length is > 1, it must match the length of x

bystreet

Logical; when TRUE it is expecting that 'a' and 'b' are numeric vectors with length equal to x

net

SpatialLinesDataFrame or Spatial Feature of "LINESTRING"

verbose

Logical; message with average age and total numer of vehicles

namerows

Any vector to be change row.names. For instance, name of regions or streets.

time

Character to be the time units as denominator, eg "1/h"

## Value

dataframe of age distrubution of vehicles

## Note

The functions age* produce distribution of the circulating fleet by age of use. The order of using these functions is:

1. If you know the distribution of the vehicles by age of use , use: my_age 2. If you know the sales of vehicles, or the registry of new vehicles, use age to apply a survival function. 3. If you know the theoretical shape of the circulating fleet and you can use age_ldv, age_hdv or age_moto. For instance, you dont know the sales or registry of vehicles, but somehow you know the shape of this curve. 4. You can use/merge/transform/adapt any of these functions.

Other age: age_hdv(), age_ldv(), age()

## Examples

if (FALSE) {
data(net)
MOTO_E25_500 <- age_moto(x = net$ldv, name = "M_E25_500", k = 0.4) plot(MOTO_E25_500) MOTO_E25_500 <- age_moto(x = net$ldv, name = "M_E25_500", k = 0.4, net = net)
plot(MOTO_E25_500)
}