VirtualCost.<enum>

Virtual Cost types

Description

Class exposing the available Virtual Cost types as enums.

Not every virtual cost method might be supported by every traffic assignment method. The documentation of the chosen traffic assignment method will indicate what virtual cost methods are (not) supported.

Fields

<enum> Fields Description Instance documentation
FIXED Apply fixed cost to access physical road network from zone Fixed Virtual Cost
SPEED Apply fixed speed to access physical road network from zone Speed Virtual Cost

Example 1

from planit import *

# Choose to run Planit with a traditional static traffic assignment method
planit_instance = Planit()
planit_instance.project.set(TrafficAssignment.TRADITIONAL_STATIC)

# set virtual cost to using a fixed value
planit_instance.project.assignment.set(VirtualCost.FIXED)

# configure the instantiated property
planit_instance.project.assignment.virtual_cost.<call method>

See also

Assignment for the various assignment methods where one can set the virtual cost on and how to retrieve the instantiated virtual cost object.

Source code

Class VirtualCost in enums.py