Package hec.rss.model

Class AdjustableDiversion

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable

public class AdjustableDiversion extends ControlStructure
See Also:
  • Field Details

  • Constructor Details

    • AdjustableDiversion

      public AdjustableDiversion()
    • AdjustableDiversion

      public AdjustableDiversion(Element elem)
  • Method Details

    • getFlowParam

      public AdjustableParameter getFlowParam()
    • isNodeComputed

      public boolean isNodeComputed(int iorder, RssNode node, Integer idir)
      returns true if node is computed by the function, the function computes the flow at all nodes so it is always true
      Overrides:
      isNodeComputed in class Function
      Parameters:
      iorder - index of node in element vector
      node - node object
      idir - integer indicating whether node is inflow or outflow
      Returns:
      true if computed, else false
    • initForecastOperations

      public int initForecastOperations(RunTimeWindow rtw)
      Initialzes adjustable parameter values over forecast time window Copies the last hindcast value to the entire forecast window.
      Overrides:
      initForecastOperations in class ControlStructure
    • applyHindcastData

      public void applyHindcastData(HindcastData hd)
      applies specific hindcast data for compute
      Overrides:
      applyHindcastData in class Function
    • getHindcastDataList

      public void getHindcastDataList(Vector hvec)
      adds the hindcast record for total release from this object
      Overrides:
      getHindcastDataList in class Function
    • getActiveTSProxies

      public Vector getActiveTSProxies(Vector vec, int iotype)
      returns a vector of required input, or generated output TSRecordProxies used in the current alternative
      Overrides:
      getActiveTSProxies in class Function
    • updateTSProxyList

      public void updateTSProxyList()
      Regenerates the list of all TSProxies required for this location. This list includes all records that are generated by this function even if the records are held in another objects (e.g. RssNode) proxy list
      Overrides:
      updateTSProxyList in class Function
    • setupForSerialization

      public void setupForSerialization()
      Called just before ascii serialization. Prepares the paired data values by setting there dss record path names
      Overrides:
      setupForSerialization in class Function
    • initialize

      public boolean initialize()
      initialize prior to a compute
      Overrides:
      initialize in class Function
    • getController

      public Controller getController()
      gets the old style controller object for this diversion -creating it if necessary. This method will change if the new OpController strategy is implemented for diversions
    • clone

      public Object clone()
      clone method
      Overrides:
      clone in class ControlStructure
    • getInitialRelease

      public double getInitialRelease()
    • setInitialRelease

      public void setInitialRelease(double r)
    • getHindcastCondition

      public int getHindcastCondition()
    • setHindcastCondition

      public boolean setHindcastCondition(int cond)
    • findAdjParam

      public AdjustableParameter findAdjParam(String param)
      Overrides:
      findAdjParam in class Function
    • getCapacityValues

      public PairedValues getCapacityValues()
    • setCapacityValues

      public void setCapacityValues(PairedValues pv)
    • getAvailableFlow

      public double getAvailableFlow(RunTimeStep runtime)
      calcuates the flow available for diversion for the given time step
      Parameters:
      runtime -
      Returns:
    • computeHindcastStep

      public int computeHindcastStep(RunTimeStep runtime)
      compute diversion for a hindcast step
      Overrides:
      computeHindcastStep in class Function
    • computeForecastStep

      public int computeForecastStep(RunTimeStep runtime)
      compute diversion for a forecast step
      Overrides:
      computeForecastStep in class Function
    • getOverrideVal

      public double getOverrideVal(RunTimeStep rts)
      Get the diversion override value for the current time step. Limit the diversion to be 0 invalid input: '<'= override invalid input: '<'= flow param max value. returns and undefined value if no override
      Parameters:
      rts -
      Returns:
      value or RMAConst.UNDEF_DOUBLE
    • getComputedTSRecordProxies

      public Vector getComputedTSRecordProxies()
      returns a vector of computed ts record proxies for up and downstream flow
      Overrides:
      getComputedTSRecordProxies in class Function
    • 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 ControlStructure
      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 ControlStructure
      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