.set(+)
Initial Cost method
Description
This .set allows you to set the initial costs to be used in the PLANit traffic assignment’s initial iteration. you can either set these costs for a specific time period, or provide initial costs for all time periods at once (that do not have specific initial costs set for their time period).
Signature
.set(initial_cost_file_location, time_period_external_id)
or
.set(initial_cost_file_location)
with
Parameter | Type | Unit | Compulsory | Description |
---|---|---|---|---|
initial_cost_file_location |
string |
None |
yes | File location of initial cost file |
time_period_external_id |
integer |
None |
no | time period (external) id to link initial costs to |
Return type
None
Example 1
from planit import *
#create instance
planit_instance = PLANit()
#set initial costs for all periods
planit_instance.initial_costs.set("<path_to_initial_costs_csv>")
#override initial costs for time period 1 with more specific costs
planit_instance.initial_costs.set("<path_to_initial_costs_period_1_csv>", 1)
See also
Default Output Formatter implementation
link Output Configuration implementation
Source code
Class InitialCost
in initial_cost.py