Overview | Group | Tree | Graph | Index | Concepts |
The class IloSchedulerSolution
has two distinct purposes.
One use is for the storage of solution data, and the other use is as the
central data structure for local search. These two purposes are quite
different and so it is useful to clearly distinguish between them.
IloSchedulerSolution for Data Storage
As a general object in which to store information about the state of the
solver at the level of scheduling, an IloSchedulerSolution
object can be used to store and inspect activities, resources and resource
constraints. This information can be modified within the
IloSchedulerSolution
object, however, the modifications only
affect the data stored in the solution object. If you want the modifications
reflected either in the model or in a solver, it is necessary to directly
modify the model or the objects extracted in a solver. For example, you can
store an instance of an IloActivity
in a
solution object as follows:
IloSchedulerSolution sol(env); IloActivity act(env, 10); sol.add(act);
If we assume that act
is part of a model that has been
extracted by an IlcScheduler
object,
schedule
, and solved by the associated solver, we can then
store the activity in the solution with the command:
sol.store(scheduler);
This command causes the solver data regarding act
(and any
other extractables added to the solution) to be stored in the solution. In
the example of an IloActivity
, the bounds on
the start time, end time, processing time, and duration variables are stored
together with any external variable that you may have associated with the
activity.
Note that the data that is stored is retrieved from the current state of the solver.
The data in the solution can then be modified via the
IloSchedulerSolution
API. For example, to set the value of the
start time in the solution, you can write:
sol.setStartMin(act, 10); sol.setStartMax(act, 10);
Note that these commands only change the data stored in sol
.
In particular the original model is unchanged and the value of the start
time of the IlcActivity
that the solver has
extracted from act
is unchanged. To change the model, the
extractable itself must be changed. For example,
act.setLb(sol.getStartMin(act)); act.setUb(sol.getStartMax(act));
Similarly, you can write a search goal which takes an
IloSchedulerSolution
object as an argument and then, once
inside the search, adds constraints to the solver based on the information
stored in the IloSchedulerSolution
.
IloSchedulerSolution for Local Search
In local search in IBM® ILOG® Scheduler, IloSchedulerSolution
plays the same role as the IloSolution
object does in local
search in IBM ILOG Solver (see the IBM ILOG Solver Reference Manual). That
is, an IloSchedulerSolution
is used to represent a neighbor
that is to be explored. Typically, such a neighbor is specified by an
IloSchedulerSolution
which contains only those objects which
change in moving from the current solution to the neighbor. The values of
those objects in the solution reflect their values in the neighbor that is
to be explored. For example, assume you have a solution where four resource
constraints on the same resource are ordered as follows: A
before B
before C
before D
.
Further assume that one of the neighbors you want to explore is the one
where the order of B
and C
is reversed. The
following code will create an IloSchedulerSolution
object that
represents such a neighbor:
IloSchedulerSolution delta(env); delta.add(A, IloRestoreRCNext); delta.add(B, IloRestoreRCNext); delta.add(C, IloRestoreRCNext); delta.setNext(A, C); delta.setNext(C, B); delta.setNext(B, D);
Notice that the IloSchedulerSolution::add
method requires a second argument in this case. This argument specifies what
part of the information stored in the solution about the extractable is to
be restored by the solver. This information is only relevant in four
cases:
IloRestoreSolution
goal.
IloSolution::getConstraint
method.
IloSolution::restore
method.In each of these cases, the actual information that is restored
(or, in the case of IloSolution::getConstraint
, added
as a constraint) depends on the fields that have been defined to be
restored. By default, for IloActivity
and
IloResourceConstraint
all the stored information is
restored. Note that for IloResource
(and its
subclasses) nothing can be restored in this way. This is because,
from a local search perspective, the resource does not contain any
decision variables.
For more information about local search see the IBM ILOG Solver Reference Manual and the IBM ILOG Solver User Manual.
Storing Solutions
There are two ways to store solutions. Users can choose the method they prefer and mix methods if desired.
In the first method, all the objects that are to be stored are
added to the solution once using IloSchedulerSolution::add
. Then, when the solver is in the search state
that is to be stored, a single call to the function
IloSchedulerSolution::store(const IlcScheduler
scheduler)
will store all the added objects that have been
extracted by the solver associated with scheduler
.
In the second method, there is no need to add the objects to the
solution. Instead, when the solver is in the search state that is to be
stored, a call to IlcSchedulerSolution::store
can be made for each object that is to be stored. For example,
IloSchedulerSolution::store(const IloActivity activity, IlcScheduler scheduler)
will add activity
to
the solution and then immediately store it.
Sharing Solutions
IloSchedulerSolution
inherits from class
IloSolution
(see the IBM ILOG Concert Technology
Reference Manual). This means that all of the actual implementation of
the data structure for storing objects is performed by the instance of
IloSolution
. In addition, an instance of
IloSchedulerSolution
can be casted to an instance of
IloSolution
back and forth. This allow to share a
single solution instance among different solvers. For example, IBM® ILOG®
Dispatcher (see the IBM ILOG Dispatcher Reference Manual)
contains an IloRoutingSolution
that also inherits from
class IloSolution
. In a problem that uses both Scheduler
and Dispatcher, a single IloSolution
instance can be shared
between the two solvers by casting it to the appropriate class.
Storing Objects
When an object is stored, with either method described earlier, the values of its variables—assuming they are instantiated—are stored in the scheduler solution. If a variable is not bound, the minimal and the maximal value of its domain are stored in most cases.
IloSchedulerSolution::setLevelsStoredWithBounds
is provided to set the
resource in a “storage with bounds” mode. In such a mode, the
levels are stored so that the minimal level is never less than the minimum
capacity and the maximal level is never greater than the maximum
capacity.Consequently, the minimal capacity level of a resource at time t is the sum of the minimal capacities of all resource constraints that surely contribute to the resource and that are associated with activities that surely cover time t.
If the resource is closed, the maximal capacity level of the resource at
time t is the sum of the maximal capacities of all resource
constraints that possibly contribute to the resource and that are associated
with activities that possibly cover time t. If the resource is not
closed, the maximal capacity level of the resource at time t is
equal to IloInfinity
.
Accessing Stored Objects
An instance of the class IloSchedulerSolution
represents a
mapping between stored Scheduler objects and their (possible) values. It is
important to note that this mapping is not reversible. This means that the
values of the stored objects are preserved when backtracking. The values of
the stored objects can be accessed at any time by calling appropriate member
functions of the class IloSchedulerSolution
. There are also
iterators that allow access to all the objects stored in a scheduler
solution.
Modifying Values of Stored Objects
It is possible to modify the values of the stored objects by calling
appropriate member functions of the class
IloSchedulerSolution
.
Restoring a solution
Relations of type next and previous as well as setup and teardown are restored only on unary resources that have a precedence graph (either light or classical).
Successors and predecessors are always restored even if the resource has no precedence graph.
For alternative resource constraints, edges of type next, previous, successor and predecessor are restored only if both resource constraints are or can be on the same resource. When a next, previous, successor or predecessor relation between two resource constraints is restored, it means that whenever both resource constraints are allocated the same resource, the relation holds.
Deleting Solutions
The IloSchedulerSolution
class provides an end
function that frees all the memory used to save the
data in a solution. Explicitly calling this function is unnecessary as the
memory will also be reclaimed when the IloEnv
is destroyed.
However, if the user is creating and manipulating a large number of
solutions, it may be desirable to reclaim memory from
IlcSchedulerSolution
instances that are no longer needed. The
end
function has been provided for just
such a situation.
For more information, see IloNumToAnySetStepFunction
in the IBM ILOG Concert Technology Reference Manual.
Also see
Global Constraints.
See Also:
IloActivity, IloResource, IloResourceConstraint, IloSchedulerSolution::ActivityIterator, IloSchedulerSolution::ResourceConstraintIterator, IloSchedulerSolution::ResourceIterator
Constructor Summary | |
---|---|
public | IloSchedulerSolution(const IloEnv, const char * name=0) |
public | IloSchedulerSolution(const IloSolution) |
public | IloSchedulerSolution(const IloModel, const char * name=0) |
Method Summary | |
---|---|
public void | add(const IloResource x) const |
public void | add(const IloModel x) const |
public void | add(const IloResourceConstraint x, IloInt restoreFields=IloRestoreAll) const |
public void | add(const IloActivity x, IloInt restoreFields=IloRestoreAll) const |
public IloBool | areLevelsStoredWithBounds(const IloResource res) const |
public void | copy(IloSchedulerSolution solution) const |
public IloNum | getCapacityMax(const IloResourceConstraint rct) const |
public IloNum | getCapacityMin(const IloResourceConstraint rct) const |
public IloNumToNumSegmentFunction | getContinuousLevelMax(const IloResource res) const |
public IloNumToNumSegmentFunction | getContinuousLevelMin(const IloResource res) const |
public IloNumToNumStepFunction | getDiscreteLevelMax(const IloResource resource) const |
public IloNumToNumStepFunction | getDiscreteLevelMin(const IloResource resource) const |
public IloNum | getDurationMax(const IloActivity activity) const |
public IloNum | getDurationMin(const IloActivity activity) const |
public IloNum | getEndMax(const IloActivity activity) const |
public IloNum | getEndMin(const IloActivity activity) const |
public IloEnv | getEnv() const |
public IloNum | getExternalVariableMax(const IloActivity activity) const |
public IloNum | getExternalVariableMin(const IloActivity activity) const |
public IloNum | getLevelMax(const IloResource resource, IloNum time) const |
public IloNum | getLevelMin(const IloResource resource, IloNum time) const |
public IloResourceConstraint | getNextRC(const IloResourceConstraint rct) const |
public IloResourceConstraint | getPrevRC(const IloResourceConstraint rct) const |
public IloNum | getProcessingTimeMax(const IloActivity activity) const |
public IloNum | getProcessingTimeMin(const IloActivity activity) const |
public IloInt | getRestorable(IloResourceConstraint rc) const |
public IloInt | getRestorable(IloActivity activity) const |
public IloResource | getSelected(const IloResourceConstraint rct) const |
public IloResourceConstraint | getSetupRC(const IloResource resource) const |
public IloNum | getStartMax(const IloActivity activity) const |
public IloNum | getStartMin(const IloActivity activity) const |
public IloResourceConstraint | getTeardownRC(const IloResource resource) const |
public IloBool | hasAsNext(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public IloBool | hasCapacityInformation(const IloResource resource) const |
public IloBool | hasPredecessors(const IloResourceConstraint rct) |
public IloBool | hasSuccessors(const IloResourceConstraint rct) |
public IloBool | isResourceSelected(const IloResourceConstraint rct) const |
public IloBool | isSetup(const IloResourceConstraint rct) const |
public IloBool | isSucceededBy(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public IloBool | isTeardown(const IloResourceConstraint rct) const |
public IloSchedulerSolution | makeClone(IloEnv e) const |
public void | remove(IloModel m) const |
public void | setCapacityMax(const IloResourceConstraint ct, IloNum max) const |
public void | setCapacityMin(const IloResourceConstraint ct, IloNum min) const |
public void | setDurationMax(const IloActivity activity, IloNum max) const |
public void | setDurationMin(const IloActivity activity, IloNum min) const |
public void | setEndMax(const IloActivity activity, IloNum max) const |
public void | setEndMin(const IloActivity activity, IloNum min) const |
public void | setExternalVariableMax(const IloActivity activity, IloNum max) const |
public void | setExternalVariableMin(const IloActivity activity, IloNum min) const |
public void | setLevelMax(const IloResource resource, IloNum start, IloNum end, IloNum max) const |
public void | setLevelMin(const IloResource resource, IloNum start, IloNum end, IloNum min) const |
public void | setLevelsStoredWithBounds(const IloResource res, IloBool withBounds=IloTrue) const |
public void | setNext(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public void | setNonRestorable(IloResourceConstraint rc) const |
public void | setNonRestorable(IloActivity activity) const |
public void | setProcessingTimeMax(const IloActivity activity, IloNum max) const |
public void | setProcessingTimeMin(const IloActivity activity, IloNum min) const |
public void | setRestorable(IloResourceConstraint rc, IloInt storeFields) const |
public void | setRestorable(IloActivity activity, IloInt storeFields) const |
public void | setSelected(IloResourceConstraint rct, const IloResource resource) const |
public void | setSetup(const IloResourceConstraint rct) const |
public void | setStartMax(const IloActivity activity, IloNum max) const |
public void | setStartMin(const IloActivity activity, IloNum min) const |
public void | setSuccessor(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public void | setTeardown(const IloResourceConstraint rct) const |
public void | store(const IloResourceConstraint ct, const IlcScheduler scheduler) const |
public void | store(const IloResource resource, const IlcScheduler scheduler) const |
public void | store(const IloActivity activity, const IlcScheduler scheduler) const |
public void | store(const IlcScheduler scheduler) const |
public void | unsetNext(const IloResourceConstraint rct) const |
public void | unsetNext(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public void | unsetPrecedences() |
public void | unsetPrecedences(const IloResource resource) |
public void | unsetPredecessors(const IloResourceConstraint rct) const |
public void | unsetPrev(const IloResourceConstraint rct) const |
public void | unsetSelected(const IloResourceConstraint rct) const |
public void | unsetSequence(const IloResource resource) |
public void | unsetSequences() |
public void | unsetSetup(const IloResourceConstraint rct) const |
public void | unsetSuccessor(const IloResourceConstraint srct1, const IloResourceConstraint srct2) const |
public void | unsetSuccessors(const IloResourceConstraint rct) const |
public void | unsetTeardown(const IloResourceConstraint rct) const |
Inner Enumeration |
---|
IloSchedulerSolution::IloResourceConstraintIteratorFilter |
Inner Class |
---|
IloSchedulerSolution::ActivityIterator |
IloSchedulerSolution::ResourceConstraintIterator |
IloSchedulerSolution::ResourceIterator |
Constructor Detail |
---|
This constructor creates a new instance of the class
IloSchedulerSolution
. This instance does not contain stored
objects. Objects can be stored in this instance by calling the member
function IloSchedulerSolution::store
.
This constructor creates an instance of IloSchedulerSolution
that is an interface to the passed IloSolution
solution. Rather
than creating an internal IloSolution
, an argument is used.
This constructor can be used to share an IloSolution
instance among a number of solvers, each with a different interface to a
solution object.
This constructor creates a scheduler solution from the environment
associated with model
. It calls add(IloModel)
and
adds all the scheduler extractables (that is, IloActivity
, IloResourceConstraint
, IloResource
and its subclasses) that have been explicity
added to the model to the solution. The optional argument name
,
if provided, becomes the name of the underlying IloSolution
associated with the newly created IloSchedulerSolution
.
Method Detail |
---|
This member function adds the passed IloResource
to the list
of objects in the solution. The next time
IloSchedulerSolution::store(const IlcScheduler)
is called, the
resource will be stored.
This member function adds model x
to the invoking scheduler
solution. That is, all activities, resource constraints, and resources that
have been explicitly added to model are added to the invoking routing
solution.
This member function adds x
to the list of objects in the
solution. The next time IloSchedulerSolution::store(const
IlcScheduler)
is called, the resource constraint will be stored. The
storeFields
argument defines the fields that will be restored
when applying goal IloRestoreSolution
or when calling
method IloSolution::restore
. Valid values of
restoreFields
are IloRestoreNothing
,
IloRestoreAll
, and any bitwise-OR combination of
IloRestoreRCNext
, IloRestoreRCPrev
,
IloRestoreRCDirectSuccessor
,
IloRestoreRCDirectPredecessors
,
IloRestoreRCSetup
, IloRestoreRCTeardown
,
IloRestoreRCCapacity
, and
IloRestoreRCSelected
.
IloResourceConstraint
does not have a resource selected, the precedence relations of type
next
, previous
, direct
successor
, direct predecessor
,
setup
and teardown
will not be
stored. This member function adds x
to the list of objects in the
solution. The next time
IloScheduler::store(const IlcScheduler)
is called,
the activity will be stored. The restoreFields
argument defines
the fields that will be restored in local search, the
IloRestoreSolution
goal, and via the
IloSolution::getConstraint
methods. Valid values of
storeFields
are IloRestoreNothing
,
IloRestoreAll
, and any bitwise-OR combination of
IloRestoreActivityStart
, IloRestoreActivityEnd
,
IloRestoreActivityDuration
,
IloRestoreActivityProcessingTime
,
IloRestoreActivityExternal
.
This member function returns IloTrue
if the current storage
mode of res
is “with bounds.”
See the section "Storing Objects" at the start of this class for
more information.
This member function should be used only if res
is stored in
the scheduler solution and contains information about capacity levels.
This member function copies solution to the invoking scheduler solution.
This member function returns the maximal capacity of the given resource constraint in the invoking scheduler solution.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function returns the minimal capacity of the given resource constraint in the invoking scheduler solution.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function returns a piecewise linear function describing the
stored maximal level of res
in the invoking scheduler solution.
The returned piecewise linear function is a physical representation of the
maximal level of res
in the solution. Therefore, it is possible
to modify the stored maximal level by modifying the piecewise linear
function; and modifying the stored maximal level of res
modifies the returned piecewise linear function.
This member function should be used only if res
is stored in
the scheduler solution and contains information about capacity levels.
This member function returns a piecewise linear function describing the
stored minimal level of res
in the invoking scheduler solution.
The returned piecewise linear function is a physical representation of the
minimal level of res
in the solution. Therefore, it is possible
to modify the stored minimal level by modifying the piecewise linear
function; and modifying the stored minimal level of res
modifies the returned piecewise linear function.
This member function should be used only if res
is stored in
the scheduler solution and contains information about capacity levels.
This member function returns a step function describing the stored
maximal level of resource
in the invoking scheduler solution.
The returned step function is a physical representation of the maximal level
of resource
in the solution. Therefore, it is possible to
modify the stored maximal level by modifying the step function; and
modifying the stored maximal level of resource
modifies the
returned step function.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels. This member function must not be used if resource
is a
continuous reservoir.
This member function returns a step function describing the stored
minimal level of resource
in the invoking scheduler solution.
The returned step function is a physical representation of the minimal level
of resource
in the solution. Therefore, it is possible to
modify the stored minimal level by modifying the step function; and
modifying the stored minimal level of resource
modifies the
returned step function.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels. This member function must not be used if resource
is a
continuous reservoir.
This member function returns the maximal duration of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the minimal duration of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the maximal end time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the minimal end time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the environment for which the scheduler solution was created.
This member function returns the maximal value for the external variable
of the given activity
in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the minimal value for the external variable of the given activity in the invoking scheduler solution.
This member function should be used only if activity is stored in the scheduler solution.
This member function returns the maximal level of the given resource in the invoking scheduler solution at the given time.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels.
This member function returns the minimal level of the given resource in the invoking scheduler solution at the given time.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels.
This member function returns the next resource constraint of the given
resource constraint in the invoking scheduler solution, if such a next
constraint exists. In case there are several such constraints, this method
returns an empty handle: see
IloSchedulerSolution::ResourceConstraintIterator
to iterate on all the next resource constraints.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function returns the previous resource constraint of the
given resource constraint in the invoking scheduler solution, if such
a previous constraint exists. In case there are several such constraints, the
method returns an empty handle : see
IloSchedulerSolution::ResourceConstraintIterator
to
iterate on all previous resource constraints.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function returns the maximal processing time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the minimal processing time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This method returns the value representing the fields of rc
that will be restored.
This method returns the value representing the fields of
activity
that will be restored.
This member function returns the selected resource of the given resource constraint in the invoking scheduler solution if this selected resource exists.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function returns the setup resource constraint of the given
resource
in the invoking scheduler solution, if such a setup resource
constraint exists. In case there are several such constraints, this method
returns an empty handle.
This member function should be used only if resource
is
stored in the invoking scheduler solution.
This member function returns the maximal start time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the minimal start time of the given activity in the invoking scheduler solution.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function returns the teardown resource constraint of the
given resource
in the invoking scheduler solution, if
such a teardown resource constraint exists. In case there are several
such constraints, this method returns an empty handle.
This member function should be used only if resource
is
stored in the invoking scheduler solution.
This member function returns IloTrue
if the
resource constraint srct2
is a next resource
constraint of the resource constraint rct1
in the
invoking scheduler solution. Otherwise, it returns
IloFalse
.
This member function returns IloTrue
if information about
capacity levels has been stored for the resource
in the
invoking scheduler solution. Otherwise, it returns IloFalse
.
Capacity information is stored for resources only if sufficient
information is available from the solver. In the case of
IlcScheduler
, the timetable constraint must exist on the
resources in order for the capacity information to be stored in the
solution. See
Resource Enforcement as Global Constraint Declaration.
This member function returns IloTrue
if the resource
constraint rct
has at least one predecessor in the
invoking scheduler solution. Otherwise it returns
IloFalse
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function returns IloTrue
if the resource
constraint rct
has at least one successor in the
invoking scheduler solution. Otherwise it returns
IloFalse
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function returns IloTrue
if the given resource
constraint has a selected resource in the invoking scheduler solution.
Otherwise, it returns IloFalse
.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function returns IloTrue
if rct
is
the setup (that is, the first) resource constraint of its resource in the
invoking scheduler solution. Otherwise, it returns IloFalse
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function returns IloTrue
if the
resource constraint srct2
succeedes the resource
constraint srct1
in the invoking scheduler
solution, that is if a successor relation has been added with
the member function setSuccessor
. Otherwise it returns
IloFalse
.
This member function returns IloTrue
if rct
is
the teardown (that is, the last) resource constraint of its resource in the
invoking scheduler solution. Otherwise, it returns IloFalse
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function allocates a new solution on e
and adds
to it all objects that were added to the invoking object. The newly created
solution is returned.
This member function removes all scheduler extractables (such as
IloActivity
, IloResourceConstraint
, IloResource
and its subclasses) that have been explicitly
added to the model from the invoking scheduler solution.
This member function changes the maximal capacity of ct
in
the invoking scheduler solution to max
.
This member function should be used only if ct
is stored in
the scheduler solution.
This member function changes the minimal capacity of ct
in
the invoking scheduler solution to min
.
This member function should be used only if ct
is stored in
the scheduler solution.
This member function changes the maximal duration of
activity
in the invoking scheduler solution to
max
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the minimal duration of
activity
in the invoking scheduler solution to
min
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the maximal end time of
activity
in the invoking scheduler solution to
max
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the minimal end time of
activity
in the invoking scheduler solution to
min
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the maximal value of the external variable
of activity
in the invoking scheduler solution to
max
. This member function should be used only if
activity
is stored in the scheduler solution.
This member function changes the minimal value of the external variable
of activity
in the invoking scheduler solution to
max
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the maximal level of resource
in the invoking scheduler solution to max
during the interval
[start end]
. For this purpose, the internal step function for
the stored maximal level of the resource is modified.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels.
This member function changes the minimal level of resource
in the invoking scheduler solution to min
during the interval
[start end]
. For this purpose, the internal step function for
the stored minimal level of the resource is modified.
This member function should be used only if resource
is
stored in the scheduler solution and contains information about capacity
levels.
If withBounds
is equal to IloTrue
, this member
function sets the storage mode of res
to be “with
bounds.” At the construction of the scheduler object, the default mode
is “without bounds.”
See the section "Storing Objects" at the start of this class for more information.
This member function should be used only if res
is stored in
the scheduler solution and contains information about capacity levels.
If the resource constaint srct1
is stored in the
invoking scheduler solution, this member function makes
srct2
the next resource constraint of
srct1
in the invoking scheduler solution. Similarly,
if the resource constraint srct2
is stored in the
invoking scheduler solution, this member function makes
srct1
the previous of srct2
.
Next and previous are restored only on unary resources.
This member function sets rc
as non-restorable. No fields of
this resource constraint will be restored. This method is equivalent to
setRestorable(rc, IloRestoreNothing);
This member function sets activity
as non-restorable. No
fields of this activity will be restored. This method is equivalent to
setRestorable(activity, IloRestoreNothing);
This member function changes the maximal processing time of
activity
in the invoking scheduler solution to
max
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the minimal processing time of
activity
in the invoking scheduler solution to
min
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function sets the data fields that will be restored for
rc
in the context of local search, the
IloRestoreSolution
goal,
IloSolution::getConstraint
, and
IloSolution::restore
.
Valid values of
storeFields
are IloRestoreNothing
,
IloRestoreAll
, and any bitwise-OR combination of
IloRestoreRCNext
, IloRestoreRCDirectSuccessor
,
IloRestoreRCSetup
, IloRestoreRCTeardown
,
IloRestoreRCCapacity
, and
IloRestoreRCSelected
.
This member function sets the data fields that will be restored for
activity
in the context of local search, the
IloRestoreSolution
goal,
IloSolution::getConstraint
, and
IloSolution::restore
.
Valid values of
storeFields
are IloRestoreNothing
,
IloRestoreAll
, and any bitwise-OR combination of
IloRestoreActivityStart
, IloRestoreActivityEnd
,
IloRestoreActivityDuration
,
IloRestoreActivityProcessingTime
,
IloRestoreActivityExternal
.
This member function sets the selected resource of rct
in
the invoking scheduler solution to resource
. If the
resource constraint is a setup (resp. teardown) resource
constraint and if the resource is stored in the invoking scheduler
solution, then the member function getSetupRC
(resp. getTeardownRC
) returns the resource constraint
rct
.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function makes rct
a setup resource
constraint in the invoking scheduler solution. If the resource
constraint has a selected resource and if this selected resource is
stored in the invoking scheduler solution, then the member function
getSetupRC
returns the resource constraint
rct
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
Setups are only restored on unary resources.
This member function changes the maximal start time of
activity
in the invoking scheduler solution to
max
.
This member function should be used only if activity
is
stored in the scheduler solution.
This member function changes the minimal start time of
activity
in the invoking scheduler solution to
min
.
This member function should be used only if activity
is
stored in the scheduler solution.
If the resource constaint srct1
is stored in the
invoking scheduler solution, this member function makes
srct2
a successor of srct1
in the invoking
scheduler solution. Similarly, if the resource constraint
srct2
is stored in the invoking scheduler solution,
this member function makes srct1
a predecessor of
srct2
.
This member function makes rct
a teardown resource
constraint in the invoking scheduler solution. If the resource
constraint has a selected resource and if this selected resource is
stored in the invoking scheduler solution, then the member functions
getTeardownRC
returns the resource constraint
rct
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
Teardowns are only restored on unary resources.
This member function stores ct
in the invoking scheduler
solution. The minimal and maximal capacities of the ct
are also
stored. The data stored is that which is present in the current search state
of scheduler
.
This member function stores resource
in the invoking
scheduler solution.
If the resource has a precedence graph, then the resource constraints that actually execute on the resource are stored. The resource constraints that are stored are only those that are part of the model: if the solver has created resource constraints during the search, they will not be added to the solution. In addition, the precedence order between those resource constraints (if present) is stored.
This member function stores activity
in the invoking
scheduler solution. The minimal and maximal values for start time, end time,
processing time, duration, and external variable are stored. The data stored
is that which is present in the current search state of
scheduler
.
This member function calls the
IloSolution::store(IloAlgorithm)
function on the internal
IloSolution
. That function stores the data (from the algorithm)
for each object that:
scheduler
.The data stored is that which is present in the current search state
of scheduler
.
This member function removes all the next resource constraints of
rct
in the invoking scheduler solution. Consistency is
maintained; that is, the resource constraint rct
is no longer
a previous resource constraint of its former next resource
constraints.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes the next edge, if it exists, between
srct1
and srct2
in the invoking schedule
solution. Consistency is maintained; that is, srct1
is
no longer a previous resource constraint of srct2
.
This member function removes all the successors and all the predecessors of all resource constraints that are stored in the invoking scheduler solution.
This member function removes all the successors and all the
predecessors of all resource constraints that have
resource
as the selected resource in the invoking
scheduler solution.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes all the predecessors of
rct
in the invoking scheduler solution. Consistency is
maintained; that is, the resource constraint rct
is no longer
a successor of its former predecessors.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes all the previous resource
constraints of rct
in the invoking scheduler
solution. Consistency is maintained; that is, the resource constraint
rct
is no longer a next resource constraint of its
former previous resource constraints.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes the selected resource of
rct
in the invoking scheduler solution. If the
resource constraint is a setup (resp. teardown) resource
constraint and if its former selected resource is stored in the
invoking scheduler solution, then the member function
getSetupRC
(resp. getTeardownRC
) will no
longer return the resource constraint rct
.
This member function should be used only if rct
is stored in
the scheduler solution.
This member function removes all the next, previous, setup and
teardown of all resource constraints that have
resource
as the selected resource in the invoking
scheduler solution.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes all the next, previous, setup and teardown of all resource constraints that are stored in the invoking scheduler solution.
This member function removes rct
as a setup
resource constraint in the invoking scheduler solution. If the resource
constraint has a selected resource and if this selected resource is
stored in the invoking scheduler solution, then the member function
getSetupRC
will no longer return the resource
constraint rct
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes the precedence relation between
srct1
and srct2
from the invoking
scheduler solution, if this edge exists. As a consequence,
srct2
is no longer a successor of srct1
in the invoking scheduler solution nor is srct1
a
predecessor of srct2
.
This member function removes all the successors of
rct
in the invoking scheduler solution. Consistency is
maintained; that is, the resource constraint rct
is no longer
a predecessor of its former successors.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
This member function removes rct
as a teardown
resource constraint in the invoking scheduler solution. If the resource
constraint has a selected resource and if this selected resource
is stored in the invoking scheduler soluiton, then the member
function getTeardownRC
will no longer return the
resource constraint rct
.
This member function should be used only if rct
is
stored in the invoking scheduler solution.
Inner Enumeration Detail |
---|
The enumeration IloResourceConstraintIteratorFilter
can be used to create a
IloSchedulerSolution::ResourceConstraintIterator
that traverses a specifed set of resource constraints such as the
predecessors or the successors. The possible values are described
below.
IloPredecessors
indicates that the iterator will
traverse the set of resource constraints that are predecessors of a
given resource constraint.
IloSuccessors
indicates that the iterator will
traverse the set of resource constraints that are direct successors
of a given resource constraint.
IloPrevious
indicates that the iterator
will traverse the set of resource constraints that are previous
of a given resource constraint.
IloNext
indicates that the iterator will
traverse the set of resource constraints that are next
of a given resource constraint.
See Also:
IloSchedulerSolution::ResourceConstraintIterator
Fields |
---|
IloPredecessors = 0 | |
IloSuccessors = 1 | |
IloPrevious = 2 | |
IloNext = 3 |