Package hec.rss.model

Class TimeSeriesComparisonWrapper

java.lang.Object
hec.rss.model.TimeSeriesComparisonWrapper
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TimeSeriesConditionalComparable, TSLocation, RssModelVariableConstants, Serializable

public class TimeSeriesComparisonWrapper extends Object implements TimeSeriesConditionalComparable, AsciiSerializable, RssModelVariableConstants, TSLocation

Title: Hec Java Development

Description: This is a simple wrapper class for an IndependentVariable object. This class is used in the Conditional comparison process to abstract the IndependantVariable from the IF-THEN-ELSE evaluation process.

Copyright: Copyright (c) 2003

Company:

See Also:
  • Constructor Details

    • TimeSeriesComparisonWrapper

      public TimeSeriesComparisonWrapper()
      Only used for AsciiDeserialzation
    • TimeSeriesComparisonWrapper

      public TimeSeriesComparisonWrapper(IndependentVariable iv, ElementOp resOp)
  • Method Details

    • getReferencedStateVariables

      public void getReferencedStateVariables(List svlist)
      adds all StateVariables refereced by this object
    • getIndependentVariable

      public IndependentVariable getIndependentVariable()
    • setElementOp

      public void setElementOp(ElementOp resOp)
    • getTSDataSet

      public TSDataSet getTSDataSet(boolean isInput)
      Description copied from interface: TSLocation
      returns the input or output TSData set currently associated with this loation
      Specified by:
      getTSDataSet in interface TSLocation
    • getTSRecordProxy

      public TSRecordProxy getTSRecordProxy(String name, int varId)
      finds a TSRecordProxy for the given variable id and name in this TSLocation
    • updateTSProxyList

      public void updateTSProxyList()
    • addTSRecordProxy

      public TSRecordProxy addTSRecordProxy(String name, int varId)
      Adds a TSRecordProxy by model variable Id
    • getActiveTSRecordProxies

      public List getActiveTSRecordProxies(List list, int iotype)
    • getElementDependencies

      public void getElementDependencies(RssSystem sys, Element sourceElem, List<Element> lastElemList)
      Examine all conditional values referenced in this conditional item to determine any elements referenced by conditional value tests. Add these referenced elements to the given List. Elements should only be added once to the given list.
      Parameters:
      lastElemList - list to contain the referenced elements
    • getTSContainer

      public doubleArrayContainer getTSContainer(String name, int vid)
      returns the double array containing the time series of the record according to variable id and name. returns null if unsuccessful
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compare

      public int compare(RunTimeStep rts, TimeSeriesComparisonWrapper tscw)
      Compares this TimeSeriesComparisonWrapper against another. If both values are equal, 0 is returned. If this value is greater than the passed in value then 1 is returned, and if this value is less than the passed in value then -1 is returned.
      Parameters:
      rts -
      tscw -
      Returns:
    • compare

      public int compare(RunTimeStep rts, double constValue)
      Specified by:
      compare in interface TimeSeriesConditionalComparable
      Parameters:
      rts - A particular step in time that the comparision must be made.
      constValue - The constant value to compare to the timeseries value at the time pointed to by the run time step.
    • getTimeSeriesValue

      public double getTimeSeriesValue(RunTimeStep rts)
    • compare

      public int compare(RunTimeStep rts, TimeSeriesConditionalComparable tscc)
      Specified by:
      compare in interface TimeSeriesConditionalComparable
    • 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
      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
      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