allocator package¶
Subpackages¶
Submodules¶
allocator.cluster module¶
allocator.cluster_haversine module¶
allocator.cluster_kahip module¶
allocator.cluster_kmeans module¶
allocator.compare_buffoon_kmeans module¶
allocator.distance_matrix module¶
allocator.mst module¶
allocator.shortest_path_gm module¶
Shortest path using Google Direction API
-
allocator.shortest_path_gm.
main
(argv=['-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])¶
allocator.shortest_path_mst_tsp module¶
allocator.shortest_path_ortools module¶
allocator.shortest_path_osrm module¶
Shortest path using OSRM trip API
-
allocator.shortest_path_osrm.
main
(argv=['-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])¶
-
allocator.shortest_path_osrm.
osrm_trip
(coords, osrm_base_url=None)¶ List of (lon, lat)
For more information: https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#trip-service
allocator.sort_by_distance module¶
allocator.utils module¶
-
allocator.utils.
column_exists
(df, col)¶ Check the column name exists in the DataFrame.
- Args:
- df (
DataFrame
): Pandas DataFrame. col (str): Column name. - Returns:
- bool: True if exists, False if not exists.
-
allocator.utils.
fixup_columns
(cols)¶ Replace index location column to name with col prefix
- Args:
- cols (list): List of original columns
- Returns:
- list: List of column names
-
allocator.utils.
isstring
(s)¶