Description Usage Arguments Details Value Author(s) References See Also
Construct a BPR-style cost or objective function
1 2 | build.BPR.cost.function(cost.data)
build.BPR.objective.function(cost.data)
|
cost.data |
A data.frame, environment or list describing the BPR function parameters. |
build.BPR.cost.function
generates a function that takes a vector or matrix of volumes and applies parameters to
them to compute a congested travel time, using the venerable (or execrable, depending on your perspective) Bureau of
Public Roads formula (the Bureau of Public Roads was a precursor of the U.S. Federal Highway Administration). The
resulting function can be used as a cost function for an assignment class within an assignment.set
.
build.BPR.objective.function
generates a function that can be used as an objective function in equilibrium
assignment algorithms that attempt to minimize generalized cost. This evaluates analytically the integral of a BPR
cost function and returns a scalar value which is the sum of integrating from 0 to each of the link volumes.
A more general (but much slower) objective function can be built using build.general.objective.function
.
Obviously, the user is also free to write an objective function on their own, consistent with whatever cost function
they may create.
Note: This function does not actually calculate the BPR function. Rather, it builds a new function that will
perform the BPR computation and that can be used as a cost.function
in an assignment.set
.
So you should call this function and then pass the resulting (unexecuted) function to the assignment set for use in
that context.
The functional form of the Bureau of Public Roads function looks like this:
cost = TIME * ( 1 + ALPHA * (volume/CAPACITY)^BETA)
The parameters in upper case must be supplied as elements of the cost.data
parameter, or in the environment from
which build.BPR.function is called. They must either have the same structure (either “vector” or
“data.frame”) as the set of volumes that will be passed to the function, or be amenable to conversion by the
standard R recycling rules. The parameters that are supplied for the BPR function are defined as follows:
The volumes for which costs are computed
The free-flow link traversal time (returned when volume is zero)
The congested link capacity (often the Highway Capacity Manual (2000) Level-of-Service D or E capacity)
First BPR function parameter (classically, 0.15, but today often varying by link type)
Second BPR function parameter (classically, 4.0, but today often varying by link type)
See assignment.set
and cost.function
for more information on how the volume structure type
is selected, and how these functions are used in highway assignment.
build.BPR.cost.function
returns a function that takes a link vector (or matrix) of volumes and returns a link vector (or matrix) of link costs.
build.BPR.objective.function
returns a function that takes a link vector (or matrix) of volumes and returns a scalar value indicating total cost.
Jeremy Raw
Bureau of Public Roads, 1964. Traffic Assignment Manual. Urban Planning Division, U.S. Department of Commerce Transportation Research Board, 2000. Highway Capacity Manual
cost.function
for the required interface of cost functions
assignment.set
for a description of how the cost function is used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.