FRAMES NO FRAMES

Class IloStateResource

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

An instance of the class IloStateResource represents a resource of infinite capacity, the state of which can vary over time. Each activity may, throughout its execution, require a state resource to be in a given state (or in any of a given set of states). Consequently, two activities may not overlap if they require incompatible states during their execution.

Parameter Classes

Possible states: (class IloNumToAnySetStepFunction)

This parameter describes the possible states of the state resource over time. It is directly modified by the following member functions: IloStateResource::addPossibleStates, IloStateResource::addPossibleState, IloStateResource::removePossibleStates, and IloStateResource::removePossibleState.

Must be in use intervals: (class IloIntervalList)

This parameter describes the set of time intervals during which the resource needs to be used by some activities. It is directly modified by the following member functions: IloStateResource::setMustBeInUse, and IloStateResource::unsetMustBeInUse.

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. Also see IloNumToAnySetStepFunction and IloIntervalList in the extensions section of the IBM ILOG Concert Technology Reference Manual.

See Also:

Constructor Summary
public IloStateResource()
public IloStateResource(IloStateResourceI * impl)
public IloStateResource(const IloEnv env, const IloAnySet states, const char * name=0)
Method Summary
public voidaddPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const
public voidaddPossibleState(IloAny state) const
public voidaddPossibleStates(IloNum timeMin, IloNum timeMax, const IloAnySet states) const
public voidaddPossibleStates(const IloAnySet states) const
public IloStateResourceI *getImpl() const
public IloAnySetgetPossibleStates(IloNum time) const
public IloAnySetgetPossibleStates() const
public IloBoolisAlwaysPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const
public IloBoolisEverPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const
public IloBoolisPossibleState(IloNum time, IloAny state) const
public voidremovePossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const
public voidremovePossibleState(IloAny state) const
public voidremovePossibleStates(IloNum timeMin, IloNum timeMax, const IloAnySet states) const
public voidremovePossibleStates(const IloAnySet states) const
public voidsetMustBeInUse(IloNum timeMin, IloNum timeMax) const
public voidsetMustBeInUseParam(const IloIntervalList intervals) const
public voidsetPossibleStatesParam(const IloNumToAnySetStepFunction states) const
public voidunsetMustBeInUse(IloNum timeMin, IloNum timeMax) const
Inherited Methods from IloResource
addCapacityEnforcementInterval, addTransitionTimeEnforcementInterval, areCalendarConstraintsIgnored, areCapacityConstraintsIgnored, arePrecedenceConstraintsIgnored, areSequenceConstraintsIgnored, areTransitionTimeConstraintsIgnored, getCalendar, getCalendarEnforcement, getCapacityEnforcement, getDurationEnforcement, getImpl, getPrecedenceEnforcement, getSequenceEnforcement, getTransitionTimeEnforcement, hasCalendar, ignoreCalendarConstraints, ignoreCapacityConstraints, ignorePrecedenceConstraints, ignoreSequenceConstraints, ignoreTransitionTimeConstraints, isCapacityResource, isContinuousReservoir, isDiscreteEnergy, isDiscreteResource, isKeptOpen, isReservoir, isStateResource, isUnaryResource, keepOpen, removeCapacityEnforcementInterval, removeTransitionTimeEnforcementInterval, setCalendar, setCalendarEnforcement, setCapacityEnforcement, setCapacityEnforcementIntervalsParam, setDurationEnforcement, setPrecedenceEnforcement, setResourceParam, setSequenceEnforcement, setTransitionTimeEnforcement, setTransitionTimeEnforcementIntervalsParam
Constructor Detail

IloStateResource

public IloStateResource()
This constructor creates an instance that is empty, that is, one whose handle pointer is null. You must assign it a value before you access it. Any attempt to access it before assignment leads to undefined behaviour.

IloStateResource

public IloStateResource(IloStateResourceI * impl)
This constructor creates an instance of the handle class from the pointer to an instance of the implementation class.

IloStateResource

public IloStateResource(const IloEnv env, const IloAnySet states, const char * name=0)

This constructor creates a new instance of IloStateResource and adds it to the set of resources managed in the given environment. The argument states is the set of pointers that can be accepted as possible states for the resource. If the argument name is defined, it is assigned as the name of the newly created state resource.


Method Detail

addPossibleState

public void addPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const

This member function adds a given state to the set of possible states of the invoking resource over the interval [timeMin, timeMax).


addPossibleState

public void addPossibleState(IloAny state) const

This member function adds a state to the set of possible states of the invoking resource.


addPossibleStates

public void addPossibleStates(IloNum timeMin, IloNum timeMax, const IloAnySet states) const

This member function adds a set of states to the set of possible states of the invoking resource over the interval [timeMin, timeMax).


addPossibleStates

public void addPossibleStates(const IloAnySet states) const

This member function adds a set of states to the set of possible states of the invoking resource.


getImpl

public IloStateResourceI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

getPossibleStates

public IloAnySet getPossibleStates(IloNum time) const

This member function returns the set of possible states of the invoking resource at a given time.


getPossibleStates

public IloAnySet getPossibleStates() const

This member function returns the set of possible states of the invoking resource.


isAlwaysPossibleState

public IloBool isAlwaysPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const

This member function returns IloTrue if and only if it is possible that the invoking resource is in the given state over the entire interval [timeMin, timeMax). Otherwise, it returns IloFalse.


isEverPossibleState

public IloBool isEverPossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const

This member function returns IloTrue if and only if it is possible that the invoking resource is in the given state at some point in the interval [timeMin, timeMax). Otherwise, it returns IloFalse.


isPossibleState

public IloBool isPossibleState(IloNum time, IloAny state) const

This member function returns IloTrue if and only if it is possible that the invoking resource is in the given state at the given time. Otherwise, it returns IloFalse.


removePossibleState

public void removePossibleState(IloNum timeMin, IloNum timeMax, IloAny state) const

This member function states that the invoking resource must not be in the given state at any time in the interval [timeMin, timeMax).


removePossibleState

public void removePossibleState(IloAny state) const

This member function removes a state from the set of possible states of the invoking resource.


removePossibleStates

public void removePossibleStates(IloNum timeMin, IloNum timeMax, const IloAnySet states) const

This member function states that the invoking resource must not be in any of the given states at any time in the interval [timeMin, timeMax).


removePossibleStates

public void removePossibleStates(const IloAnySet states) const

This member function removes a set of states from the set of possible states of the invoking resource.


setMustBeInUse

public void setMustBeInUse(IloNum timeMin, IloNum timeMax) const

This member function states that the invoking resource must be in use and that it cannot be idle over the interval [timeMin, timeMax).


setMustBeInUseParam

public void setMustBeInUseParam(const IloIntervalList intervals) const

This member function sets the argument intervals as the list of time intervals during which the invoking resource must be in use.


setPossibleStatesParam

public void setPossibleStatesParam(const IloNumToAnySetStepFunction states) const

This member function sets the argument states as the function that describes the possible states of the invoking resource over time.


unsetMustBeInUse

public void unsetMustBeInUse(IloNum timeMin, IloNum timeMax) const

This member function states that the invoking resource does not need to be in use during the interval [timeMin, timeMax).