Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i install Google's CP solver OR-Tools in MiniZinc?

I'm currently working on MiniZinc, and i have been running my models with the two solvers integrated in MiniZinc: Gecode and Chuffed. I've been running it in the IDE, but i am aware that it can be runned in bash too (using minizinc command).

But i would like to test how my models do with Google's CP solver, called OR-Tools. But i really don't know how. I got the MiniZinc snap installation in Ubuntu 18.04, but i can download a fresh directory of MiniZinc and run it locally, and configure the solver there (and not in snap installation since snap directories can not be modified).

I need a way to install OR-Tools and make it work at least in the terminal (but run it from the IDE would be perfect).

like image 419
Juan Marcos Avatar asked Apr 30 '20 23:04

Juan Marcos


People also ask

Can I run MiniZinc solver from a fresh Directory?

I got the MiniZinc snap installation in Ubuntu 18.04, but i can download a fresh directory of MiniZinc and run it locally, and configure the solver there (and not in snap installation since snap directories can not be modified). I need a way to install OR-Tools and make it work at least in the terminal (but run it from the IDE would be perfect).

How do I install the solver add-in?

If the Solver Add-in is not listed in the Add-Ins available box, click Browse to locate the add-in. If you get prompted that the Solver Add-in is not currently installed on your computer, click Yes to install it. After you load the Solver Add-in, the Solver command is available in the Analysis group on the Data tab.

Which solver should I use to solve my problem?

After modeling your problem in the programming language of your choice, you can use any of a half dozen solvers to solve it: commercial solvers such as Gurobi or CPLEX, or open-source solvers such as SCIP, GLPK, or Google's GLOP and award-winning CP-SAT.

What is the solver add-in for Excel 2013?

Solver is a free add-in for Excel 2013 with SP1 and later. For more information, search for Solver in the Office Store. The Solver add-in from Frontline Systems isn't currently available for Excel on mobile devices. Solver is a free add-in for Excel 2013 with SP1 and later.


1 Answers

MiniZinc uses solver configuration files to find the available solver. If, however, the solver does not provide a configuration file. The IDE can help you add a user configuration file for the solver in the following simple steps.

  1. Open the preferences window.
  2. In the solver selection, select "Add new..." Add new solver
  3. Enter the details of the solver you want to add. Most importantly the location of the executable and the location of their MiniZinc library. Enter Solver details

Edit/Addition: Obtaining the necessary executables

As mentioned by Stradivari in the comment above, releases are distributed at or-tools @ Github.

Pick the corresponding asset from one of those following the or-tools_flatzinc_{XXX}_{VERSION}.zip naming scheme.

like image 186
Dekker1 Avatar answered Oct 21 '22 11:10

Dekker1