FRAMES NO FRAMES

Class IloCapResource

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

IloCapResource is the root class for capacity resources, that is, resources that are defined to have a limited integer capacity over time. In Scheduler, there are five classes of capacity resources:

Theoretical and Maximal Capacity

The theoretical capacity of a capacity resource is a bound (that is, a limit) on the amount of capacity that can be available at any point in time. The maximal capacity is the capacity that can be used in practice at a particular point in time or over a particular interval of time. The maximal capacity typically varies over time (a resource maximal capacity profile), while the theoretical capacity is an intrinsic property of the resource. The maximal capacity can never exceed the theoretical capacity. The theoretical capacity can be infinite.

The theoretical capacity can be set by the member function IloCapResource::setCapacity. The maximal level is set by the member functions setCapacityMax, setEnergyMax, setLevelMax of the classes IloDiscreteResource, IloDiscreteEnergy, IloReservoir or IloContinuousReservoir.

Resources as Data Members

An instance of the class IloCapResource may be a data member of another “external” object. In such a case, it may be useful to find the external object from the instance of IloCapResource. The inherited member functions IloExtractable::getObject and IloExtractable::setObject are provided to manage such an inverse link.

Parameter Classes

Initial occupation: (class IloNumToNumStepFunction or IloNumToNumSegmentFunction

This parameter describes the initial occupation of the capacity resource over time (see the following section, Initial Occupation). The parameter class IloNumToNumStepFunction is the capacity resource of an instance of IloDiscreteEnergy, IloDiscreteResource, or IloReservoir. IloNumToNumSegmentFunction is the capacity resource of an instance of IloContinuousReservoir. It is directly modified by the member function IloCapResource::setInitialOccupation. IloNumToNumStepFunction and IloNumToNumSegmentFunction are documented in the IBM ILOG Concert Technology Reference Manual.

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.

Initial Occupation

A resource may already be occupied by some activities before solving a scheduling problem. This initial occupation can be set up without having to declare the corresponding activities.

That facility is intended to help in solving a problem by iteratively adding a new set of activities to schedule or in improving a solution by rescheduling a subset of the activities.

The initial occupation parameter is defined with an instance of the IloNumToNumSegmentFunction class if the capacity resource is a continuous reservoir, and with an instance of the IloNumToNumStepFunction class otherwise. IloNumToNumStepFunction and IloNumToNumSegmentFunction are documented in the IBM ILOG Concert Technology Reference Manual.

For instances of IloDiscreteResource and IloDiscreteEnergy, the initial level is zero outside the definition domain of the function.

For instances of IloReservoir or IloContinuousReservoir, if the definition domain of the function intersects the capacity enforcement intervals defined on the invoking reservoir (see IloResource::setCapacityEnforcementIntervalsParam), the initial level is given by the function on the defined enforcement intervals, and by zero elsewhere. That is, the initial level of the reservoir is ignored. If the definition domain of the function does not intersect the temporal interval of the time table, the initial level of the reservoir is used as usual.

See Also:

Constructor Summary
public IloCapResource()
public IloCapResource(IloCapResourceI * impl)
Method Summary
public voidaddMaxTextureIgnoreInterval(const IloIntervalList list)
public voidaddMaxTextureIgnoreInterval(IloNum start, IloNum end)
public voidaddMaxTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)
public voidaddMaxTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)
public voidaddMinTextureIgnoreInterval(const IloIntervalList list)
public voidaddMinTextureIgnoreInterval(IloNum start, IloNum end)
public voidaddMinTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)
public voidaddMinTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)
public voidemptyMaxTextureIgnoreIntervals()
public voidemptyMinTextureIgnoreIntervals()
public IloNumgetCapacity() const
public IloCapResourceI *getImpl() const
public IloNumgetInitialOccupation(IloNum time) const
public IloNumgetInitialOccupationMax(IloNum timeMin, IloNum timeMax) const
public IloNumgetInitialOccupationMin(IloNum timeMin, IloNum timeMax) const
public IloBoolhasInitialOccupation() const
public IloBoolhasMaxTextureMeasurement() const
public IloBoolhasMinTextureMeasurement() const
public voidremoveMaxTextureIgnoreInterval(const IloIntervalList list)
public voidremoveMaxTextureIgnoreInterval(IloNum start, IloNum end)
public voidremoveMaxTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)
public voidremoveMaxTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)
public voidremoveMinTextureIgnoreInterval(const IloIntervalList list)
public voidremoveMinTextureIgnoreInterval(IloNum start, IloNum end)
public voidremoveMinTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)
public voidremoveMinTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)
public voidsetCapacity(IloNum capacity) const
public voidsetInitialOccupation(IloNum timeMin, IloNum occ1, IloNum timeMax, IloNum occ2) const
public voidsetInitialOccupation(IloNum timeMin, IloNum timeMax, IloNum occ) const
public voidsetInitialOccupationParam(const IloNumToNumSegmentFunction tfp) const
public voidsetInitialOccupationParam(const IloNumToNumStepFunction tfp) const
public voidsetMaxTextureHeuristicBeta(IloNum b)
public voidsetMaxTextureParam(const IloTextureParam param) const
public voidsetMaxTextureRandomGenerator(IloRandom r)
public voidsetMinTextureHeuristicBeta(IloNum b)
public voidsetMinTextureParam(const IloTextureParam param) const
public voidsetMinTextureRandomGenerator(IloRandom r)
public voidunsetMaxTextureRandomGenerator()
public voidunsetMinTextureRandomGenerator()
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

IloCapResource

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

IloCapResource

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

Method Detail

addMaxTextureIgnoreInterval

public void addMaxTextureIgnoreInterval(const IloIntervalList list)

This member function adds an interval list to the list of intervals that are ignored by the texture measurement on the maximum capacity constraint of the invoking resource. The new interval is merged with existing intervals that it overlaps, if any.


addMaxTextureIgnoreInterval

public void addMaxTextureIgnoreInterval(IloNum start, IloNum end)

This member function adds an interval to the list of intervals that are ignored by the texture measurement on the maximum capacity constraint of the invoking resource. The ignored interval is [start, end). The new interval is merged with existing intervals that it overlaps, if any.


addMaxTextureIgnoreIntervalOnDuration

public void addMaxTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)

This member function adds an interval to the list of intervals that are ignored by the texture measurement on the maximum capacity constraint of the resource. The ignored interval is [start,start+duration). The new interval is merged with existing intervals that it overlaps, if any.


addMaxTexturePeriodicIgnoreInterval

public void addMaxTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)

This member function adds a set of intervals to the list of intervals that are ignored by the texture measurement on the maximum capacity constraint of the invoking resource. For every i >= 0 such that start + i * period < end, an interval of[start + i * period, start + duration + i * period) is added. Adding a new interval that overlaps with an already existing interval results in the merging of the intervals.


addMinTextureIgnoreInterval

public void addMinTextureIgnoreInterval(const IloIntervalList list)

This member function adds an interval list to the list of intervals that are ignored by the texture measurement on the minimum capacity constraint of the invoking resource. The new interval is merged with existing intervals that it overlaps, if any.


addMinTextureIgnoreInterval

public void addMinTextureIgnoreInterval(IloNum start, IloNum end)

This member function adds an interval to the list of intervals that are ignored by the texture measurement on the minimum capacity constraint of the invoking resource. The ignored interval is [start, end). The new interval is merged with existing intervals that it overlaps, if any.


addMinTextureIgnoreIntervalOnDuration

public void addMinTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)

This member function adds an interval to the list of intervals that are ignored by the texture measurement on the minimum capacity constraint of the resource. The ignored interval is [start,start+duration). The new interval is merged with existing intervals that it overlaps, if any.


addMinTexturePeriodicIgnoreInterval

public void addMinTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)

This member function adds a set of intervals to the list of intervals that are ignored by the texture measurement on the minimum capacity constraint of the invoking resource. For every i >= 0 such that start + i * period < end, an interval of[start + i * period, start + duration + i * period) is added. Adding a new interval that overlaps with an already existing interval results in the merging of the intervals.


emptyMaxTextureIgnoreIntervals

public void emptyMaxTextureIgnoreIntervals()

This member function removes all the intervals from the ignored intervals of the texture measurement on the maximum capacity constraint of the invoking resource.


emptyMinTextureIgnoreIntervals

public void emptyMinTextureIgnoreIntervals()

This member function removes all the intervals from the ignored intervals of the texture measurement on the minimum capacity constraint


getCapacity

public IloNum getCapacity() const

This member function returns the theoretical capacity of the invoking resource.


getImpl

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

getInitialOccupation

public IloNum getInitialOccupation(IloNum time) const

Returns the initial occupation at time.

Initial Occupation

A resource may already be occupied by some activities before solving a scheduling problem. This initial occupation can be set up without having to declare the corresponding activities.

That facility is intended to help in solving a problem by iteratively adding a new set of activities to schedule or in improving a solution by rescheduling a subset of the activities.

The initial occupation parameter is defined with an instance of the IloNumToNumSegmentFunction class if the capacity resource is a continuous reservoir, and with an instance of the IloNumToNumStepFunction class otherwise. IloNumToNumStepFunction and IloNumToNumSegmentFunction are documented in the Concert Technology Reference Manual.

For instances of IloDiscreteResource and IloDiscreteEnergy, the initial level is zero outside the definition domain of the function.

For instances of IloReservoir or IloContinuousReservoir, if the definition domain of the function intersects the capacity enforcement intervals defined on the invoking reservoir (see IloResource::setCapacityEnforcementIntervalsParam), the initial level is given by the function on the defined enforcement intervals, and by zero elsewhere. That is, the initial level of the reservoir is ignored. If the definition domain of the function does not intersect the temporal interval of the time table, the initial level of the reservoir is used as usual.


getInitialOccupationMax

public IloNum getInitialOccupationMax(IloNum timeMin, IloNum timeMax) const

Returns the maximum level of the initial occupation function on the interval [timeMin, timeMax).

See IloCapResource::getInitialOccupation for more information about initial occupation.


getInitialOccupationMin

public IloNum getInitialOccupationMin(IloNum timeMin, IloNum timeMax) const

Returns the minimum level of the initial occupation function on the interval [timeMin, timeMax).

See IloCapResource::getInitialOccupation for more information about initial occupation.


hasInitialOccupation

public IloBool hasInitialOccupation() const

This member function returns IloTrue if an initial occupation has been set up on the invoking resource. Otherwise, it returns IloFalse.

See IloCapResource::getInitialOccupation for more information about initial occupation.


hasMaxTextureMeasurement

public IloBool hasMaxTextureMeasurement() const

This member function returns IloTrue if a texture measurement will be created at extraction time on the maximum capacity constraint of the invoking resource. Otherwise, IloFalse is returned.


hasMinTextureMeasurement

public IloBool hasMinTextureMeasurement() const

This member function returns IloTrue if a texture measurement will be created at extraction time on the minimum capacity constraint of the invoking resource. Otherwise, IloFalse is returned.


removeMaxTextureIgnoreInterval

public void removeMaxTextureIgnoreInterval(const IloIntervalList list)

This member function removes all intervals ignored by the texture measurement on the invoking resource during the intervals in list.


removeMaxTextureIgnoreInterval

public void removeMaxTextureIgnoreInterval(IloNum start, IloNum end)

This member function removes all intervals ignored by the texture measurement on the maximum capacity constraint of the invoking resource between start and end. If start is inside an existing interval [start1, end1), that is, start1 < start < end1, this results in the ignored interval [start1, start). If end is inside an interval [start2, end2) this results in an ignored interval [end, end2).


removeMaxTextureIgnoreIntervalOnDuration

public void removeMaxTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)

This member function removes all ignored intervals on the texture measurement on the maximum capacity constraint of the invoking resource between start and start+duration.


removeMaxTexturePeriodicIgnoreInterval

public void removeMaxTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)

This member function removes ignored intervals from the texture measurement on the maximum capacity constraint of the invoking resource. More precisely, for every i >= 0 such that start + i * period < end, this function removes all intervals betweenstart + i * period and start + duration + i *period.


removeMinTextureIgnoreInterval

public void removeMinTextureIgnoreInterval(const IloIntervalList list)

This member function removes all intervals ignored by the texture measurement on the minimum capacity constraint of the invoking resource during the intervals in list.


removeMinTextureIgnoreInterval

public void removeMinTextureIgnoreInterval(IloNum start, IloNum end)

This member function removes all intervals ignored by the texture measurement on the minimum capacity constraint of the invoking resource between start and end. If start is inside an existing interval [start1, end1), that is, start1 < start < end1, this results in the ignored interval [start1, start). If end is inside an interval [start2, end2) this results in an ignored interval [end, end2).


removeMinTextureIgnoreIntervalOnDuration

public void removeMinTextureIgnoreIntervalOnDuration(IloNum start, IloNum duration)

This member function removes all ignored intervals on the texture measurement on the minimum capacity constraint of the invoking resource between start and start+duration.


removeMinTexturePeriodicIgnoreInterval

public void removeMinTexturePeriodicIgnoreInterval(IloNum start, IloNum duration, IloNum period, IloNum end)

This member function removes ignored intervals from the texture measurement on the minimum capacity constraint of the invoking resource. More precisely, for every i >= 0 such that start + i * period < end, this function removes all intervals betweenstart + i * period and start + duration + i *period.


setCapacity

public void setCapacity(IloNum capacity) const

This member function sets capacity as the new theoretical capacity of the invoking resource.


setInitialOccupation

public void setInitialOccupation(IloNum timeMin, IloNum occ1, IloNum timeMax, IloNum occ2) const

Sets the initial occupation on the interval [timeMin, timeMax) to be equal to occ1 at timeMin, to be equal to occ2 at timeMax and to be linear between these two time points. This function should be called only if the invoking capacity resource is a continuous reservoir.

See IloCapResource::getInitialOccupation for more information about initial occupation.


setInitialOccupation

public void setInitialOccupation(IloNum timeMin, IloNum timeMax, IloNum occ) const

Sets the initial occupation on the interval [timeMin, timeMax) to be equal to occ.

See IloCapResource::getInitialOccupation) for more information about initial occupation.


setInitialOccupationParam

public void setInitialOccupationParam(const IloNumToNumSegmentFunction tfp) const

This member function sets the piecewise linear function tfp as the initial level of the invoking resource. An exception is thrown if the invoking resource is not a continuous reservoir.

See IloCapResource::getInitialOccupation for more information about initial occupation.


setInitialOccupationParam

public void setInitialOccupationParam(const IloNumToNumStepFunction tfp) const

This member function sets the argument tfp as the initial level of the invoking resource.

See IloCapResource::getInitialOccupation for more information about initial occupation.


setMaxTextureHeuristicBeta

public void setMaxTextureHeuristicBeta(IloNum b)

This member function sets the beta value to be used with the random number generator for the texture measurement on the maximum constraint of the invoking resource. If no random number generator is used, this function does nothing. For details on the use of the beta argument, see IlcResourceTexture::setRandomGenerator.


setMaxTextureParam

public void setMaxTextureParam(const IloTextureParam param) const

This member function sets the texture parameter on maximum capacity constraints to param. Modeling objects that are created will point to this instance, which can thus be shared between several objects.


setMaxTextureRandomGenerator

public void setMaxTextureRandomGenerator(IloRandom r)

This member function sets the random number generator that will be used in choosing the critical time point for the texture measurement on the maximum constraint of the invoking resource. By default, no random number generator is used.


setMinTextureHeuristicBeta

public void setMinTextureHeuristicBeta(IloNum b)

This member function sets the beta value to be used with the random number generator for the texture measurement on the minimum constraint of the invoking resource. If no random number generator is used, this function does nothing. For details on the use of the beta argument, see IlcResourceTexture::setRandomGenerator.


setMinTextureParam

public void setMinTextureParam(const IloTextureParam param) const

This member function sets the texture parameter on minimum capacity constraints to param. Modeling objects that are created will point to this instance, which can thus be shared between several objects.


setMinTextureRandomGenerator

public void setMinTextureRandomGenerator(IloRandom r)

This member function sets the random number generator that will be used in choosing the critical time point for the texture measurement on the minimum constraint of the invoking resource. By default, no random number generator is used.


unsetMaxTextureRandomGenerator

public void unsetMaxTextureRandomGenerator()

This member function removes the random number generator from the maximum capacity constraint, meaning that no random numbers will be used in choosing the critical time point in the texture measurement.


unsetMinTextureRandomGenerator

public void unsetMinTextureRandomGenerator()

This member function removes the random number generator from the minimum capacity constraint, meaning that no random numbers will be used in choosing the critical time point in the texture measurement.