Package hec.rss.model

Class TandemOpRule

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

public class TandemOpRule extends OpRule implements DemandRuleInf
Title: General CWMS Project Description: Copyright: Copyright (c) 2000 Company: RMA
See Also:
  • Constructor Details

    • TandemOpRule

      public TandemOpRule()
      default constructor
    • TandemOpRule

      public TandemOpRule(String name)
      constructor that accepts a rule name
      Parameters:
      name -
  • Method Details

    • getElementDependencies

      public void getElementDependencies(List elemList)
      adds elements upon which the current rule depends to the given list. Does not add the element that owns this rule.
      Overrides:
      getElementDependencies in class OpRule
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      add the time series record proxies associated current compute
      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
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      do nothing
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • setBalanceStor

      public void setBalanceStor(RunTimeStep rts, double balstor, double releaseVol)
    • setRuleLimit

      public void setRuleLimit(RunTimeStep rts, double limitval)
    • getOpValue

      public OpValue getOpValue(RunTimeStep rts)
      returns the operation value based on the previously computed rule limit. As of 12/04
      Overrides:
      getOpValue in class OpRule
      Parameters:
      rts -
      Returns:
    • isLocalRule

      public boolean isLocalRule()
      returns true if this rule is local to a reservoir
      Overrides:
      isLocalRule in class OpRule
      Returns:
    • isDnstrmRule

      public boolean isDnstrmRule()
      returns true if this rule is a downstream rule
      Overrides:
      isDnstrmRule in class OpRule
      Returns:
    • isPerAvgRule

      public boolean isPerAvgRule()
      returns true if this rule uses period average evaluation
      Overrides:
      isPerAvgRule in class OpRule
      Returns:
      default is false
    • setReservoirIndex

      public void setReservoirIndex(int resIndex)
      accessor method to set the reservoir index
      Parameters:
      resIndex - reservoir index
    • getReservoirIndex

      public int getReservoirIndex()
      accessor method that returns the reservoir index
      Returns:
      reservoir index
    • getTandemReservoir

      public ReservoirElement getTandemReservoir()
      returns the downstream Reservoir for which this rule operates. Assumes that the getSystem() returns a valid RssSystem and that the reservoirIndex is a valid ReservoirElement index.
      Returns:
    • getRuleLimitType

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

      public boolean initializeCompute()
      called at the begining of the computation
      Overrides:
      initializeCompute in class OpRule
      Returns:
      true if successful
    • evaluateRule

      public OpValue evaluateRule(RunTimeStep rts, double initialValue, int iteration, boolean evalDownstream)
      compares the intial value to rule constraints and returns the adjusted value
      Overrides:
      evaluateRule in class OpRule
    • 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
      Overrides:
      outputReport in class OpRule
    • getWaterAccount

      public WaterAccount getWaterAccount()
      Description copied from interface: DemandRuleInf
      Gets the water account.
      Specified by:
      getWaterAccount in interface DemandRuleInf
      Returns:
      the water account
    • setWaterAccount

      public void setWaterAccount(WaterAccount wa)
      Description copied from interface: DemandRuleInf
      Sets the water account.
      Specified by:
      setWaterAccount in interface DemandRuleInf
      Parameters:
      wa - the new water account