ighelpers module

tripsender.ighelpers.get_edge_length(geoms)

A function that gets the length of each geometry for the geoms column supplied as a list.

Parameters

geoms – (GeoDataframe.geoms) The GeoSeries of the geometry column on a GeoDataFrame

Returns

(list) List of lengths for each geometry object

tripsender.ighelpers.profile(fnc)

A decorator that uses cProfile to profile a function

tripsender.ighelpers.run_tripsender(A_car, A_ped, G_car, G_ped, SynthPop, closest_car, closest_ped, dict_Personas)

A function that runs the trip sender function.

Parameters
  • A_car – (numpy array) Array of all nodes in the graph

  • A_ped – (numpy array) Array of all nodes in the graph

  • G_car – (igraph graph object) iGraph Graph object for car network

  • G_ped – (igraph graph object) iGraph Graph object for ped network

  • SynthPop – (Pandas DataFrame) DataFrame containing the synthetic profiles

  • closest_car – (GeoDataFrame) GDF containing origins and closest destinations for each destination class

  • closest_ped – (GeoDataFrame) GDF containing origins and closest destinations for each destination class

  • dict_Personas – (List) List of dictionaries containing the 14 synthetic population groups

Returns

(GeoDataFrame) GDF of the result with a route column containing a list of nodes for the shortest path