vein (version 0.7.8)

adt: Average daily traffic (ADT) from hourly traffic data.

Description

adt calculates ADT based on hourly traffic data. The input traffic data is usually for morning rush hours.

Usage

adt(pc, lcv, hgv, bus, mc, p_pc, p_lcv, p_hgv, p_bus, p_mc,
  expanded = FALSE)

Arguments

pc

numeric vector for passenger cars

lcv

numeric vector for light commercial vehicles

hgv

numeric vector for heavy good vehicles or trucks

bus

numeric vector for bus

mc

numeric vector for motorcycles

p_pc

data-frame profile for passenger cars, 24 hours only.

p_lcv

data-frame profile for light commercial vehicles, 24 hours only.

p_hgv

data-frame profile for heavy good vehicles or trucks, 24 hours only.

p_bus

data-frame profile for bus, 24 hours only.

p_mc

data-frame profile for motorcycles, 24 hours only.

expanded

boolean argument for returning numeric vector or "Vehicles"

Value

numeric vector of total volume of traffic per link, or data-frames of expanded traffic

Examples

Run this code
# NOT RUN {
{
data(net)
data(pc_profile)
p1 <- pc_profile[, 1]
adt1 <- adt(pc = net$ldv*0.75,
            lcv = net$ldv*0.1,
            hgv = net$hdv,
            bus = 0,
            mc = net$ldv*0.15,
            p_pc = p1,
            p_lcv = p1,
            p_hgv = p1,
            p_bus = p1,
            p_mc = p1)
head(adt1)
plot(adt1)
adt2 <- adt(pc = net$ldv*0.75,
            lcv = net$ldv*0.1,
            hgv = net$hdv,
            bus = net$hdv,
            mc = net$ldv*0.15,
            p_pc = p1,
            p_lcv = p1,
            p_hgv = p1,
            p_bus = p1*0, # when zero, must be the same size
            p_mc = p1,
            TRUE)
head(adt2)
plot(adt2) # Class Vehicles
}
# }

Run the code above in your browser using DataLab