Skip to main content
FRAMES NO FRAMES

Class IloAllMinDistance

Definition file: ilconcert/ilomodel.h
Map of IloAllMinDistanceIloAllMinDistanceIloAllMinDistanceIloConstraintIloIntExprArgIloNumExprArgIloExtractable
For constraint programming: constraint on the minimum absolute distance between a pair of variables in an array.

An instance of the class IloAllMinDistance is a constraint that makes sure that the absolute distance between any pair of variables in an array of constrained integer variables will be greater than or equal to a given integer.

What Is Extracted

All the variables that have been added to the model and that have not been removed from it will be extracted when the algorithm IloCP or IloSolver extracts the constraint.

IloCplex does not extract this constraint.

See Also:

Method Summary
public IloAllMinDistanceI *getImpl() const
public IloAllMinDistance()
public IloAllMinDistance(IloAllMinDistanceI * impl)
public IloAllMinDistance(const IloEnv env, const IloIntVarArray vars, IloInt k, const char * name=0)
Inherited Methods from IloConstraint
getImpl, IloConstraint, IloConstraint
Inherited Methods from IloIntExprArg
getImpl, IloIntExprArg, IloIntExprArg
Inherited Methods from IloNumExprArg
getImpl, IloNumExprArg, IloNumExprArg
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, IloExtractable, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, removeFromAll, setLocation, setName, setObject
Method Detail

IloAllMinDistance

public IloAllMinDistance()
This constructor creates an empty handle. You must initialize it before you use it.

IloAllMinDistance

public IloAllMinDistance(IloAllMinDistanceI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloAllMinDistance

public IloAllMinDistance(const IloEnv env, const IloIntVarArray vars, IloInt k, const char * name=0)

This constructor returns a constraint that ensures that the absolute distance between any pair of variables in the array vars will be greater than or equal to k. You must add this constraint to a model and extract the model for an algorithm in order for it to be taken into account.


getImpl

public IloAllMinDistanceI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.