run {cartools} | R Documentation |
run
function is a wrapper for the trial
and plotfollow3
functions.The run
function is a wrapper for the trial
and plotfollow3
functions.
run(nveh, ulead, ulead.sd, ubrkdown, ubrkdown.sd, k, k.sd, d, leff, xlim, ylim)
nveh |
number of vehicles in the investigation or |
ulead |
lead vehicle speed (mph) at time |
ulead.sd |
standard deviation of |
ubrkdown |
breakdown speed (mph) of lead vehicle, a number |
ubrkdown.sd |
standard deviation of |
k |
traffic density (vehicles per mile, vpm) of the pre-breakdown state, a number |
k.sd |
standard deviation of following vehicle breakdown speed, a number |
d |
deceleration rate of the lead |
leff |
effective vehicle length (feet), a number |
xlim |
plot range along the |
ylim |
plot range along the |
The function returns an t-x
image and eight lists:
output[[1]]
returns a vector of run
input values; output[[2]]
returns
a matrix of pre-breakdown ulead
speed, breakdown ubrkdown
speed,
pre-breakdown k
density values for each vehicle; output[[3]]
returns
a time matrix consisting of t0,t1,t2,t3,t4,t5
;
output[[4]], output[[5]], output[[6]]
and output[[7]]
returns matrices
of speed u
, location x and safe headway h
values for each vehicle
at times t0,t1,t2,t3
, respectively. Finally, output[[8]]
returns a list
the cflist
list consisting of information stored as L
and Fw
matrices.
run(10, 63, 10, 0, 0, 55, 5, 15, 14, c(0, 20),c(-1000, 200)) run(10, 63, 10, 34, 0.1, 55, 5, 15, 14, c(0, 60),c(-2000, 4000)) run(10, 63, 10, 10, 1, 55, 5, 15, 14, c(0, 40),c(-2000, 2500))