The NETWORK Procedure

SHORTESTPATH Statement

  • SHORTESTPATH < options >;

The SHORTESTPATH statement invokes an algorithm that calculates shortest paths between pairs of nodes in the input graph. By default, PROC NETWORK finds a shortest path for each possible combination of source and sink nodes. For more information about the shortest path algorithm, see the section Shortest Path.

You can specify the following options:

MAXLINKWEIGHT=number
MAXPATHWEIGHT=number

specifies the maximum sum of link weights in a path. Any shortest path whose sum of link weights is greater than number is removed from the results. The default is the largest number that can be represented by a double, which causes no paths to be removed from the results.

MINLINKWEIGHT=number
MINPATHWEIGHT=number

specifies the minimum sum of link weights in a path. Any shortest path whose sum of link weights is less than number is removed from the results. The default is the largest (in magnitude) negative number that can be represented by a double, which causes no paths to be removed from the results.

OUTPATHS=CAS-libref.data-table
OUT=CAS-libref.data-table

specifies the output data table to contain the shortest paths. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTSUMMARY=CAS-libref.data-table

specifies the output data table to contain descriptive statistics of the finite shortest paths for each source. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTWEIGHTS=CAS-libref.data-table

specifies the output data table to contain the total weight of the shortest path for each source-sink pair. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

SINK=sink-node

specifies the sink node for shortest path calculations. This setting overrides the use of the variable sink in the data table that you specify in the NODESSUBSET= option in the PROC NETWORK statement.

SOURCE=source-node

specifies the source node for shortest path calculations. This setting overrides the use of the variable source in the data table that you specify in the NODESSUBSET= option in the PROC NETWORK statement.

Last updated: November 30, 2020