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_configuration()[source]

Read the fast-trips assignment and path-finding configuration

read_input_files()[source]

Reads in the input network and demand files and initializes the relevant data structures.

run_assignment(output_dir)[source]
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 of fasttrips.Passenger instances indexed by passenger’s path ID

routes = None

dict with fasttrips.Route.route_id key and fasttrips.Route value

stops = None

dict with fasttrips.Stop.stop_id key and fasttrips.Stop value

tazs = None

dict with fasttrips.TAZ.taz_id key and fasttrips.TAZ value

trips = None

dict with fasttrips.Trip.trip_id key and fasttrips.Trip value