FRAMES NO FRAMES

Class IloResource

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

A resource is represented by an instance of the abstract class IloResource. Activities in a schedule may require or provide resources.

This class inherits from the IBM® ILOG® Concert Technology class IloExtractable. That class is documented in the IBM ILOG Concert Technology Reference Manual.

There are several predefined subclasses of IloResource.

Parameter Classes

Calendar: (class IloCalendar)

This parameter attached to the resource allows expressing complex behavior as resource breaks and shifts, and efficiency along the schedule. It is modified by the member function IloResource::setCalendar.

Resource parameter: (class IloResourceParam)

This parameter describes the basic resource parameter of the resource. It is directly modified by the following member functions: IloResource::ignoreCalendarConstraints, IloResource::ignoreCapacityConstraints, IloResource::ignorePrecedenceConstraints, IloResource::ignoreSequenceConstraints, IloResource::ignoreTransitionTimeConstraints, IloResource::setBreaksEnforcement, IloResource::setCapacityEnforcement, IloResource::setPrecedenceEnforcement, IloResource::setSequenceEnforcement, IloResource::setTransitionTimeEnforcement, and IloResource::keepOpen.

Capacity enforcement intervals: (class IloIntervalList)

This parameter describes the set of time intervals on which the resource usage must be enforced. It is directly modified by the following member functions: IloResource::addCapacityEnforcementInterval and IloResource::removeCapacityEnforcementInterval.

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.

For more information, see Calendars, and Resource Usage Profiles .

See Also:

Constructor Summary
public IloResource()
public IloResource(IloResourceI * impl)
Method Summary
public voidaddCapacityEnforcementInterval(IloNum tmin, IloNum tmax, IloNum step=1) const
public voidaddTransitionTimeEnforcementInterval(IloNum tmin, IloNum tmax) const
public IloBoolareCalendarConstraintsIgnored() const
public IloBoolareCapacityConstraintsIgnored() const
public IloBoolarePrecedenceConstraintsIgnored() const
public IloBoolareSequenceConstraintsIgnored() const
public IloBoolareTransitionTimeConstraintsIgnored() const
public IloCalendargetCalendar() const
public IloEnforcementLevelgetCalendarEnforcement() const
public IloEnforcementLevelgetCapacityEnforcement() const
public IloEnforcementLevelgetDurationEnforcement() const
public IloResourceI *getImpl() const
public IloEnforcementLevelgetPrecedenceEnforcement() const
public IloEnforcementLevelgetSequenceEnforcement() const
public IloEnforcementLevelgetTransitionTimeEnforcement() const
public IloBoolhasCalendar() const
public voidignoreCalendarConstraints(IloBool ignored=IloTrue) const
public voidignoreCapacityConstraints(IloBool ignored=IloTrue) const
public voidignorePrecedenceConstraints(IloBool ignored=IloTrue) const
public voidignoreSequenceConstraints(IloBool ignored=IloTrue) const
public voidignoreTransitionTimeConstraints(IloBool ignored=IloTrue) const
public IloBoolisCapacityResource() const
public IloBoolisContinuousReservoir() const
public IloBoolisDiscreteEnergy() const
public IloBoolisDiscreteResource() const
public IloBoolisKeptOpen() const
public IloBoolisReservoir() const
public IloBoolisStateResource() const
public IloBoolisUnaryResource() const
public voidkeepOpen(IloBool open=IloTrue) const
public voidremoveCapacityEnforcementInterval(IloNum tmin, IloNum tmax) const
public voidremoveTransitionTimeEnforcementInterval(IloNum tmin, IloNum tmax) const
public voidsetCalendar(IloCalendar calendar) const
public voidsetCalendarEnforcement(IloEnforcementLevel level) const
public voidsetCapacityEnforcement(IloEnforcementLevel level) const
public voidsetCapacityEnforcementIntervalsParam(const IloIntervalList it) const
public voidsetDurationEnforcement(IloEnforcementLevel level) const
public voidsetPrecedenceEnforcement(IloEnforcementLevel level) const
public voidsetResourceParam(const IloResourceParam params) const
public voidsetSequenceEnforcement(IloEnforcementLevel level) const
public voidsetTransitionTimeEnforcement(IloEnforcementLevel level) const
public voidsetTransitionTimeEnforcementIntervalsParam(const IloIntervalList it) const
Constructor Detail

IloResource

public IloResource()
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.

IloResource

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

Method Detail

addCapacityEnforcementInterval

public void addCapacityEnforcementInterval(IloNum tmin, IloNum tmax, IloNum step=1) const

This member function specifies a new time interval [tmin,tmax) during which the usage of the invoking resources will be enforced. The step represents the time precision that must be considered when enforcing the usage of the invoking resource on that interval.


addTransitionTimeEnforcementInterval

public void addTransitionTimeEnforcementInterval(IloNum tmin, IloNum tmax) const

This member function specifies a new time interval [tmin, tmax) during which the transition times on the invoking resources will be enforced.


areCalendarConstraintsIgnored

public IloBool areCalendarConstraintsIgnored() const

This member function returns IloTrue if the calendar constraints of the invoking resource are to be ignored. Otherwise, it returns IloFalse.


areCapacityConstraintsIgnored

public IloBool areCapacityConstraintsIgnored() const

This member function returns IloTrue if the usage of the invoking resource is to be ignored. Otherwise, it returns IloFalse.


arePrecedenceConstraintsIgnored

public IloBool arePrecedenceConstraintsIgnored() const

This member function returns IloTrue if the precedence constraints of the invoking resource are to be ignored. Otherwise, it returns IloFalse.


areSequenceConstraintsIgnored

public IloBool areSequenceConstraintsIgnored() const

This member function returns IloTrue if the sequence constraints of the invoking resource are to be ignored. Otherwise, it returns IloFalse.


areTransitionTimeConstraintsIgnored

public IloBool areTransitionTimeConstraintsIgnored() const

This member function returns IloTrue if the transition time on the invoking resource is to be ignored. Otherwise, it returns IloFalse.


getCalendar

public IloCalendar getCalendar() const

This member function returns the calendar attached to the invoking resource, if such an object exists.


getCalendarEnforcement

public IloEnforcementLevel getCalendarEnforcement() const

This member function returns the enforcement level for the calendar of the invoking resource. Also see IloResource::setCalendarEnforcement.


getCapacityEnforcement

public IloEnforcementLevel getCapacityEnforcement() const

This member function returns the capacity enforcement level of the invoking resource. See also: IloResource::setCapacityEnforcement.


getDurationEnforcement

public IloEnforcementLevel getDurationEnforcement() const

This member function returns the duration enforcement level of the invoking resource. See also: IloResource::setDurationEnforcement.


getImpl

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

getPrecedenceEnforcement

public IloEnforcementLevel getPrecedenceEnforcement() const

This member function returns the enforcement level for precedence relations of the invoking resource. See also: IloResource::setPrecedenceEnforcement.


getSequenceEnforcement

public IloEnforcementLevel getSequenceEnforcement() const

This member function returns the enforcement level for sequencing relations of the invoking resource. See also: IloResource::setSequenceEnforcement.


getTransitionTimeEnforcement

public IloEnforcementLevel getTransitionTimeEnforcement() const

This member function returns the transition time enforcement level of the invoking resource. See also: IloResource::setTransitionTimeEnforcement.


hasCalendar

public IloBool hasCalendar() const

This member function returns IloTrue if a calendar has been attached to the invoking resource. Otherwise, it returns IloFalse.


ignoreCalendarConstraints

public void ignoreCalendarConstraints(IloBool ignored=IloTrue) const

This member function allows specifying if the calendar constraint of the invoking resources will be ignored. If the argument ignored is equal to IloTrue, it will behave as if no calendar is attached to the invoking resource.


ignoreCapacityConstraints

public void ignoreCapacityConstraints(IloBool ignored=IloTrue) const

This member function allows specifying if the usage of the invoking resource by the activities will be ignored. If the argument ignored is equal to IloTrue, and the resource is a capacity resource, it will behave as if the capacity constraints on the resource are ignored. If the resource is a state resource, it will behave as if the required state constraints on the resource are ignored.


ignorePrecedenceConstraints

public void ignorePrecedenceConstraints(IloBool ignored=IloTrue) const

This member function allows specifying if the precedence relations defined on the invoking resource will be ignored. If the argument ignored is equal to IloTrue, it will behave as if the precedence constraints are ignored. Precedence relations are expressed with the member function IloResourceConstraint::setSuccessor.


ignoreSequenceConstraints

public void ignoreSequenceConstraints(IloBool ignored=IloTrue) const

This member function allows specifying if the sequence relations defined on the invoking resource will be ignored. If the argument ignored is equal to IloTrue, it will behave as if the sequence constraints are ignored. Sequence relations are expressed with the member functions IloResourceConstraint::setNext and IloResourceConstraint::setNotNext.


ignoreTransitionTimeConstraints

public void ignoreTransitionTimeConstraints(IloBool ignored=IloTrue) const

This member function allows specifying if the transition times defined on the invoking resource will be ignored. If the argument ignored is equal to IloTrue, it will behave as if the transition time constraints are ignored.


isCapacityResource

public IloBool isCapacityResource() const

This member function distinguishes between the classes of resources available in Scheduler. It returns IloTrue if the invoking resource is an instance of the class IloCapResource. Otherwise, it returns IloFalse.


isContinuousReservoir

public IloBool isContinuousReservoir() const

This member function returns IloTrue if the invoking resource is an instance of the class IloContinuousReservoir. Otherwise, it returns IloFalse.


isDiscreteEnergy

public IloBool isDiscreteEnergy() const

This member function returns IloTrue if the invoking resource is an instance of the class IloDiscreteEnergy. Otherwise, it returns IloFalse.


isDiscreteResource

public IloBool isDiscreteResource() const

This member function returns IloTrue if the invoking resource is an instance of the class IloDiscreteResource. Otherwise, it returns IloFalse.


isKeptOpen

public IloBool isKeptOpen() const

This member function returns IloTrue if the invoking resource should be kept open. Otherwise, it returns IloFalse. See also: IloResource::keepOpen.


isReservoir

public IloBool isReservoir() const

This member function returns IloTrue if the invoking resource is an instance of the class IloReservoir. Otherwise, it returns IloFalse.


isStateResource

public IloBool isStateResource() const

This member function returns IloTrue if the invoking resource is an instance of the class IloStateResource. Otherwise, it returns IloFalse.


isUnaryResource

public IloBool isUnaryResource() const

This member function returns IloTrue if the invoking resource is an instance of the class IloUnaryResource. Otherwise, it returns IloFalse.


keepOpen

public void keepOpen(IloBool open=IloTrue) const

If the argument open is equal to IloTrue, this member function states that the invoking resource must be kept open when starting to solve the problem. It means that additional activities requiring or providing the invoking resource may be added during solving. Otherwise, if the argument open is equal to IloFalse, it states that all the activities requiring or providing the invoking resource will be defined in the model before starting to solve the problem. By default, it is supposed that all the activities requiring or providing the invoking resource are defined in the model before starting to solve the problem.


removeCapacityEnforcementInterval

public void removeCapacityEnforcementInterval(IloNum tmin, IloNum tmax) const

This member function removes a time interval [tmin,tmax) during which the usage of the invoking resources had be enforced. It means that the resource usage does not need to be enforced on the interval [tmin, tmax).


removeTransitionTimeEnforcementInterval

public void removeTransitionTimeEnforcementInterval(IloNum tmin, IloNum tmax) const

This member function removes a time interval [tmin, tmax) during which the transition times on the invoking resources were enforced.


setCalendar

public void setCalendar(IloCalendar calendar) const

This member function attaches the calendar calendar to the invoking resource. Notice that calendars can be shared between resources, and that setCalendar does not imply that a local copy of the calendar is made. One should be aware of the fact that any change to a shared calendar, using IloCalendar member functions with the calendar that comes from getCalendar, applies to all resources sharing the calendar.


setCalendarEnforcement

public void setCalendarEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the calendar of the resources. The level of enforcement of calendar constraints describes how the solver will enforce these calendar specifications. The semantics of these levels is solver dependent. The default enforcement level is IloBasic.


setCapacityEnforcement

public void setCapacityEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the usage of the resources depending on this parameter. The level of enforcement of resource usage describes how the solver will enforce this resource usage. The semantics of these levels is solver dependent. The default enforcement level is IloBasic.


setCapacityEnforcementIntervalsParam

public void setCapacityEnforcementIntervalsParam(const IloIntervalList it) const

This member function sets it as the list of capacity enforcement intervals of the invoking resource.


setDurationEnforcement

public void setDurationEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the durations of the activities using the invoking resource. The duration level of enforcement describes how the solver will enforce these durations. The semantics of these levels are solver dependent. The default enforcement level is IloBasic.


setPrecedenceEnforcement

public void setPrecedenceEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the precedence relations defined on the resources depending on this parameter. Precedence relations can be expressed with the member function IloResourceConstraint::setSuccessor. The level of enforcement of precedence relations describes how the solver will enforce these constraints. The semantics of these levels is solver dependent. The default enforcement level is IloBasic.


setResourceParam

public void setResourceParam(const IloResourceParam params) const

This member function sets params as the new resource parameter.


setSequenceEnforcement

public void setSequenceEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the sequencing relations defined on the resources depending on this parameter. Sequencing relations are expressed by the member functions IloResourceConstraint::setNext and IloResourceConstraint::setNotNext. The level of enforcement of sequencing relations describes how the solver will enforce these relations. The semantics of these levels is solver dependent. The default enforcement level is IloBasic.


setTransitionTimeEnforcement

public void setTransitionTimeEnforcement(IloEnforcementLevel level) const

This member function allows specifying an enforcement level for the transition times defined on the invoking resource. Transition times can be associated with a resource using the class IloTransitionTime. The level of enforcement of transition times describes how the solver will enforce these relations. The semantics of these levels is solver dependent. The default enforcement level is IloBasic.


setTransitionTimeEnforcementIntervalsParam

public void setTransitionTimeEnforcementIntervalsParam(const IloIntervalList it) const

This member function sets it as the list of transition time enforcement intervals of the invoking resource.