FRAMES NO FRAMES

Class IloSchedulerSolution::ResourceConstraintIterator

Definition file: ilsched/ilosolution.h
Include file: <ilsched/iloscheduler.h>

An instance of this class traverses the list of IloResourceConstraint instances that have been stored in an IloSchedulerSolution.

See Also:

Constructor and Destructor Summary
public ResourceConstraintIterator(IloSchedulerSolution sol)
public ResourceConstraintIterator(IloSchedulerSolution sol, IloResource r)
public ResourceConstraintIterator(IloSchedulerSolution sol, IloActivity a)
public ResourceConstraintIterator(IloSchedulerSolution sol, IloResourceConstraint ct, IloBool iterateOnSuccessors=IloTrue)
public ResourceConstraintIterator(IloSchedulerSolution sol, IloResourceConstraint ct, IloSchedulerSolution::IloResourceConstraintIteratorFilter filter)
Method Summary
public IloBoolok() const
public IloResourceConstraintoperator*()
public ResourceConstraintIterator &operator++()
Constructor and Destructor Detail

ResourceConstraintIterator

public ResourceConstraintIterator(IloSchedulerSolution sol)

This constructor creates an iterator to traverse all the resource constraints that are stored in the given scheduler solution.


ResourceConstraintIterator

public ResourceConstraintIterator(IloSchedulerSolution sol, IloResource r)

This constructor creates an iterator to traverse all the resource constraints that have resource r as the selected resource.


ResourceConstraintIterator

public ResourceConstraintIterator(IloSchedulerSolution sol, IloActivity a)

This constructor creates an iterator that traverses all the resource constraints on activity a that are stored in the solution sol.


ResourceConstraintIterator

public ResourceConstraintIterator(IloSchedulerSolution sol, IloResourceConstraint ct, IloBool iterateOnSuccessors=IloTrue)

When the boolean iterateOnSuccessors is true, this constructor creates an iterator that traverses all the resoure constraints that succeed the resource constraint ct in the scheduler solution sol. When the boolean iterateOnSuccessors is false, this constructor creates an iterator that traverses all the resource constraints that precede the resource constraint ct in the scheduler solution sol.


ResourceConstraintIterator

public ResourceConstraintIterator(IloSchedulerSolution sol, IloResourceConstraint ct, IloSchedulerSolution::IloResourceConstraintIteratorFilter filter)

This constructor creates an iterator that traverses the subset of resource constraints specified by the filter. For instance, to iterate on all successors of ct that are stored in the scheduler solution sol, use filter value IloSchedulerSolution::IloSuccessors. See enum IloSchedulerSolution::IloResourceConstraintIteratorFilter for all possible values of the filter.


Method Detail

ok

public IloBool ok() const

This member function returns IloTrue if the current position of the iterator is a valid one. It returns IloFalse if all the resources have been scanned by the iterator.


operator*

public IloResourceConstraint operator*()

This operator returns the current instance of IloResourceConstraint, the one to which the invoking iterator points. If the iterator is set past the end position, then this operator returns an empty handle.


operator++

public ResourceConstraintIterator & operator++()

This left-increment operator shifts the current position of the iterator to the next instance of IloResourceConstraint.