Overview | Group | Tree | Graph | Index | Concepts |
An instance of IloActivity
allows modeling tasks in
Scheduler. The properties of an instance of IloActivity
can be
divided into three categories: time interval, requirement of resources, and
compliance with calendars (for example, the ability to be suspended by breaks).
This class inherits from the IBM® ILOG® Concert Technology class
IloExtractable
. That class is documented in the IBM ILOG
Concert Technology Reference Manual.
Activity as a Time Interval
Several Concert Technology numerical variables define the underlying time interval of an activity. These variables are the start and end variables, which are the bounds of the time interval, and the processing time variable, which is the quantity of time for which the activity must be processed to achieve its execution according to calendar definition. Scheduler allows creating constraints on the time interval in a natural way.
A time-bound constraint enforces limits on the start or end variables of
the time interval. The variable must be greater than, less than, or equal to
a numerical constant or variable. The time-bound constraints
startsAfter
and endsBefore
allow managing release
dates and due dates on activities.
A temporal constraint synchronizes the execution of two activities. More
precisely, the start or end variable of the preceding activity must be less than
or equal to the start or end variable of the following activity, with a
given delay. The delay is either a numerical constant or variable. For
example, the temporal constraint startsAfterEnd
is used to
enforce that the invoking activity follows another activity.
For example:
IloEnv env; IloModel m(env); IloActivity act1(env, 5); IloActivity act2(env, 8); IloNumVar delay(env, -6, 10); m.add(act1.startsAfterEnd(act2, delay); m.add(act1.startsAfter(6)); IloNumVar duedate(env, 45, 60); m.add(act2.endsBefore(duedate));
For more information, see Temporal Relations.
Activity as a Resource Requirement
A resource constraint enforces the fact that on a certain time interval a
resource is used to process the activity. The class IloActivity
offers a set of member functions to create a resource constraint.
The default member function to declare a resource constraint on a
discrete resource or a state resource is IloActivity::requires
. It means that the activity will
reserve the resource from its start time to its end time.
The default member functions to declare a resource constraint on a
reservoir are IloActivity::produces
, which is
used to fill the reservoir at the end of the activity, and IloActivity::consumes
, used to empty the reservoir at the
start of the activity.
For example:
IloEnv env; IloModel m(env); IloActivity act(env, 5); IloDiscreteResource d(env, 12); IloReservoir r(env, 200); IloNumVar c(env, 3, 5); m.add(act.requires(d, c)); m.add(act.consumes(r, 25));
Activity and Calendars
Resources and resource constraints can be associated with a calendar. A calendar allows expression of complex behavior such as suspension due to breaks, disjunctions due to shifts, or duration increase due to efficiency. For more information, see Calendars.
An activity that allows suspension because of breaks is a breakable activity. An activity that takes into account the efficiency function of calendars is a useEfficiency activity.
The behavior of an activity with respect to the calendars must be declared by the user. It allows the solver to partition the processing time of an activity between its start and end times.
The class IloActivity
provides a full set of member
functions associated with parameter classes that manage the behavior of an
activity with respect to calendars.
Functional and Integral Constraints and External Variables
Functional and integral constraints are of the form yrct =
f(xrct) or yrct = sum{startrct -> endrct}f(t).dt and hold
for every resource constraint rct on a given resource (see
Functional and Integral Constraints on Resources.
External variables are useful when xrct or yrct are not
already associated with the resource constraint (start, end,
capacity demand, and so forth). In such cases, member
functions of IloActivity
allow designating IBM® ILOG® Concert
Technology variables as external variables, and using these variables in
functional and integral constraints (see the enumeration IloSchedVariable
).
Parameter Classes
Instances of IloActivityConstraintsParam
are used to choose what kind of constraints on activities should be taken
into account.
Instances of IloActivityBasicParam
are
used to specify basic behavior of the activity regarding calendars, such
as the activity is breakable, the activity use efficiency, and some general
parameters on the breakable activity such as the maximum duration of
breaks.
Instances of IloActivityBreakParam
are
used to specify the way breakable activities should be executed; for
example, the type of breaks, the durations of disjunctive breaks, and the
possibility to suspend the activity at its start or its end.
Instances of IloActivityShiftParam
are
used to specify the way activities should be behave in case of shifts; for
instance, some shifts can be ignored regarding their type, or their duration.
Instances of IloActivityOverlapParam
are
used to specify in which conditions an activity can overlap breaks, for
example, if the activity can start or end in a break.
Refer to Scheduler Overview for more information on how to share parameters among resources, and how the direct modification of parameters through the resource API may affect them.
For more information, see Calendars, Functional and Integral Constraints on Resources, Temporal Relations, Transition Costs, and Transition Times.
See Also:
IloActivityBasicParam, IloActivityBreakParam, IloActivityShiftParam, IloActivityConstraintsParam, IloActivityOverlapParam, IloSchedulerSolution, IloResourceConstraint, IloTransitionParam, IloPrecedenceConstraint, IloTimeBoundConstraint, IloSchedVariable
Constructor Summary | |
---|---|
public | IloActivity() |
public | IloActivity(IloActivityI * impl) |
public | IloActivity(const IloEnv env, IloNum processingTime, const char * name) |
public | IloActivity(const IloEnv env, IloNum processingTime, IloInt transitionType=0, const char * name=0) |
public | IloActivity(const IloEnv env, const IloNumVar processingTimeVariable, IloInt transitionType=0, const char * name=0) |
Method Summary | |
---|---|
public void | addDisjunctiveBreakType(const IloIntSet types) const |
public void | addDisjunctiveBreakType(IloInt type) const |
public void | addEndBreakOverlapType(const IloIntSet types) const |
public void | addEndBreakOverlapType(IloInt type) const |
public void | addIgnoredBreakType(const IloIntSet types) const |
public void | addIgnoredBreakType(IloInt type) const |
public void | addIgnoredShiftType(const IloIntSet types) const |
public void | addIgnoredShiftType(IloInt type) const |
public void | addStartBreakOverlapType(const IloIntSet types) const |
public void | addStartBreakOverlapType(IloInt type) const |
public IloBool | areCoverConstraintsIgnored() const |
public IloBool | arePrecedenceConstraintsIgnored() const |
public IloBool | areResourceConstraintsIgnored() const |
public IloBool | areTimeBoundConstraintsIgnored() const |
public IloBool | canBeSuspendedAtEnd() const |
public IloBool | canBeSuspendedAtStart() const |
public void | clearDisjunctiveBreakType() const |
public void | clearEndBreakOverlapType() const |
public void | clearIgnoredBreakType() const |
public void | clearIgnoredShiftType() const |
public void | clearStartBreakOverlapType() const |
public IloAltResConstraint | consumes(const IloAltResSet, const IloNumVar capVar) const |
public IloAltResConstraint | consumes(const IloAltResSet, IloNum cap=1) const |
public IloResourceConstraint | consumes(const IloCapResource, const IloNumVar capVar) const |
public IloResourceConstraint | consumes(const IloCapResource, IloNum cap=1) const |
public IloCoverConstraint | covers() const |
public IloTimeBoundConstraint | endsAfter(const IloNumVar time) const |
public IloTimeBoundConstraint | endsAfter(IloNum time) const |
public IloPrecedenceConstraint | endsAfterEnd(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | endsAfterEnd(const IloActivity act, IloNum delay=0) const |
public IloPrecedenceConstraint | endsAfterStart(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | endsAfterStart(const IloActivity act, IloNum delay=0) const |
public IloTimeBoundConstraint | endsAt(const IloNumVar time) const |
public IloTimeBoundConstraint | endsAt(IloNum time) const |
public IloPrecedenceConstraint | endsAtEnd(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | endsAtEnd(const IloActivity act, IloNum delay=0) const |
public IloPrecedenceConstraint | endsAtStart(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | endsAtStart(const IloActivity act, IloNum delay=0) const |
public IloTimeBoundConstraint | endsBefore(const IloNumVar time) const |
public IloTimeBoundConstraint | endsBefore(IloNum time) const |
public IloIntExprArg | getDurationExpr() const |
public IloNum | getDurationMax() const |
public IloNum | getDurationMaxNormalBreaks() const |
public IloNum | getDurationMin() const |
public IloNum | getDurationMinNormalBreaks() const |
public IloNum | getEndBreakOverlapMax() const |
public IloNum | getEndBreakOverlapMin() const |
public IloIntExprArg | getEndExpr() const |
public IloNum | getEndMax() const |
public IloNum | getEndMin() const |
public IloNum | getExecutionDurationMin() const |
public IloNum | getExternalValue() const |
public IloNumVar | getExternalVariable() const |
public IloActivityI * | getImpl() const |
public IloNum | getProcessingTimeMax() const |
public IloNum | getProcessingTimeMin() const |
public IloNumVar | getProcessingTimeVariable() const |
public IloNum | getStartBreakOverlapMax() const |
public IloNum | getStartBreakOverlapMin() const |
public IloIntExprArg | getStartExpr() const |
public IloNum | getStartMax() const |
public IloNum | getStartMin() const |
public IloInt | getTransitionType() const |
public IloBool | hasDisjunctiveBreakType() const |
public IloBool | hasEndBreakOverlapType() const |
public IloBool | hasIgnoredBreakType() const |
public IloBool | hasIgnoredShiftType() const |
public IloBool | hasStartBreakOverlapType() const |
public void | ignoreBreakDisjunctivity(IloBool ignored=IloTrue) const |
public void | ignoreCoverConstraints(IloBool ignored=IloTrue) const |
public void | ignorePrecedenceConstraints(IloBool ignored=IloTrue) const |
public void | ignoreResourceConstraints(IloBool ignored=IloTrue) const |
public void | ignoreTimeBoundConstraints(IloBool ignored=IloTrue) const |
public IloBool | isBreakable() const |
public IloBool | isBreakDisjunctivityIgnored() const |
public IloBool | isDisjunctiveBreakType(IloInt type) const |
public IloBool | isEndBreakOverlapType(IloInt type) const |
public IloBool | isIgnoredBreakType(IloInt type) const |
public IloBool | isIgnoredShiftType(IloInt type) const |
public IloBool | isStartBreakOverlapType(IloInt type) const |
public IloAltResConstraint | produces(const IloAltResSet, const IloNumVar capVar) const |
public IloAltResConstraint | produces(const IloAltResSet, IloNum cap=1) const |
public IloResourceConstraint | produces(const IloContinuousReservoir, const IloNumVar capVar) const |
public IloResourceConstraint | produces(const IloContinuousReservoir, IloNum cap=1) const |
public IloResourceConstraint | produces(const IloReservoir, const IloNumVar capVar) const |
public IloResourceConstraint | produces(const IloReservoir, IloNum cap=1) const |
public IloAltResConstraint | provides(const IloAltResSet, const IloNumVar capVar, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloFalse) const |
public IloAltResConstraint | provides(const IloAltResSet, IloNum cap=1, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloFalse) const |
public IloResourceConstraint | provides(const IloReservoir, const IloNumVar capVar, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloFalse) const |
public IloResourceConstraint | provides(const IloReservoir, IloNum cap=1, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloFalse) const |
public void | removeDisjunctiveBreakType(const IloIntSet types) const |
public void | removeDisjunctiveBreakType(IloInt type) const |
public void | removeEndBreakOverlapType(const IloIntSet types) const |
public void | removeEndBreakOverlapType(IloInt type) const |
public void | removeIgnoredBreakType(const IloIntSet types) const |
public void | removeIgnoredBreakType(IloInt type) const |
public void | removeIgnoredShiftType(const IloIntSet types) const |
public void | removeIgnoredShiftType(IloInt type) const |
public void | removeStartBreakOverlapType(const IloIntSet types) const |
public void | removeStartBreakOverlapType(IloInt type) const |
public IloResourceConstraint | requires(const IloStateResource, const IloAnySetVar states, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requires(const IloStateResource, const IloAnySet states, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requires(const IloStateResource, const IloAnyVar state, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requires(const IloStateResource, IloAny state, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloAltResConstraint | requires(const IloAltResSet, const IloNumVar capVar, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloAltResConstraint | requires(const IloAltResSet, IloNum cap=1, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requires(const IloCapResource, const IloNumVar capVar, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requires(const IloCapResource, IloNum cap=1, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requiresNot(const IloStateResource, const IloAnySetVar states, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requiresNot(const IloStateResource, const IloAnySet states, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requiresNot(const IloStateResource, const IloAnyVar state, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public IloResourceConstraint | requiresNot(const IloStateResource, IloAny state, IloTimeExtent extent=IloFromStartToEnd, IloBool outward=IloTrue) const |
public void | setActivityBasicParam(const IloActivityBasicParam param) const |
public void | setActivityBreakParam(const IloActivityBreakParam param) const |
public void | setActivityConstraintsParam(const IloActivityConstraintsParam param) const |
public void | setActivityOverlapParam(const IloActivityOverlapParam param) const |
public void | setActivityShiftParam(const IloActivityShiftParam param) const |
public void | setBreakable(IloBool breakable=IloTrue) const |
public void | setCanBeSuspendedAtEnd(IloBool val=IloTrue) const |
public void | setCanBeSuspendedAtStart(IloBool val=IloTrue) const |
public void | setDurationMax(IloNum duration) |
public void | setDurationMaxNormalBreaks(IloNum max) const |
public void | setDurationMin(IloNum duration) |
public void | setDurationMinNormalBreaks(IloNum min) const |
public void | setEndBreakOverlapMax(IloNum max) const |
public void | setEndBreakOverlapMin(IloNum min) const |
public void | setEndMax(IloNum endMax) const |
public void | setEndMin(IloNum endMin) const |
public void | setExecutionDurationMin(IloNum min) const |
public void | setExternalValue(IloNum val) |
public void | setExternalVariable(IloNumVar var) |
public void | setProcessingTimeMax(IloNum processingTime) const |
public void | setProcessingTimeMin(IloNum processingTime) const |
public void | setStartBreakOverlapMax(IloNum max) const |
public void | setStartBreakOverlapMin(IloNum min) const |
public void | setStartMax(IloNum startMax) const |
public void | setStartMin(IloNum startMin) const |
public void | setTransitionType(IloInt type) const |
public void | setUseEfficiency(IloBool useEfficiency=IloTrue) const |
public void | shareEndWithEnd(IloActivity activity) |
public void | shareEndWithStart(IloActivity activity) |
public void | shareStartWithEnd(IloActivity activity) |
public void | shareStartWithStart(IloActivity activity) |
public IloTimeBoundConstraint | startsAfter(const IloNumVar time) const |
public IloTimeBoundConstraint | startsAfter(IloNum time) const |
public IloPrecedenceConstraint | startsAfterEnd(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | startsAfterEnd(const IloActivity act, IloNum delay=0) const |
public IloPrecedenceConstraint | startsAfterStart(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | startsAfterStart(const IloActivity act, IloNum delay=0) const |
public IloTimeBoundConstraint | startsAt(const IloNumVar time) const |
public IloTimeBoundConstraint | startsAt(IloNum time) const |
public IloPrecedenceConstraint | startsAtEnd(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | startsAtEnd(const IloActivity act, IloNum delay=0) const |
public IloPrecedenceConstraint | startsAtStart(const IloActivity act, const IloNumVar delay) const |
public IloPrecedenceConstraint | startsAtStart(const IloActivity act, IloNum delay=0) const |
public IloTimeBoundConstraint | startsBefore(const IloNumVar time) const |
public IloTimeBoundConstraint | startsBefore(IloNum time) const |
public void | unshare() |
public IloBool | useEfficiency() const |
Constructor Detail |
---|
This constructor creates a new instance of IloActivity
. The new activity
is constrained to execute between the time origin and the time horizon of
the schedule environment. Its processing time is set to the given
processingTime
. Its name is set to name
.
This constructor creates a new instance of IloActivity
. The new activity
is constrained to execute between the time origin and the time horizon of
the schedule environment. Its processing time is set to the given
processingTime
. transitionType
represents its transition type.
Its name is set to name
.
This constructor creates a new instance of IloActivity
. The processing
time variable of the new activity is set to processingTimeVariable
.
transitionType
represents its transition type. Its name is set to
name
.
Method Detail |
---|
This member function adds the set of types types
to the set
of disjunctive break types of the invoking activity. If a break type belongs
to the set of disjunctive break types of a breakable activity, the breakable
activity must be completely processed either before or after that type of
break.
Initially, an activity is created with an empty set of disjunctive break types.
This member function has no effect if the invoking activity is not breakable.
This member function adds the type type
to the set of
disjunctive break types of the invoking activity. If a break type belongs to
the set of disjunctive break types of an activity, the breakable activity
must be completely processed either before or after that type of break.
Initially, an activity is created with an empty set of disjunctive break types.
This member function has no effect if the invoking activity is not breakable.
This member function adds the set of types types
to the set of overlap
break types of the invoking activity. If a break type belongs to the set of
overlap break types of an activity, the activity can be processed at its end
time during that break. Initially, an activity is created with an empty set
of overlap break types.
This member function adds the type type
to the set of
overlap break types of the invoking activity. If a break type belongs to the
set of overlap break types of an activity, the activity can be processed at
its end time during that break. Initially, an activity is created with an
empty set of overlap break types.
This member function adds the set of types types
to the set
of ignored break types of the invoking activity. That is, the invoking activity
behaves as if breaks of type included in types
do not exist.
Initially, an activity is created with an empty set of ignored break types.
This member function adds the type type
to the set of
ignored break types of the invoking activity. That is, the invoking activity
behaves as if breaks of type type
do not exist.
Initially, an activity is created with an empty set of ignored break types.
This member function adds the set of types types
to the set
of ignored shift types of the invoking activity. That is, the invoking activity
behaves as if shifts of type included in types
do not exist.
Initially, an activity is created with an empty set of ignored shift types.
This member function adds the type type
to the set of
ignored shift types of the invoking activity. That is, the invoking activity
behaves as if shifts of type type
never exist.
Initially, an activity is created with an empty set of ignored shift types.
This member function adds the set of types types
to the set of overlap
break types of the invoking activity. If a break type belongs to the set of
overlap break types of an activity, the activity can be processed at its
start time during that break. Initially, an activity is created with an
empty set of overlap break types.
This member function adds type
to the set of overlap break types
of the invoking activity. If a break type belongs to the set of overlap
break types of an activity, the activity can be processed at its start time
during that break. Initially, an activity is created with an empty set of
overlap break types.
This member function returns IloTrue
if the cover
constraints defined on the invoking activity are not taken into account when
searching for the solution. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the precedence
constraints defined on the invoking activity are not taken into account when
searching for the solution. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the resource
constraints defined on the invoking activity are not taken into account when
searching for the solution. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the time-bound
constraints defined on the invoking activity are not taken into account when
searching for the solution. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the invoking
activity can be suspended at its end time. Otherwise, it returns
IloFalse
.
This member function returns IloTrue
if the invoking
activity can be suspended at its start time. Otherwise, it returns
IloFalse
.
This member function empties the set of disjunctive break types of the invoking activity.
This member function empties the set of end overlap types of the invoking activity.
This member function empties the set of ignored break types of the invoking activity.
This member function empties the set of ignored shift types of the invoking activity.
This member function empties the set of start overlap types of the invoking activity.
An activity consumes a resource if some amount of the resource capacity must be made available for the execution of the activity and the capacity is non-recoverable after the end of the activity. For example, an activity might consume a raw material in manufacturing a product.
If the resource is discrete (classes
IloDiscreteResource
,
IloReservoir
,
IloDiscreteEnergy
),
the activity requires the capacity at all times after the activity's
start time. The corresponding member function implies that the occupancy of the
resource by the activity is rounded inward toward the nearest valid time that corresponds
to a time step.
When the given resource is an instance of IloDiscreteEnergy
,
it means that the
source of the energy is consumed (that is, that the given capacity can no longer be
provided again after the beginning of the activity).
When the resource is discrete, the following two expressions are equivalent:
activity.consumes(resource, capacity);
and
activity.requires(resource, capacity, IlcAfterStart);
If the resource is a continuous reservoir (class
IloContinuousReservoir
),
the
consumption is continuous and linear from the start time to the end time of the invoking
activity. Since the time step of a timetable for a continuous reservoir is 1, the returned
resource constraint has no inward/outward rounding mode. Its time extent, which does
not match any case of the enumeration
IloTimeExtent
,
is not defined either.
If the invoking activity consumes a resource in set
, the consumption will be discrete if
the selected resource is an instance of IloDiscreteResource
,
IloReservoir
,
or
IloDiscreteEnergy
.
It will be continuous if the selected resource is an instance of
IloContinuousReservoir
.
An IloException
is thrown when entering the search if either the capacity is negative,
or if capacity is a variable with a negative minimal value.
This member function builds a cover constraint for the invoking activity. The set of activities to be covered by the invoking activity is initially empty. See the member functions IloCoverConstraint::add and IloCoverConstraint::remove to see how to modify the set of covered activities. The cover constraint states that the start time of the invoking activity is equal to the earliest of the start times of the covered activities, and that the end time of the invoking activity is equal to the latest of the end times of the covered activities.
This member function states that the invoking activity must end after or at time
. More
formally, act.endsAfter(time)
means end(act) >= time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity ends after
the end of act
. In addition, at least the given delay must elapse between
the end of act
and the end of the invoking activity.
The member function can be invoked with a negative delay
, which means
that the invoking activity can end before the end of act
, but the difference
between the end time of act
and the end time of the invoking activity cannot
exceed -delay
.
More formally, act1.endsAfterEnd(act, delay)
means
end(act1) >= end(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity ends
after the beginning of act
. In addition, at least the given delay
must elapse between the beginning of act
and the end of the invoking activity.
The member function can be invoked with a negative delay
, which means that
the invoking activity can end before the beginning of act
, but the difference
between the start time of act
and the end time of the invoking
activity cannot exceed -delay
.
More formally, act1.endsAfterStart(act, delay)
means
end(act1) >= start(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity must end at time
. More formally,
act.endsAt(time)
means end(act) == time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that exactly the given delay must elapse between the end
of act
and the end of the invoking activity.
More formally, act1.endsAtEnd(act, delay)
means
end(act1) == end(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that exactly the given delay must elapse between the
beginning of act
and the end of the invoking activity.
More formally, act1.endsAtStart(act, delay)
means
end(act1) == start(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity must end before or at time
. More
formally, act.endsBefore(time)
means end(act) <= time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function returns an expression that represents the duration of the invoking activity.
This member function returns the maximum duration of the invoking activity.
This member function returns the maximal duration above which all breaks
are considered as disjunctive. By default, the value of this maximal
duration is IloInfinity
.
This member function returns the minimum duration of the invoking activity.
This member function returns the threshold duration under which all breaks are considered as disjunctive. By default, the value of this minimal duration is 1 (one) so that only the breaks with null duration are considered as disjunctive.
This member function returns the maximal value of the end break overlap variable of the invoking activity.
This member function returns the minimal value of the end break overlap variable of the invoking activity.
This member function returns an expression that represents the end time of the invoking activity.
This member function returns the latest end time of the invoking activity.
This member function returns the earliest end time of the invoking activity.
A breakable activity executes during a set of disjoint temporal intervals. These execution intervals are separated by intervals that correspond to the breaks that suspend the activity. This member function returns the minimal duration for any execution interval of the invoking activity.
This member function returns the current value of the external variable of the invoking activity. It raises an error in case the external variable is not bound.
This member function returns the external variable of the invoking
activity. By default, the external variable of an activity is a variable
with a domain [IloIntMin, IloIntMax]
.
This member function returns the maximum processing time of the invoking activity.
This member function returns the minimum processing time of the invoking activity.
This member function returns the variable that represents the processing time for the invoking activity.
This member function returns the maximal value of the start break overlap variable of the invoking activity.
This member function returns the minimal value of the start break overlap variable of the invoking activity.
This member function returns an expression that represents the start time of the invoking activity.
This member function returns the latest start time of the invoking activity.
This member function returns the earliest start time of the invoking activity.
The transition type of an activity is an integer intended to define transition time and cost from an indexed classification of activities.
This member function returns IloTrue
if the set of
disjunctive break types is not empty.
This member function returns IloTrue
if the set of end break
overlap types is not empty.
This member function returns IloTrue
if the set of
ignored break types is not empty.
This member function returns IloTrue
if the set of
ignored shift types is not empty.
This member function returns IloTrue
if the set of start
break overlap types is not empty.
When the argument ignored
is equal to IloTrue
,
this member function inhibits the disjunctive breaks for the invoking
activity. That is, all breaks will be treated as normal, non-disjunctive
breaks. Otherwise, the disjunctive breaks are taken into account for the
invoking activity.
This member function has no effect if at the beginning of the search the invoking activity is not breakable.
When the argument ignored
is equal to IloTrue
,
this member function inhibits the cover constraints defined on the invoking
activity. Otherwise, and by default, the cover constraints defined on the
invoking activity are taken into account.
When the argument ignored
is equal to IloTrue
,
this member function inhibits the precedence constraints defined on the
invoking activity. Otherwise the precedence constraints defined on the
invoking activity are taken into account.
When the argument ignored
is equal to IloTrue
,
this member function inhibits the resource constraints defined on the
invoking activity. When the argument ignored
is equal to
IloFalse
, this member function takes into account the resource
constraints defined on the invoking activity.
When the argument ignored
is equal to IloTrue
,
this member function inhibits the time-bound constraints defined on the
invoking activity. Otherwise the time-bound constraints defined on the
invoking activity are taken into account.
This member function returns IloTrue
if the invoking
activity is breakable. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the break disjunctivity is
ignored for the invoking activity. Otherwise, it returns
IloFalse
.
This member function returns IloTrue
if the type
type
belongs to the set of disjunctive break types of the
invoking activity. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the type
type
belongs to the set of end overlap types of the invoking
activity. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the type
type
belongs to the set of ignored break types of the
invoking activity. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the type
type
belongs to the set of ignored shift types of the
invoking activity. Otherwise, it returns IloFalse
.
This member function returns IloTrue
if the type
type
belongs to the set of start overlap types of the invoking
activity. Otherwise, it returns IloFalse
.
An activity produces if some amount of the capacity of the (discrete or continuous) reservoir is definitely made available through the execution of the activity. This member function states that the invoking activity produces the given capacity for the given reservoir.
If the reservoir is discrete (class IloReservoir
), this member function implies that the
occupancy of the reservoir by the activity is rounded inward toward the nearest valid
time that corresponds to a time step. The following two expressions are equivalent:
activity.produces(reservoir, capacity);
activity.provides(reservoir, capacity, IloAfterEnd);
If the reservoir is continuous (class IloContinuousReservoir
), the production
process is continuous and linear from the start time to the end time of the invoking
activity. Since the time step of a timetable for a continuous reservoir is 1, the returned
resource constraint has no inward/outward rounding mode. Its time extent, which does
not match any case of the enumeration IloTimeExtent
, is not defined either.
If the invoking activity produces for a reservoir in set
, the production will be discrete if
the selected reservoir is an instance of IloReservoir
. It will be continuous if the
selected reservoir is an instance of IloContinuousReservoir
.
An IloException
is thrown when entering the search if either the capacity is negative,
or if capacity is a variable with a negative minimal value.
This member function states that the invoking activity provides the given capacity of the
given reservoir. By default, the activity provides the reservoir from the beginning to the
end of its execution. However, the optional argument extent
is available to represent
cases in which the activity provides the reservoir over a different time extent, as
explained in IloTimeExtent
.
The argument outward
is important only when one of the resource usage enforcement
intervals of the reservoir has a time step greater than 1 (one). In that case, outward
defines whether the occupancy of the reservoir by the activity should be rounded outward
or inward towards the nearest valid time that corresponds to a step. By default, outward
is considered
to be false for a providing resource constraint.
An IloException
is thrown when entering the search if either the capacity is negative,
or if capacity is a variable with a negative minimal value.
The set of alternative resources can contain a continuous reservoir if the time extent is
IloNever
,
IloAlways
,
IloAfterStart
or
IloAfterEnd
.
If the time extent is
IloNever
, the activity does not provide any capacity.
If the time extent is IloAlways
,
the capacity is provided at any time. If the time extent is IloAfterStart
or
IloAfterEnd
,
the capacity is not provided before the start of the activity, is totally
provided after its end and linearly provided between its start and its end.
This member function removes the set of types types
from the
set of disjunctive break types of the invoking activity. If a break type
belongs to the set of disjunctive break types of a breakable activity, the
activity must be completely processed either before or after that type of
break.
This member function removes the type type
from the set of
disjunctive break types of the invoking activity. If a break type belongs to
the set of disjunctive break types of a breakable activity, the activity
must be completely processed either before or after that type of break.
For each activity, a set of break types is given that defines which break
types can possibly be overlapped by the end of the activity. This member
function removes all the types of types
from this set of break
types on the invoking activity.
For each activity, a set of break types is given that defines which break
types can possibly be overlapped by the end of the activity. This member
function removes type
from this set of break types on the
invoking activity.
This member function removes the set of types types
from the
set of ignored break types of the invoking activity.
This member function removes the type type
from the set of
ignored break types of the invoking activity.
This member function removes the set of types types
from the
set of ignored shift types of the invoking activity.
This member function removes the type type
from the set of
ignored shift types of the invoking activity.
For each activity, a set of break types is given that defines which break
types can possibly be overlapped by the start of the activity. This member
function removes all the types of types
from this set of break
types on the invoking activity.
For each activity, a set of break types is given that defines which break
types can possibly be overlapped by the start of the activity. This member
function removes the type type
from this set of break types on
the invoking activity.
This member function states that the invoking activity requires the given resource in one
of the given set of states. The state may change during execution, but must remain in the
given set of states. By default, the activity requires the resource from the beginning to the
end of its execution. However, the optional argument extent
is available to represent
cases in which the activity requires the resource over a different time extent, as explained in
IloTimeExtent
.
The argument outward
is important only when one of the resource usage enforcement
intervals of the resource has a time step greater than 1 (one). In that case, outward
defines whether the occupancy of the resource by the activity should be rounded outward
or inward towards the nearest valid time that corresponds to a step. By default, outward
is
considered to be true for a requirement.
This member function states that the invoking activity requires the given resource in the
given state. By default, the activity requires the resource from the beginning to the end of
its execution. However, the optional argument extent
is available to represent cases in
which the activity requires the resource over a different time extent, as explained in
IloTimeExtent
.
The argument outward
is important only when one of
the resource usage enforcement intervals of the resource has a time
step greater than 1 (one). In that case, outward
defines whether the occupancy of the resource by the activity
should be rounded outward or inward towards the nearest valid time
that corresponds to a step. By default, outward
is
considered to be true for a requirement.
This member function states that the invoking activity requires the given capacity of the
given resource. For example, an activity might require the presence of a worker on a
shift. By default, the activity requires the resource from the beginning to the end of its
execution. However, the optional argument extent
is available to represent cases in
which the activity requires the resource over a different time extent, as explained in
IloTimeExtent
.
The argument outward
is important only when one of the resource usage enforcement
intervals of the resource has a time step greater than 1 (one). In that case, outward
defines whether the occupancy of the resource by the activity should be rounded outward
or inward towards the nearest valid time that corresponds to a step. When the given
resource is an instance of IloDiscreteEnergy
,
it means that the given capacity is
required for each unit of time in the given time extent. By default, outward
is considered to be true for a requirement.
An IloException
is thrown when entering the search if either the capacity is negative,
or if capacity is a variable with a negative minimal value.
The member function must not be called with a capacity resource that is a continuous
reservoir; however, the set of alternative resources can contain a continuous reservoir if
time extent is IloNever
,
IloAlways
,
IloAfterStart
or
IloAfterEnd
. If the time
extent is
IloNever
,
the activity does not require any capacity. If the time extent is
IloAlways
,
the capacity is required at any time. If the time extent is
IloAfterStart
or IloAfterEnd
,
the capacity is not required before the start of the activity, is totally
required after its end and linearly required between its start and its end.
This member function states that the invoking activity requires the given resource in any state that does not belong to the given set of states. The state may change during execution, but must never belong to the given set of states.
By default, the activity requires the resource from the beginning to the end of its
execution. However, the optional argument extent
is available to represent cases in
which the activity requires the resource over a different time extent, as explained in
IloTimeExtent
.
The argument outward
is important only when one of the resource usage enforcement
intervals of the resource has a time step greater than 1 (one). In that case, outward
defines whether the occupancy of the resource by the activity should be rounded outward
or inward towards the nearest valid time that corresponds to a step. By default, outward
is
considered to be true for a requirement.
This member function states that the invoking activity requires the given resource in any state different from the given state. The state may change during execution, but must never be the given state.
By default, the activity requires the resource from the beginning to the end of its
execution. However, the optional argument extent
is available to represent cases in
which the activity requires the resource over a different time extent, as explained in
IloTimeExtent
.
The argument outward
is important only when one of the resource usage enforcement
intervals of the resource has a time step greater than 1 (one). In that case, outward
defines whether the occupancy of the resource by the activity should be rounded outward
or inward towards the nearest valid time that corresponds to a step. By default, outward
is
considered to be true for a requirement.
This member function sets param
as the new basic activity
parameter.
This member function sets param
as the new break activity
parameter.
This member function sets param
as the new constraint
activity parameter.
This member function sets param
as the new overlap activity
parameter.
This member function sets param
as the new shift activity
parameter.
When the argument breakable
is equal to
IloTrue
, this member function allows the invoking activity to
be breakable. Otherwise, the invoking activity is not breakable.
If val
is equal to IloTrue
, this member function permits the
invoking activity to be suspended at its end time.
This member function has no effect if at the beginning of the search the invoking activity is not breakable.
If val
is equal to IloTrue
, this member function permits the
invoking activity to be suspended at its start time. Otherwise, the invoking
activity cannot be suspended at its start time.
This member function has no effect if at the beginning of the search the invoking activity is not breakable.
This member function states that the duration of the invoking
activity can be at most duration
.
This member function states that the invoking activity must be completely
processed either before or after any break whose duration is strictly
greater than max
. By default, the value of this duration for a
breakable activity is IloInfinity
.
This member function states that the duration of the invoking
activity must be at least duration
.
This member function states that the invoking activity must be completely
processed either before or after any break whose duration is strictly lower
than min
.
By default, the value of this duration for a breakable activity is
1
(one) so that only the breaks with null duration are
considered as disjunctive.
This member function sets max
as the new maximal value of
the end break overlap duration.
This member function sets min
as the new minimal value of
the end break overlap duration.
This member function states that the invoking activity must not
end after endMax
.
This member function states that the invoking activity must not
end before endMin
.
A breakable activity executes during a set of disjoint temporal intervals. These execution intervals are separated by intervals that correspond to the breaks that suspend the activity.
This member function states that the duration of the temporal intervals
during which the invoking breakable activity executes must each be greater
or equal to min
. Note that min
must be a strictly
positive integer. By default, breakable activities are created with a
minimal duration for execution intervals of 1 (one).
This member function sets val
as the value of the external
variable of the invoking activity.
This member function sets var
as the external variable of
the invoking activity.
This member function states that the processing time of the
invoking activity can be at most processingTime
.
This member function states that the processing time of the
invoking activity must be at least processingTime
.
This member function sets max
as the new maximal value of
the start break overlap duration.
This member function sets min
as the new minimal value of
the start break overlap duration.
This member function states that the invoking activity must not
start after startMax
.
This member function states that the invoking activity must not
start before startMin
.
The transition type of an activity is an integer intended to define
transition time and cost from an indexed classification of activities. It is
used by transition parameters (instances of the class IloTransitionParam
).
When the argument useEfficiency
is equal to
IloTrue
, the processing time of the invoking activity
is computed using the efficiency function of resource calendars.
Note that if no calendar with efficiency function is attached to resources or resource constraints required by the invoking activity, the processing time remains unbounded.
This member function states that the invoking activity shares its
end with the end of the activity
provided as
argument.
This member function states that the invoking activity shares its
end with the start of the activity
provided as
argument.
This member function states that the invoking activity shares its
start with the end of the activity
provided as
argument.
This member function states that the invoking activity shares its
start with the start of the activity
provided as
argument.
This member function states that the invoking activity must start after or at time
. More
formally, act.startsAfter(time)
means start(act) >= time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity starts after the end of act
.
(In other words, act
precedes the invoking activity.) In addition, at least the
given delay
must elapse between the end of act
and the beginning of the
invoking activity.
The member function can be invoked with a negative delay
, which means that the
invoking activity can start before the end of act
, but the difference between
the end time of act
and the start time of the invoking activity cannot
exceed -delay
.
More formally, act1.startsAfterEnd(act, delay)
means
start(act1) >= end(act) + delay
.
The constraint returned by this member function must be added to the model by
IloModel::add
in order to be taken into account during the search for solutions.
This member function states that the invoking activity starts after the beginning of act
.
In addition, at least the given delay
must elapse between the beginning of act
and the
beginning of the invoking activity.
The member function can be invoked with a negative delay
, which means that
the invoking activity can start before the beginning of act
, but the difference between
the start time of act
and the start time of the invoking activity cannot exceed -delay
.
More formally, act1.startsAfterStart(act, delay)
means start(act1) >= start(act) + delay
.
The constraint returned by this member function must be added
to the model by IloModel::add
in order to be taken into account during the search for
solutions.
This member function states that the invoking activity must start at time
. More formally,
act.startsAt(time)
means start(act) == time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that exactly the given delay must
elapse between the end of act
and the beginning of the invoking activity.
More formally, act1.startsAtEnd(act, delay)
means
start(act1) == end(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that exactly the given delay
must
elapse between the beginning of act
and the beginning of the invoking activity.
More formally, act1.startsAtStart(act, delay)
means
start(act1) == start(act) + delay
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity must start before or at time
. More
formally, act.startsBefore(time)
means start(act) <= time
.
The constraint returned by this member
function must be added to the model by IloModel::add
in order to be taken into
account during the search for solutions.
This member function states that the invoking activity does not share its start nor its end.
This member function returns IloTrue
if the processing time
of the invoking activity is computed using the efficiency function of resource calendars.
Otherwise, it returns IloFalse
.