Package hec.rss.model

Class TimeStepRoutingElement

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, ITimeStepRoutingElement, PlotVariableConstants, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, hec.watershed.res.model.PlottableObject, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable
Direct Known Subclasses:
ReachElement

public class TimeStepRoutingElement extends Element implements ITimeStepRoutingElement
Simple Element that serves the purpose of allowing time step dependent routing for elements that just need to define TS Routing.
See Also:
  • Constructor Details

    • TimeStepRoutingElement

      public TimeStepRoutingElement()
    • TimeStepRoutingElement

      public TimeStepRoutingElement(Element element)
    • TimeStepRoutingElement

      public TimeStepRoutingElement(RssSystem sys, int idx)
  • Method Details

    • clone

      public Object clone()
      Description copied from class: Element
      clone method
      Overrides:
      clone in class Element
    • initialize

      public boolean initialize(RunTimeWindow rtw)
      Description copied from class: Element
      initialize prior to a compute
      Overrides:
      initialize in class Element
    • setRoutingFunction

      public boolean setRoutingFunction(RunTimeWindow rtw)
    • putFunction

      public void putFunction(Duration d, Function f)
      Description copied from interface: ITimeStepRoutingElement
      Sets a function to used based on a duration
      Specified by:
      putFunction in interface ITimeStepRoutingElement
      Parameters:
      d -
      f -
    • getDefinedTimeStepDurations

      public Duration[] getDefinedTimeStepDurations()
      Returns an array of Durations for which a Routing Function is defined.
      Specified by:
      getDefinedTimeStepDurations in interface ITimeStepRoutingElement
      Returns:
    • getFunction

      public Function getFunction(Duration d, Function defaultF)
      Returns a Function based on a duration as a query item. If the return value is NULL, then the defaultFunction is returned
      Specified by:
      getFunction in interface ITimeStepRoutingElement
      Parameters:
      d -
      defaultF - return if map.get(d) == null
      Returns:
    • 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 sub-classes of Function should over-ride this method if they use TSRecordProxies
      Overrides:
      updateTSProxyList in class Element
    • getActiveTSProxies

      public Vector getActiveTSProxies(Vector vec, int iotype)
      returns a vector of required input, or generated output TSRecordProxies used in the current alternative default implementation elements, assume all records are active
      Overrides:
      getActiveTSProxies in class Element
    • setActive

      public void setActive(boolean active, boolean recurse)
      Sets whether element is active for computation. Also sets nodes computed by this element to the sam active or inactive state.
      Overrides:
      setActive in class Element
    • 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 Element
      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 Element
      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