Overview | Group | Tree | Graph | Index | Concepts |
Instances of the class IloCoverConstraint
are cover
constraints. A cover constraint states that an activity (the covering
activity) must exactly cover a set of activities (the covered activities).
More precisely, it means that the start time of the covering activity is
equal to the earliest of the start times of the covered activities, and that
the end time of the covering activity is equal to the latest of the end
times of the covered activities.
This class inherits from the IBM® ILOG® Concert Technology class
IloConstraint
. That class is documented in the IBM ILOG Concert
Technology Reference Manual.
Instances of this class are created by the member function
IloActivity::covers
.
See Also:
IloActivity, IloActivityConstraintsParam
Constructor Summary | |
---|---|
public | IloCoverConstraint() |
public | IloCoverConstraint(IloCoverConstraintI * impl) |
Method Summary | |
---|---|
public void | add(const IloActivity act) const |
public IloBool | contains(const IloActivity act) const |
public IloActivity | getActivity() const |
public IloCoverConstraintI * | getImpl() const |
public void | remove(const IloActivity act) const |
Constructor Detail |
---|
Method Detail |
---|
This member function adds the activity act
to the set of
activities to be covered.
Example
The code:
IloCoverConstraint coverCT = act.covers(); coverCT.add(act1); coverCT.add(act2); model.add(coverCT);
adds to the model the constraint that activity act
must
cover both activities act1
and act2
. Another way
to add the same constraint is:
model.add(act.covers(2, act1, act2));
This member function returns IloTrue
if and only if the
activity act
is to be covered by the constraint.
This member function returns the covering activity of the cover
constraint. That is, it returns the activity on which a member function
IloActivity::covers
was called to build the
invoking cover constraint.
This member function removes the activity act
from the set
of activities to be covered.