Package hec.rss.model

Class CoefRouting

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

public class CoefRouting extends Routing
See Also:
  • Constructor Details

    • CoefRouting

      public CoefRouting()
    • CoefRouting

      public CoefRouting(Element elem)
  • Method Details

    • calcLag

      public double calcLag()
    • clone

      public Object clone()
      clone method
      Overrides:
      clone in class Function
    • computeForecastStep

      public int computeForecastStep(RunTimeStep rts)
      compute one routing step during forecast
      Overrides:
      computeForecastStep in class Function
    • computeRouting

      public int computeRouting(RunTimeStep rts, double[] inputTS, double[] outputTS, Object[] routingDataTS, double[] routed)
      Compute routing over the given time window using the provided input, output, and routing data object time series arrays
      Overrides:
      computeRouting in class Routing
      Parameters:
      rts - time step and number of steps
      inputTS - upstream flow time series
      outputTS - previously computed downstream flow time series
      routingDataTS - additional time depended routing data if needed for the routing method
      routed - newly computed downstream flow (array size must be >= rts.nstep)
      Returns:
      return flag, RssReturnStatusConstants.RTN_NOPROBLEM if routing computed successfully
    • computeRouting

      public int computeRouting(RunTimeStep rts)
      Overrides:
      computeRouting in class Routing
    • setStraddle

      public void setStraddle(int straddle)
    • setLag

      public void setLag(int lag)
    • setFactor

      public void setFactor(double factor)
    • setCoefArray

      public void setCoefArray(double[] ca)
      Sets the coefficient routing array values. Normalization is done if the sum of the values do not equal 1 or 0.
    • setCoefArray

      public void setCoefArray(double[] ca, boolean normalize)
      Sets the coefficient routing array values.
      Parameters:
      ca - the double coefficient values
      normalize - if the values is true normalization is done if the sum of the coefficients does not equal 1 or 0. If false, no normalization is done ever.
    • getCoefArray

      public double[] getCoefArray()
    • getStraddle

      public int getStraddle()
    • getLag

      public int getLag()
    • getFactor

      public double getFactor()
    • hasDefaultParameters

      public boolean hasDefaultParameters()
      test whether default coefficient values have been changed
      Overrides:
      hasDefaultParameters in class Function
    • estimateCoefRouting

      public boolean estimateCoefRouting(RunTimeStep rts, double[] coef)
      Overrides:
      estimateCoefRouting in class Routing
    • 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 Routing
      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 Routing
      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
      Overrides:
      outputReport in class Routing
    • computeRoutingStepStandalone

      public double computeRoutingStepStandalone(int rtsMinutes, double q0, double q1, double reachOutflow, double[] initSubOutflow, double[] finSubOutflow)
      Description copied from class: Routing
      Method to compute a time step of routing through a reach for an offline WQ simulation Default implementation - returns array of constant flows Actual routing methods implemented in individual subclasses
      Overrides:
      computeRoutingStepStandalone in class Routing
      Parameters:
      q0 - initial flow into upstream subreach
      q1 - flow at end of time step into upstream subreach
      reachOutflow - flow at end of the reach - used for coef routing
      initSubOutflow - array of subreach flows at start of time step
      finSubOutflow - array of subreach flows at end of time step
      Returns:
      flow at the end of the reach at end of time step