ighelpers module¶
-
tripsender.ighelpers.get_edge_length(geoms)¶ A function that gets the length of each geometry for the
geomscolumn supplied as a list.- Parameters
geoms – (GeoDataframe.geoms) The
GeoSeriesof the geometry column on aGeoDataFrame- Returns
(list) List of lengths for each geometry object
-
tripsender.ighelpers.profile(fnc)¶ A decorator that uses
cProfileto 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)
iGraphGraph object for car networkG_ped – (igraph graph object)
iGraphGraph object for ped networkSynthPop – (Pandas DataFrame)
DataFramecontaining the synthetic profilesclosest_car – (GeoDataFrame)
GDFcontaining origins and closest destinations for each destination classclosest_ped – (GeoDataFrame)
GDFcontaining origins and closest destinations for each destination classdict_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