Package hec.rss.model

Class RssRatingObject

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

Title: HEC JavaDev Description: Copyright: Company: RMA
See Also:
  • Constructor Details

    • RssRatingObject

      public RssRatingObject()
      Constructor for the RssRatingObject object
    • RssRatingObject

      public RssRatingObject(Element e)
  • Method Details

    • getOutputBPart

      protected String getOutputBPart()
    • setupForSerialization

      public void setupForSerialization()
      Called just before ascii serialization. Prepares the paired data values by setting there dss record path names
    • setOutOfRangeValuesToMissing

      public void setOutOfRangeValuesToMissing(boolean tf)
    • getOutOfRangeValuesToMissing

      public boolean getOutOfRangeValuesToMissing()
    • clone

      public Object clone()
      clone method
      Overrides:
      clone in class RssTSLocationObject
    • initialize

      public void initialize()
    • setElement

      public void setElement(Element e)
    • getElement

      public Element getElement()
    • setRatingName

      public void setRatingName(String rname)
    • getRatingName

      public String getRatingName()
    • getElevation

      public double getElevation(double q)
    • isEmpty

      public boolean isEmpty()
    • getElevation

      public double getElevation(RunTimeStep runtime, double q)
    • getFlowFromStage

      public double getFlowFromStage(RunTimeStep runtime, double stage)
      Interpolate flow from given stage and time step. Assume the rating relates stage to flow
      Parameters:
      runtime - time step
      stage - from which flow will be interpolated
      Returns:
      interpolated flow or RMAConst.UNDEF_DOUBLE if interpolation was unsuccessful
    • getIndpVarValue

      protected double getIndpVarValue(RunTimeStep rts, boolean hasElevTS)
      Use the Independent Variable Object to interpolate a stage value for the given time step from global time series arrays
      Parameters:
      rts - time step to use from global arrays
      hasElevTS - flag indicating if the elevation time series is available
      Returns:
      interpolated stage
    • getTwoVarValue

      protected double getTwoVarValue(IndependentVariable ivRow, IndependentVariable ivCol, RunTimeStep rts, boolean hasElevTS)
      Compute elevation for Two Independent Variable function
      Parameters:
      ivRow - Row IndependentVariable
      ivCol - Column IndependentVariable
      rts -
      hasElevTS -
      Returns:
    • getInpVarFlow

      protected double getInpVarFlow(RunTimeStep rts, double stage)
      Use the Independent Variable Object to interpolate a flow value for the given stage, if it is a two variable lookup the given time step is used to choose a value for the second lookup parameter from global time series arrays
      Parameters:
      rts - time step to use from global arrays
      Returns:
      interpolated stage
    • isDefined

      public boolean isDefined(RunTimeStep runtime)
      Determine if tailwater flow is defined for current runtime Tailwater cannot be computed correctly unless flow is defined for requested time step
      Parameters:
      runtime -
      Returns:
    • usesRatingCurveElev

      public boolean usesRatingCurveElev()
    • setUsesRatingCurveElev

      public void setUsesRatingCurveElev(boolean b)
    • getRatingCurve

      public PairedValues getRatingCurve()
      returns a clone of the junctions rating curve
    • setRatingCurve

      public void setRatingCurve(PairedValues rc)
      replaces the junctions existing rating curve with the given PairedValues object, also adds/removes a stage time series record proxy as required
    • getStageDatum

      public void getStageDatum(hec.data.ParamDouble pd)
    • setStageDatum

      public void setStageDatum(hec.data.ParamDouble pd)
    • setStageDatum

      public void setStageDatum(double stageDatum)
    • getIndependentVariableRatingCurveExt

      public PairedValuesExt getIndependentVariableRatingCurveExt()
      returns a clone of the junctions rating curve
    • setIndependentVariableRatingCurveExt

      public void setIndependentVariableRatingCurveExt(PairedValuesExt rc)
      replaces the junctions existing rating curve with the given PairedValues object, also adds/removes a stage time series record proxy as required
    • getIndependentVariableRatingCurve

      public PairedValues getIndependentVariableRatingCurve()
      returns a clone of the junctions rating curve
    • setIndependentVariableRatingCurve

      public void setIndependentVariableRatingCurve(PairedValues rc)
      replaces the junctions existing rating curve with the given PairedValues object, also adds/removes a stage time series record proxy as required
    • usesIndependentVariable

      public boolean usesIndependentVariable()
    • setUsesIndependentVariable

      public void setUsesIndependentVariable(boolean b)
    • getIndependentVariable

      public IndependentVariable getIndependentVariable()
    • setIndependentVariable

      public void setIndependentVariable(IndependentVariable iv)
    • getModelVariableElementIds

      public int[] getModelVariableElementIds()
      get the element ids for the elements associated with model variables
      Returns:
    • getDownstreamModelVariableElementId

      public int getDownstreamModelVariableElementId(Element refElement)
      get the downsteam most element id (if one) for the elements associated with model variables
      Returns:
    • getDefaultIndependentVariable

      public IndependentVariable getDefaultIndependentVariable()
      Create a default independent model variable is that is downstream node flow
      Returns:
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      add the time series record proxies associated current compute
      Overrides:
      getActiveTSRecordProxies in class RssTSLocationObject
    • getActiveTSProxies

      public Vector getActiveTSProxies(Vector vec, int iotype)
      returns a vector of required input, or generated output TSRecordProxies used in the current alternative default implementation, assume all records are active
    • 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
      Specified by:
      updateTSProxyList in class RssTSLocationObject
    • getReferencedStateVariables

      public void getReferencedStateVariables(List svlist)
      adds StateVariables refereced by this rule to the given list
      Parameters:
      svlist - unique list of state variables
    • getSystem

      public RssSystem getSystem()
      Description copied from class: RssTSLocationObject
      Each subclass must provide a method to return its parent RssSystem
      Specified by:
      getSystem in class RssTSLocationObject
    • 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 RssTSLocationObject
      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 RssTSLocationObject
      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