FRAMES NO FRAMES

Class IlcResourceConstraintDeltaIterator

Definition file: ilsched/schedule.h
Include file: <ilsched/ilsched.h>

An instance of this class traverses a delta set of resource constraints (for example, the new direct predecessors of a given resource constraint).

See Also:

Constructor and Destructor Summary
public IlcResourceConstraintDeltaIterator(IlcResourceConstraint constraint, IlcResourceConstraintIteratorFilter filter)
Method Summary
public IlcActivitygetActivity() const
public IlcResourcegetResource() const
public IlcBoolok() const
public IlcResourceConstraintoperator*() const
public IlcResourceConstraintDeltaIterator &operator++()
Constructor and Destructor Detail

IlcResourceConstraintDeltaIterator

public IlcResourceConstraintDeltaIterator(IlcResourceConstraint constraint, IlcResourceConstraintIteratorFilter filter)

This constructor creates a delta iterator to traverse the elements of the subset of resource constraints specified by the filter whose status has changed with respect to constraint. The possible filters are IlcDirectPredecessors, IlcDirectSuccessors, IlcPredecessors, IlcSuccessors. The possible statuses of a resource constraint with respect to constraint are: unranked, direct predecessor, direct successor, indirect predecessor, indirect successor.

Thus, with the filter IlcDirectSuccessors or IlcDirectPredecessors, the delta iterator traverses the set of new direct successors or direct predecessors of constraint.

With the filter IlcSuccessors or IlcPredecessors, the delta iterator traverses the union of the set of new direct successors and the set of new indirect successors or the union of the set of new direct predecessors and the set of new indirect predecessors of constraint. This delta set is a superset of the set of new successors or new predecessors of constraint because any resource constraint whose status changes from direct successor to indirect successor or from direct predecessor to indirect predecessor will be traversed by this delta iterator even though it was already a successor or predecessor.

Note
The delta sets of resource constraints are emptied when all the demons attached to the graph events of a resource constraint have been executed. Thus, any attempt to traverse a delta set of resource constraints outside the execution of such a demon may lead to unexpected behavior.

This constructor can be used only when a resource precedence graph is associated with the resource required by constraint. If the resource is not associated with a precedence graph, an instance of IloSolver::SolverErrorException is thrown.


Method Detail

getActivity

public IlcActivity getActivity() const

This member function returns the activity involved in the resource constraint located at the current position of the invoking iterator.


getResource

public IlcResource getResource() const

This member function returns the resource involved in the resource constraint located at the current position of the invoking iterator.


ok

public IlcBool ok() const

This member function returns IlcTrue if the current position of the iterator is a valid one. It returns IlcFalse if all the constraints have been scanned by the iterator.


operator*

public IlcResourceConstraint operator*() const

This operator accesses the instance of IlcResourceConstraint located at the current position of the iterator. If the iterator is set past the end position, this operator returns an empty handle.


operator++

public IlcResourceConstraintDeltaIterator & operator++()

This left-increment operator shifts the current position of the iterator.