fasttrips.Assignment¶
-
class
fasttrips.
Assignment
[source]¶ Bases:
object
Assignment class. Documentation forthcoming.
Methods
__init__
()This does nothing. assign_paths
(output_dir, FT)Finds the paths for the passengers. choose_paths_without_simulation
(FT, …)Given a pathset for each passernger, choose a path (if relevant). compare_choices
(pathset_paths_df, prior_choice)Reads in a pathset_path_df and the pathset_path_df of a prior iteration and returns the number of new choices made in the current iteration along with a simplified chosen df to use in the next iteration. filter_trip_list_to_not_arrived
(…)Filter the given trip list to only those that have not arrived according to pathset_paths_df. find_passenger_vehicle_times
(…)Given a dataframe of passenger links and a dataframe of vehicle trip links, adds two new columns to the passenger links for board and alight time. find_trip_based_pathset
(iteration, …)Perform trip-based path set search. flag_missed_transfers
(pathset_paths_df, …)Given passenger pathset links with the vehicle board_time and alight_time attached to trip links, this method will add columns to determine if there are missed transfers. generate_pathsets
(FT, pathset_paths_df, …)Figures out which person trips for whom to generate_pathsets, stored in Passenger.pathfind_trip_list_df
initialize_fasttrips_extension
(…)Initialize the C++ fasttrips extension by passing it the network supply. load_passengers_on_vehicles_with_cap
(…)Check if we have boards on over-capacity vehicles. merge_pathsets
(pathfind_trip_list_df, …)Merge the given new pathset paths and links into the existing merge_prior_choices
(pathset_paths_df, …)Join success or bump flag count information onto a pathset_paths_df and pathset_links_df :param pathset_paths_df: Current iteration of pathset_paths_df. number_of_pathsets
(pathset_paths_df)Counts the number of passenger trips with pathsets and returns it. process_weight_qualifiers
(weights)Qualifiers are used to change the default behavior of weight_names. put_passengers_on_vehicles
(pathset_links_df, …)Puts the chosen passenger trips specified in pathset_links_df onto the transit vehicle trips specified by veh_trip_df. read_configuration
(config_fullpath)Read the configuration parameters from Assignment.CONFIGURATION_FILE
read_functions
(func_file)Read the functions from :py:attr:`Assignment.CONFIGURATION_FUNCTIONS_FILE read_weights
([weights_file])Read the weights from :py:attr:`Assignment.INPUT_WEIGHTS save_choices
(pathset_paths_df, success_df, …)Returns an updated count of successfully chosen paths and paths that were bumped for each user. set_fasttrips_bump_wait
(bump_wait_df)Sends the bump wait information to the fasttrips extension simulate
(FT, output_dir, iteration, …)Given a pathset for each passenger, choose a path (if relevant) and then actually assign the passengers trips to the vehicles. write_configuration
(output_dir)Write the configuration parameters to function as a record with the output. write_vehicle_trips
(output_dir, iteration, …)Attributes
BOARD_STATE_CATEGORICAL
path invalidated before ever chosen due to capacity problems BUMP_BUFFER
Extra time so passengers don’t get bumped (?). BUMP_ONE_AT_A_TIME
Simulation: bump one stop at a time (slower, more accurate) CAPACITY_CONSTRAINT
Route choice configuration: Use vehicle capacity constraints. CHOSEN_CATEGORIES
These will be ordered, so to select chosen, choose those > CHOSEN_NOT_CHOSEN_YET CHOSEN_NOT_CHOSEN_YET
categories for SIM_COL_PAX_CHOSEN CHOSEN_REJECTED
CONFIGURATION_FILE
Configuration file for fasttrips CONFIGURATION_FUNCTIONS_FILE
Configuration functions CONFIGURATION_OUTPUT_FILE
Output copy of the configuration file in case anything got overridden (Hmm naming conventions are a bit awkward here) CONVERGENCE_GAP
CREATE_SKIMS
Configuration: Create skims flag. DEBUG_NUM_TRIPS
Debug mode: only run this number of trips, -1 to run all. DEBUG_OUTPUT_COLUMNS
Debug: include debug columns in output DEBUG_TRACE_ONLY
Debug mode: only run trace passengers FARE_ZONE_SYMMETRY
INPUT_DEMAND_DIR
Configuration: Input demand directory INPUT_NETWORK_ARCHIVE
Configuration: Input network directory INPUT_WEIGHTS
Configuration: Pathweight parameters MAX_ITERATIONS
Configuration: Maximum number of iterations to remove capacity violations. MAX_NUM_PATHS
Route choice configuration: Max number of paths in a pathset. MAX_PF_ITERATIONS
MAX_SIMULATION_ITERS
How many Simulation Iterations should we do before going back to path-finding? MIN_PATH_PROBABILITY
Route choice configuration: Minimum path probability for the path to be used. MSA_RESULTS
MSA the results that affect the next iteration to avoid oscillation: boards, alights, overcap onboard at stops NETWORK_BUILD_DATE
NETWORK_BUILD_DATE_START_TIME
NUMBER_OF_PROCESSES
Number of processes to use for path finding (via multiprocessing
) Set to 1 to run everything in this process Set to less than 1 to use the result ofmultiprocessing.cpu_count()
Set to positive integer greater than 1 to set a fixed number of processesOUTPUT_DIR
Configuration: Run Configuration OUTPUT_PASSENGER_TRAJECTORIES
Configuration: Passenger trajectory output flag. OUTPUT_PATHSET_PER_SIM_ITER
Configuration: If true, outputs pathset every simulation iteration. PATHFINDING_EVERYONE
Are we finding paths for everyone right now? Or just un-arrived folks? PATHFINDING_TYPE
Configuration: Pathfinding Type. PATHFINDING_TYPE_DETERMINISTIC
Find paths deterministically, using shortest path search based on travel time. PATHFINDING_TYPE_READ_FILE
Don’t find paths; read Passenger.PF_PATHS_CSV
andPassenger.PF_LINKS_CSV
.PATHFINDING_TYPE_STOCHASTIC
Find paths stochastically using trip-based hyperpath PREPEND_ROUTE_ID_TO_TRIP_ID
Prepend the route id to the trip id? This is for readability in debugging, since route IDs are typically more readable and trip ids are inscrutable SIMULATION
Configuration: Do simulation? It should be True for iterative assignment. SIM_COL_MISSED_XFER
Is this link/path a missed transfer? Set in both pathset links and pathset paths, this is a 1 or 0 SIM_COL_PAX_ALIGHT_DELAY_MIN
Delay in alight_time from original pathfinding understanding of alight time SIM_COL_PAX_ALIGHT_TIME
Alight time from the transit vehicle SIM_COL_PAX_A_TIME
Time of arrival at A SIM_COL_PAX_BOARD_STATE
NaN if not relevent, 1 if lucky enough to board at an at- or over-capacity stop, 0 if bumped. SIM_COL_PAX_BOARD_TIME
Board time on the transit vehicle SIM_COL_PAX_BUMP_ITER
SIM_COL_PAX_B_TIME
Time of arrival at B SIM_COL_PAX_CHOSEN
Chosen status for path SIM_COL_PAX_COST
Link cost. SIM_COL_PAX_DISTANCE
Link distance SIM_COL_PAX_FARE
Link fare in currency SIM_COL_PAX_FARE_PERIOD
Fare period id SIM_COL_PAX_FREE_TRANSFER
Free transfer? NaN, 0.0 or 1.0, only free based on fare_attributes_ft.txt SIM_COL_PAX_LINK_TIME
Link time (SIM_COL_PAX_B_TIME - SIM_COL_PAX_A_TIME) SIM_COL_PAX_LNPS
log(PathSize) SIM_COL_PAX_LOGSUM
Logsum of all paths SIM_COL_PAX_MISSED_XFER
Is this link a missed transfer SIM_COL_PAX_OVERCAP
SIM_COL_PAX_OVERCAP_FRAC
If board at an overcap stop, fraction of boards that are overcap SIM_COL_PAX_PROBABILITY
Probability of this path SIM_COL_PAX_WAIT_TIME
Wait time SKIM_END_TIME
Configuration: End of the time period for which the skim is required (specify as ‘HH:MM’). SKIM_START_TIME
Configuration: Beginning of the time period for which the skim is required. SKIP_PERSON_IDS
Skip these passengers STOCH_DISPERSION
Route choice configuration: Dispersion parameter in the logit function. STOCH_MAX_STOP_PROCESS_COUNT
Route choice configuration: How many times max times should we process a stop during labeling? Use -1 to specify no max. STOCH_PATHSET_SIZE
Route choice configuration: How many stochastic paths will we generate (not necessarily unique) to define a path choice set? Int. TIME_WINDOW
Configuration: Path time-window. TRACE_IDS
Trace these persons/person trips (a list of tuples) TRANSFER_FARE_IGNORE_PATHENUM
In path-enumeration, suppress trying to adjust fares using transfer fare rules. TRANSFER_FARE_IGNORE_PATHFINDING
In path-finding, suppress trying to adjust fares using transfer fare rules. UTILS_CONVERSION
Stop labeling configuration: Multiplies the utilities by this factor so that there are not negative costs labels which can result in lengthy and ineffective path-finding. bump_wait
This is the only simulation state that exists across iterations It’s a dictionary of (trip_id, stop_id) -> earliest time a bumped passenger started waiting bump_wait_df
-
static
choose_paths_without_simulation
(FT, output_dir, iteration, pathfinding_iteration, pathset_paths_df, pathset_links_df, veh_trips_df)[source]¶ Given a pathset for each passernger, choose a path (if relevant). That’s it.
Returns (valid_linked_trips, pathset_paths_df, pathset_links_df)
-
static
compare_choices
(pathset_paths_df, prior_choice)[source]¶ Reads in a pathset_path_df and the pathset_path_df of a prior iteration and returns the number of new choices made in the current iteration along with a simplified chosen df to use in the next iteration.
Parameters: - pathset_paths_df – Current iteration of Pathset_Paths_DF
- prior_choice – Pathset_Paths_DF of a prior iteration.
Returns: - new_choices_count: Total number of new choices in this iteration
compared to the input prior choice df.
- chosen: Simplified DF of ‘person_id’, ‘person_trip_id_num’, and ‘description’
that can be used in subsequent invocations of this method.
-
static
filter_trip_list_to_not_arrived
(trip_list_df, pathset_paths_df)[source]¶ Filter the given trip list to only those that have not arrived according to pathset_paths_df.
-
static
find_passenger_vehicle_times
(pathset_links_df, veh_trips_df)[source]¶ Given a dataframe of passenger links and a dataframe of vehicle trip links, adds two new columns to the passenger links for board and alight time.
- Takes the trip links of pathset_links_df (columns: person_id, trip_list_id_num, pathnum, linkmode, trip_id_num, A_id_num, B_id_num, A_seq, B_seq, pf_A_time, pf_B_time, pf_linktime, A_id, B_id, trip_id)
- Joins with vehicle trips on trip id num, A_id, A_seq to add: * board time (Assignment.SIM_COL_PAX_BOARD_TIME) * overcap (Assignment.SIM_COL_PAX_OVERCAP) * overcap_frac (Assignment.SIM_COL_PAX_OVERCAP_FRAC)
- Joins with vehicle trips on trip id num, B_id, B_seq to add: * alight time (Assignment.SIM_COL_PAX_ALIGHT_TIME)
Returns the same dataframe but with four additional columns (replacing them if they’re already there).
-
static
find_trip_based_pathset
(iteration, pathfinding_iteration, pathset, hyperpath, trace)[source]¶ Perform trip-based path set search.
Will do so either backwards (destination to origin) if
PathSet.direction
isPathSet.DIR_OUTBOUND
or forwards (origin to destination) ifPathSet.direction
isPathSet.DIR_INBOUND
.- Returns (pathdict,
- performance_dict)
Where pathdict maps {pathnum:{PATH_KEY_COST:cost, PATH_KEY_PROBABILITY:probability, PATH_KEY_STATES:[state list]}}
- Where performance_dict includes:
- pathfinding return status, number of label iterations, max number of times a stop was processed, seconds spent in labeling, seconds spend in enumeration
Parameters: - pathset (a
PathSet
instance) – the path to fill in - hyperpath (bool) – pass True to use a stochastic hyperpath-finding algorithm, otherwise a deterministic shortest path search algorithm will be use.
- trace (bool) – pass True if this path should be traced to the debug log
-
static
flag_missed_transfers
(pathset_paths_df, pathset_links_df)[source]¶ Given passenger pathset links with the vehicle board_time and alight_time attached to trip links, this method will add columns to determine if there are missed transfers.
This works on all paths in the pathset rather than just the chosen paths because then we can choose a path without missed transfers.
The following columns are used in pathset_links_df: * Passenger.TRIP_LIST_COLUMN_TRIP_LIST_ID_NUM, * Passenger.PF_COL_PATH_NUM, * Passenger.PF_COL_LINK_NUM, * Assignment.SIM_COL_PAX_BOARD_TIME * Assignment.SIM_COL_PAX_ALIGHT_TIME * Passenger.PF_COL_PAX_B_TIME
In particular, the following columns are added (or replaced if they’re already there) to pathset_links_df:
Column Name Column Description Assignment.SIM_COL_PAX_ALIGHT_DELAY_MIN
Delay in alight_time from original pathfinding understanding of alight time Assignment.SIM_COL_PAX_A_TIME
New A time given the trip board/alight times for the trip links Assignment.SIM_COL_PAX_B_TIME
New B time given the trip board/alight times for the trip links Assignment.SIM_COL_PAX_LINK_TIME
New link time from B time - A time Assignment.SIM_COL_PAX_WAIT_TIME
New waittime given the trip board/alight times for the trip links Assignment.SIM_COL_PAX_MISSED_XFER
Is this link a missed xfer The column,
AssignmentSIM_COL_PAX_MISSED_XFER
, is also added to pathset_paths_df.
-
static
generate_pathsets
(FT, pathset_paths_df, veh_trips_df, output_dir, iteration, pathfinding_iteration)[source]¶ Figures out which person trips for whom to generate_pathsets, stored in
Passenger.pathfind_trip_list_df
Generates paths sets for those person trips using deterministic trip-based shortest path (TBSP) or stochastic trip-based hyperpath (TBHP).
Returns the number of pathsets found.
-
static
initialize_fasttrips_extension
(process_number, output_dir, stop_times_df)[source]¶ Initialize the C++ fasttrips extension by passing it the network supply.
-
static
load_passengers_on_vehicles_with_cap
(iteration, pathfinding_iteration, simulation_iteration, trips, pathset_paths_df, pathset_links_df, veh_loaded_df)[source]¶ Check if we have boards on over-capacity vehicles. Mark them and mark the boards.
If
Assignment.CAPACITY_CONSTRAINT
, then bump off overcapacity passengers.The process is:
- Look at which vehicle links are over capacity, adding columns named
Trip.SIM_COL_VEH_OVERCAP
and py:attr:Trip.SIM_COL_VEH_OVERCAP_FRAC to veh_loaded_df - Look at the stops where the first people board after we’re at capacity (impossible boards) if any
- If
Assignment.BUMP_ONE_AT_A_TIME
, select the first such stop by arrival time Otherwise, select the first such stop for each vehicle trip - Join these stops to pathset_links_df, so pathset_links_df now has column Assignment.SIM_COL_PAX_OVERCAP_FRAC
- If not
Assignment.CAPACITY_CONSTRAINT
, return (and drop the column namedTrip.SIM_COL_VEH_OVERCAP
from veh_loaded_df) - Figure out which passenger trips are actually getting bumped. Some people can get on at these stops, but not all, so let the first
ones that arrive at the stop get on and filter to the ones we’ll actually bump. Update the column named
Assignmment.SIM_COL_PAX_BUMP_ITER
. If non-null, this represents the iteration the passenger got bumped.
Return (chosen_paths_bumped, pathset_paths_df, pathset_links_df, veh_loaded_df)
- Look at which vehicle links are over capacity, adding columns named
-
static
merge_pathsets
(pathfind_trip_list_df, pathset_paths_df, pathset_links_df, new_pathset_paths_df, new_pathset_links_df)[source]¶ Merge the given new pathset paths and links into the existing
-
static
merge_prior_choices
(pathset_paths_df, pathset_links_df, flag_df)[source]¶ Join success or bump flag count information onto a pathset_paths_df and pathset_links_df :param pathset_paths_df: Current iteration of pathset_paths_df. :param pathset_links_df: Current iteration of pathset_links_df :param flag_df: success or bump df :return: pathset_paths_df and pathset_links_df with additional flag column.
-
static
number_of_pathsets
(pathset_paths_df)[source]¶ Counts the number of passenger trips with pathsets and returns it.
-
static
process_weight_qualifiers
(weights)[source]¶ Qualifiers are used to change the default behavior of weight_names. Qualifiers are added by adding a period (.) after the weight_name and specifying the qualifier name. Qualifier attributes are specified after a second dot.
For example: depart_early_cost_min.logistic.growth_rate depart_early_cost_min is being qualified as a logistic penalty instead of the default behavior. growth_rate is an attribute of the logistic qualifier. :param weights: vertically oriented qualifiers :return: pivoted weights table with the qualifiers normalized horizontally.
-
static
put_passengers_on_vehicles
(pathset_links_df, veh_trips_df)[source]¶ Puts the chosen passenger trips specified in pathset_links_df onto the transit vehicle trips specified by veh_trip_df.
- Returns veh_trips_df but with updated columns
-
static
read_configuration
(config_fullpath)[source]¶ Read the configuration parameters from
Assignment.CONFIGURATION_FILE
-
static
read_functions
(func_file)[source]¶ Read the functions from :py:attr:`Assignment.CONFIGURATION_FUNCTIONS_FILE
-
static
read_weights
(weights_file=None)[source]¶ Read the weights from :py:attr:`Assignment.INPUT_WEIGHTS
-
static
save_choices
(pathset_paths_df, success_df, bump_df)[source]¶ Returns an updated count of successfully chosen paths and paths that were bumped for each user. :param pathset_paths_df: Current iteration of pathset_paths_df after simulation. :param success_df: Count of chosen paths for each user across prior iterations :param bump_df: Count of bumped paths for each user across prior iterations :return:
success_df: Updated count of chosen paths for each user across each iteration bump_df: Updated count of bumped paths for each user across each iteration
-
static
set_fasttrips_bump_wait
(bump_wait_df)[source]¶ Sends the bump wait information to the fasttrips extension
-
static
simulate
(FT, output_dir, iteration, pathfinding_iteration, pathset_paths_df, pathset_links_df, veh_trips_df)[source]¶ Given a pathset for each passenger, choose a path (if relevant) and then actually assign the passengers trips to the vehicles.
Returns (valid_linked_trips, pathset_paths_df, pathset_links_df, veh_loaded_df)
-
static
write_configuration
(output_dir)[source]¶ Write the configuration parameters to function as a record with the output.
-
static
write_vehicle_trips
(output_dir, iteration, pathfinding_iteration, simulation_iteration, veh_trips_df)[source]¶
-
BOARD_STATE_CATEGORICAL
= ['board_easy', 'boarded', 'bumped', 'bumped_othertrip', 'bumped_unchosen']¶ path invalidated before ever chosen due to capacity problems
-
BUMP_BUFFER
= None¶ Extra time so passengers don’t get bumped (?). A
datetime.timedelta
instance.
-
BUMP_ONE_AT_A_TIME
= None¶ Simulation: bump one stop at a time (slower, more accurate)
When addressing capacity constraints in simulation, we look at all the (trip, stop)-pairs where the boards are not allowed since vehicle is over capacity. The faster way to address this is to bump all of those passengers, which means we call the assigned path bad and try to reassign.
However, this could over-bump passengers, because if a passenger rides multiple crowded vehicles, then bumping her frees up space on other vehicles and so some other bumping may not be necessary. Thus, the more accurate (but slower) method is to bump passengers from each (trip,stop) at a time, in order of the full vehicle arrival time, and then recalculate loads, and iterate until we have no capacity issues. Boolean.
-
CAPACITY_CONSTRAINT
= None¶ Route choice configuration: Use vehicle capacity constraints. Boolean.
-
CHOSEN_CATEGORIES
= ['rejected', 'unchosen']¶ These will be ordered, so to select chosen, choose those > CHOSEN_NOT_CHOSEN_YET
-
CHOSEN_NOT_CHOSEN_YET
= 'unchosen'¶ categories for SIM_COL_PAX_CHOSEN
-
CHOSEN_REJECTED
= 'rejected'¶
-
CONFIGURATION_FILE
= None¶ Configuration file for fasttrips
-
CONFIGURATION_FUNCTIONS_FILE
= None¶ Configuration functions
-
CONFIGURATION_OUTPUT_FILE
= 'ft_output_config.txt'¶ Output copy of the configuration file in case anything got overridden (Hmm naming conventions are a bit awkward here)
-
CONVERGENCE_GAP
= None¶
-
CREATE_SKIMS
= None¶ Configuration: Create skims flag. This is specific to the travel demand models (not working in this version). Boolean.
-
DEBUG_NUM_TRIPS
= -1¶ Debug mode: only run this number of trips, -1 to run all. Int.
-
DEBUG_OUTPUT_COLUMNS
= False¶ Debug: include debug columns in output
-
DEBUG_TRACE_ONLY
= False¶ Debug mode: only run trace passengers
-
FARE_ZONE_SYMMETRY
= False¶
-
INPUT_DEMAND_DIR
= None¶ Configuration: Input demand directory
-
INPUT_NETWORK_ARCHIVE
= None¶ Configuration: Input network directory
-
INPUT_WEIGHTS
= None¶ Configuration: Pathweight parameters
-
MAX_ITERATIONS
= None¶ Configuration: Maximum number of iterations to remove capacity violations. When the transit system is not crowded or when capacity constraint is relaxed the model will terminate after the first iteration
-
MAX_NUM_PATHS
= None¶ Route choice configuration: Max number of paths in a pathset. Used in conjuntion with
Assignment.MIN_PATH_PROBABILITY
-
MAX_PF_ITERATIONS
= 10¶
-
MAX_SIMULATION_ITERS
= 10¶ How many Simulation Iterations should we do before going back to path-finding?
-
MIN_PATH_PROBABILITY
= None¶ Route choice configuration: Minimum path probability for the path to be used. Used in conjucntion with
Assignment.MAX_NUM_PATHS
, so it only kicks in if that is specified AND we hit it, then we start dropping using this threshhold.
-
MSA_RESULTS
= False¶ MSA the results that affect the next iteration to avoid oscillation: boards, alights, overcap onboard at stops
-
NETWORK_BUILD_DATE
= datetime.datetime(2019, 2, 27, 21, 11, 42, 808269)¶
-
NETWORK_BUILD_DATE_START_TIME
= datetime.datetime(2019, 2, 27, 0, 0)¶
-
NUMBER_OF_PROCESSES
= None¶ Number of processes to use for path finding (via
multiprocessing
) Set to 1 to run everything in this process Set to less than 1 to use the result ofmultiprocessing.cpu_count()
Set to positive integer greater than 1 to set a fixed number of processes
-
OUTPUT_DIR
= None¶ Configuration: Run Configuration
-
OUTPUT_PASSENGER_TRAJECTORIES
= None¶ Configuration: Passenger trajectory output flag. Passengers’ path and time will be reported if this flag is on. Note that the simulation flag should be on for passengers’ time. Boolean.
-
OUTPUT_PATHSET_PER_SIM_ITER
= None¶ Configuration: If true, outputs pathset every simulation iteration. If false, outputs pathset every path-finding iteration.
-
PATHFINDING_EVERYONE
= True¶ Are we finding paths for everyone right now? Or just un-arrived folks?
-
PATHFINDING_TYPE
= None¶ Configuration: Pathfinding Type. Should be one of Deterministic, Stochastic or File
-
PATHFINDING_TYPE_DETERMINISTIC
= 'deterministic'¶ Find paths deterministically, using shortest path search based on travel time.
-
PATHFINDING_TYPE_READ_FILE
= 'file'¶ Don’t find paths; read
Passenger.PF_PATHS_CSV
andPassenger.PF_LINKS_CSV
.
-
PATHFINDING_TYPE_STOCHASTIC
= 'stochastic'¶ Find paths stochastically using trip-based hyperpath
-
PREPEND_ROUTE_ID_TO_TRIP_ID
= False¶ Prepend the route id to the trip id? This is for readability in debugging, since route IDs are typically more readable and trip ids are inscrutable
-
SIMULATION
= None¶ Configuration: Do simulation? It should be True for iterative assignment. In a one shot assignment with simulation flag off, the passengers are assigned to paths but are not loaded to the network. Boolean.
-
SIM_COL_MISSED_XFER
= 'missed_xfer'¶ Is this link/path a missed transfer? Set in both pathset links and pathset paths, this is a 1 or 0
-
SIM_COL_PAX_ALIGHT_DELAY_MIN
= 'alight_delay_min'¶ Delay in alight_time from original pathfinding understanding of alight time
-
SIM_COL_PAX_ALIGHT_TIME
= 'alight_time'¶ Alight time from the transit vehicle
-
SIM_COL_PAX_A_TIME
= 'new_A_time'¶ Time of arrival at A
-
SIM_COL_PAX_BOARD_STATE
= 'board_state'¶ NaN if not relevent, 1 if lucky enough to board at an at- or over-capacity stop, 0 if bumped. Set by
Assignment.flag_bump_overcap_passengers()
-
SIM_COL_PAX_BOARD_TIME
= 'board_time'¶ Board time on the transit vehicle
-
SIM_COL_PAX_BUMP_ITER
= 'bump_iter'¶
-
SIM_COL_PAX_B_TIME
= 'new_B_time'¶ Time of arrival at B
-
SIM_COL_PAX_CHOSEN
= 'chosen'¶ Chosen status for path
-
SIM_COL_PAX_COST
= 'sim_cost'¶ Link cost. (Cannot be cost because it collides with TAZ.DRIVE_ACCESS_COLUMN_COST)
-
SIM_COL_PAX_DISTANCE
= 'distance'¶ Link distance
-
SIM_COL_PAX_FARE
= 'fare'¶ Link fare in currency
-
SIM_COL_PAX_FARE_PERIOD
= 'fare_period'¶ Fare period id
-
SIM_COL_PAX_FREE_TRANSFER
= 'free_transfer'¶ Free transfer? NaN, 0.0 or 1.0, only free based on fare_attributes_ft.txt
-
SIM_COL_PAX_LINK_TIME
= 'new_linktime'¶ Link time (SIM_COL_PAX_B_TIME - SIM_COL_PAX_A_TIME)
-
SIM_COL_PAX_LNPS
= 'ln_PS'¶ log(PathSize)
-
SIM_COL_PAX_LOGSUM
= 'logsum'¶ Logsum of all paths
-
SIM_COL_PAX_MISSED_XFER
= 'missed_xfer'¶ Is this link a missed transfer
-
SIM_COL_PAX_OVERCAP
= 'overcap'¶
-
SIM_COL_PAX_OVERCAP_FRAC
= 'overcap_frac'¶ If board at an overcap stop, fraction of boards that are overcap
-
SIM_COL_PAX_PROBABILITY
= 'probability'¶ Probability of this path
-
SIM_COL_PAX_WAIT_TIME
= 'new_waittime'¶ Wait time
-
SKIM_END_TIME
= None¶ Configuration: End of the time period for which the skim is required (specify as ‘HH:MM’). A
datetime.datetime
instance.
-
SKIM_START_TIME
= None¶ Configuration: Beginning of the time period for which the skim is required. (specify as ‘HH:MM’). A
datetime.datetime
instance.
-
SKIP_PERSON_IDS
= None¶ Skip these passengers
-
STOCH_DISPERSION
= None¶ Route choice configuration: Dispersion parameter in the logit function. Higher values result in less stochasticity. Must be nonnegative. If unknown use a value between 0.5 and 1. Float.
-
STOCH_MAX_STOP_PROCESS_COUNT
= None¶ Route choice configuration: How many times max times should we process a stop during labeling? Use -1 to specify no max. Int. Setting this to a positive value may increase runtime but may decrease pathset quality. (Todo: test/quantify this.)
-
STOCH_PATHSET_SIZE
= None¶ Route choice configuration: How many stochastic paths will we generate (not necessarily unique) to define a path choice set? Int.
-
TIME_WINDOW
= None¶ Configuration: Path time-window. This is the time in which the paths are generated. E.g. with a typical 30 min window, any path within 30 min of the departure time will be checked. A
datetime.timedelta
instance.
-
TRACE_IDS
= []¶ Trace these persons/person trips (a list of tuples)
-
TRANSFER_FARE_IGNORE_PATHENUM
= None¶ In path-enumeration, suppress trying to adjust fares using transfer fare rules. This is for performance testing.
-
TRANSFER_FARE_IGNORE_PATHFINDING
= None¶ In path-finding, suppress trying to adjust fares using transfer fare rules. This is for performance testing.
-
UTILS_CONVERSION
= None¶ Stop labeling configuration: Multiplies the utilities by this factor so that there are not negative costs labels which can result in lengthy and ineffective path-finding. Must be positive; should be greater than 1.0. Double.
-
bump_wait
= {}¶ This is the only simulation state that exists across iterations It’s a dictionary of (trip_id, stop_id) -> earliest time a bumped passenger started waiting
-
bump_wait_df
= None¶
-
static