.assignment

PlanitProject property

Description

The .assignment property allows access to the assignment instance for configuration purposes. Depending on the chosen assignment different methods and properties will be exposed. Only a single assignment is available for each planit project instance.

Return type

Traffic Assignment implementation

Example 1

Create a traditional static traffic assignment. The planit_instance.assignment.<call method> must call a method available on the traditional static assignment class, since this is the instance it returns

from planit import *

# create instance, set traffic assignment type, access the assignment instance
planit_instance = Planit()
planit_instance.project.set(TrafficAssignment.TRADITIONAL_STATIC)
planit_instance.project.assignment.<call method>

See also

TrafficAssignment.<enum> for supported assignment types
.set(+) on how to instantiate this property

To find out more about the options available on any of the assignment implementations, please refer to the assignment section of this manual

Source code

Class PlanitProject in project.py