Package hec.rss.model

Class DiversionDemandOpRule

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

public class DiversionDemandOpRule extends OpRule
Diversion OpRule to handle the original Diversion Rules
See Also:
  • Constructor Details

    • DiversionDemandOpRule

      public DiversionDemandOpRule()
    • DiversionDemandOpRule

      public DiversionDemandOpRule(String name)
      Parameters:
      name -
  • Method Details

    • setRule

      public void setRule(Rule rule)
      Parameters:
      rule -
    • getRule

      public Rule getRule()
    • initializeCompute

      public boolean initializeCompute()
      pass initialization command to diversion rule
      Overrides:
      initializeCompute in class OpRule
    • getRuleLimitType

      public int getRuleLimitType()
      get the limit type of this rule should be implemented by all subclasses of OpRule
      Overrides:
      getRuleLimitType in class OpRule
    • getReferencedStateVariables

      public void getReferencedStateVariables(List svlist)
      Description copied from class: OpRule
      adds StateVariables refereced by this rule to the given list
      Overrides:
      getReferencedStateVariables in class OpRule
      Parameters:
      svlist - unique list of state variables
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      default implementation calls the old method without the iteration argument 2007-12-27
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • evaluateRule

      public OpValue evaluateRule(RunTimeStep rts, double initialValue, int iteration, boolean evalDownstream)
      Description copied from class: OpRule
      compares the intial value to rule constraints and returns the adjusted value
      Overrides:
      evaluateRule in class OpRule
    • getOpValue

      public OpValue getOpValue(RunTimeStep rts)
      Overrides:
      getOpValue in class OpRule
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      Description copied from class: OpRule
      add the time series record proxies associated current compute. subclassses that over-ride this method should also call this method
      Overrides:
      getActiveTSRecordProxies in class OpRule
    • 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
      Overrides:
      updateTSProxyList in class OpRule
    • evaulatePerformance

      public void evaulatePerformance(RunTimeWindow rtw)
      post processing immediately following compute to evalute performance
      Overrides:
      evaulatePerformance in class OpRule
      Parameters:
      rtw -
    • clone

      public DiversionDemandOpRule clone()
      Description copied from class: RssTSLocationObject
      clone method
      Overrides:
      clone in class OpRule
    • getLimitType

      public int getLimitType()
      get the limit type, min, max, specified, demand
      Returns:
      the limit type
    • setLimitType

      public void setLimitType(int limitType)
      set the limit type, min, max, specified, demand.
      Parameters:
      limitType - the new limit type
    • 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 OpRule
      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 OpRule
      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