fasttrips.FastTrips

class fasttrips.FastTrips(input_network_archive, input_demand_dir, input_weights, run_config, output_dir, input_functions=None, logname_append='', appendLog=False, skim_config_file=None)[source]

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, skim_config_file=None)[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.

  • skim_config_file (string) – Location of skim config csv files to read

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)

run_skimming(output_dir)

entry point to run skimming without assignment, i.e. for unloaded network .

Attributes

DEBUG_LOG

Debug log filename.

INFO_LOG

Info log filename.

passengers

collections.OrdederedDict of fasttrips.Passenger instances indexed by passenger's path ID

stops

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

routes

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

tazs

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

trips

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