Learn R Programming

cartools (version 0.1.0)

zipper: The zipper function can be used to simulate interaction among three vehicles in car following on a single lane or three vehicles merging on a two-lane highway.

Description

The zipper function can be used to simulate interaction among three vehicles in car following on a single lane or three vehicles merging on a two-lane highway.

Usage

zipper(tstart, tend,
    ustart1, uend1, xstart1, xend1,
    ustart2, uend2, xstart2, xend2,
    ustart3, uend3, xstart3, xend3)

Arguments

tstart

start time, a number

tend

end time, a number

ustart1

start speed (mph) for vehicle in lane 1, a number

uend1

end speed (mph) for vehicle in lane 1, a number

xstart1

start location for vehicle in lane 1 (feet), a number

xend1

end location for vehicle in lane 1 (feet), a number

ustart2

start speed (mph) for vehicle in lane 2, a number

uend2

end speed (mph) for vehicle in lane 2, a number

xstart2

start location for vehicle in lane 2 (feet), a number

xend2

end location for vehicle in lane 2 (feet), a number

ustart3

start speed (mph) for vehicle in lane 3, a number

uend3

end speed (mph) for vehicle in lane 3, a number

xstart3

start location for vehicle in lane 3 (feet), a number

xend3

end location for vehicle in lane 3 (feet), a number

Value

zipper uses a deterministic model and animation to illustrate an ``idealistic'' situation, a so-called a ``zipper merge.''

Examples

Run this code
# NOT RUN {
zipper(0,60,90,90,0,5000,90,90,-200,4500,90,90,-500, 4000)
zipper(0,40,85,90,0,4000,90,99,0,4500,90,90,-500, 4200)
zipper(0,5,60,20,0,500,65,20,-100,467,80,20,-350,433)
# }

Run the code above in your browser using DataLab