Overview | Group | Tree | Graph | Index | Concepts |
An instance of IlcResourceTexture
represents a measure of
the criticality of the resource over time. Criticality is a non-negative
floating point value with 0 indicating that the minimum or maximum resource
capacity constraint will be satisfied at all time points given the current
time windows for all resource constraints on the resource. The higher the
criticality value the more likely the resource capacity constraint will be
broken at a time point.
Such a measure of criticality can be used as a basis for heuristic decision making. For example, it might be useful to identify the resource and time point with the highest overall criticality and then make a heuristic decision involving the resource constraints that possibly demand that resource at that time point.
The criticality is calculated by the aggregation of demand from each of
the resource constraints that can possibly execute on the resource. This
individual demand is represented, for each resource constraint, by an
instance of the class IlcRCTexture
. A simple
aggregation is first performed by summing the demand (and variance of the
demand) at each time point from each IlcRCTexture
instance. These aggregate demand and variance
curves can be examined using an instance of IlcResourceTextureIterator
. The criticality curve is formed
by a transformation of the aggregate demand and variance curves. This
transformation takes into account the value of the resource capacity
constraint (minimum or maximum) at each time point. The class
IlcTextureCriticalityCalculatorI
allows you
to define the transformation from aggregate demand and aggregate variance to
criticality. The common transformations are predefined in the classes
IlcProbabilisticCriticalityCalculatorI
and
IlcRelativeDemandCriticalityCalculatorI
.
You can also define the individual curves which represent the demand (and
variance) of a single resource constraint for a single resource. This can be
done by defining a subclass of IlcRCTextureI
and a subclass of IlcRCTextureFactoryI
.
Again, a number of commonly used classes are predefined: IlcRCTextureESTI
, IlcRCTextureProbabilisticI
, and IlcRCTextureTargetI
together with their corresponding
factories: IlcRCTextureESTFactoryI
,
IlcRCTextureProbabilisticFactoryI
, and
IlcRCTextureTargetFactoryI
.
The individual curves represented by the instances of IlcRCTexture
and the aggregate curves represented by the
instances of IlcResourceTexture
are automatically updated when
the possible time window of an activity changes.
An IlcResourceTexture
instance must be created by using
either the method IlcCapResource::makeMaxTextureMeasurement
or IlcCapResource::makeMinTextureMeasurement
.
The following concepts are used in the discussion of the
IlcResourceTexture
class.
For more information and examples of the use of
IlcResourceTexture
curves, see
Texture Measurements,
and the texture curve example in the IBM ILOG Scheduler
User's Manual, "Using The Trace Facilities to Handle An Overconstrained
Problem."
For more information, see Texture Measurements.
See Also:
IlcRCTexture, IlcResourceTextureIterator, IlcDiscreteResource, IlcRCTextureFactoryI, IlcTextureCriticalityCalculatorI, IlcTextureSuccessorGoal, IlcTextureAltSuccessorGoal
Constructor Summary | |
---|---|
public | IlcResourceTexture() |
public | IlcResourceTexture(IlcResourceTextureI * impl) |
Method Summary | |
---|---|
public IlcFloat | getCriticalContribution(const IlcResourceConstraint ct) const |
public IlcRCTextureArray | getCriticalityOrderedRCTextures() const |
public IlcResourceTextureI * | getImpl() const |
public IlcFloat | getMaxCriticality() const |
public const char * | getName() const |
public IlcAny | getObject() const |
public IloSolver | getSolver() const |
public IloSolverI * | getSolverI() const |
public IlcFloat | getTimeOfMaxCriticality() const |
public IlcBool | hasPossibleCommitments() const |
public void | operator=(const IlcResourceTexture & h) |
public void | resetNoCommitments() const |
public void | setName(const char * name) const |
public void | setNoCommitmentsAtCriticalPoint() const |
public void | setObject(IlcAny object) const |
public void | setRandomGenerator(IloRandom rg, IlcFloat beta=1.) const |
Constructor Detail |
---|
Method Detail |
---|
This member function returns the amount that the individual curve
associated with ct
contributes to the overall curve at the
critical time point.
This member function returns an array of IlcRCTexture
instances associated with this
IlcResourceTexture
instance, ordered in descending order of the
magnitude of their contribution to the aggregate curve at the critical time
point.
IlcRCTextureArray
are defined using the Solver macro
ILCARRAY(IlcRCTexture)
.
Refer to the IBM ILOG Solver Reference Manual for information on using the macro to
create array classes.This member function returns the highest level of criticality of the texture curve.
This member function returns an instance of IloSolver
associated with the invoking object.
This member function returns a pointer to the implementation object of the solver where the invoking object was extracted.
This member function returns the time point of the highest criticality of the texture curve.
This member function tests if there are any time points at which there
can possibly be commitments to be performed among the contending resource
constraints. This function returns IlcTrue
if there are any
time points at which there is an aggregate criticality of greater than 0.
Otherwise, it returns IlcFalse
.
This function removes all intervals that were previously declared to
contain no possible commitments by the IlcResourceTexture::setNoCommitmentsAtCriticalPoint
function. This function can
be useful when your search consists of multiple separate goals. For example,
imagine you are solving a problem involving both resource allocation and
activity sequencing. You may want to assign all alternative resources using
one goal and then use a different goal to add precedence constraints between
resource constraints assigned to the same resource. Depending on the goal,
the use of setNoCommitmentsAtCriticalPoint()
has different
semantics. In the alternative resource assignment goal, the IlcResourceTexture::setNoCommitmentsAtCriticalPoint
is used to inform the
texture measurement that there are no alternative resource assignments to be
made over some time interval. When switching to the resource constraint
sequencing goal, the no commitment intervals are no longer relevant: the
goal is trying to add precedence constraints and so the fact that there are
no alternative resource assignments to be made is irrelevant. In such a
case, you can use resetNoCommitment()
to remove all the
intervals and recalculate the criticality.
This member function informs the IlcResourceTexture
instance
that there are no commitments at its current critical point, and therefore
any time points that involve only those activities that have a positive
contribution for the current critical point should actually have a
criticality of 0.
An example of such a situation is the following:
Activity A: [0 .. 10 — 10 —> 10 .. 20] and requires R0
Activity B: [10 .. 20 — 10 —> 20 .. 30] and requires R0
A ends before the start of B.
If A and B are the only activities on unary resource
R0, and R0 is available throughout the time interval [0,
30], then it is clear that the criticality is 0 at all time points on the
interval [0, 30]. There is no possibility that the capacity constraint on
R0 will be exceeded. However, for reasons of computational
complexity, the IlcResourceTexture
may consider each activity
individually in aggregating individual demand into overall criticality. This
estimation leads to a non-zero criticality value on the interval [10, 20).
That is, based on their time windows, both A and B can be
executing at, for example, time 15. Because the texture aggregation
procedure does not take into account the existence of a precedence
constraint between A and B, it estimates that there is a
non-zero likelihood that bothA and B will
execute at time 15. Therefore, the estimated criticality is greater than 0.
If 15 were estimated to be the critical time point on R0, some
heuristics may attempt to reduce that criticality by posting a precedence
constraint between the two activities only to find that such a constraint
already exists and, in fact, that the true criticality is 0. At that point,
this member function could be used to inform the
IlcResourceTexture
that there are no possible commitments at
its critical point and to cause it to recalculate its criticality. In fact,
this function analyzes all the activities that can possibly execute at the
critical point and expands the interval with no possible commitments as far
as possible. The reasoning is that if there are no possible commitments
among the activities competing for the critical point, then there are no
possible commitments at any time point where only those activities (or a
subset) can possibly execute. In our example, the new texture measurement
would assign a criticality of 0 to all points on the interval [0 30).
This member function sets the random number generator and the beta value to
be used with the random number generator. The random number generator is
used to choose the critical time point when a number of time points have
similar criticalities. The beta value controls the interval of values which
will be considered similar. If a random generator has been set, the critical
time point on a texture will be found by selecting with uniform probability
one time point from all of those whose criticality value lies in the
interval [
beta * maxCrit, maxCrit]
, where
maxCrit
is the maximum criticality value of all time points on
the resource. In other words, all the time points whose criticality values
lie within the interval are considered to have the same criticality and so
one of them is randomly selected.