FRAMES NO FRAMES

IlcMinDistance

public IlcConstraint IlcMinDistance(IlcIntExp x, IlcIntExp y, IlcInt k)
Definition file: ilsolver/ilcint.h
Include file: <ilsolver/ilosolver.h>

The function IlcMinDistance creates and returns a constraint. When that constraint is posted, it insures that the absolute distance between x and y will be greater than or equal to k (that is, |x - y| >= k).

IlcMinDistance(x,y,k) is more efficient than, although logically equivalent to, the code IlcAbs(x-y) >= k.

IlcAllMinDistance is a similar function operating on all the variables in an array (rather than on two variables).

See Also: