Adam N. Elmachtoub and Hyemi Kim
This repository contains the source code to reproduce the findings presented in the research paper titled "Fair Fares for Vehicle Sharing Systems". For an in-depth understanding, please refer to the full paper.
Some code files utilize the Pyomo library to address non-convex optimization challenges. We employ the Couenne (global solver) and Ipopt (local solver) optimization solvers. While the codebase is tailored for usage with Colab, you have the flexibility to execute it locally by setting up the necessary libraries, such as pyomo.
-
$N$ : Number of locations (nodes) -
$K$ : Number of vehicles (units)
Visualizes characterized regions demonstrating price fairness implications for both linear and exponential demand models.
- Fairness Metrics: Price & Access
- Demand Function: Linear Demand
-
$N = 2$ ,$K = 1$
- Fairness Metrics: Price & Access
- Demand Function: Linear Demand
-
$N = 2$ ,$K \geq 1$
- Fairness Metrics: Price & Access
- Demand Function: Exponential Demand
-
$N = 2$ ,$K \geq 1$
- Fairness Metrics: Price & Access
- Demand Function: Linear & Exponential Demand
-
$N = 2$ ,$K = 1$ - Perform a grid search on the stylized model without utilizing a solver
- Fairness Metrics: (trip/origin based) Price & Access
- Demand Function: Exponential Demand
-
$N = 3$ ,$K \geq 1$
- Get an approximate solutions from Exponential_Approximation.ipynb
- Using the approximated solutions, run Exponential_Grid_Search.ipynb in Grid_Search
- Adjust the file location within the relevant code sections.
- Download the required data based on your desired analysis timeframe:
- Yellow Taxi Trip Records (PARQUET)
- Green Taxi Trip Records (PARQUET)
- High Volume For-Hire Vehicle Trip Records (PARQUET)
- Taxi Zone Lookup Table (CSV)
- Organize downloaded files into the "Case_Study/Data" folder.
- To visualize outcomes, download Taxi Zone Shapefile (PARQUET) and include the following files:
- taxi_zones.shx
- taxi_zones.shp
- Adjust the timeframe within the code as needed:
time_start = "2023-03-03 18:00:00"
time_end = "2023-03-03 20:00:00"
- Output: data_dictionary_logistic.pkl
Update the pwd (path) to load data_dictionary_logistic.pkl.