Description Details References Examples
TravelR provides some common, specialized tools for travel demand modeling in R.
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:
Iterative proportional fitting (“Fratar” expansion) of matrices to new marginal totals (gravity models are a sub-species of this fitting): ipf
Re-aggregating matrices to a different set of dimensions using an equivalence table: reaggregate.matrix
Numeric integration by adaptive quadrature for use in assignment algorithms: cost.integrator
Loading a variety of highway network file formats into a standard internal format: highway.net
Equilibrium highway assignment using a variety of methods: highway.assign
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.
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.