Skip to content
These docs are for v1 of RelationalAI. Click here to view the v2 docs.

This feature is currently in Preview.

Use MiniZinc

Use MiniZinc for decision problems that naturally fit a constraint programming (CP) model. It works well for discrete constraint satisfaction problems and models that benefit from CP global constraints.

  • Supports constraint programming (CP) and discrete optimization.
  • Does not support continuous decision variables.
  • Only the Chuffed backend is currently exposed.
  • MiniZinc requires a single, scalar objective.

Create a Problem with Integer model type and pass "minizinc" to .solve() to use the MiniZinc backend:

from relationalai.semantics import Integer, Model
from relationalai.semantics.reasoners.prescriptive import Problem
m = Model("DiscreteExample")
# ... model definition ...
p = Problem(m, Integer)
# ... problem definition ...
p.solve("minizinc")
  • MiniZinc requires Problem(m, Integer). If you use Float, you will typically get type or compilation errors.
  • MiniZinc runs through a MiniZinc backend. In current deployments, PyRel uses the Chuffed backend.

MiniZinc is bundled and does not require a license key or additional Snowflake setup.

DetailInfo
Version2.8.5
LicenseMPL 2.0 (free and open source)