Description Usage Arguments Details Value Author(s) See Also
These functions facilitate constructing network variants and demand sets for use in multi-class highway assignment.
1 2 3 4 | make.assignment.class(network, name, demand, link.subset=TRUE, penalty.subset=NULL, cost.function=NULL)
add.assignment.class(classes,aclass)
## S3 method for class 'list'
add.assignment.class(classes,aclass)
|
network |
The base highway network on which this assignment set will be loaded |
name |
A name (character string) for the assignment class |
demand |
A demand matrix for the named assignment class |
link.subset |
An index vector that can be used to select links in the base network that will be available for this assignment class |
penalty.subset |
An index vector that selects which penalties (from the network's turn penalty table) will be applied to this assignment set |
cost.function |
A |
classes |
A list, either empty or containing previously added assignment classes |
aclass |
A highway.assignment.class constructed by |
These functions support multi-class highway assignment.
Use make.assignment.class
to construct a new assignment class. Use add.assignment.class
to add another
assignment class to a list of assignment classes. A list of assignment classes is required for the classes
parameter
in new.assignment.set
.
It is common to have a non-null link.subset
, with the most common situation being to distinguish networks in
which all links are available from one that only contains links available to a certain vehicle class (e.g. trucks or
high-occupancy vehicles). It is similarly useful to have a non-null penalty.subset
, either for penalties that
are only applicable during certain periods of the day, or that are only applicable to certain vehicle classes. Only the
links and penalties in the indicated subset will be examined when building paths. Care should be taken that the
terminal nodes (zones) all remain connnected when the particular subset is selected. The igraph package can be
useful for rapidly testing connectivity. The shortest path functions will warn if the resulting network subset is not
connected.
The cost.function
parameter is not used directly, but is provided as a convenience since it is sometimes
desirable to decompose the cost.function
for the assignment.set
into smaller functions specifically
for the individual classes. These can be called by the user's assignment set cost function. Getting fancy with cost
functions is not advised since it can wreak havoc with the convergence of equilibrium assignment algorithms, and the
simplest possible cost function model should be sought (which usually means providing a single function through
new.assignment.set
).
add.assignment.class
is generic, and can add an assignment class to an assignment.set
or to an
existing list of assignment classes previously created with add.assignment.class
. It performs a variety of
tests to ensure that the proposed assignment class has everythign it needs to operate successfully.
make.assignment.class
returns a list of elements with class highway.assignment.class
suitable for
building a assignment.set
. The specific list elements are:
A unique name for the class, constructed according to the rules of legal names for R symbols; see make.names
for help in creating a good name
A demand matrix with demand for this class (e.g. trucks, or high-occupancy vehicles)
The network topology, including turn penalties and open links, for this assignment class
A class-specific cost function; only called if specifically coded in the assignment set cost function
add.assignment.class
returns its first argument, to which aclass
has been added.
Jeremy Raw
assignment.set
,highway.assign
,
add.assignment.class.highway.assignment.set
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.