.set_fixed_speed(+)
A Fixed virtual cost method
A speed based virtual cost is applied for making the trip from a zone to the first modelled node that has an equivalent in the real-world, i.e., a physical node. The same holds for a movement in the opposite direction, i.e., from an eligble physical node to a zone. This cost is regarded as virtual since it does not utilise any real-world infrastructure.
The user can configure the fixed speed that is applied to determine the cost to via this class. The actual cost is then computed based on the distance between the zone and the connectoid i.c.w. the chosen speed.
Name | Default | Type | Unit |
---|---|---|---|
speed value | 25.0 | float |
Kilometres per hour (km/h) |
Speed virtual cost exposes the following methods
Name | Description |
---|---|
.set_connectoid_speed(+) |
Override the default fixed speed |
This class has no properties (yet)
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 SPEED
planit_instance.assignment.set(VirtualCost.SPEED)
# override the default fixed speed (km/h)
planit_instance.assignment.virtual_cost.set_fixed_connectoid_cost(50.0)
Traffic assignment on assignments that support this virtual cost implementation
VirtualCost.<enum> for all available virtual cost options
VirtualCost landing page for all available virtual cost implementations
Class VirtualCostWrapper
in Wrappers.py
A Fixed virtual cost method