Package hec.rss.model

Class MuskingumCungeRouting

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

public class MuskingumCungeRouting extends Routing
MuskingumCungeRouting computes routed flows using the Muskingum-Cunge routing method. The routing can be computed for several different channel types: circle, trapezoid, or an eight-point cross-section.
See Also:
  • Constructor Details

    • MuskingumCungeRouting

      public MuskingumCungeRouting()
    • MuskingumCungeRouting

      public MuskingumCungeRouting(Element elem)
    • MuskingumCungeRouting

      public MuskingumCungeRouting(Element elem, ChannelType type)
  • Method Details

    • getChannelType

      public ChannelType getChannelType()
      Gets channel type for this routing.
      Returns:
      channel type
    • getMaximumExpectedFlow

      public double getMaximumExpectedFlow()
    • getMinimumExpectedFlow

      public double getMinimumExpectedFlow()
    • setMaximumExpectedFlow

      public void setMaximumExpectedFlow(double flow)
    • setMinimumExpectedFlow

      public void setMinimumExpectedFlow(double flow)
    • getMaximumExpectedFlow

      public void getMaximumExpectedFlow(hec.data.ParamDouble pd)
    • setMaximumExpectedFlow

      public void setMaximumExpectedFlow(hec.data.ParamDouble pd)
    • getMinimumExpectedFlow

      public void getMinimumExpectedFlow(hec.data.ParamDouble pd)
    • setMinimumExpectedFlow

      public void setMinimumExpectedFlow(hec.data.ParamDouble pd)
    • setNumberOfTimestepSubintervals

      public void setNumberOfTimestepSubintervals(int numintv)
    • getNumberOfTimestepSubintervals

      public int getNumberOfTimestepSubintervals()
    • setChannelType

      public void setChannelType(ChannelType type)
      Sets channel type and creates a Channel.
      Parameters:
      type - channel type.
    • getChannel

      public Channel getChannel()
      Gets channel for this routing.
      Returns:
      channel object
    • computeRouting

      public int computeRouting(RunTimeStep rts)
      Compute routing for the full hydrograph.
      Overrides:
      computeRouting in class Routing
      Parameters:
      rts - run-time-step object
      Returns:
    • 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
    • computeForecastStep

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

      public int computeForecast(RunTimeWindow rtw, int computeFlag)
      Overrides:
      computeForecast in class Routing
    • computeRoutingStep

      public double computeRoutingStep(int interval, double q0, double q1)
      Compute routing for one time step.
      Parameters:
      interval - timeStep in minutes.
      q0 - inflow at beginning of period.
      q1 - inflow at end of period.
      Returns:
      outflow at end of period.
    • initialize

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

      public boolean isValid()
      Checks if parameter values are valid for this routing method.
      Overrides:
      isValid in class NamedType
      Returns:
      true, if parameters are valid, otherwise false.
    • computeFlowStats

      protected void computeFlowStats(double qref)
      Compute average flow and some other flow stats
      Parameters:
      qref -
    • 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(ElementHotstartState elementHotstartState, int stateId)
    • copyDataFromMuskingumCunge8ptRouting

      public void copyDataFromMuskingumCunge8ptRouting(MuskingumCunge8ptRouting oldRoutingFunction)
      Copy relavent data from MuskingumCunge8ptRouting function into current MuskingumCungetRouting function. MuskingumCunge8ptRouting will no longer be used.
      Parameters:
      oldRouting - Old MuskingumCunge8ptRouting function
    • copyDataFromMuskingumCungePrismRouting

      public void copyDataFromMuskingumCungePrismRouting(MuskingumCungePrismRouting oldRoutingFunction)
      Copy relavent data from MuskingumCungePrismRouting function into current MuskingumCungetRouting function. MuskingumCungePrismRouting will no longer be used.
      Parameters:
      oldRouting - Old MuskingumCungePrismRouting 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 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
    • setupForSerialization

      public void setupForSerialization()
      Called just before ascii serialization. Prepares the paired data values by setting there dss record path names Store the Celerity vs. q and Topwidth vs. q paired value curves for reference
      Overrides:
      setupForSerialization in class Function
    • 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
    • initializeStandalone

      public boolean initializeStandalone()
      Description copied from class: Routing
      Initialize routing object for standalone compute in offline WQ simulation Default method - implemented in individual subclasses
      Overrides:
      initializeStandalone in class Routing
      Returns:
      true if initialization successful, false o.w.
    • 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