Path Output Configuration

Path Output Configuration implementation

Description

The path output configuration allows you to configure options regarding the path outputs of your traffic assignment run.

Path information is stored by Mode, Time Period, and Iteration, where the user can configure what information is persisted for each path under each available combination of these labels.

If you decide to add and remove output properties, ensure that at least one method of unique identification for the path remains in place. Currently, this requires including (external) ids of the related origin-destination zone. If not, the assignment will fail.

Defaults

ID_PRIORITY fields

Name Value Type Unit
OutputProperty.RUN_ID activated OutputProperties.<enum> None
OutputProperty.TIME_PERIOD_EXTERNAL_ID activated OutputProperties.<enum> None
OutputProperty.MODE_EXTERNAL_ID activated OutputProperties.<enum> None
OutputProperty.ORIGIN_ZONE_EXTERNAL_ID activated OutputProperties.<enum> None
OutputProperty.DESTINATION_ZONE_EXTERNAL_ID activated OutputProperties.<enum> None
OutputProperty.DESTINATION_ZONE_EXTERNAL_ID activated OutputProperties.<enum> None

OUTPUT_PRIORITY fields

Name Value Type Unit
OutputProperty.PATH_STRING activated OutputProperties.<enum> None

Path output representation fields

Name Value Type Unit
RouteIdType.LINK_SEGMENT_EXTERNAL_ID activated RouteIdType.<enum> None

Methods

Path output configuration exposes the following methods.

Name Description
.add(+) Add an output property to the be included in each path’s output entry
.remove(+) Exclude an output property from each path’s output entry
.remove_all_properties() Exclude all output properties from each path’s output entry
.set_path_id_type(+) Choose what id’s to use in the path (string) representation
.get_path_id_type() Find out what id type is used for the paths (MISSING METHOD)

Properties

Path output configuration does not expose properties (yet)

Example 1

from planit import *

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


# add the internal ids for the OD used in PLANit to the path output, in additional to
# the default external ids available from the input files.
planit_instance.assignment.path_configuration.add(OutputProperty.ORIGIN_ZONE_ID)
planit_instance.assignment.path_configuration.add(OutputProperty.DESTINATION_ZONE_ID)

# switch the path identification from LINK_SEGMENT_EXTERNAL_ID (default) to NODE_EXTERNAL_ID 
planit_instance.assignment.path_configuration.set_path_id_type(RouteIdType.NODE_EXTERNAL_ID)


Identification

Each path is by default identified by

  • OutputProperty.ORIGIN_ZONE_EXTERNAL_ID, and
  • OutputProperty.DESTINATION_ZONE_EXTERNAL_ID

Alternatively, the user can reconfigure this to using .add(+) and .remove(+) to

  • OutputProperty.ORIGIN_ZONE_ID, and
  • OutputProperty.DESTINATION_ZONE_ID

Currently, no other identification methods are supported. So, make sure the properties of one of the two approaches are included in your configuration

See also

General Output Configuration for general output configuration options
RouteIdType.<enum> to see the options on the various path (string) identification methods
OutputProperty.<enum> for all available output properties across all output configurations in PLANit

Source code

Class PathOutputTypeConfigurationWrapper in wrappers.py


.add(+)

Path output configuration method

.remove(+)

Path output configuration method

.remove_all_properties()

Path output configuration method

.set_path_id_type(+)

Path output configuration method