Maximal Propagate (cpmpy.tools.maximal_propagate)
Maximal propagation of CPMpy constraints using repeated solving.
- cpmpy.tools.maximal_propagate.maximal_propagate(constraints, vars=None, solver='ortools', method='union')[source]
Maximal propagation algorithm for CP programs.
Returns all values for variables for which at least one model exists. I.e., returns a globally consistent constraint network.
- Param:
constraints: list of CPMpy constraints
- Param:
vars: list of variables, optional, list of variables to propagate.
- Param:
solver: name of a solver, see SolverLookup.solvernames(). for faster propgation, use incremental solver such as pysat, z3 or gurobi.
- Param:
method: method of propagation, optional, for large domains, use ‘union’, for small domains use ‘intersect’