Ride-sharing optimization formulation based on queuing theory [1].
- Manhattan is divided into 63 zones.
- Traffic flow of each zone is modeled as an M/M/1 queue.
- Demand and supply of an M/M/1 queue are calculated from average traffic inflows and outflows during four years [2].
- The average traffic inflows and outflows are in
./data
for each time period (weekday morning, weekday lunch, weekday dinner, weekday night, weekend morning, weekend lunch, weekend dinner, weekend night).
Please refer to Section 5.4 of [1] for detailed notations and derivations. There are the two most important terms.
-
$\frac{1}{\lambda_i}$ : the average number of arriving passengers to zone$i$ . -
$\frac{\rho_i}{\mu_i - \lambda_i}$ : the average waiting time of serviced passengers at zone$i$ .
Setting
To use more decision variables and constraints, Gurobipy educational license [3] was used. The location you want to start from and the time limit are needed. The location indices are as follows.
python3 single_fixed_depot.py -z ${depot_index} -l ${time_limit} -a ${alpha} -b ${beta}
For exmaple,
python3 single_fixed_depot.py -z 3 -l 3600 -a 1 -b 0
Unlike single_fixed_depot.py
, we should decide the number of vehicles to control and the fixed depot doesn't need.
python3 multi_no_depot.py -v ${num_vehicles} -l ${time_limit} -a ${alpha} -b ${beta}
For example,
python3 multi_no_depot.py -v 6 -l 1800 -a 1 -b 0
[1] Lee, Jungeun and Kim, Sunhwi and Kim, Eunchong and Vo, Cong Phat and Song, Jeonghwan and Jeon, Jeong hwan, Deep Reinforcement Learning-Based Autonomous Ride-Sharing System. Available at SSRN: https://ssrn.com/abstract=4773032 or http://dx.doi.org/10.2139/ssrn.4773032
[2] Donovan, Brian; Work, Dan (2016): New York City Taxi Trip Data (2010-2013). University of Illinois at Urbana-Champaign. https://doi.org/10.13012/J8PN93H8
[3] Gurobi Optimization, L. (2023), Gurobi optimizer reference manual. https://www.gurobi.com