I work almost exclusively in R and Rstudio, and have found it to be an excellent ecosystem for data analysis and OR, including discrete event simulation, Monte Carlo simulation, MILP, and the Traveling Salesman Problem. The ONLY gap I see is, no library for the Vehicle Routing Problem and variants.

Anybody know of a VRP package in R? I may need to undertake writing functions implementing VRP if I can't find a ready package.

  • 1
    $\begingroup$ Does the Concorde TSP Solver not fill your needs (doesn't handle your desired type of VRPs)? R interface to Concorde TSP Solver is available cran.r-project.org/web/packages/TSP/TSP.pdf and rdocumentation.org/packages/TSP/versions/1.1-7/topics/Concorde $\endgroup$ Jan 5 '20 at 1:12
  • $\begingroup$ Your chances of finding something like that in other languages (like Python) are higher. But if you need it in R and you find no luck, check this link and maybe contact the authors $\endgroup$
    – EhsanK
    Jan 5 '20 at 1:14
  • $\begingroup$ @MarkL.Stone I use that package for TSP, but I have the need for a number of capacitated VRP variants. $\endgroup$
    – Ralph
    Jan 5 '20 at 1:24
  • $\begingroup$ @EhsanK I know I could use Google ortools for Python, but there would be significant transition costs to moving large workflows from R to Python at this time. Thanks $\endgroup$
    – Ralph
    Jan 5 '20 at 1:26

The package netgen (v1.3) can be used to generate networks and benchmark instances of VRP and TSP.

As this article shows it is also possible to solve a variant of VRP (CVRP) in R Shiny, which is another package used for interactive modelling/applications.

  • 1
    $\begingroup$ The Shiny app looks like it has two CVRP algorithms behind it: sweep and GA. I have used Shiny quite a bit, but it still looks like the author had to write the algo himself in R and include that in the Shiny app code. Not a big deal, but at least I know that is what is needed. $\endgroup$
    – Ralph
    Jan 6 '20 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.