Overview | Group | Tree | Graph | Index | Concepts |
IlcRCTextureESTI
is the implementation class for the earliest
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 its earliest start time. The
points used in the texture curve can be seen in the example in the documentation for
IlcRCTextureESTI::calculateIndividualCurve.
For more information, see Texture Measurements.
See Also:
IlcRCTextureIterator, IlcResourceTexture, IlcRCTextureESTFactoryI, IlcRCTextureProbabilisticI, IlcRCTextureI, IlcRCTextureTargetI
Constructor and Destructor Summary | |
---|---|
protected | IlcRCTextureESTI(IlcManager m, IlcResourceConstraint rc, IlcResourceTexture resTexture) |
Method Summary | |
---|---|
protected virtual void | calculateIndividualCurve() |
Constructor and Destructor Detail |
---|
This protected constructor creates an instance of
IlcRCTextureESTI
for resource constraint rc
and
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 IlcRCTextureESTI
or from the
IlcRCTextureESTFactoryI
friend class.
Method Detail |
---|
This virtual, protected function creates the actual individual curve for the invoking object.
Example
Here is an example of how the updateDataPoints()
and
calculateIndividualCurve()
methods might be written.
IlcBool IlcRCTextureESTI::updateDataPoints() { IlcResourceConstraint rc = getResourceConstraint(); IlcFloat newAltWeight = calcAltWeight(); IlcInt dur, cap, startMin; IlcAltResConstraint altRct = rc.getAlternative(); if (0 != altRct.getImpl()) { IlcResource res = rc.getResource(); startMin = altRct.getStartMin(res) dur = altRct.getDurationMax(res); cap = altRct.getCapacityMax(res); } else { IlcActivity act = rc.getActivity(); startMin = act.getStartMin(); dur = act.getDurationMax(); cap = (rc.isVariableResourceConstraint() ? rc.getCapacityVariable().getMax() : rc.getCapacity()); } IlcBool changed = IlcFalse; if ((getStart() != startMin) || (getDuration() != dur) || (getCapacity() != cap) || (getAltWeight() != newAltWeight)) { changed = IlcTrue; setStart(startMin); setDuration(dur); setEnd(startMin + dur); setCapacity(cap); setAltWeight(newAltWeight); } return changed; } void IlcRCTextureESTI::calculateIndividualCurve() { IlcFloat demand = getCapacity() * getAltWeight(); insertEvent(getStart(), demand, demand); insertEvent(getEnd(), 0, -demand); }