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.
- Parameters:
constraints – list of CPMpy constraints
vars – list of variables, optional, list of variables to propagate.
solver – name of a solver, see
SolverLookup.solvernames()for faster propagation, use incremental solver such as pysat, z3 or gurobi.method – method of propagation, optional, for large domains, use ‘union’, for small domains use ‘intersect’