Package hec.rss.model

Class DivertedOutletElement

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

public class DivertedOutletElement extends ReservoirOutletElement implements SeepageConstants, TailElevContainer, AltInputReportInfc
See Also:
  • Field Details

  • Constructor Details

    • DivertedOutletElement

      public DivertedOutletElement()
    • DivertedOutletElement

      public DivertedOutletElement(RssSystem sys, int idx, ReservoirElement p)
  • Method Details

    • getModelVariables

      public Vector getModelVariables(Vector variableList)
      returns the model variables available for plotting method required by PlottableObject interface
      Specified by:
      getModelVariables in interface hec.watershed.res.model.PlottableObject
      Overrides:
      getModelVariables in class Element
      Parameters:
      variableList - vector of model variables
      Returns:
      updated vector of model variables
    • 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
    • getTSRecords

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

      public void disconnectDownstream(double eoff, double noff)
      disconnects the diversion from downstream element and optionaly offsets the location of the downstream end
      Parameters:
      eoff - east offset in world coordinates added to downstream location
      noff - north offset in world coordinates added to downstream location
    • getDiversionProjectId

      public long getDiversionProjectId()
    • setDiversionProjectId

      public void setDiversionProjectId(long id)
    • getCompositeRelease

      public PairedValuesExt getCompositeRelease()
    • 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
    • initialize

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

      public Element getTailwaterElement()
    • getTailwaterElevation

      public TailwaterElevation getTailwaterElevation()
      Specified by:
      getTailwaterElevation in interface TailElevContainer
    • setParentElement

      public void setParentElement(Element e)
      Overrides:
      setParentElement in class Element
    • setHasTailElev

      public void setHasTailElev(boolean b)
      Description copied from interface: TailElevContainer
      activates/deactivates tailwater elevation
      Specified by:
      setHasTailElev in interface TailElevContainer
    • hasTailElev

      public boolean hasTailElev()
      Description copied from interface: TailElevContainer
      returns boolean indicating whether this element has a tailwater elevation
      Specified by:
      hasTailElev in interface TailElevContainer
    • hasPowerPlant

      public boolean hasPowerPlant()
      determines whether the diversion has one or more power plants
      Returns:
      true if there is at least one power plant
    • clone

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

      public void setActive(boolean active)
      Sets whether element is active for computation. Also sets nodes computed by this element to the sam active or inactive state. if there are no controlled or uncontrolled outlets for this diverted outlet then it is never set active
      Overrides:
      setActive in class Element
    • removeNode

      public void removeNode(RssNode node)
      override Element.removeNode to remove child routing element if necessary
      Overrides:
      removeNode in class Element
    • hasReach

      public boolean hasReach()
    • isConnected

      public boolean isConnected()
      Test if diverted outlet is connected back to a stream element
      Returns:
      true if reach is connected to a downstream location
    • getReachElement

      public Element getReachElement()
    • calcSeepageFlow

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

      public int computeHindcastStep(RunTimeStep rts)
      computes a single hindcast time step - skips routing
      Overrides:
      computeHindcastStep in class Element
    • computeForecastStep

      public int computeForecastStep(RunTimeStep rts)
      computes a single forecast time step
      Overrides:
      computeForecastStep in class Element
    • getConstSeepage

      public double getConstSeepage()
    • setConstSeepage

      public void setConstSeepage(double s)
    • getConstSeepage

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

      public void setConstSeepage(hec.data.ParamDouble pd)
    • 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()
      this is actually returning the Diverted outlet elements tailwater outflow
      Overrides:
      getUpstreamNode in class Element
      Returns:
      RssNode at the tailwater outflow
    • getDownstreamNode

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

      public List getDownstreamNodes(List vec)
      Description copied from class: Element
      returns all downstream nodes in the node list does not recurse through child elements
      Overrides:
      getDownstreamNodes in class Element
    • getReachNode

      public RssNode getReachNode()
    • convertRoutingElement

      public void convertRoutingElement()
    • addNode

      public void addNode(RssNode n, int idir)
      override add node to make connections to child elements
      Overrides:
      addNode in class Element
    • getTailNode

      public RssNode getTailNode()
      returns the downstream node of the tailwater child element
    • addChildElement

      public void addChildElement(Element child)
      override Element method to handle connectivity
      Overrides:
      addChildElement in class Element
    • setActive

      public void setActive(boolean active, boolean recurse)
      Override default Element.setActive to set the reach inactive when there is no down stream connection.
      Overrides:
      setActive in class Element
    • hasOutlets

      public boolean hasOutlets()
      Determines whether the diverted outlet has any controlled or uncontrolled outlets
      Returns:
      true if there are outlets
    • getLineColor

      public Color getLineColor()
    • getInflowType

      public int getInflowType()
    • setInflowType

      public void setInflowType(int inFlowType)
    • 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 ReservoirOutletElement
      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 ReservoirOutletElement
      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