FRAMES NO FRAMES

IlcEqAbstraction

public IlcConstraint IlcEqAbstraction(IlcAnyVarArray ys, IlcAnyVarArray xs, IlcAnyArray vals, IlcAny abstractValue)
public IlcConstraint IlcEqAbstraction(IlcIntVarArray ys, IlcIntVarArray xs, IlcIntArray vals, IlcInt abstractValue)
Definition file: ilsolver/ilcany.h
Include file: <ilsolver/ilosolver.h>

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:

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: