Package hec.rss.model

Class OpControllableElement

java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.OpControllableElement
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, OpControllable, RssReturnStatusConstants, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable

public class OpControllableElement extends NamedType implements OpControllable, RssReturnStatusConstants
Manages a reference to a controllable object in the reservoir physical data.
See Also:
  • Constructor Details

    • OpControllableElement

      public OpControllableElement()
    • OpControllableElement

      public OpControllableElement(OpController c, int id)
    • OpControllableElement

      public OpControllableElement(OpController c, Element e)
  • Method Details

    • setReleaseElement

      public void setReleaseElement(Element e)
      sets the associated release element and release element id
      Specified by:
      setReleaseElement in interface OpControllable
    • getReleaseElementId

      public int getReleaseElementId()
      index of release element this contrable is associated with
      Specified by:
      getReleaseElementId in interface OpControllable
    • getIncrROCLimit

      public double getIncrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist)
      Returns the approximate overall increasing rate of change constraint for this reservoir. The constraint is the total release capacity (relcap) divided by the time required to decrease from max release to zero (dt). If there is no IROC constraint the dt returned is RmaConst.UNDEFINED_DOUBLE
      Specified by:
      getIncrROCLimit in interface OpControllable
    • getDecrROCLimit

      public double getDecrROCLimit(RunTimeStep rts, double[] relcap, double[] dt, double elev, List rulelist)
      Returns the approximate overall decreasing rate of change constraint for this reservoir. The constraint is the total release capacity (relcap) divided by the time required to decrease from max release to zero (dt). If there is no DROC constraint the dt returned is RmaConst.UNDEFINED_DOUBLE
      Specified by:
      getDecrROCLimit in interface OpControllable
    • isUncontrolled

      public boolean isUncontrolled()
    • getFlowForPrevGateHeight

      public double getFlowForPrevGateHeight(RunTimeStep rts, double resElev)
      returns the estimated flow if the gate openings from the previous time step are maintained
      Specified by:
      getFlowForPrevGateHeight in interface OpControllable
    • getInstFlowCap

      public double getInstFlowCap(RunTimeStep rts, double elev, double[] cntrl, double[] unctrl)
      Description copied from interface: OpControllable
      return the instantaneous flow capacity at the given time step and elevation
      Specified by:
      getInstFlowCap in interface OpControllable
    • clone

      public Object clone()
      clone method - for complete cloning, reset the OpController on the returned clone.
      Specified by:
      clone in interface OpControllable
      Overrides:
      clone in class NamedType
    • setController

      public void setController(OpController oc)
      sets the parent controller
      Specified by:
      setController in interface OpControllable
    • setParameterValue

      public double setParameterValue(double val, RunTimeStep rts)
      sets the adjustable parameter value, returns the value actually applied
      Specified by:
      setParameterValue in interface OpControllable
    • commitOperation

      public int commitOperation(double val, RunTimeStep rts, int numsteps)
      commit the operating decision for the given step to adjustable parameters
    • getCurrentParameterValue

      public double getCurrentParameterValue()
      gets the total current adjustable parameter value
      Specified by:
      getCurrentParameterValue in interface OpControllable
    • getPreviousParameterValue

      public double getPreviousParameterValue(RunTimeStep rts)
      gets the total current adjustable parameter value
      Specified by:
      getPreviousParameterValue in interface OpControllable
    • getAdjustableParameter

      public AdjustableParameter getAdjustableParameter()
      returns the adjustable parameter associated with the Element function, must be called after initializing the compute
      Specified by:
      getAdjustableParameter in interface OpControllable
    • initializeCompute

      public boolean initializeCompute(RunTimeWindow rtw)
      prepares for computation, gets a reference to the controlled element
      Specified by:
      initializeCompute in interface OpControllable
    • initForPostProcessing

      public boolean initForPostProcessing(RunTimeWindow rtw)
      Prepares this run for post processing in the ResSim Simulation Module. This routing sets up all data model connectivity, but does not load time series arrays.
      Specified by:
      initForPostProcessing in interface OpControllable
      Returns:
      RTN_NOPROBLEM if successful
    • initOperationStep

      public int initOperationStep(RunTimeStep rts, int iteration)
      initialization call before each operation step
      Specified by:
      initOperationStep in interface OpControllable
    • recalcPhysicalLimitsInst

      public void recalcPhysicalLimitsInst(RunTimeStep rts, double elev)
      Specified by:
      recalcPhysicalLimitsInst in interface OpControllable
    • recalcPhysicalLimits

      public void recalcPhysicalLimits(RunTimeStep rts, double[] xt, double[] et, int tcnt)
      Specified by:
      recalcPhysicalLimits in interface OpControllable
    • setReleaseElementId

      public void setReleaseElementId(int elementId)
      index of release element this contrable is associated with
      Specified by:
      setReleaseElementId in interface OpControllable
    • getElementIndex

      public int getElementIndex()
      returns the index of the Element refered to by this object
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class NamedType
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class NamedType
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful