Package hec.rss.model

Class Dam

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

public class Dam extends ControlStructure implements AltInputReportInfc
See Also:
  • Constructor Details

    • Dam

      public Dam()
    • Dam

      public Dam(Element elem)
  • Method Details

    • computeStepFlow

      public double computeStepFlow(RunTimeStep rts)
      Compute the spillway flow at time step, rts. Computes end of period instantaneous flow or period average flow depending on the compute calculation option. Assumes that both rts.step and rts.step-1 are valid time series array indexes. This method was introduced for the rs4engine.
      Parameters:
      rts -
      Returns:
      end of period instantaneous flow or period average flow depending on the compute calculation option
    • getHindcastFlow

      public double getHindcastFlow(RunTimeStep rts)
    • getEstimatedFlow

      public double getEstimatedFlow(RunTimeStep rts, double elev0, double elev1)
    • getEstimatedFlow

      public double getEstimatedFlow(RunTimeStep rts, int iteration)
      return the best current estimate of flow at the given time step
      Overrides:
      getEstimatedFlow in class ControlStructure
      Parameters:
      rts - the time step
      Returns:
      flow estimate
    • getEstimatedROI

      public double getEstimatedROI(RunTimeStep rts, int iteration)
      Overrides:
      getEstimatedROI in class ControlStructure
    • getEstimatedROD

      public double getEstimatedROD(RunTimeStep rts, int iteration)
      Overrides:
      getEstimatedROD in class ControlStructure
    • 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
    • getComputesLeakage

      public boolean getComputesLeakage()
    • setComputesLeakage

      public void setComputesLeakage(boolean b)
    • clone

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

      public boolean hasLeakageValues()
    • getLeakageValues

      public PairedValues getLeakageValues()
    • setLeakageValues

      public void setLeakageValues(PairedValues lv)
    • computeHindcastStep

      public int computeHindcastStep(RunTimeStep runtime)
      Overrides:
      computeHindcastStep in class Function
    • initialize

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

      public int computeForecastStep(RunTimeStep runtime)
      Overrides:
      computeForecastStep in class Function
    • computeForecastStep

      public int computeForecastStep(RunTimeStep runtime, double[] xt, double[] et, int tcnt)
      Overrides:
      computeForecastStep in class Function
    • computeSubStepFlow

      public double computeSubStepFlow(RunTimeStep rts, double xt, double et)
      Overrides:
      computeSubStepFlow in class Function
    • getRelease

      public double getRelease(double elev)
      return flow/release for given elevation
      Overrides:
      getRelease in class ControlStructure
    • getTopOfDam

      public void getTopOfDam(hec.data.ParamDouble pd)
    • setTopOfDam

      public void setTopOfDam(hec.data.ParamDouble pd)
    • getTopOfDam

      public double getTopOfDam()
    • getWidthOfDam

      public void getWidthOfDam(hec.data.ParamDouble pd)
    • setWidthOfDam

      public void setWidthOfDam(hec.data.ParamDouble pd)
    • getWidthOfDam

      public double getWidthOfDam()
    • setTopOfDam

      public void setTopOfDam(double dbl)
      Sets the value for the top of the dam
    • setWidthOfDam

      public void setWidthOfDam(double dbl)
      Sets the value for the width of the dam
    • getWeirCoef

      public double getWeirCoef()
      Gets the Weir Coefficient
    • setWeirCoef

      public void setWeirCoef(double dbl)
      Sets the Weir Coefficient
    • 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
    • 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
    • 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