| Overview | Group | Tree | Graph | Index | Concepts |
This function creates and returns a constraint that ys[i] is the abstraction
of xs[i] over vals with respect to abstractValue for use
during a Solver search.
The argument xs should be an array of constrained variables. The argument
vals is an array of integers or pointers. The argument abstractValue
is a value that must not belong to any of the variables in xs and must not
appear in vals.
For each xs[i], Solver creates a variable corresponding to the abstraction
of xs[i] with respect to vals. In other words, for every variable in
xs, xs[i], Solver creates a variable ys[i] such that the
domain of ys[i] is equal to the set made up of the value abstractValue
plus all those values xs[j] that also belong to the array vals. Then
internally Solver maintains these conditions:
xs[i] is a value in the array
vals if and only if
ys[i] == xs[i];
xs[i] is
not a value in the array
vals if and only if
ys[i] == abstractValue.This function makes it easy to define constraints that impinge only on a particular set of values from the domains of constrained variables.
For a function that returns an array (rather than a constraint), see IlcAbstraction.
For a constraint suitable for use in a model, see IloAbstraction.
See Also:
IlcAbstraction, IlcBoolAbstraction, IloAbstraction