FRAMES NO FRAMES

Class IlcAltResConstraintIterator

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

An instance of the class IlcAltResConstraintIterator is an iterator that traverses, during the search, the constraints defined between an instance of IlcActivity and an instance of IlcAltResSet. If used before entering the search, this iterator will traverse an empty list of alternative resource constraints.

If you iterate over all the constraints that require or provide the resources in that set, you are actually traversing all the resources that might be required or provided. If you want to traverse only the constraints that surely provide or require the resources in the set of an instance of IlcAltResSet, then you have to use the member function IlcConstraint::isPosted (documented in the IBM ILOG Solver Reference Manual) to distinguish among them. See the example in IlcResourceConstraintIterator for a program that makes this distinction correctly.

See Also:

Constructor and Destructor Summary
public IlcAltResConstraintIterator(IlcAltResSet set)
public IlcAltResConstraintIterator(IlcActivity act)
public IlcAltResConstraintIterator(IlcAltResSet set, IlcTimeExtent extent)
public IlcAltResConstraintIterator(IlcActivity act, IlcTimeExtent extent)
Method Summary
public IlcBoolok() const
public IlcAltResConstraintoperator*() const
public IlcAltResConstraintIterator &operator++()
Constructor and Destructor Detail

IlcAltResConstraintIterator

public IlcAltResConstraintIterator(IlcAltResSet set)

This constructor creates a new instance of IlcAltResConstraintIterator that traverses the constraints that require or provide the capacity resources in set.


IlcAltResConstraintIterator

public IlcAltResConstraintIterator(IlcActivity act)

This constructor creates a new instance of IlcAltResConstraintIterator that traverses the alternative resource constraints defined on act.


IlcAltResConstraintIterator

public IlcAltResConstraintIterator(IlcAltResSet set, IlcTimeExtent extent)

This constructor creates a new instance of IlcAltResConstraintIterator that traverses the constraints that require or provide the capacity resources in set that have the time extent indicated by extent.


IlcAltResConstraintIterator

public IlcAltResConstraintIterator(IlcActivity act, IlcTimeExtent extent)

This constructor creates a new instance of IlcAltResConstraintIterator that traverses the alternative resource constraints defined on act that have the time extent indicated by extent.


Method Detail

ok

public IlcBool ok() const

This member function returns IlcTrue if there is a current constraint and the invoking iterator points to it. Otherwise, it returns IlcFalse.


operator*

public IlcAltResConstraint operator*() const

This operator returns the current constraint, 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 IlcAltResConstraintIterator & operator++()

This operator shifts the iterator to point to the next element.