Package hec.rss.model

Class InflowTimeSeriesOptionModel

java.lang.Object
hec.rss.model.InflowTimeSeriesOptionModel
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable

public class InflowTimeSeriesOptionModel extends Object implements AsciiSerializable, Cloneable

Title: Hec Java Development

Description:

Holds the data for the Time Series Option dialog

Copyright: Copyright (c) 2002

Company: RMA, Inc.

See Also:
  • Field Details

    • DATE_TYPE

      public static final int DATE_TYPE
      Type for Date Independent Variable
      See Also:
    • DATE_TIME_TYPE

      public static final int DATE_TIME_TYPE
      type for Date Time Independent Variable
      See Also:
    • MODEL_VARIABLE_TYPE

      public static final int MODEL_VARIABLE_TYPE
      type for Model Variable Independent Variable
      See Also:
    • TIME_SERIES_TYPE

      public static final int TIME_SERIES_TYPE
      type for Time Series Independent Variable
      See Also:
    • TS_FUNCTION_STRINGS

      public static final String[] TS_FUNCTION_STRINGS
      strings corresponding to Time Series Functions
    • TS_CURRENT_TYPE

      public static final int TS_CURRENT_TYPE
      type id for Current Value time series function
      See Also:
    • TS_PREVIOUS_TYPE

      public static final int TS_PREVIOUS_TYPE
      type id for Previous Value time series function
      See Also:
    • TS_LAGGED_TYPE

      public static final int TS_LAGGED_TYPE
      type id for Lagged Value time series function
      See Also:
    • TS_PERAVG_TYPE

      public static final int TS_PERAVG_TYPE
      type id for Period Average time series function
      See Also:
    • TS_PERMAX_TYPE

      public static final int TS_PERMAX_TYPE
      type id for Period Maximum time series function
      See Also:
    • TS_PERMIN_TYPE

      public static final int TS_PERMIN_TYPE
      type id for Period Minimum time series function
      See Also:
  • Constructor Details

    • InflowTimeSeriesOptionModel

      public InflowTimeSeriesOptionModel()
  • Method Details

    • InflowTimeSeriesOptionModel

      public void InflowTimeSeriesOptionModel()
      Constructor
    • setModalVariableInfo

      public void setModalVariableInfo(TSRecordProxy proxy, Element elem, ModelVariable mv)
      Sets the ModalVariableInfo information for this object.
      Parameters:
      proxy - The new modalVariableInfo value
      elem - the Element
      mv - the ModelVariable
      Throws:
      IllegalStateException - if the type isn't MODEL_VARIABLE_TYPE
    • setTimeSeriesName

      public void setTimeSeriesName(String name)
      Sets the TimeSeries Name for this object
      Parameters:
      name - The new TimeSeries Name
      Throws:
      IllegalStateException - if the type isn't TIME_SERIES_TYPE
    • setTimeSeriesOptions

      public void setTimeSeriesOptions(int function, double lag, double period)
      Sets the TimeSeriesOptions attribute of the IndependentVariable object
      Parameters:
      function - the TimeSeriesOption Function
      lag - the TimeSeries lag
      period - the TimeSeries period
      Throws:
      IllegalStateException - if the type isn't TIME_SERIES_TYPE or MODEL_VARIABLE_TYPE
    • setModelVariableString

      public void setModelVariableString(String s)
      Sets the modelVariableString attribute of the InflowTimeSeriesOptionModel object
      Parameters:
      s - The new modelVariableString value
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Sets the fieldObject attribute of the InflowTimeSeriesOptionModel object
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The new fieldObject value
      fobj - The new fieldObject value
      Returns:
      Boolean
    • getTSProxyName

      public String getTSProxyName()
      Gets the name if the TSRecordProxy
      Returns:
      name of proxy
    • getTimeSeriesName

      public String getTimeSeriesName()
      Gets the TimeSeries Name value only valid if the type is TIME_SERIES_TYPE
      Returns:
      The TimeSeries Name value
    • getTimeSeriesFunction

      public String getTimeSeriesFunction()
      Gets the TimeSeries Function only valid if the type is MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE
      Returns:
      The TimeSeries Function value
    • getTimeSeriesFunctionType

      public int getTimeSeriesFunctionType()
      Gets the timeSeriesFunctionType attribute of the InflowTimeSeriesOptionModel object
      Returns:
      The timeSeriesFunctionType value
    • getTimeSeriesLag

      public double getTimeSeriesLag()
      Gets the TimeSeries Lag only valid if the type is MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE
      Returns:
      The TimeSeries Lag value
    • getTimeSeriesPeriod

      public double getTimeSeriesPeriod()
      Gets the TimeSeries Period only valid if the type is MODEL_VARIABLE_TYPE or TIME_SERIES_TYPE
      Returns:
      The TimeSeries Period value
    • getType

      public int getType()
      Gets the Type of this object one of:
      DATE_TYPE
      DATE_TIME_TYPE
      MODEL_VARIABLE_TYPE
      TIME_SERIES_TYPE
      Returns:
      The Type value
    • getElementId

      public int getElementId()
      Gets the Element of this object
      Only valid if type is MODEL_VARIABLE_TYPE
      Returns:
      The Element value
    • getModelVariableId

      public int getModelVariableId()
      Gets the ModelVariable value
      Only valid if type is MODEL_VARIABLE_TYPE
      Returns:
      The ModelVariable value
    • getModelVariable

      public ModelVariable getModelVariable()
      Gets the modelVariable attribute of the InflowTimeSeriesOptionModel object
      Returns:
      The modelVariable value
    • getFieldObject

      public Object getFieldObject(Field fld)
      Gets the fieldObject attribute of the InflowTimeSeriesOptionModel object
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - Description of Parameter
      Returns:
      The fieldObject value
    • evaluateTSFunction

      public double evaluateTSFunction(RunTimeStep rts, double[] tsarray)
      Computes the value of the independent variable based on the Time Series Function
      Parameters:
      rts - RunTimeStep at which the independent variable is to be evaluated
      tsarray - Time Series array
      Returns:
      value of independent variable
    • areTheSame

      public boolean areTheSame(IndependentVariable iv)
      Test if two IndependentVariable are essentially the same
      Parameters:
      iv - Description of Parameter
      Returns:
      Description of the Returned Value
    • clone

      public Object clone()
      Description of the Method
      Overrides:
      clone in class Object
      Returns:
      Description of the Returned Value
    • buildFunctionOfString

      public String buildFunctionOfString(ReleaseFuncOpRule rule)
      Description of the Method
      Parameters:
      rule - Description of Parameter
      Returns:
      Description of the Returned Value
    • toString

      public String toString()
      Enumerations to strings
      Overrides:
      toString in class Object
      Returns:
      String value for enumeration