package: TravelR: Tools for writing travel demand models

Description Details References Examples

Description

TravelR provides some common, specialized tools for travel demand modeling in R.

Details

The travelr package provides tools for travel demand modeling that are not otherwise available in R.

In particular, the package directly supports the following operations:

Other basic operations for travel demand modeling, such as trip generation models using either rate- or regression-based methods, cross-classification models, gravity models, destination choice models, and mode choice models using a variety of logit formulations can be straightforwardly constructed (and often estimated) using a combination of R packages and travelr tools. Examples and vignettes will gradually be added to travelr to illustrate these operations.

Additional tools may appear later, most notably tools for transit path-building and assignment.

travelr is intended both for producing \dQuoteworking models and for researching model algorithms, particularly algorithms for highway assignment.

References

Martin, W.A., and McGuckin, N.A., 1998, NCHRP Report 365: Travel Estimation Techniques for Urban Planning, National Cooperative Highway Research Program / Transportation Research Board Ortuzar, J. D., and Willumsen, L.G., 2001, Modelling Transport, Third Edition, John Wiley & Sons Sheffi, Y., 1985, Urban Transportation Networks, Prentice-Hall; available online as a PDF at http://web.mit.edu/sheffi/www/urbanTransportation.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
# A tiny, complete travel model using travelr functions
# You may run this example with example(skim.paths)
data(SiouxFalls)

# Trip Generation
productions<-rowSums(SiouxFalls.od)
attractions<-colSums(SiouxFalls.od)

# Highway Skims
cost.function<-with(SiouxFalls.net$Links,function(...)FFTime)
aclass <- make.assignment.class(SiouxFalls.net,"All",SiouxFalls.od)
aset <- new.assignment.set(SiouxFalls.net,list(All=aclass),cost.volume.type="vector",cost.function=cost.function)
paths <- build.paths(aset,aset$ff.cost)
travel.times <- skim.paths(paths,aset$ff.cost)[["All"]] # only one purpose: "All trips"

# Trip Distribution (Gravity Model with gamma function)
base.distribution <- hwy.gamma.function(travel.times,-0.02,-0.123) # HBW coefficients from NCHRP 365
trip.table <- ipf(base.distribution,list(rows=productions, cols=attractions),method="absolute")
aset <- hwy.update.demand(aset,"All",trip.table)

# Trip Assignment
assignment.results <- highway.assign(aset,method="Frank.Wolfe")
loaded.links <- assignment.results$volumes

## End(Not run)

travelr documentation built on May 2, 2019, 5:17 p.m.

Related to package in travelr...