Bike Share Rebalancing With Mathematical Optimization
Problem
Using historical Citi-bike data in NYC and Jersey area during July 2022, we like to know:
What is the demand for bikes per hour at each station during the first week of August?
Knowing the demand, how can we minimize loss of sale?
We use a mixture of Machine Learning (ML) and Mathematical Optimization (MO) to solve this problem.
Repo Guide
The ML model to predict the number of in-flow and out-flow of bikes per hour at each station
for the first week of August, can be found in the predict_bike_flow notebook.
The MO model to decide how many bikes should be added to or removed from each station
during each hour (with the goal of minimizing total loss of sale) is in the bike_rebalancing notebook.
The data is collected from the Citi-bike data website. They are processed in predict_bike_flow notebook.
The stations_flow.csv and top_stations.csv are the outputs of ML model
that are used as inputs for the MO model. Of course, you can run the predict_bike_flow notebook and
or even modify it as you please to get new results. Just ensure the format of the output is similar
in case you like to use the MO model of bike_rebalancing notebook.
For details on licensing or on running the notebooks, see the overview on Modeling Examples
This notebook can be ran using the “online course” version of Gurobi.