or-toolsminizinccp-sat

How to define solver parameters in minizinc for CP-SAT from Google or-tools


Using the CP-SAT solver from Google OR-Tools for backend CP-Solver , and want to define the solver parameters in minizinc. Define the solver config as following :

{
    "backend-flags": {
        "interleave_search": true
    },
    "intermediate-solutions": true,
    "parallel": 16,
    "solver": "com.google.or-tools@9.5.2237",
    "time-limit": 120000 }

but the error is coming back :

ERROR: Unknown command line flag 'interleave_search'
=====ERROR=====

Solution

  • --params interleave_search:true
    

    note that this is the default if you do -f. (1 worker)

    Here is the cp-sat msc.in file:

    {
      "id": "com.google.ortools.sat",
      "name": "OR Tools CP-SAT",
      "description": "Google's Operations Research CP-SAT-LP FlatZinc interface",
      "version": "@PROJECT_VERSION@",
      "mznlib": "../cpsat",
      "executable": "@FZ_REL_INSTALL_BINARY@",
      "tags": ["cpsatlp", "cp", "lcg", "int"],
      "stdFlags": ["-a", "-f", "-p", "-r", "-s", "-v"],
      "extraFlags": [
        ["--params", "Provide parameters interpreted as a text SatParameters proto", "string", ""]
      ],
      "supportsMzn": false,
      "supportsFzn": true,
      "needsSolns2Out": true,
      "needsMznExecutable": false,
      "needsStdlibDir": false,
      "isGUIApplication": false
    }