Package hec.rss.model

Class ReachElement

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

See Also:
  • Constructor Details

    • ReachElement

      public ReachElement()
    • ReachElement

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

    • initialize

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

      public boolean initializeRoutingForWQ(RunTimeWindow rtw)
    • calcLag

      public double calcLag()
    • 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 Element
    • toString

      public String toString()
      Returns the name of the Reach Element
      Overrides:
      toString in class Element
    • clone

      public Object clone()
      clone does a deep copy of child objects
      Overrides:
      clone in class TimeStepRoutingElement
    • computeHindcast

      public int computeHindcast(RunTimeWindow rtw, int computeType)
      performs a compute over the runtime window using hindcast logic
      Overrides:
      computeHindcast in class Element
    • computeForecast

      public int computeForecast(RunTimeWindow rtw, int computeType)
      performs a compute over the runtime window using forecast logic
      Overrides:
      computeForecast in class Element
    • calcSeepageFlow

      public double calcSeepageFlow(double flow)
      Specified by:
      calcSeepageFlow in interface SeepageConstants
      Overrides:
      calcSeepageFlow in class Element
    • getConstSeepage

      public double getConstSeepage()
    • getConstSeepage

      public void getConstSeepage(hec.data.ParamDouble pd)
    • setConstSeepage

      public void setConstSeepage(hec.data.ParamDouble pd)
    • setConstSeepage

      public void setConstSeepage(double s)
    • getReturnRatio

      public double getReturnRatio()
    • setReturnRatio

      public void setReturnRatio(double s)
    • getSeepageValues

      public PairedValues getSeepageValues()
    • setSeepageValues

      public void setSeepageValues(PairedValues e)
    • getSeepageType

      public int getSeepageType()
    • setSeepageType

      public boolean setSeepageType(int cond)
    • getLine

      public hec.map.WorldLine getLine()
    • getReferencePt

      public hec.map.WorldPt getReferencePt()
      Overrides:
      getReferencePt in class Element
    • setReferencePt

      public void setReferencePt(hec.map.WorldPt pt)
    • setLine

      public void setLine(hec.map.WorldLine reg)
    • getUpstreamNode

      public RssNode getUpstreamNode()
      Description copied from class: Element
      returns the first upstream node in the node list
      Overrides:
      getUpstreamNode in class Element
      Returns:
      the first upstream node in the node list
    • getDownstreamNode

      public RssNode getDownstreamNode()
      Description copied from class: Element
      returns the first downstream node in the node list
      Overrides:
      getDownstreamNode in class Element
    • readData

      public boolean readData(BufferedReader input)
      Description copied from class: Element
      Retrieves the Element data from the specified BufferedReader. This method is called by RssSystem.readFile after encountering an Element line type. Control of the file processing is passed back to the RssSystem object once an Element End line type is found or if "Element" is not contained in the line type. The later case is an error condition.

      The data stream must have type=param formatting. The following types and parameters are defined.

      Element Name= (String) name of the Element
      Element Nodes= (comma delimited ints) list of nodes connected by this element
      Element NodeDir= (comma delimited ints) list of node directions
      Element Function= (String) function type name
      Element End

      There must one NodeDir value for each RssNode associated with the element. A NodeDir value of 1 indicates positive flow at the node is an inflow to this element, 0 indicates a positive flow is an outflow.

      The function type name must be a valid Function Class name. The currently implemented classes include CoefRouting, Storage, Junction, Dam, and AdjustableFlow.
      The Element Function line type generate new Function according to the specified class name. The readData method of the new object is called to process class specific data. Control is returned to this method when a Element Function End line type is found. Note that a Element Function= line type must be matched by a Element Function End line type or the file will not be processed correctly.

      Overrides:
      readData in class Element
      Parameters:
      input - BufferedReader connected to the ASCII file containing the RssSystem data.
      See Also:
    • writeData

      public boolean writeData(BufferedWriter out)
      Overrides:
      writeData in class Element
    • getModelVariables

      public Vector getModelVariables(Vector variableList)
      Specified by:
      getModelVariables in interface hec.watershed.res.model.PlottableObject
      Overrides:
      getModelVariables in class Element
    • getDefaultModelVariables

      public Vector getDefaultModelVariables()
      Returns a list of Model Variables that are used in the default plot required by PlottableObject interface
      Specified by:
      getDefaultModelVariables in interface hec.watershed.res.model.PlottableObject
      Overrides:
      getDefaultModelVariables in class Element
      Returns:
      list of ModelVariable objects
    • getPlotTypes

      public Vector getPlotTypes()
      Specified by:
      getPlotTypes in interface hec.watershed.res.model.PlottableObject
      Overrides:
      getPlotTypes in class Element
    • getTSRecords

      public Vector getTSRecords(ModelVariable plotVariable, Vector proxyList)
      Overrides:
      getTSRecords in class Element
    • importFrom

      public boolean importFrom(RuleResolution rr)
    • setFillColorName

      public void setFillColorName(String color)
      set the fill color for the Reach
      Parameters:
      color - the new Fill color or null to use the default fill color.
    • getFillColorName

      public String getFillColorName()
      get the fill color for the Reach
      Returns:
      the fill color or null if the default fill color is used.
    • 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 TimeStepRoutingElement
      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 TimeStepRoutingElement
      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
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element elem)
      Description copied from interface: AltInputReportInfc
      Alternative Input Report Interface for data.
      Specified by:
      outputReport in interface AltInputReportInfc