Package hec.rss.model

Class LagAndKRouting

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

public class LagAndKRouting extends Routing
See Also:
  • Constructor Details

    • LagAndKRouting

      public LagAndKRouting()
      Default Constructor
    • LagAndKRouting

      public LagAndKRouting(Element elem)
      Constructor
      Parameters:
      elem -
  • Method Details

    • 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
    • clone

      public Object clone()
      Description copied from class: Function
      clone method
      Overrides:
      clone in class Function
    • saveFunctionState

      public void saveFunctionState(int stateid)
      save the current state of the element and its function with the given identifier - saves subreach flows
      Overrides:
      saveFunctionState in class Function
      Parameters:
      stateid - identifier for the state
    • restoreFunctionState

      public void restoreFunctionState(int stateid)
      restore the state of the element and its function matching the given identifier - restores subreach flows
      Overrides:
      restoreFunctionState in class Function
      Parameters:
      stateid - identifier for the state
    • saveHotstartState

      public void saveHotstartState(HotstartState parentHotstartState, int stateId)
      Overrides:
      saveHotstartState in class Function
    • restoreHotstartState

      public boolean restoreHotstartState(HotstartState parentState)
      Overrides:
      restoreHotstartState in class Function
    • initialize

      public boolean initialize()
      Description copied from class: Routing
      initialize prior to a compute
      Overrides:
      initialize in class Routing
    • computeForecastStep

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

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

      protected double computeRoutingStep(double dtHours, double q0, double q1)
      Compute routing for one time step.
      Parameters:
      dtHours - time interval in hours
      q0 - inflow at beginning of interval
      q1 - inflow at end of interval
      Returns:
      outflow at end of interval
    • lagInflow

      protected double[] lagInflow(double dtHours, LagAndKCarryOver carryOver, double[] inflow)
    • attenuateFlow

      protected double[] attenuateFlow(double dtHours, LagAndKCarryOver carryOver, double[] flow)
    • getInflowLagTable

      public PairedValues getInflowLagTable()
    • getOutflowKTable

      public PairedValues getOutflowKTable()
    • setInflowLagTable

      public void setInflowLagTable(PairedValues inflowLagTable)
    • setOutflowKTable

      public void setOutflowKTable(PairedValues outflowKTable)
    • setIsConstantLag

      public void setIsConstantLag(boolean isConstant)
    • isConstantLag

      public boolean isConstantLag()
    • setIsConstantK

      public void setIsConstantK(boolean isConstant)
    • isConstantK

      public boolean isConstantK()
    • setConstantLag

      public void setConstantLag(double lag)
    • getConstantLag

      public double getConstantLag()
    • setConstantK

      public void setConstantK(double k)
    • getConstantK

      public double getConstantK()
    • setCarryOverState

      public boolean setCarryOverState(int stateid, LagAndKCarryOver co)
    • getCarryOverState

      public LagAndKCarryOver getCarryOverState()
    • findStorage

      public double findStorage(double outflow)
    • 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