Skip to content

Commit

Permalink
merge RouteVizConfig into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
chiertu committed Dec 10, 2023
2 parents 1975655 + b109d4a commit 3cd4502
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 21 deletions.
33 changes: 19 additions & 14 deletions code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,34 @@
* `bike_conversion.py`: Converts truck-serviced points to bike-serviced points when near other bike-serviced points
* Aggregate pickup/dropoff loads to designated aggregation points
* Separate .csv outputs into bike-only and truck-only datasets

* `GenerateSingleSourceofTruth.py`:
This is a python script to clean the data and create the single source of truth dataframe that will be used for all location points in a given city.
* To change the script's config parameters, change parameters in the `convert.to_bikes` section of `utils/config_inputs.ini`
* `extract_capacity_demands.py`: extract pickup/dropoff demands for all locations
* `extract_supplementary_info.py`: extract supplementary info for all locations (to help with visualization)
* `GetWayPoint.py` :
data: optimized route data
this file will using the data and request the waypoints through the route along with the instructions for driving
* `GenerateDistMatrix.py`: This is a python script to generate distance matrices for any dataset
* `optimize_cvrp.py`:
Performs route optimization using the Google ORTools Capacitated Vehicle Routing Problem algorithm; can be generalized and applied to any locations dataset and any constraint inputs by changing arguments in the utils/config_inputs.ini
* `GenerateSingleSourceofTruth.py`:
This is a python script to clean the data and create the single source of truth dataframe that will be used for all location points in a given city.
* `RouteViz.py`: Given a folder/directory of routes, create interactive visualizations (.html).



* To change the script's config parameters, change parameters in the `route.viz` section of `utils/config_inputs.ini`
* `RouteWithTime.py` :
data: optimized route data

this file will using the data and request the time duration between each stop from mapbox direction API and than accumulates all
This file will using the data and request the time duration between each stop from mapbox direction API and than accumulates all
the time plus 5 min picking up or drop up time at each stop.


* `GetWayPoint.py` :
data: optimized route data

this file will using the data and request the waypoints through the route along with the instructions for driving

* `complete_feasibility_report.py` :
Use this script to add a new row to the output/feasibilityfile.csv which records the inputs and outputs generated from running a new model. This script will interact with the utils/config.ini file to grab inputs and outputs from the pipeline and update the feasibility report for each new trial
### Pipeline
Many scripts interact with the utils/config_inputs.ini file to grab inputs and outputs from the pipeline and update the feasibility report for each new trial. Remember to change this to fit the pipeline to your needs.
1. `GenerateSingleSourceofTruth.py`
2. `GenerateDistMatrix.py`
3. `bike_conversion.py`
4. `RouteViz.py`
5. `complete_feasibility_report.py`:


* `perpetual_pipeline.py`:
This is the pipeline for our project.
2 changes: 1 addition & 1 deletion code/bike_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 2. parse config
truth_df_path = cfg["truth_df_path"]
truth_dist_df_path = cfg["truth_dist_df_path"]
location = [float(cfg["Latitude"]), float(cfg["Longitude"])]
location = [float(cfg["latitude"]), float(cfg["longitude"])]
distance_thresh = float(cfg["distance_thresh"]) # in meters
aggs = ast.literal_eval(cfg["bike_aggregate_list"])

Expand Down
Loading

0 comments on commit 3cd4502

Please sign in to comment.