Fixed

The Fixed Virtual Cost implementation
Description

A fixed 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 elligble 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 cost to apply via this class.

Defaults

Name Default Type Unit
Fixed cost value 0.0 float Hour (h)

Methods

Fixed virtual cost exposes the following methods

Name Description
.set_fixed_connectoid_cost(+) Override the default fixed cost

Properties

This class has no properties (yet)

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 FIXED
planit_instance.project.assignment.set(VirtualCost.FIXED)

# override the default fixed cost
1_min = 60.0/3600.0 # 60 seconds/3600 seconds in an hour
planit_instance.project.assignment.virtual_cost.set_fixed_connectoid_cost(1_min)

See also

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

Source code

Class VirtualCostWrapper in projectwrappers.py


.set_fixed_connectoid_cost(+)

A Fixed virtual cost method