build.network.set: Construct internal structures for shortest path evaluation

Description Usage Arguments Details Value Author(s) See Also

Description

Build suitable internal structures for computing shortest paths on a highway network.

Usage

1
.build.network.set(network, link.subset=NULL, pen.subset=NULL)

Arguments

network

A highway network

link.subset

A vector index indicating which network links are active for this class (default: all links)

pen.subset

A vector index indicating which penalty values are active for this class (default: no penalties

)

Details

This function is usually only called from within new.assignment.set. It sets up an internal representation of a highway network from which a path tree can be rapidly built. It is provided publicly, since it may be useful for building a function to rapidly load and format an external network in some new file format.

The link.subset and pen.subset are standard indexes suitable for selecting a subset from a vector whose length is given by network$numLinks, either logical or integer. In particular, setting link.subset (or pen.subset) to TRUE will select all links (or penalties).

If link.subset is not provided, all links will be selected.

If pen.subset is not provided, no penalties will be selected.

Value

Returns a version of the network suitable for use in building shortest paths efficiently.

Author(s)

Jeremy Raw

See Also

shortest.paths


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