Package hec.rss.model

Class DownstreamCntrlOpRule

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

public class DownstreamCntrlOpRule extends DownstreamOpRule implements DemandRuleInf
Reservoir release as a function of a downstream control limit
See Also:
  • Constructor Details

    • DownstreamCntrlOpRule

      public DownstreamCntrlOpRule()
    • DownstreamCntrlOpRule

      public DownstreamCntrlOpRule(String name)
    • DownstreamCntrlOpRule

      public DownstreamCntrlOpRule(String name, int dnstrmNodeIndex)
  • Method Details

    • evaulatePerformance

      public void evaulatePerformance(RunTimeWindow rtw)
      post processing immediately following compute to evalute performance
      Overrides:
      evaulatePerformance in class DownstreamOpRule
      Parameters:
      rtw -
    • 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 ReleaseFuncOpRule
    • evaluateLimits

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

      public void setOpValue(RunTimeStep rts, OpValue ov)
    • 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 ReleaseFuncOpRule
      Parameters:
      rts -
      Returns:
    • isLocalRule

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

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

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

      public int getMaxRoutingSteps()
    • getPriorityLimit

      public OpValue getPriorityLimit()
    • evaluateRule

      public OpValue evaluateRule(RunTimeStep rts, double initialValue, int iteration, boolean evalDownstream)
      evaluates the rule with or without activation of downstream decision
      Overrides:
      evaluateRule in class OpRule
      Parameters:
      rts - current time step
      initialValue - initial flow value
      evalDownstream - flag to either perform or not perform downstream decision
      Returns:
      OpValue representing the limit created by this rule
    • initializeCompute

      public boolean initializeCompute()
      called before compute by OpController
      Overrides:
      initializeCompute in class ReleaseFuncOpRule
      Returns:
    • initForPostProcessing

      public boolean initForPostProcessing()
      Prepares this run for post processing in the ResSim Simulation Module. This routing sets up all data model connectivity, but does not load time series arrays.
      Overrides:
      initForPostProcessing in class OpRule
      Returns:
      true if successful
    • setParentRuleIndex

      public void setParentRuleIndex(int i)
    • getParentRuleIndex

      public int getParentRuleIndex()
    • getDownstreamOp

      public DownstreamOp getDownstreamOp()
    • getParentRule

      public DownstreamOpRule getParentRule()
    • copyParentInto

      public void copyParentInto(DownstreamOpRule parentRule)
    • getRuleLimitType

      public int getRuleLimitType()
      get the limit type of this rule should be implemented by all subclasses of OpRule
      Overrides:
      getRuleLimitType in class ReleaseFuncOpRule
    • 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 DownstreamOpRule
    • getActiveTSRecordProxies

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

      public Object getFieldObject(Field fld)
      Description copied from class: ReleaseFuncOpRule
      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 DownstreamOpRule
      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 DownstreamOpRule
      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 ReleaseFuncOpRule
    • getWaterAccount

      public WaterAccount getWaterAccount()
      Description copied from interface: DemandRuleInf
      Gets the water account.
      Specified by:
      getWaterAccount in interface DemandRuleInf
      Overrides:
      getWaterAccount in class ReleaseFuncOpRule
      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
      Overrides:
      setWaterAccount in class ReleaseFuncOpRule
      Parameters:
      wa - the new water account
    • isPassThru

      public boolean isPassThru()
    • setPassThru

      public void setPassThru(boolean b)
    • setOperationType

      public void setOperationType(DownstreamCntrlOpRule.OperationType opType)
    • getOperationType

      public DownstreamCntrlOpRule.OperationType getOperationType()
    • setUpperLimitZone

      public void setUpperLimitZone(String zoneName)
    • getUpperLimitZone

      public String getUpperLimitZone()
    • setLowerLimitZone

      public void setLowerLimitZone(String zoneName)
    • getLowerLimitZone

      public String getLowerLimitZone()
    • setReRegAvgPeriod

      public void setReRegAvgPeriod(Double period)
    • getReRegAvgPeriod

      public Double getReRegAvgPeriod()
    • setPriority

      public void setPriority(RunTimeStep rts, double p)
      Overrides:
      setPriority in class OpRule
    • getPriority

      public double getPriority(RunTimeStep rts)
      Description copied from class: OpRule
      Get the rule priority value for the given time step. Highest priority is 0 (hard constraint), increasing value indicates lower priority. Priority invalid input: '<' 0 indicates the rule is not active for this time step.
      Overrides:
      getPriority in class OpRule
      Parameters:
      rts -
      Returns:
      rule priority value