| Overview | Group | Tree | Graph | Index | Concepts | 

IlcCapResource is the root class for capacity
 resources, that is, resources that are defined to have a limited integer
 capacity over time. In the Scheduler Engine, there are the following classes
 of capacity resources:
Closing a Resource
The inherited member function IlcResource::close specifies that all the activities
 requiring or providing the invoking resource are known; that is, they have
 been linked to the resource. This information allows additional constraint
 propagation to take place, for example, the propagation of minimal capacity
 constraints. Propagating minimal capacity constraints is particularly useful
 in the case of resource allocation problems for which some minimal amount of
 provided capacity must be reached. With such information, indeed, the system
 can eliminate situations in which minimal capacity amounts cannot be reached
 using only the activities already defined.
An instance of IloSolver::SolverErrorException is thrown if
 you attempt to add a new requiring or providing activity to a capacity
 resource that has been closed.
Initial Occupation
The timetable of the resource represents the occupation of the resource by activities. Scheduler Engine offers a way to set up the initial occupation 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.
For discrete resources, that is for instances of IlcDiscreteResource, IlcDiscreteEnergy, and IlcReservoir, the initial occupation is defined with an
 instance of the IlcIntToIntStepFunction class. For continuous
 reservoirs, that is instances of IlcContinuousReservoir, the initial occupation is defined
 with an instance of the IlcIntToFloatSegmentFunction class. The value of the
 stepwise or piecewise linear function at an integer point in time is
 considered as the sum of the requirements of fictitious or previously
 constructed activities. 
For instances of IlcDiscreteResource and
 IlcDiscreteEnergy, the initial level is zero
 outside the definition domain of the function.
For instances of IlcReservoir and
 IlcContinuousReservoir, if the definition
 domain of the function intersects the temporal interval of the time table,
 the initial level is given by the function on its definition domain, and by
 zero elsewhere. That is, Scheduler Engine ignores the initial level of the
 reservoir. 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.
For more information, see
 Timetable,
 Disjunctive Constraint,
 and in the IBM ILOG Solver Reference Manual, IlcIntToIntStepFunction.
See Also:
IlcIntervalList, IlcResource, IlcResourceConstraint, IlcResourceIterator, IlcSchedule, IlcRCTextureFactory, IlcIntToFloatSegmentFunction, IlcTextureCriticalityCalculator, IlcAltResSet
| Constructor Summary | |
|---|---|
public  | IlcCapResource() | 
public  | IlcCapResource(IlcCapResourceI * impl) | 
| Method Summary | |
|---|---|
public IlcCapResourceI * | getImpl() const | 
public IlcResourceTexture | getMaxTextureMeasurement() const | 
public IlcResourceTexture | getMinTextureMeasurement() const | 
public IlcIntTimetable | getTimetable() const | 
public IlcIntTimetable | getTimetable(IlcInt time) const | 
public IlcBool | hasInitialOccupation() const | 
public IlcBool | hasMaxTextureMeasurement() const | 
public IlcBool | hasMinTextureMeasurement() const | 
public void | incrDurableRequirement(IlcIntToIntStepFunction func) | 
public void | incrDurableRequirement(IlcInt t1, IlcInt t2, IlcInt cap, IlcBool inward, IlcInt db) | 
public IlcBool | isRedundantResource() const | 
public IlcConstraint | makeBalanceConstraint() | 
public IlcResourceTexture | makeMaxTextureMeasurement(IlcRCTextureFactory=0, IlcTextureCriticalityCalculator=0) | 
public IlcResourceTexture | makeMinTextureMeasurement(IlcRCTextureFactory=0, IlcTextureCriticalityCalculator=0) | 
public IlcConstraint | makeTimetableConstraint(IlcInt timeMin, IlcInt timeMax, IlcInt timeStep, IlcInt capacity) | 
public IlcConstraint | makeTimetableConstraint(IlcInt timeMin, IlcInt timeMax, IlcInt timeStep) | 
public IlcConstraint | makeTimetableConstraint(IlcInt timeStep=1) | 
public void | operator=(const IlcCapResource & h) | 
public void | setInitialOccupation(IlcIntToFloatSegmentFunction func) | 
public void | setInitialOccupation(IlcIntToIntStepFunction func) | 
public void | unsetInitialOccupation() | 
| Constructor Detail | 
|---|
| Method Detail | 
|---|
This member function returns the texture measurement associated with the maximum constraint of the invoking resource. If no texture measurement has been associated with the maximum constraint of the invoking resource, an empty handle is returned.
This member function returns the texture measurement associated with the minimum constraint of the invoking resource. If no texture measurement has been associated with the minimum constraint of the invoking resource, an empty handle is returned.
This member function returns the first timetable of the invoking resource
 (first in chronological order). An instance of
 IloSolver::SolverErrorException is thrown is no timetable
 exists for the invoking resource. The invoking resource must not be a
 continuous reservoir.
This member function returns the timetable that includes
 time. An instance of
 IloSolver::SolverErrorException is thrown if no timetable is
 defined at time. The invoking resource must not be a continuous
 reservoir.
This member function returns IlcTrue if an initial
 occupation has been set up on the invoking resource. Otherwise, it returns
 IlcFalse.
Initial Occupation
The timetable of the resource represents the occupation of the resource by activities. Scheduler Engine offers a way to set up the initial occupation 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.
For discrete resources, that is instances of IlcDiscreteResource, IlcDiscreteEnergy, and IlcReservoir, the initial occupation is defined with an
 instance of the IlcIntToIntStepFunction class. For continuous
 reservoirs, that is instances of IlcContinuousReservoir, the initial occupation is defined
 with an instance of the IlcIntToFloatSegmentFunction class. The value of the
 stepwise or piecewise linear function at an integer point in time is
 considered as the sum of the requirements of fictitious or previously
 constructed activities. 
For instances of IlcDiscreteResource and
 IlcDiscreteEnergy, the initial level is zero
 outside the definition domain of the function.
For instances of IlcReservoir and
 IlcContinuousReservoir, if the definition
 domain of the function intersects the temporal interval of the time table,
 the initial level is given by the function on its definition domain, and by
 zero elsewhere. That is, Scheduler Engine ignores the initial level of the
 reservoir. 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.
This member function returns IlcTrue if a texture
 measurement has been created on the maximum constraint of the invoking
 resource. Otherwise, it returns IlcFalse. 
This member function returns IlcTrue if a texture
 measurement has been created on the minimum constraint of the invoking
 resource. Otherwise, it returns IlcFalse.
The purpose of this function is to provide a non-reversible, non-monotonic edition of the requirement amount of a durable resource. Refer to Durability for complete information on that subject.
This function modifies the requirement amount that corresponds to an
 activity starting a t1, ending at t2 and requiring
 the capacity of the argument capacity. This function is similar
 to having an activity on each step starting at t1, ending at
 t2 and of value capacity of the argument
 func.
If the argument capacity is greater than 0, the effect of
 the function is to add capacity to the amount of requirement to
 the resource on the interval [t1, t2); that is, to
 actually decrease the available capacity in the resource.
If the argument capacity is less than 0, the effect of the
 function is to remove capacity from the requirement amount of
 the resource on the interval [t1, t2); that is, to
 increase the available capacity in the resource.
In the case of a discrete resource timetable of timestep different from
 one, an instance of IloSolver::SolverErrorException is thrown
 if the function steps do not fit the timestep of the resource. In the case
 of energy with a break timetable, the equivalent activities are considered
 as being not breakable.
The coherency of the requirement amount with respect to the resource capacity is under the responsibility of the user. For example, one should be cautious that the requirements that are undone do not exceed the requirement of activities committed on the resource when a search using the durable resource is launched.
For a multi-threaded durable resource, these functions are enclosed in a critical section. That is, these functions are MT-hot.
An instance of IloSolver::SolverErrorException is thrown if
 the schedule is not durable, if the durable schedule is not closed, or if
 the resource is in used by a computational manager.
The purpose of this function is to provide a non-reversible, non-monotonic edition of the requirement amount of a durable resource. Refer to Durability for complete information on that subject.
This function modifies the requirement amount that corresponds to an
 activity starting a t1, ending at t2 and requiring
 the capacity of the argument cap.
If the argument cap is greater than 0, the effect of the
 function is to add cap to the amount of requirement to the
 resource on the interval [t1, t2); that is, to
 actually decrease the available capacity in the resource.
If the argument cap is less than 0, the effect of the
 function is to remove cap from the requirement amount of the
 resource on the interval [t1, t2); that is, to
 increase the available capacity in the resource.
The optional argument inward is used by discrete resource
 timetable constraints of a time step greater than one as the rounding policy
 for the equivalent activity. The optional argument db is used
 by energy with break timetable constraints as the duration of the breaks for
 the equivalent breakable activity (that is, end time - start time -
 processing time).
The coherency of the requirement amount with respect to the resource capacity is under the responsibility of the user. For example, one should be cautious that the requirements that are undone do not exceed the requirement of activities committed on the resource when a search using the durable resource is launched.
For a multi-threaded durable resources, these functions are enclosed in a critical section. That is, these functions are MT-hot.
An instance of IloSolver::SolverErrorException is thrown if
 the tuple [t1, t2, db) is invalid for defining an activity. An
 instance of IloSolver::SolverErrorException is thrown if the
 schedule is not durable, if the durable schedule is not closed, or if the
 resource is in used by a computational manager.
This method returns IlcTrue if the invoking
 IlcCapResource object was created as a redundant resource,
 using the method IlcAltResSet::makeRedundantResource. It returns
 IlcFalse otherwise.
This member function creates a balance constraint on the invoking discrete resource or reservoir. This constraint allows a stronger propagation of the discrete resource capacity. See Balance Constraint for more information. That constraint must be posted in order to be taken into account.
This member function creates an instance of IlcResourceTexture
 on the maximum constraint of the invoking resource. By default, that is,
 if not otherwise specified, the IlcRCTextureFactory used is an
 instance of IlcRCTextureProbabilisticFactoryI and the
 IlcTextureCriticalityCalculator used is an instance of
 IlcProbabilisticCriticalityCalculatorI.
 
This member function creates an instance of IlcResourceTexture
 on the minimum constraint of the invoking resource. By default, that is,
 if not otherwise specified, the IlcRCTextureFactory used is an
 instance of IlcRCTextureProbabilisticFactoryI and the
 IlcTextureCriticalityCalculator used is an instance of
 IlcProbabilisticCriticalityCalculatorI.
 
This member function creates and returns a timetable constraint for the
 invoking resource. This timetable constraint implies that the capacity of
 the resource is limited to capacity from timeMin
 to timeMax and allowed to change only at times timeMin +
 i * timeStep. If the invoking resource is an instance of
 IlcDiscreteResource or IlcUnaryResource, capacity represents the
 maximal theoretical capacity. If the invoking resource is an instance of
 IlcDiscreteEnergy, capacity
 represents the maximal available energy.
An instance of IloSolver::SolverErrorException is thrown if
 any of the following conditions occur:
 timeStep is not strictly positive; 
 timeMin is not strictly less than 
 timeMax;
 timeMax minus 
 timeMin is not a multiple of 
 timeStep; This member function creates and returns a timetable constraint for the
 invoking resource. This timetable constraint implies that the capacity of
 the resource is limited to the theoretical capacity of the resource from
 timeMin to timeMax and allowed to change only at
 times timeMin + i * timeStep. 
An instance of IloSolver::SolverErrorException is thrown if
 any of the following conditions occur:
 timeStep is not strictly positive; 
 timeMin is not strictly less than 
 timeMax;
 timeMax minus 
 timeMin is not a multiple of 
 timeStep; This member function creates and returns a timetable constraint for the
 invoking resource. This timetable constraint implies that the capacity of
 the resource is limited to the theoretical capacity of the resource from the
 time origin timeMin to the time horizon, and allowed to change
 only at times timeMin + i * timeStep. 
An instance of IloSolver::SolverErrorException is thrown if
 any of the following conditions occur:
 timeStep is not strictly positive; 
 timeStep; This member function sets the argument func as the initial
 level of the timetables of the invoking capacity resource. The invoking
 resource must be a continuous reservoir. The argument func is
 copied. The initial occupation is considered at post time of the timetable
 constraint. That is, a call to setInitialOccupation after the
 adding of the timetable constraint in the solver and the entering of the
 solver in search mode has no effect.
Refer to IlcCapResource::hasInitialOccupation
 for more information on initial occupation.
This member function sets the argument func as the initial
 level of the timetables of the invoking resource. The argument
 func is copied. The initial occupation is considered at post
 time of the timetable constraint. That is, a call to
 setInitialOccupation after the adding of the timetable
 constraint in the solver and the entering of the solver in search mode has
 no effect.
Refer to IlcCapResource::hasInitialOccupation
 for more information on initial occupation.
This member function unsets the initial level of the timetables of the invoking resource. That is, the resource no longer has an initial occupation.
Refer to IlcCapResource::hasInitialOccupation
 for more information on initial occupation.