Package hec.rss.model

Class PrescribedOpRule

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

public class PrescribedOpRule extends OpRule implements AsciiSerializable, Serializable, Cloneable
User specified reservoir regulation on a flexible time schedule. Operations supported include: Set Release Set Gate Set Elevation Target Set Release relative to Inflow Elevation Change over period Hold Release Hold Gate. Operations are provided in as as time specific list. The start time is required for all operations. End times are optionally specified. The rule does not need to specify operation of the entire simulation time window.
See Also:
  • Constructor Details

    • PrescribedOpRule

      public PrescribedOpRule()
    • PrescribedOpRule

      public PrescribedOpRule(String name)
  • Method Details

    • initializeCompute

      public boolean initializeCompute()
      Description copied from class: OpRule
      prep for compute
      Overrides:
      initializeCompute in class OpRule
    • 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
    • evaluateLimits

      public void evaluateLimits(RunTimeStep rts, int iteration)
      calculates the limiting value for this rule for the given time step.
      Overrides:
      evaluateLimits in class OpRule
      Parameters:
      rts -
      iteration -
    • getFlowValue

      public double getFlowValue(RunTimeStep rts, PrescribedOpItem opItem)
    • getOpValue

      public OpValue getOpValue(RunTimeStep rts)
      Overrides:
      getOpValue in class OpRule
    • 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
    • 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
    • clone

      public Object clone()
      Description copied from class: RssTSLocationObject
      clone method
      Overrides:
      clone 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
    • getOpItemList

      public List<PrescribedOpItem> getOpItemList()
      Returns:
    • setOpItemList

      public void setOpItemList(List<PrescribedOpItem> data)
      Parameters:
      data -
    • getOperators

      public String[] getOperators()
      Returns:
    • 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
    • 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