Using SolverStudio for linear programming – a solution to Lumosity’s Pet Detective game

I needed to get up to speed on tools for linear programming for a project. After looking at Excel, AMPL, Lingo, and Rstudio, I selected SolverStudio. As an exercise, I applied it to the Pet Detective (PD) game on Lumosity.com. PD is a constrained vehicle delivery problem, so I modeled it as a network with the costs equal to the distances between the “nodes,” which consist of the starting point, the homes, and the pets. The starting point is the car, which can carry a maximum of 4 pets at a time.

If you are already familiar with SolverStudio and just want the formulation details, then go to the source files on GitHub here. It includes formulations written in AMPL and PuLP for the Pet Detective problem, solutions to several problems from 3 to 11 pets, including solution times, and some examples from the AMPL book. I did not automate the generation of the distance matrix as I was interested in the optimization, so if you use this for a new problem, you’ll have to provide that piece yourself. For a more technical, but not mathematically rigorous, discussion, see the PDF document here.

SolverStudio is an add-in for Microsoft Excel that interfaces to a number of different linear solver packages with capabilities for several modeling languages. SolverStudio is a great learning tool. For details, visit http://www.SolverStudio.org.