Package hec.rss.model

Class ReleaseFuncOpRule

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, TSLocation, DemandRuleInf, AltInputReportInfc, RssModelVariableConstants, RssReturnStatusConstants, RssTSLocation, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable
Direct Known Subclasses:
DownstreamOpRule, ReRegRule, WaterQualityOpRule

public class ReleaseFuncOpRule extends OpRule implements AsciiSerializable, Serializable, Cloneable, DemandRuleInf
Reservoir release as a function of other reservoir parameter
See Also:
  • Field Details

  • Constructor Details

    • ReleaseFuncOpRule

      public ReleaseFuncOpRule()
    • ReleaseFuncOpRule

      public ReleaseFuncOpRule(String name)
  • Method Details

    • getTargetTSRecordProxy

      public TSRecordProxy getTargetTSRecordProxy()
      returns the TSRecordProxy for the time series that is the target for this rule operation. Comparison of the target to the rule limit allows determination as to whether the rule was satisfied.
      Overrides:
      getTargetTSRecordProxy in class OpRule
    • updateByDemandScale

      public void updateByDemandScale(double scl)
      Overrides:
      updateByDemandScale in class OpRule
    • 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
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      calculates the limiting value for this rule for the given time step. as of 12/04
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • 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
    • getPatternContainer

      public PowerGenerationPatternContainer getPatternContainer()
    • setPatternContainer

      public void setPatternContainer(PowerGenerationPatternContainer pc)
    • 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)
      adds StateVariables refereced by this rule to the given list
      Overrides:
      getReferencedStateVariables in class OpRule
      Parameters:
      svlist - unique list of state variables
    • getRequiredTSRecordProxies

      public Vector getRequiredTSRecordProxies(Vector v)
      returns the TSRecordProxies required by independent variable proxies are only included if they are associated with elements that are not downstream of this reservoir - if they are downstream, then the dependency is accomodated by extending the iterationBlock in the ordering logic
      Overrides:
      getRequiredTSRecordProxies 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
    • getPeriod

      public int getPeriod()
      Period for Period Average Limit
      Returns:
      period
    • getStartingDay

      public int getStartingDay()
      Returns:
      starting day of period index for Period Average Limit
    • getActiveTSRecordProxies

      public Vector getActiveTSRecordProxies(Vector vec, int iotype)
      add the time series record proxies associated current compute
      Overrides:
      getActiveTSRecordProxies in class OpRule
    • initializeCompute

      public boolean initializeCompute()
      prep for compute
      Overrides:
      initializeCompute in class OpRule
    • getLargestLimitValue

      public double getLargestLimitValue()
    • getLimitValue

      public double getLimitValue(RunTimeStep rts)
    • evaluateRule

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

      public Object clone()
      Description copied from class: RssTSLocationObject
      clone method
      Overrides:
      clone in class OpRule
    • setIndependentVariable

      public void setIndependentVariable(IndependentVariable independentVariable)
    • getIndependentVariable

      public IndependentVariable getIndependentVariable()
    • setFunctionRelease

      public void setFunctionRelease(SeasonalPairedValues spv)
    • getFunctionRelease

      public SeasonalPairedValues getFunctionRelease()
    • getSeasonalRecord

      public SeasonalRecord getSeasonalRecord()
      rule is a function of date or date/time
    • setSeasonalRecord

      public void setSeasonalRecord(SeasonalRecord sr)
    • setTimeInterpolationType

      public void setTimeInterpolationType(int type)
      Type of interpolation of values in time
    • getTimeInterpolationType

      public int getTimeInterpolationType()
    • getLimitType

      public int getLimitType()
      returns the integer type of the limit: -1=Min, 1=Max
    • setLimitType

      public void setLimitType(int type)
      sets the limit type, must ether -1=Min or 1=Max, 0 Specified or 2 Demand
    • getFieldObject

      public Object getFieldObject(Field fld)
      Called just before ascii serialization. Prepares the paired data values by setting there dss record path names
      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
    • setPeriod

      public void setPeriod(int period)
    • setStartingDay

      public void setStartingDay(int startingDay)
    • 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
    • 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