.override_output_property_units(+)

Link output configuration method

Description

The .override_output_property_units(+) method, allows you to override the units used for the given output property and the subsequent persisted results. Two variations are available depending if the property is a simple single unit, e.g. km, h, veh, or a combined unit, e.g. km/h, veh/km, etc.

Signature

.override_output_property_units(output_property : OutputProperty, alternative_unit : UnitType)

or

override_output_property_units(output_property : OutputProperty, numerator_unit_types, denominator_unit_types)

with

Parameter Type Unit Compulsory Description
output_property OutputProperty.<enum> - YES Choice of output property to change units for
alternative_unit UnitType.<enum> - YES New choice for unit
numerator_unit_types List of UnitType.<enum> - YES New choice for numerator units
denominator_unit_types List of UnitType.<enum> - YES New choice for denominator units

the chosen alternative units are verified to be compatible with the defaults, so you cannot change from km to h since they are not of the same unit group.

Return type

None

Example 1

from planit import *

# prep
planit_instance = Planit()
planit_instance.project.set(TrafficAssignment.TRADITIONAL_STATIC )

# change to veh/h from the default pcu/h for the output property FLOW       
assignment_project.assignment.link_configuration.override_output_property_units(OutputProperty.FLOW, [UnitType.VEH], [UnitType.HOUR])

See also

OutputProperty.<enum> for the available output property enums and their compatibility

Source code

Class LinkOutputTypeConfigurationWrapper in projectwrappers.py

Last modified January 1, 0001