mosstool.trip.gmns.sta¶
Module Contents¶
Classes¶
run static traffic assignment on GMNS map with persons |
Data¶
API¶
- mosstool.trip.gmns.sta.__all__¶
[‘STA’]
- class mosstool.trip.gmns.sta.STA(map: mosstool.type.Map, work_dir: str)¶
run static traffic assignment on GMNS map with persons
Initialization
- _get_od(start: mosstool.type.Position, end: mosstool.type.Position)¶
get origin and destination of a trip
Args:
t: Trip, trip
Return:
(origin, destination): (str, str), origin and destination
- _check_connection(start_road_id: int, end_road_id: int)¶
check if two road segments are connected
Args:
start_road_id: int, start road segment id
end_road_id: int, end road segment id
Return:
bool, True if two road segments are connected, False otherwise
- run(persons: mosstool.type.Persons, time_interval: int = 60, reset_routes: bool = False, column_gen_num: int = 10, column_update_num: int = 10)¶
run static traffic assignment on GMNS map with persons. trips of persons will be sliced into time intervals. static traffic assignment will be run for each time interval. route results will be saved into persons.
EXPERIMENTAL: the method is only for trip with deterministic departure time. Other cases will be skipped.
Args:
persons: Persons, persons with trips
time_interval: int, time interval (minutes) for static traffic assignment slice. Try to set time_interval larger than trip’s travel time.
reset_routes: bool, reset routes of persons before running static traffic assignment
column_gen_num: int, number of column generation iterations for static traffic assignment
column_update_num: int, number of column update iterations for static traffic assignment
Return:
Persons, persons with route results
dict, statistics of static traffic assignment