.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_xml_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_xml_id |
string | None |
no | time period (XML) 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.project.initial_costs.set("<path_to_initial_costs_csv>")
#override initial costs for time period with XML id "1" with more specific costs
planit_instance.project.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
Last modified January 1, 0001