Skip to main content

The flexible and real-time commute trip sharing problems


The Commute Trip Sharing Problem (CTSP) was introduced to remove parking pressure on cities, as well as corporate and university campuses. Its goal is to reduce the number of vehicles being used for daily commuting activities. Given a set of inbound and outbound requests, which consists of origin and destination pairs and their departure and return times, the CTSP assigns riders and a driver, as well as inbound and outbound routes, to each vehicle in order to satisfy time-window, capacity, and ride-duration constraints. The CTSP guarantees a ride back for each rider, which is a critical aspect of such a ride-sharing system. This paper generalizes the CTSP to account for uncertainties about the return trip. Each rider is assumed to have a return time specified by a distribution (learned from historical data) and, each day, a percentage of riders will want to preprone or postpone their return trip to accommodate some schedule changes. The paper proposes two generalizations of the CTSP: the Flexible CTSP (FCTSP) and the Real-Time CTSP (RT-CTSP). In the FCTSP, riders must confirm their final return times by a fixed deadline. In the RT-CTSP, riders confirm their new return times in real time with some prior notice. The paper proposes a two-step approach to address the FCTSP and the RT-CTSP. The first step uses a scenario-based stochastic program to choose the drivers and the morning routes in order to maximize the robustness of the driver assignment. The second step reoptimizes the plan at the fixed deadline or in real time once the return times are confirmed. Experiments on a real-world dataset of commute trips demonstrate the effectiveness of the algorithm in generating robust plans and reveal a trade-off between vehicle reduction and plan robustness as the robust plans tend to be conservative. A method is then proposed to evaluate this trade-off using the per-unit price ratio of vehicle increase to uncovered riders.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11


  1. Bent, R.W., & Van Hentenryck, P. (2004). Scenario-based planning for partially dynamic vehicle routing with stochastic customers. Operations Research, 52(6), 977–987.

    Article  Google Scholar 

  2. Cordeau, J.F. (2006). A branch-and-cut algorithm for the dial-a-ride problem. Operations Research, 54(3), 573–586.

    Article  MathSciNet  Google Scholar 

  3. Cordeau, J.F., & Laporte, G. (2003). A tabu search heuristic for the static multi-vehicle dial-a-ride problem. Transportation Research Part B: Methodological, 37(6), 579–594.

    Article  Google Scholar 

  4. Desrochers, M. (1988). An algorithm for the shortest path problem with resource constraints. Tech. Rep. G-88-27 Les Cahiers du GERAD.

  5. Dumas, Y., Desrosiers, J., & Soumis, F. (1991). The pickup and delivery problem with time windows. European Journal of Operational Research, 54(1), 7–22.

    Article  MathSciNet  Google Scholar 

  6. Farley, A.A. (1990). A note on bounding a class of linear programming problems, including cutting stock problems. Operations Research, 38(5), 922–923.

    Article  Google Scholar 

  7. Hasan, M.H., Van Hentenryck, P., Budak, C., Chen, J., & Chaudhry, C. (2018). Community-based trip sharing for urban commuting. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, AAAI-18 (pp. 6589–6597). California: AAAI Press.

  8. Hasan, M.H., Van Hentenryck, P., & Legrain, A. (2019). The commute trip sharing problem. arXiv:1904.11017.

  9. Hunsaker, B., & Savelsbergh, M.W.P. (2002). Efficient feasibility testing for dial-a-ride problems. Operations Research Letters, 30(3), 169–173.

    Article  MathSciNet  Google Scholar 

  10. Jaw, J.J., Odoni, A.R., Psaraftis, H.N., & Wilson, N.H. (1986). A heuristic algorithm for the multi-vehicle advance request dial-a-ride problem with time windows. Transportation Research Part B: Methodological, 20(3), 243–257.

    Article  Google Scholar 

  11. Raghunathan, A.U., Bergman, D., Hooker, J., Serra, T., & Kobori, S. (2018). The integrated last-mile transportation problem (ILMTP). In Twenty-eighth international conference on automated planning and scheduling, ICAPS 2018 (pp. 388–397). California: AAAI Press.

  12. Raghunathan, A.U., Bergman, D., Hooker, J., Serra, T., & Kobori, S. (2018). Seamless multimodal transportation scheduling. arXiv:1807.09676.

  13. Savelsbergh, M.W.P. (1985). Local search in routing problems with time windows. Annals of Operations Research, 4(1), 285–305.

    Article  MathSciNet  Google Scholar 

  14. Serra, T., Raghunathan, A.U., Bergman, D., Hooker, J., & Kobori, S. (2019). Last-mile scheduling under uncertainty. In Rousseau, L. M., & Stergiou, K. (Eds.) Integration of constraint programming, artificial intelligence, and operations research (pp. 519–528). Cham: Springer International Publishing.

  15. Srour, F.J., Agatz, N., & Oppen, J. (2018). Strategies for handling temporal uncertainty in pickup and delivery problems with time windows. Transportation Science, 52(1), 3–19.

    Article  Google Scholar 

Download references


We would like to thank Stephen Dolen from Logistics, Transportation, and Parking of the University of Michigan for his assistance in obtaining the dataset used in this research. Part of this research was funded by NSF Grant 1854684 and the Rackham Graduate Student Research Grant. This research was also supported in part through computational resources and services provided by Advanced Research Computing at the University of Michigan.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Mohd. Hafiz Hasan.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hasan, M.H., Van Hentenryck, P. The flexible and real-time commute trip sharing problems. Constraints 25, 160–179 (2020).

Download citation

  • Published:

  • Issue Date:

  • DOI: