FRAMES NO FRAMES

IlcAbstraction

public IlcIntVarArray IlcAbstraction(IlcIntVarArray vars, IlcIntArray values, IlcInt abstractValue)
public IlcAnyVarArray IlcAbstraction(IlcAnyVarArray vars, IlcAnyArray values, IlcInt abstractValue)
Definition file: ilsolver/ilcint.h
Include file: <ilsolver/ilosolver.h>

This function creates and returns an array of constrained variables for use during a Solver search. The argument vars should be an array of constrained variables. The argument values is an array of integers or pointers. The argument abstractValue is a value that must not belong to any of the variables in vars and must not appear in values.

For each vars[i], Solver creates a variable corresponding to the abstraction of vars[i] with respect to values. In other words, for every variable in vars, vars[i], Solver creates a variable w[i] such that the domain of w[i] is equal to the set made up of the value abstractValue plus all those values vars[j] that also belong to the array values. Then internally, Solver enforces 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 a constraint (rather than an array), see IlcEqAbstraction.

For a constraint suitable for use in a model, see IloAbstraction.

See Also: