OpenPaths Help

Link Consolidation

This section describes the Link Consolidation function available by invoking Cube.exe from a Voyager script.

Sections include:

Introduction

The Cube.exe Link Consolidation function works the same as the tool in Network Window (see Link consolidation of the CUBE Base Reference Guide). This consolidation function may be called by invoking Cube.exe from a Voyager script.

The Function will consolidate a series of links with same characteristics, and no cross streets, into a single link. When the network is displayed in true shape mode (connected to a shapefile by means of a VPR file), consolidating the links will also update the shapefile to maintain the true shape display linkage.

Keywords and Usage

The link consolidation is invoked from a Voyager script beginning with:

RUNPGM=CUBE PARAMETERS='/command /CloseWhenDone
/Minimize /NoSplash'
function=LINKCONSOLIDATE
  • FUNCTION LINKCONSOLIDATE function option is required to enable the link consolidation mode.

  • Under the PARAMETERS keyword, you may specify:

    • /command puts CUBE in command mode and is required.

    • /CloseWhenDone, /Minimize, and /NoSplash are optional, but recommended when running from Voyager.

  • The script must terminate with ENDFUNCTION.

Additional keywords for Link Consolidation include:

  • NETI — the input binary network (.NET). Or, a Visual Project File (.VPR) associating a binary network and true shape linkages if applicable.

    • With true shape, the consolidation will also update the shapefile to maintain the true shape display linkage. However, the true shape display must have a sequence field specified, since a consolidated link will be linked to more than one shape and the order of the shapes must be specified in the sequence field.

  • NETO — filename of the consolidated output network (.NET)

  • TURNPENI — filename of the input turn penalties (.PEN) associated with the network, if applicable.

  • TURNPENO — filename of the output turn penalties (.PEN), updated to reflect the new connecting nodes. Optional.

  • LOGFILEO — optional filename (.LOG) for logging the consolidation

  • Each link attribute (field) of the input network may be associated with a mode to specify what value goes into the consolidated link. The consolidation mode keywords below define the type of consolidation for each link attribute.

    Note: Link attributes without an associated consolidation mode will default to the mode specified in the DEFAULTNUMMODE or DEFAULTTEXTMODE keywords. For character attributes, all options except MATCH, FIRST, LAST, MIN, MAX, MIN0, and MAX0 are treated as the same as FIRST.

    • MATCH — The attribute must be the same for the links to be consolidated (for example, NUMLANES).

      It is not required to have any attribute set to MATCH even though it is unusual. In that case, any series of links with no cross streets (all inside nodes are connected to two links only) will be consolidated.

    • SUM — Total the values from all the links in the series (for example, DISTANCE)

    • FIRST — Use the value from the first link in the series

    • LAST — Use the value from the last link in the series (except

    • blank values for character attributes)

    • MIN — Use the minimum value from all the links in the series

    • MAX — Use the maximum value from all the links in the series

    • AVE — Use the average value from all the links in the series

    • MIN0 — Use the minimum value from all the links in the series except 0 values (except blank values for character attributes)

    • MAX0 — Use the maximum value from all the links in the series except 0 values (except blank values for character attributes)

    • AVE0 — Use the average value from all the links in the series except 0 values

    • COUNT — A count of the number of links that are consolidated. The original values in the links will be destroyed so it is best to create a new attribute to store the count

    • WEIGHT1AVE0 — Compute the distance weighted average on distance/unit type attribute (for example, SPEED) from all the links in the series, except 0 values

    • WEIGHT2AVE — Compute the distance weighted average on unit/distance type attribute (for example, signals per mile) from all the links in the series

    • WEIGHT2AVE0 — Compute the distance weighted average on unit/distance type attribute (for example, signals per mile) from all the links in the series, except 0 values

  • DEFAULTNUMMODE — the default consolidation mode for numeric attributes, when unspecified (see list above)

  • DEFAULTTXTMODE — the default consolidation mode for text attributes, when unspecified (see list above)

Example

In this script, an input binary network is consolidated with a true shape linkage.

RUN PGM=CUBE PARAMETERS='/command /CloseWhenDone /Minimize /NoSplash'
function=LINKCONSOLIDATE
neti="UnConsolidateNet.vpr" ; or simply a .net without true shape
turnpeni="UnConsolidate.pen" ; optional
turnpeno="Consolidate.pen" ; optional
neto="Consolidate.net"
logfileo="Consolidate.log" ; optional
DefaultNumMode=Max ; or Match,Sum,First,Last etc.
DefaultTxtMode=Last ; or Match,First,Last etc.
Match = FUNC_ClS,LANES
Sum = DISTANCE, TIME
First = FROMID
Last = TOID
Min = CAPACITY
Max = AREATYPE
Ave = COUNT
; Min0 =    ; excluding 0 values
; Max0 =    ; excluding 0 values
; Ave0 =    ; excluding 0 values
Count = SEGMENTS  ; count of consolidated links
Weight1Ave0=SPEED; Distance weighted ave, distance/unit type e.g.speed
(miles per hr) always excluding 0 values
Weight2Ave =SIGNAL_DENSITY ; Distance weighted ave, unit/distance type
e.g. signal per mile
Weight2Ave0=TOLL ;unit/distance weighted ave, excluding 0 values
endfunction
ENDRUN