Package hec.rss.model

Class DecisionSch

java.lang.Object
hec.rss.model.DecisionSch
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, AltInputReportInfc, Serializable, Cloneable

public class DecisionSch extends Object implements AsciiSerializable, Cloneable, AltInputReportInfc
Decision Schedule for Reservoir Operation Sets. Each reservoir OpSet object will have one DecisionSch object that defines the frequency at which operating decisions are made.
See Also:
  • Field Details

    • INTERVALTYPE_STEP

      public static final int INTERVALTYPE_STEP
      Interval Option for decisions every time step
      See Also:
    • INTERVALTYPE_REGULAR

      public static final int INTERVALTYPE_REGULAR
      Interval Option for decisions on a regular interval
      See Also:
    • INTERVALTYPE_WEEKLYSCH

      public static final int INTERVALTYPE_WEEKLYSCH
      Interval Option for decisions on a weekly schedule
      See Also:
    • REGULARTYPE_1HR

      public static final int REGULARTYPE_1HR
      Regular Interval Option for decisions every hour
      See Also:
    • REGULARTYPE_2HR

      public static final int REGULARTYPE_2HR
      Regular Interval Option for decisions every 2 hours
      See Also:
    • REGULARTYPE_3HR

      public static final int REGULARTYPE_3HR
      Regular Interval Option for decisions every 3 hours
      See Also:
    • REGULARTYPE_4HR

      public static final int REGULARTYPE_4HR
      Regular Interval Option for decisions every 4 hours
      See Also:
    • REGULARTYPE_6HR

      public static final int REGULARTYPE_6HR
      Regular Interval Option for decisions every 6 hours
      See Also:
    • REGULARTYPE_8HR

      public static final int REGULARTYPE_8HR
      Regular Interval Option for decisions every 8 hours
      See Also:
    • REGULARTYPE_12HR

      public static final int REGULARTYPE_12HR
      Regular Interval Option for decisions every 12 hours
      See Also:
    • REGULARTYPE_DAILY

      public static final int REGULARTYPE_DAILY
      Regular Interval Option for decisions once per day
      See Also:
    • REGULARTYPE_WEEKLY

      public static final int REGULARTYPE_WEEKLY
      Regular Interval Option for decisions once per week
      See Also:
    • REGULARTYPE_MONTHLY

      public static final int REGULARTYPE_MONTHLY
      Regular Interval Option for decisions once per month
      See Also:
  • Constructor Details

    • DecisionSch

      public DecisionSch()
      Default Constructor
  • Method Details

    • clone

      public Object clone()
      Clone method (used primarily when object is copied for editing)
      Overrides:
      clone in class Object
      Returns:
      a clone of itself
    • getCurrentDecisionInterval

      public int getCurrentDecisionInterval()
      Gets the current Decision Interval chosen
      Returns:
      Integer index to combobox
    • setCurrentDecisionInterval

      public void setCurrentDecisionInterval(int interval)
      Sets the current Decision Interval chosen
      Parameters:
      interval - Integer index to combobox selection
    • getRegularType

      public int getRegularType()
      Returnd Regular Type index
      Returns:
      Integer index for combobox selection
    • setRegularType

      public void setRegularType(int type)
      Sets Regular Type index for combobox selection
      Parameters:
      type - Integer index
    • getStartHour

      public int getStartHour()
      Returns the Starting Hour index
      Returns:
      Integer index for combobox selection
    • setStartHour

      public void setStartHour(int hour)
      Sets the Starting Hour index for combobox selection
      Parameters:
      hour - Integer index
    • getStartDOW

      public int getStartDOW()
      Returns Starting Day of the Week index
      Returns:
      Integer index for combobox selection
    • setStartDOW

      public void setStartDOW(int startDOW)
      Sets Starting Day of the Week index for combobox
      Parameters:
      startDOW - Integer for combobox selection
    • getStartDOM

      public int getStartDOM()
      Returns Starting Day of the Month index
      Returns:
      Integer index for combobox
    • setStartDOM

      public void setStartDOM(int startDOM)
      Sets the Starting Day of Month
      Parameters:
      startDOM - integer Day of Month
    • getWeeklySchedule

      public Vector[] getWeeklySchedule()
      Returns Weekly Schedule table cell values
      Returns:
      Vector[] cell values
    • setWeeklySchedule

      public void setWeeklySchedule(Vector[] sch)
      Sets Weekly Schedule table values
      Parameters:
      sch - Vector[] cell values
    • clearRegularInterval

      public void clearRegularInterval()
      Clears all indexes and sets them to original default state
    • clearWeeklySchedule

      public void clearWeeklySchedule()
      Clears Weekly Schedule table
    • isDecisionStep

      public boolean isDecisionStep(RunTimeStep rts)
      returns pre-determined flag indicating whether the given time step is a decision step.
      Parameters:
      rts -
      Returns:
    • determineDecisionStep

      public boolean determineDecisionStep(RunTimeStep rts)
      Determines whether the given time step is a decision step
      Parameters:
      rts - time step to test
      Returns:
      true if operating decisions are to be made.
    • getNumDecisionSteps

      public int getNumDecisionSteps(RunTimeStep rts)
      return the precalculated number of decision steps for this time step
      Parameters:
      rts -
      Returns:
    • calcNumDecisionSteps

      public int calcNumDecisionSteps(RunTimeStep rts)
      calculates and returns the number of time steps in the current decision interval - assume this method is called when isDecisionStep() has returned true.
      Parameters:
      rts -
      Returns:
    • getMaxNumDecisionSteps

      public int getMaxNumDecisionSteps(int dt)
      return the maximum number of decision steps. calculate if necessary
      Parameters:
      dt -
      Returns:
    • calcMaxNumDecisionSteps

      public int calcMaxNumDecisionSteps(int dt)
      calculates and returns the max number of time steps in the decision schedule
      Parameters:
      dt - time step in seconds
      Returns:
    • getLastDayOfMonth

      public static int getLastDayOfMonth(HecTime hecTime)
      return the last day for the calendar month
    • initializeCompute

      public boolean initializeCompute(RunTimeWindow rtw)
      prepare for compute
      Parameters:
      rtw -
      Returns:
    • 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
      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
      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