fasttrips.FastTrips¶
-
class
fasttrips.
FastTrips
(input_network_archive, input_demand_dir, input_weights, run_config, output_dir, input_functions=None, logname_append='', appendLog=False)[source]¶ Bases:
object
This is the model itself. Should be simple and run pieces and store the big data structures.
-
__init__
(input_network_archive, input_demand_dir, input_weights, run_config, output_dir, input_functions=None, logname_append='', appendLog=False)[source]¶ Constructor.
Reads configuration and input files from input_network_dir. Writes output files to output_dir, including log files.
Parameters: - input_network_dir (string) – Location of network csv files to read
- input_demand_dir (string) – Location of demand csv files to read
- input_weights (string) – Location of pathweight file
- run_config (string) – Location of run configuraiton file.
- output_dir (string) – Location to write output and log files.
- logname_append (string) – Modifier for info and debug log filenames. So workers can write their own logs.
- appendLog (bool) – Append to info and debug logs? When FastTrips assignment iterations (to handle capacity bumps), we’d like to append rather than overwrite.
Methods
__init__
(input_network_archive, …[, …])Constructor. read_configuration
()Read the fast-trips assignment and path-finding configuration read_input_files
()Reads in the input network and demand files and initializes the relevant data structures. run_assignment
(output_dir)Attributes
DEBUG_LOG
Debug log filename. INFO_LOG
Info log filename. -
read_input_files
()[source]¶ Reads in the input network and demand files and initializes the relevant data structures.
-
DEBUG_LOG
= 'ft_debug%s.log'¶ Debug log filename. Detailed output goes here, including trace information.
-
INFO_LOG
= 'ft_info%s.log'¶ Info log filename. Writes brief information about program progression here.
-
passengers
= None¶ collections.OrdederedDict
offasttrips.Passenger
instances indexed by passenger’s path ID
-
routes
= None¶ dict
withfasttrips.Route.route_id
key andfasttrips.Route
value
-
stops
= None¶ dict
withfasttrips.Stop.stop_id
key andfasttrips.Stop
value
-
tazs
= None¶ dict
withfasttrips.TAZ.taz_id
key andfasttrips.TAZ
value
-
trips
= None¶ dict
withfasttrips.Trip.trip_id
key andfasttrips.Trip
value
-