.set(+)
Traditional static traffic assignment method
Description
This .set allows you to set the choice for components used in traditional static assigment such as:
- How to compute cost for the transport network (split in physical and virtual cost)
- How to perform smoothing between iterations
Depending on the chosen option the assignment performs differently
Signature
.set(component_type_enum_choice)
Parameter | Type | Unit | Compulsory | Description |
---|---|---|---|---|
component_type_enum_choice | PhysicalCost.<enum> |
- | YES | Type of link performance function to apply as the physical cost, i.e., travel time |
"” | VirtualCost.<enum> |
- | YES | Type of cost to apply as the virtual cost, i.e., travel time from zone-to-physical-network |
"” | Smoothing.<enum> |
- | YES | Type of smoothing to apply between iterations |
Return type
None
Supported types
Traditional static assignment currently supports the following PhysicalCost types:
PhysicalCost.BPR
Traditional static assignment currently supports the following Virtual cost types:
VirtualCost.FIXED
VirtualCost.SPEED
Traditional static assignment currently supports the following Smoothing types:
Smoothing.MSA
Example 1
from planit import *
# Choose to run PLANit with a traditional static traffic assignment method
planit_instance = PLANit()
planit_instance.set(TrafficAssignment.TRADITIONAL_STATIC)
# set physical cost to BPR link performance function
planit_instance.assignment.set(PhysicalCost.BPR)
# configure the instantiated property
planit_instance.assignment.physical_cost.<call method>
Example 2
from planit import *
# Choose to run PLANit with a traditional static traffic assignment method
planit_instance = PLANit()
planit_instance.set(TrafficAssignment.TRADITIONAL_STATIC )
# set virtual cost to a constant value for all connectors (zone-to-physical network connections)
planit_instance.assignment.set(VirtualCost.FIXED)
# configure the instantiated property
planit_instance.assignment.virtual_cost.<call method>
Example 3
from planit import *
# Choose to run PLANit with a traditional static traffic assignment method
planit_instance = PLANit()
planit_instance.set(TrafficAssignment.TRADITIONAL_STATIC )
# set virtual cost to a constant value for all connectors (zone-to-physical network connections)
planit_instance.assignment.set(Smoothing.MSA)
# configure the instantiated property
planit_instance.assignment.smoothing.<call method>
See also
Physical Cost for physical cost implementations
Smoothing for smoothing implementations
Virtual Cost for virtual cost implementations
Source code
Class AssignmentWrapper
in Wrappers.py