A generic exact solver for vehicle routing and related problems


Major advances were recently obtained in the exact solution of vehicle routing problems (VRPs). Sophisticated branch-cut-and-price (BCP) algorithms for some of the most classical VRP variants now solve many instances with up to a few hundreds of customers. However, adapting and reimplementing those successful algorithms for other variants can be a very demanding task. This work proposes a BCP solver for a generic model that encompasses a wide class of VRPs. It incorporates the key elements found in the best existing VRP algorithms: ng-path relaxation, rank-1 cuts with limited memory, path enumeration, and rounded capacity cuts; all generalized through the new concepts of “packing set” and “elementarity set”. The concepts are also used to derive a branching rule based on accumulated resource consumption and to generalize the Ryan and Foster branching rule. Extensive experiments on several variants show that the generic solver has an excellent overall performance, in many problems being better than the best specific algorithms. Even some non-VRPs, like bin packing, vector packing and generalized assignment, can be modeled and effectively solved.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3


  1. 1.

    Achterberg, T.: Constraint integer programming. Ph.D. thesis, Technische Universitat Berlin (2007)

  2. 2.

    Archetti, C., Bianchessi, N., Speranza, M.: Optimal solutions for routing problems with profits. Discrete Appl. Math. 161(4–5), 547–557 (2013)

    MathSciNet  MATH  Google Scholar 

  3. 3.

    Avella, P., Boccia, M., Vasilyev, I.: A computational study of exact knapsack separation for the generalized assignment problem. Comput. Optim. Appl. 45(3), 543–555 (2010)

    MathSciNet  MATH  Google Scholar 

  4. 4.

    Baldacci, R., Bartolini, E., Mingozzi, A.: An exact algorithm for the pickup and delivery problem with time windows. Oper. Res. 59(2), 414–426 (2011)

    MathSciNet  MATH  Google Scholar 

  5. 5.

    Boost C++ libraries (2019). https://www.boost.org/

  6. 6.

    Baldacci, R., Christofides, N., Mingozzi, A.: An exact algorithm for the vehicle routing problem based on the set partitioning formulation with additional cuts. Math. Program. 115, 351–385 (2008)

    MathSciNet  MATH  Google Scholar 

  7. 7.

    Baldacci, R., Mingozzi, A.: A unified exact method for solving different classes of vehicle routing problems. Math. Program. 120(2), 347–380 (2009)

    MathSciNet  MATH  Google Scholar 

  8. 8.

    Baldacci, R., Mingozzi, A., Roberti, R.: New route relaxation and pricing strategies for the vehicle routing problem. Oper. Res. 59(5), 1269–1283 (2011)

    MathSciNet  MATH  Google Scholar 

  9. 9.

    Balinski, M., Quandt, R.: On an integer program for a delivery problem. Oper. Res. 12(2), 300–304 (1964)

    Google Scholar 

  10. 10.

    Bartolini, E., Cordeau, J.F., Laporte, G.: Improved lower bounds and exact algorithm for the capacitated arc routing problem. Math. Program. 137(1), 409–452 (2013)

    MathSciNet  MATH  Google Scholar 

  11. 11.

    Beasley, J.E.: OR-Library: Distributing test problems by electronic mail. J. Oper. Res. Soc. 41(11), 1069–1072 (1990)

    Google Scholar 

  12. 12.

    Belenguer, J., Benavent, E.: The capacitated arc routing problem: Valid inequalities and facets. Comput. Optim. Appl. 10(2), 165–187 (1998)

    MathSciNet  MATH  Google Scholar 

  13. 13.

    Belov, G., Scheithauer, G.: A branch-and-cut-and-price algorithm for one-dimensional stock cutting and two-dimensional two-stage cutting. Eur. J. Oper. Res. 171(1), 85–106 (2006)

    MathSciNet  MATH  Google Scholar 

  14. 14.

    Benavent, E., Corberán, Á., Desaulniers, G., Lessard, F., Plana, I., Sanchis, J.M.: A branch-price-and-cut algorithm for the min-max k-vehicle windy rural postman problem. Networks 63(1), 34–45 (2014)

    MathSciNet  MATH  Google Scholar 

  15. 15.

    Bianchessi, N., Mansini, R., Speranza, M.G.: A branch-and-cut algorithm for the team orienteering problem. Int. Trans. Oper. Res. 25(2), 627–635 (2018)

    MathSciNet  MATH  Google Scholar 

  16. 16.

    Bode, C., Irnich, S.: Cut-first branch-and-price-second for the capacitated arc-routing problem. Oper. Res. 60(5), 1167–1182 (2012)

    MathSciNet  MATH  Google Scholar 

  17. 17.

    Archetti, C., Feillet, D., Hertz, A., Speranza, M.G.: The capacitated team orienteering and profitable tour problems. J. Oper. Res. Soc. 60(6), 831–842 (2009)

    MATH  Google Scholar 

  18. 18.

    Brandão, F.: Pedroso, JaP: bin packing and related problems—general arc-flow formulation with graph compression. Comput. Oper. Res. 69, 56–67 (2016)

    MathSciNet  MATH  Google Scholar 

  19. 19.

    Bulhoes, T., Hà, M.H., Martinelli, R., Vidal, T.: The vehicle routing problem with service level constraints. Eur. J. Oper. Res. 265(2), 544–558 (2018)

    MathSciNet  MATH  Google Scholar 

  20. 20.

    Bulhões, T., Pessoa, A., Protti, F., Uchoa, E.: On the complete set packing and set partitioning polytopes: properties and rank 1 facets. Oper. Res. Lett. 46(4), 389–392 (2018)

    MathSciNet  MATH  Google Scholar 

  21. 21.

    Bulhoes, T., Sadykov, R., Uchoa, E.: A branch-and-price algorithm for the minimum latency problem. Comput. Oper. Res. 93, 66–78 (2018)

    MathSciNet  MATH  Google Scholar 

  22. 22.

    Caprara, A., Toth, P.: Lower bounds and algorithms for the 2-dimensional vector packing problem. Discrete Appl. Math. 111(3), 231–262 (2001)

    MathSciNet  MATH  Google Scholar 

  23. 23.

    Chao, I.M., Golden, B.L., Wasil, E.A.: The team orienteering problem. Eur. J. Oper. Res. 88(3), 464–474 (1996)

    MATH  Google Scholar 

  24. 24.

    Christofides, N., Eilon, S.: An algorithm for the vehicle-dispatching problem. Oper. Res. Q. 20, 309–318 (1969)

    Google Scholar 

  25. 25.

    Christofides, N., Mingozzi, A., Toth, P.: Combinatorial Optimization, chap. The Vehicle Routing Problem, pp. 315–338. Wiley, Chichester (1979)

  26. 26.

    Clautiaux, F., Hanafi, S., Macedo, R., Émilie Voge, M., Alves, C.: Iterative aggregation and disaggregation algorithm for pseudo-polynomial network flow models with side constraints. Eur. J. Oper. Res. 258(2), 467–477 (2017)

    MathSciNet  MATH  Google Scholar 

  27. 27.

    Contardo, C., Martinelli, R.: A new exact algorithm for the multi-depot vehicle routing problem under capacity and route length constraints. Discrete Optim. 12, 129–146 (2014)

    MathSciNet  MATH  Google Scholar 

  28. 28.

    Cordeau, J.F., Gendreau, M., Laporte, G.: A tabu search heuristic for periodic and multi-depot vehicle routing problems. Networks 30(2), 105–119 (1997)

    MATH  Google Scholar 

  29. 29.

    Dantzig, G., Ramser, J.: The truck dispatching problem. Manage. Sci. 6(1), 80–91 (1959)

    MathSciNet  MATH  Google Scholar 

  30. 30.

    Delorme, M., Iori, M.: Enhanced pseudo-polynomial formulations for bin packing and cutting stock problems. INFORMS J. Comput. 32(1), 101–119 (2020)

    Google Scholar 

  31. 31.

    Delorme, M., Iori, M., Martello, S.: Bin packing and cutting stock problems: Mathematical models and exact algorithms. Eur. J. Oper. Res. 255(1), 1–20 (2016)

    MathSciNet  MATH  Google Scholar 

  32. 32.

    Desaulniers, G., Desrosiers, J., loachim, I., Solomon, M.M., Soumis, F., Villeneuve, D., et al.: A unified framework for deterministic time constrained vehicle routing and crew scheduling problems. In: Fleet Management and Logistics, pp. 57–93. Springer (1998)

  33. 33.

    Desaulniers, G., Lessard, F., Hadjar, A.: Tabu search, partial elementarity, and generalized k-path inequalities for the vehicle routing problem with time windows. Transp. Sci. 42(3), 387–404 (2008)

    Google Scholar 

  34. 34.

    Dunning, I., Huchette, J., Lubin, M.: JuMP: a modeling language for mathematical optimization. SIAM Rev. 59(2), 295–320 (2017)

    MathSciNet  MATH  Google Scholar 

  35. 35.

    Eglese, R.W., Li, L.Y.O.: Efficient routeing for winter gritting. J. Oper. Res. Soc. 43(11), 1031–1034 (1992)

    Google Scholar 

  36. 36.

    El-Hajj, R., Dang, D.C., Moukrim, A.: Solving the team orienteering problem with cutting planes. Comput. Oper. Res. 74, 21–30 (2016)

    MathSciNet  MATH  Google Scholar 

  37. 37.

    Falkenauer, E.: A hybrid grouping genetic algorithm for bin packing. J. Heuristics 2, 5–30 (1996)

    Google Scholar 

  38. 38.

    Fukasawa, R., Longo, H., Lysgaard, J., Aragão, MPd, Reis, M., Uchoa, E., Werneck, R.F.: Robust branch-and-cut-and-price for the capacitated vehicle routing problem. Math. Program. 106(3), 491–511 (2006)

  39. 39.

    Gehring, H., Homberger, J.: Parallelization of a two-phase metaheuristic for routing problems with time windows. J. Heuristics 8(3), 251–276 (2002)

    MATH  Google Scholar 

  40. 40.

    Gélinas, S., Desrochers, M., Desrosiers, J., Solomon, M.M.: A new branching strategy for time constrained routing problems with application to backhauling. Ann. Oper. Res. 61(1), 91–109 (1995)

    MATH  Google Scholar 

  41. 41.

    Gouveia, L., Leitner, M., Ruthmair, M.: Extended formulations and branch-and-cut algorithms for the black-and-white traveling salesman problem. Eur. J. Oper. Res. 262(3), 908–928 (2017)

    MathSciNet  MATH  Google Scholar 

  42. 42.

    Gschwind, T., Irnich, S., Rothenbächer, A.K., Tilk, C.: Bidirectional labeling in column-generation algorithms for pickup-and-delivery problems. Eur. J. Oper. Res. 266(2), 521–530 (2018)

    MathSciNet  MATH  Google Scholar 

  43. 43.

    Gurobi Optimization, L.: Gurobi optimizer reference manual, version 7.5 (2017). http://www.gurobi.com

  44. 44.

    Held, S., Cook, W., Sewell, E.C.: Maximum-weight stable sets and safe lower bounds for graph coloring. Math. Program. Comput. 4(4), 363–381 (2012)

    MathSciNet  MATH  Google Scholar 

  45. 45.

    Heßler, K., Gschwind, T., Irnich, S.: Stabilized branch-and-price algorithms for vector packing problems. Eur. J. Oper. Res. 271(2), 401–419 (2018)

    MathSciNet  MATH  Google Scholar 

  46. 46.

    Irnich, S.: Resource extension functions: Properties, inversion, and generalization to segments. OR Spectrum 30(1), 113–148 (2008)

    MathSciNet  MATH  Google Scholar 

  47. 47.

    Irnich, S., Desaulniers, G., Desrosiers, J., Hadjar, A.: Path-reduced costs for eliminating arcs in routing and scheduling. INFORMS J. Comput. 22(2), 297–313 (2010)

    MathSciNet  MATH  Google Scholar 

  48. 48.

    Jepsen, M., Petersen, B., Spoorendonk, S., Pisinger, D.: Subset-row inequalities applied to the vehicle-routing problem with time windows. Oper. Res. 56(2), 497–511 (2008)

    MATH  Google Scholar 

  49. 49.

    Kallehauge, B., Larsen, J., Madsen, O.: Lagrangian duality applied to the vehicle routing problem with time windows. Comput. Oper. Res. 33(5), 1464–1487 (2006)

    MathSciNet  MATH  Google Scholar 

  50. 50.

    Kullmann, O.: Handbook of Satisfiability, chap. Fundaments of branching heuristics, pp. 205–244. IOS Press, Amsterdam (2009)

  51. 51.

    Laporte, G., Nobert, Y.: A branch and bound algorithm for the capacitated vehicle routing problem. Oper. Res. Spektrum 5(2), 77–85 (1983)

    MATH  Google Scholar 

  52. 52.

    Le Bodic, P., Nemhauser, G.: An abstract model for branching and its application to mixed integer programming. Math. Program. 166(1), 369–405 (2017)

    MathSciNet  MATH  Google Scholar 

  53. 53.

    LEMON: Library for Efficient Modeling and Optimization in Networks (2014). https://lemon.cs.elte.hu/trac/lemon

  54. 54.

    Li, H., Lim, A.: A metaheuristic for the pickup and delivery problem with time windows. Int. J. Artif. Intell. Tools 12(02), 173–186 (2003)

    Google Scholar 

  55. 55.

    Longo, H., De Aragão, M.P., Uchoa, E.: Solving capacitated arc routing problems using a transformation to the cvrp. Comput. Oper. Res. 33(6), 1823–1837 (2006)

    MATH  Google Scholar 

  56. 56.

    Lysgaard, J.: CVRPSEP: A package of separation routines for the capacitated vehicle routing problem. Technical report 03-04 Department of Management Science and Logistics, Aarhus School of Business (2003)

  57. 57.

    Lysgaard, J., Letchford, A.N., Eglese, R.W.: A new branch-and-cut algorithm for the capacitated vehicle routing problem. Math. Program. 100(2), 423–445 (2004)

    MathSciNet  MATH  Google Scholar 

  58. 58.

    Marques, G., Sadykov, R., Deschamps, J.C., Dupas, R.: An improved branch-cut-and-price algorithm for the two-echelon capacitated vehicle routing problem. Comput. Oper. Res. 114, 104833 (2020)

    MathSciNet  MATH  Google Scholar 

  59. 59.

    Nauss, R.M.: Solving the generalized assignment problem: An optimizing and heuristic approach. INFORMS J. Comput. 15(3), 249–266 (2003)

    MathSciNet  MATH  Google Scholar 

  60. 60.

    Parmentier, A.: Algorithms for non-linear and stochastic resource constrained shortest path. Math. Methods Oper. Res. 89(2), 281–317 (2019)

    MathSciNet  MATH  Google Scholar 

  61. 61.

    Pecin, D., Contardo, C., Desaulniers, G., Uchoa, E.: New enhancements for the exact solution of the vehicle routing problem with time windows. INFORMS J. Comput. 29(3), 489–502 (2017)

    MathSciNet  MATH  Google Scholar 

  62. 62.

    Pecin, D., Pessoa, A., Poggi, M., Uchoa, E.: Improved branch-cut-and-price for capacitated vehicle routing. In: Proceedings of the XVII IPCO, Lecture Notes in Computer Science, vol. 8494, pp. 393–403. Springer (2014)

  63. 63.

    Pecin, D., Pessoa, A., Poggi, M., Uchoa, E.: Improved branch-cut-and-price for capacitated vehicle routing. Math. Program. Comput. 9(1), 61–100 (2017)

    MathSciNet  MATH  Google Scholar 

  64. 64.

    Pecin, D., Pessoa, A., Poggi, M., Uchoa, E., Santos, H.: Limited memory rank-1 cuts for vehicle routing problems. Oper. Res. Lett. 45(3), 206–209 (2017)

    MathSciNet  MATH  Google Scholar 

  65. 65.

    Pecin, D., Uchoa, E.: Comparative analysis of capacitated arc routing formulations for designing a new branch-cut-and-price algorithm. Transp. Sci. 53(6), 1501–1799 (2019)

    Google Scholar 

  66. 66.

    Pessoa, A., Poss, M., Sadykov, R., Vanderbeck, F.: Branch-and-cut-and-price for the robust capacitated vehicle routing problem with knapsack uncertainty. Oper. Res. (Forthcoming) (2020)

  67. 67.

    Pessoa, A., Sadykov, R., Uchoa, E.: Enhanced branch-cut-and-price algorithm for heterogeneous fleet vehicle routing problems. Eur. J. Oper. Res. 270, 530–543 (2018)

    MathSciNet  MATH  Google Scholar 

  68. 68.

    Pessoa, A., Sadykov, R., Uchoa, E., Vanderbeck, F.: Automation and combination of linear-programming based stabilization techniques in column generation. INFORMS J. Comput. 30(2), 339–360 (2018)

    MathSciNet  Google Scholar 

  69. 69.

    Pessoa, A., Sadykov, R., Uchoa, E., Vanderbeck, F.: A generic exact solver for vehicle routing and related problems. In: Lodi, A., Nagarajan, V. (eds.) Integer Programming and Combinatorial Optimization, vol. 11480, pp. 354–369. Springer, Berlin (2019)

    Google Scholar 

  70. 70.

    Petersen, B., Pisinger, D., Spoorendonk, S.: Chvátal-gomory rank-1 cuts used in a dantzig-wolfe decomposition of the vehicle routing problem with time windows. In: Golden BL, Raghavan S, Wasil EA, (eds) The Vehicle Routing Problem: Latest Advances and New Challenges, pp. 397–419. Springer, Berlin (2008)

  71. 71.

    Poggi de Aragão, M., Uchoa, E.: Integer program reformulation for robust branch-and-cut-and-price. In: L. Wolsey (ed.) Annals of Mathematical Programming in Rio, pp. 56–61. Búzios, Brazil (2003)

  72. 72.

    Posta, M., Ferland, J.A., Michelon, P.: An exact method with variable fixing for solving the generalized assignment problem. Comput. Optim. Appl. 52, 629–644 (2012)

    MathSciNet  MATH  Google Scholar 

  73. 73.

    Righini, G., Salani, M.: Symmetry helps: Bounded bi-directional dynamic programming for the elementary shortest path problem with resource constraints. Discrete Optim. 3(3), 255–273 (2006)

    MathSciNet  MATH  Google Scholar 

  74. 74.

    Roberti, R., Mingozzi, A.: Dynamic ng-path relaxation for the delivery man problem. Transp. Sci. 48(3), 413–424 (2014)

    Google Scholar 

  75. 75.

    Røpke, S.: Branching decisions in branch-and-cut-and-price algorithms for vehicle routing problems. Presentation in International Workshop on Column Generation, Bromont, Canada (2012)

    Google Scholar 

  76. 76.

    Ropke, S., Cordeau, J.F.: Branch and cut and price for the pickup and delivery problem with time windows. Transp. Sci. 43(3), 267–286 (2009)

    Google Scholar 

  77. 77.

    Ryan, D.M., Foster, B.A.: An integer programming approach to scheduling. In: Wren, A. (ed.) Computer Scheduling of Public Transport: Urban Passenger Vehicle and Crew Scheduling, pp. 269–280. North-Holland, Amsterdam (1981)

    Google Scholar 

  78. 78.

    Sadykov, R., Uchoa, E., Pessoa, A.: A bucket graph based labeling algorithm with application to vehicle routing. Transp. Sci. (Forthcoming) (2020)

  79. 79.

    Sadykov, R., Vanderbeck, F., Pessoa, A., Tahiri, I., Uchoa, E.: Primal heuristics for branch-and-price: the assets of diving methods. INFORMS J. Comput. 31(2), 251–267 (2019)

    MathSciNet  Google Scholar 

  80. 80.

    Schoenfield, J.E.: Fast, exact solution of open bin packing problems without linear programming. Technical report, US Army Space and Missile Defense Command (2002)

  81. 81.

    Solomon, M.M.: Algorithms for the vehicle routing and scheduling problems with time window constraints. Oper. Res. 35(2), 254–265 (1987)

    MathSciNet  MATH  Google Scholar 

  82. 82.

    Uchoa, E., Pecin, D., Pessoa, A., Poggi, M., Subramanian, A., Vidal, T.: New benchmark instances for the capacitated vehicle routing problem. Eur. J. Oper. Res. 257(3), 845–858 (2017)

    MathSciNet  MATH  Google Scholar 

  83. 83.

    Vanderbeck, F., Sadykov, R., Tahiri, I.: BaPCod — a generic Branch-And-Price Code (2018). https://realopt.bordeaux.inria.fr/?page_id=2

  84. 84.

    Vanderbeck, F., Wolsey, L.A.: Reformulation and decomposition of integer programs. In: 50 Years of Integer Programming 1958-2008, pp. 431–502. Springer (2010)

  85. 85.

    Wei, L., Luo, Z., Baldacci, R., Lim, A.: A new branch-and-price-and-cut algorithm for one-dimensional bin-packing problems. INFORMS J. Comput. 32(2), 428–443 (2020)

    Google Scholar 

Download references


We would like to thank Teobaldo Bulhoes and Guillaume Marques for a large part of the implementation of the Julia–JuMP interface to the solver; Teobaldo Bulhoes, Guillaume Marques and Eduardo Queiroga for implementing, over that interface, the models corresponding to the examples of this paper; and Laurent Facq for a general support of the computing environment. Experiments presented in this paper were carried out using the PlaFRIM (Federative Platform for Research in Computer Science and Mathematics), created under the Inria PlaFRIM development action with support from Bordeaux INP, LABRI and IMB and other entities: Conseil Régional d’Aquitaine, Université de Bordeaux, CNRS and ANR in accordance to the “Programme d’Investissements d’Avenir”. This study was financed in part by the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq), Grant 313601/2018-6 (Produtividade 1B), and by the Fundação de Amparo à Pesquisa do Estado do Rio de Janeiro (FAPERJ), Grant E-26/202.887/2017 (Cientista do Estado).

Author information



Corresponding author

Correspondence to Eduardo Uchoa.

Additional information

Publisher's Note

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

A short version of this work was already published in [69].

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Pessoa, A., Sadykov, R., Uchoa, E. et al. A generic exact solver for vehicle routing and related problems. Math. Program. (2020). https://doi.org/10.1007/s10107-020-01523-z

Download citation


  • Integer programming
  • Column generation
  • Routing

Mathematics Subject Classification

  • 90C11 Mixed integer programming
  • 90C06 Large-scale problems in mathematical programming
  • 90B06 Transportation
  • logistics and supply chain management
  • 90-04 Software
  • source code
  • etc. for problems pertaining to operations research and mathematical programming