SPATH identifies the shortest path from one node to all other nodes in a network of directed arcs or undirected links.
Model input requirements:
- Model title: the title of the model is entered into the indicated form field
- Starting node. Provide the name of the origin node, from which the shortest paths will be determined
- Link type. Select whether the input data is for uni-directional arcs (directed arcs) or bi-directional links (undirected edges)
- Link descriptions. For each link in the network, indicate on a separate line, separated by blanks, the following:
- Name of its from-node, 1 to 8 characters
- Name of its to-node, 1 to 8 characters, and
- Length/distance/cost, as integer or floating-point number
Note: for bi-directional links, the nodes can be listed in either order.
Example problem
Consider the following network of cities and connecting air travel miles.
The bi-directional-link input data for identifying the shortest path from DFW (or any originating node) to all other nodes is:
HNL LAX 2555 SFO ORD 1843 SFO LAX 337 LAX ORD 1743 LAX DFW 1233 DFW ORD 802 DFW LGA 1387 DFW MIA 1120 ORD PVD 849 LGA PVD 142 LGA MIA 1099 MIA PVD 1205
Back to SPATH input form
|