Skip to main content
FRAMES NO FRAMES

IlcAllMinDistance

public IlcConstraint IlcAllMinDistance(IlcIntVarArray vars, IlcInt k, IlcFilterLevel level)
public IlcConstraint IlcAllMinDistance(IlcIntVarArray vars, IlcInt k)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Creates and returns a minimum distance constraint.

The function IlcAllMinDistance creates and returns a constraint. When that constraint is posted, it ensures that the absolute distance between any pair of variables in the array vars will be greater than or equal to k. This function is for use during a CP Optimizer search, for example, inside a goal (an instance of IlcGoal) or inside a constraint (an instance of IlcConstraint). If you are looking for similar functionality for use in an IBM® ILOG® Concert Technology model, consider IloAllMinDistance documented in the IBM ILOG Concert Technology Reference Manual.

If you do not explicitly state a filter level, then CP Optimizer uses the default filter level for this constraint (that is, IlcBasic). The optional argument level can take one of the two values: IlcBasic or IlcExtended. The domain reduction during propagation depends on the value of level. See IlcFilterLevel for an explanation of filter levels and their effect on constraint propagation.

IlcBasic

IlcBasic is the lowest value.

IlcExtended

IlcExtended causes more domain reduction than IlcBasic; it also takes longer to run.

For more information, see IloAllMinDistance in the IBM ILOG Concert Technology Reference Manual.

See Also: