Search code examples
installationsolverconstraint-programmingor-toolsminizinc

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).


Solution

  • 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

    1. 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_{XXX}_{VERSION}.zip naming scheme.