Skip to main content
FRAMES NO FRAMES

Class IloSpan

Definition file: ilconcert/ilosmodel.h
Map of IloSpanIloSpanIloSpanIloConstraintIloIntExprArgIloNumExprArgIloExtractable
An instance of this class represents a span constraint.

An instance of IloSpan represents a span constraint. A span constraint between an interval variable a and a set of interval variables {b1,...,bn} states that interval a spans over all present intervals from the set {b1,...,bn}. That is: interval a starts together with the first present interval from {b1,...,bn} and ends together with the last one. Interval a is absent if and only if all intervals in {b1,...,bn} are absent.

You must add this constraint to a model and extract the model to an algorithm in order for it to be taken into account.

Note: This constraint cannot be used in a logical constraint.

For more information on the span constraint, see the concept Constraints on groups of interval variables in CP Optimizer.

Method Summary
public IloSpanI *getImpl() const
public IloSpan()
public IloSpan(IloSpanI * impl)
public IloSpan(const IloEnv env, const IloIntervalVar a, const IloIntervalVarArray bs, 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

IloSpan

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

IloSpan

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

IloSpan

public IloSpan(const IloEnv env, const IloIntervalVar a, const IloIntervalVarArray bs, const char * name=0)

This constructor creates a span constraint between interval variable a and the set of interval variables in the array bs and makes it part of the environment env.


getImpl

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