generic_nary_constraint
generic_nary_constraint |
Purpose
This constraint can be used to propagate a user-defined constraint over n variables (its propagation is based on the GAC2001 algorithm (cf.
[Bes01]).
Synopsis
function generic_nary_constraint(vars:arrray of cpvar, fctname:string, userparam:integer) : cpctr
function generic_nary_constraint(vars:cpvarlist, fctname:string, userparam:integer) : cpctr
function generic_nary_constraint(vars:arrray of cpvar, fctname:string, propagation: integer, userparam:integer) : cpctr
function generic_nary_constraint(vars:cpvarlist, fctname:string, propagation: integer, userparam:integer) : cpctr
function generic_nary_constraint(vars:set of cpvar, fctname:string, userparam:integer) : cpctr
function generic_nary_constraint(vars:set of cpvar, fctname:string, propagation: integer, userparam:integer) : cpctr
Arguments
vars
|
a set, array, or cpvarlist of decision variables
|
fctname
|
name of the function specifying the user-defined constraint, such a function necessarily takes a cpvarlist/cptuple and an integer (the value of
userparam) as arguments and returns a Boolean.
|
userparam
|
a user parameter
|
propagation
|
the level of propagation to achieve
|
Return value
An n-ary constraint over a set of variables