FRAMES NO FRAMES

Class IlcRCTextureESTI

Definition file: ilsched/texturei.h
Include file: <ilsched/ilsched.h>

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:

Constructor and Destructor Summary
protected IlcRCTextureESTI(IlcManager m, IlcResourceConstraint rc, IlcResourceTexture resTexture)
Method Summary
protected virtual voidcalculateIndividualCurve()
Inherited Methods from IlcRCTextureI
calcAltWeight, calculateIndividualCurve, getAltWeight, getCapacity, getDuration, getEnd, getResourceConstraint, getStart, getTargetStart, insertEvent, setAltWeight, setCapacity, setDuration, setEnd, setStart, setTargetStart, updateDataPoints
Constructor and Destructor Detail

IlcRCTextureESTI

protected IlcRCTextureESTI(IlcManager m, IlcResourceConstraint rc, IlcResourceTexture resTexture)

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

calculateIndividualCurve

protected virtual void calculateIndividualCurve()

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);

 }