Package hec.rss.model

Class RssNode

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

public class RssNode extends Node implements TSLocation, RssReturnStatusConstants
See Also:
  • Constructor Details

    • RssNode

      public RssNode()
    • RssNode

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

    • finalize

      public void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • addFlowRule

      public void addFlowRule(FlowLimitOpRule rule)
      Add an operation rule to this node
    • getFlowRuleVector

      public Vector getFlowRuleVector()
      returns a reference to this nodes oprule vector the calling routine must not edit this vector!!!
    • applyHindcastData

      public void applyHindcastData(HindcastData hd)
      applies specific hindcast data for compute
    • clearTSProxyList

      public void clearTSProxyList()
      dumps all ts proxies except input flows
    • getActiveTSProxies

      public Vector getActiveTSProxies(Vector vec, int iotype)
      returns a vector of required input, or generated output TSRecordProxies used in the current alternative for nodes, assume all records are active
    • getActiveOutputWQTSProxies

      public List<TSRecordProxy> getActiveOutputWQTSProxies()
    • addTSRecordProxy

      public TSRecordProxy addTSRecordProxy(int varId)
      Adds a TSRecordProxy by model variable Id
    • getTSRecordProxy

      public TSRecordProxy getTSRecordProxy(int varId)
      finds a TSRecordProxy for the given variable id in this TSLocation
    • getTSFactor

      public double getTSFactor(int varid)
    • setComputationPoint

      public void setComputationPoint(hec.watershed.model.ComputationPoint cp)
      associates this node with a common compuation point
    • toString

      public String toString()
      Overrides:
      toString in class NamedType
    • isActive

      public boolean isActive()
      returns whether node is active for computation
    • setActive

      public void setActive(boolean active)
      sets whether node is active for computation
    • getContinuityElement

      public Element getContinuityElement()
    • setSystem

      public void setSystem(RssSystem sys)
    • getUpstreamElement

      public Element getUpstreamElement()
    • setUpstreamElement

      public void setUpstreamElement(Element elem)
    • getDownstreamElement

      public Element getDownstreamElement()
    • setDownstreamElement

      public void setDownstreamElement(Element elem)
    • removeElement

      public void removeElement(Element e)
    • setStreamStation

      public void setStreamStation(double stat)
      Overrides:
      setStreamStation in class Node
    • getStreamCoord

      public double getStreamCoord()
      Overrides:
      getStreamCoord in class Node
    • getLocation

      public hec.map.WorldPt getLocation()
      Overrides:
      getLocation in class Node
    • getStream

      public StreamElement getStream()
    • dispose

      public void dispose()
    • isDisposed

      public boolean isDisposed()
    • getTSDataSet

      public TSDataSet getTSDataSet(boolean isInput)
      Description copied from interface: TSLocation
      returns the input or output TSData set currently associated with this loation
      Specified by:
      getTSDataSet in interface TSLocation
      Overrides:
      getTSDataSet in class Node
    • getTSArray

      public double[] getTSArray(String param)
      Overrides:
      getTSArray in class Node
    • readData

      public boolean readData(BufferedReader input)
      Retrieves the RssNode data from the specified BufferedReader. This method is called by RssSystem.readFile after encountering a RssNode line type. Control of the file processing is passed back to the RssSystem object once a RssNode End line type is found or if "Node" 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.

      Node Name= (String) name of the Node
      Node TSRecord= (String) name, (String) parameter, (int) input flag
      Node End

      If the input flag > 0, the TSRecord is in the input TSDataSet, otherwise the TSRecord is in the output TSDataSet.

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

      public boolean writeData(BufferedWriter out)
      Overrides:
      writeData in class Node
    • 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 Node
      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 Node
      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