PathIdType.<enum>

PathIdType types

Description

Class exposing the available types as enums for the way we uniquely identify paths in our output. When we include the path results explicitly in our output and in those results include the paths themselves, the choice of this type becomes relevant.

Fields

<enum> Fields Description Instance documentation
LINK_SEGMENT_ID Path as a consecutive list of link segment ids based on the internal PLANit ids N/A
LINK_SEGMENT_XML_ID Path as a consecutive list of link segment XML ids as provided in the input N/A
LINK_SEGMENT_EXTERNAL_ID Path as a consecutive list of link segment external ids as provided in the input N/A
NODE_ID Path as a consecutive list of node ids based on the internal PLANit ids N/A
NODE_XML_ID Path as a consecutive list of node XML ids as provided in the input N/A
NODE_EXTERNAL_ID Path as a consecutive list of node external ids as provided in the input N/A

Example 1

from planit import *

# prep
planit_instance = Planit()
planit_instance.project.set(TrafficAssignment.TRADITIONAL_STATIC )
planit_instance.project.assignment.activate_output(OutputType.PATH)


# use node XML ids as the way to uniquely identify the path in the output, e.g. "[1,5,4,7,9,etc.]"
planit_instance.project.assignment.path_configuration.set_path_id_type(PathIdType.NODE_XML_ID)

See also

Path Configuration for the path configuration implementation where this enum is used

Source code

Class PathIdType in enums.py