Overview | Group | Tree | Graph | Index | Concepts |
IlcRCTextureTargetI
is the implementation class for the
target start time individual texture curve. This individual curve represents
the individual demand of the associated resource constraint for its resource
based on the assumption that it will start at an externally defined target
start time. The points used in the texture curve can be seen in the example
code below.
For more information, see Texture Measurements.
See Also:
IlcRCTextureIterator, IlcResourceTexture, IlcRCTextureTargetFactoryI, IlcRCTextureProbabilisticI, IlcRCTextureI, IlcRCTexture
Constructor and Destructor Summary | |
---|---|
public | IlcRCTextureTargetI(IlcManager m, IlcResourceConstraint rc, IlcResourceTexture resTexture) |
Method Summary | |
---|---|
protected virtual IlcBool | updateDataPoints() |
Inherited Methods from IlcRCTextureESTI |
---|
calculateIndividualCurve |
Constructor and Destructor Detail |
---|
This protected constructor creates an instance of
IlcRCTextureTargetI
for resource constraint rc
and
the resource texture resTexture
. The created class represents
the individual contribution of rc
to the aggregate curve of
resTexture
. As this constructor is protected, it should only be
called from subclasses of IlcRCTextureTargetI
or from the
IlcRCTextureTargetFactoryI
friend class.
Method Detail |
---|
This virtual, protected function updates all the data points on which the curve is calculated.
Example
Here is an example of how the updateDataPoints()
method
might be written.
IlcBool IlcRCTextureTargetI::updateDataPoints() { IlcResourceConstraint rc = getResourceConstraint(); IlcFloat newAltWeight = calcAltWeight(); IlcInt dur, cap; IlcFloat startMin = getStartTime(); IlcAltResConstraint altRct = rc.getAlternative(); if (0 != altRct.getImpl()) { IlcResource res = rc.getResource(); dur = altRct.getDurationMax(res); cap = altRct.getCapacityMax(res); } else { IlcActivity act = rc.getActivity(); dur = act.getDurationMax(); cap = (rc.isVariableResourceConstraint() ? rc.getCapacityVariable().getMax() : rc.getCapacity()); } IlcBool changed = IlcFalse; if ((getStartMin() != startMin) || (getDuration() != dur) || (getCapacity() != cap) || (getAltWeight() != newAltWeight)) { changed = IlcTrue; setStart(startMin); setDuration(dur); setEnd(startMin + dur); setCapacity(cap); setAltWeight(newAltWeight); } return changed; }