Package hec.rss.model

Class Rule

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable
Direct Known Subclasses:
ConstantRelease, DiversionRule, FlowFunction, MinMax, MonthlyRelease, PoolElevation, ResGuideCurve, SpecifiedRelease, TimeSeries

public abstract class Rule extends RssTSLocationObject implements RssModelVariableConstants
See Also:
  • Field Details

    • _multiplier

      protected DayOfWeekMultiplier _multiplier
    • _timeOfDayMultiplier

      protected TimeOfDayMultiplier _timeOfDayMultiplier
    • _useDayOfWeekMultiplier

      protected boolean _useDayOfWeekMultiplier
    • _useTimeOfDayMultiplier

      protected boolean _useTimeOfDayMultiplier
    • _usePeriodAverageLimit

      protected boolean _usePeriodAverageLimit
    • _ruleType

      protected transient String _ruleType
    • _opController

      protected OpController _opController
  • Constructor Details

  • Method Details

    • updateByDemandScale

      public void updateByDemandScale(double scl)
    • setUseDemandScale

      public void setUseDemandScale(boolean b)
      set the flag to use demand scale for firm yield analysis
    • useDemandScale

      public boolean useDemandScale()
      return flag to use demand scale for firm yield analysis
      Returns:
      flag to use demand scale for firm yield analysis
    • setDemandScale

      public void setDemandScale(double scl)
      sets the demand scale used for firm yield analysis
    • getDemandScale

      public double getDemandScale()
      gets the demand scale used for firm yield analysis
    • getReferencedStateVariables

      public void getReferencedStateVariables(List svlist)
      adds all StateVariables refereced by diversion rule to the given List
    • updateTSProxyList

      public void updateTSProxyList()
      Have top level controller update the TSRecordProxy set for itself and all child controllers and rules
      Specified by:
      updateTSProxyList in class RssTSLocationObject
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      add the time series record proxies associated with the active operation set to the given vector
      Overrides:
      getActiveTSRecordProxies in class RssTSLocationObject
    • getUnitSystem

      public int getUnitSystem()
    • getValue

      public abstract double getValue(AdjustableParameter adjparam, RunTimeStep rts, double val)
      This method should be overriden
    • setTSLocationData

      public void setTSLocationData(String type, String name, String param)
    • readData

      public boolean readData(BufferedReader input)
    • writeData

      public boolean writeData(BufferedWriter out)
    • getRuleType

      public String getRuleType()
    • setRuleType

      protected void setRuleType(String ruleType)
    • initialize

      public boolean initialize()
    • initializeCompute

      public boolean initializeCompute()
      initialize TSRecordProxy for RssTSLocationObject
    • getTSRecordProxies

      public Vector getTSRecordProxies()
      Overrides:
      getTSRecordProxies in class RssTSLocationObject
    • toString

      public String toString()
      Overrides:
      toString in class NamedType
    • setController

      @Deprecated public void setController(Controller control)
      Deprecated.
    • getController

      @Deprecated public Controller getController()
      Deprecated.
      get the Rule Controller
      Returns:
      the Controller that owns the Rule
    • getSystem

      public RssSystem getSystem()
      Return the RssSystem of the Conroller
      Specified by:
      getSystem in class RssTSLocationObject
      Returns:
    • getGmtOffset

      public int getGmtOffset()
      get the GMT offset
      Returns:
      the GMT Offset
    • useDayOfWeekMultiplier

      public boolean useDayOfWeekMultiplier()
      Returns true if Day Of Week Multiplier to be used
    • setUseDayOfWeekMultiplier

      public void setUseDayOfWeekMultiplier(boolean tf)
      Set flag for Day Of Week Multiplier
    • setPeriodAverageLimit

      public void setPeriodAverageLimit(boolean tf)
    • getMultiplier

      public DayOfWeekMultiplier getMultiplier()
      Returns a new Day of Week Multiplier object
    • setMultiplier

      public void setMultiplier(DayOfWeekMultiplier mult)
      Sets the Day of Week Mulitplier
    • getDayOfWeekFactor

      public double getDayOfWeekFactor(RunTimeStep rts)
      Get multiplier factor for the day, accounting for day of the week
    • useTimeOfDayMultiplier

      public boolean useTimeOfDayMultiplier()
      Returns true if Time Of Day Multiplier to be used
    • usePeriodAverageLimit

      public boolean usePeriodAverageLimit()
    • setUseTimeOfDayMultiplier

      public void setUseTimeOfDayMultiplier(boolean tf)
      Set flag for Time Of Day Multiplier
    • setUsePeriodAverageLimit

      public void setUsePeriodAverageLimit(boolean tf)
      Set flag for period average limit use
      Parameters:
      tf -
    • getTimeOfDayMultiplier

      public TimeOfDayMultiplier getTimeOfDayMultiplier()
      Returns a Time Of Day Multiplier object
    • setTimeOfDayMultiplier

      public void setTimeOfDayMultiplier(TimeOfDayMultiplier mult)
      Sets the Time of Day Mulitplier
    • getTimeOfDayFactor

      public double getTimeOfDayFactor(RunTimeStep rts)
    • setOpController

      public void setOpController(OpController controller)
      Parameters:
      controller -
    • 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