run {cartools} R Documentation

## The `run` function is a wrapper for the `trial` and `plotfollow3` functions.

### Description

The `run` function is a wrapper for the `trial` and `plotfollow3` functions.

### Usage

```run(nveh, ulead, ulead.sd, ubrkdown, ubrkdown.sd, k, k.sd, d, leff, xlim,
ylim)
```

### Arguments

 `nveh` number of vehicles in the investigation or `vehicle` = 1, 2, ..., `nveh`, a number `ulead` lead vehicle speed (mph) at time `t0`, i.e., before breakdown, a number `ulead.sd` standard deviation of `ulead`, a number `ubrkdown` breakdown speed (mph) of lead vehicle, a number `ubrkdown.sd` standard deviation of `ubrkdown`, a number `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 `l` vehicle, a number `leff` effective vehicle length (feet), a number `xlim` plot range along the `t` axis, a vector `ylim` plot range along the `x` axis, a vector

### Value

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.

### Examples

```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))
```

[Package cartools version 0.1.0 Index]