Package hec.rss.model
Class DecisionSch
java.lang.Object
hec.rss.model.DecisionSch
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,AltInputReportInfc,Serializable,Cloneable
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intInterval Option for decisions on a regular intervalstatic final intInterval Option for decisions every time stepstatic final intInterval Option for decisions on a weekly schedulestatic final intRegular Interval Option for decisions every 12 hoursstatic final intRegular Interval Option for decisions every hourstatic final intRegular Interval Option for decisions every 2 hoursstatic final intRegular Interval Option for decisions every 3 hoursstatic final intRegular Interval Option for decisions every 4 hoursstatic final intRegular Interval Option for decisions every 6 hoursstatic final intRegular Interval Option for decisions every 8 hoursstatic final intRegular Interval Option for decisions once per daystatic final intRegular Interval Option for decisions once per monthstatic final intRegular Interval Option for decisions once per week -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalcMaxNumDecisionSteps(int dt) calculates and returns the max number of time steps in the decision scheduleintcalculates and returns the number of time steps in the current decision interval - assume this method is called when isDecisionStep() has returned true.voidClears all indexes and sets them to original default statevoidClears Weekly Schedule tableclone()Clone method (used primarily when object is copied for editing)booleanDetermines whether the given time step is a decision stepintGets the current Decision Interval chosengetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.static intgetLastDayOfMonth(HecTime hecTime) return the last day for the calendar monthintgetMaxNumDecisionSteps(int dt) return the maximum number of decision steps.intreturn the precalculated number of decision steps for this time stepintReturnd Regular Type indexintReturns Starting Day of the Month indexintReturns Starting Day of the Week indexintReturns the Starting Hour indexVector[]Returns Weekly Schedule table cell valuesbooleanprepare for computebooleanreturns pre-determined flag indicating whether the given time step is a decision step.voidoutputReport(AlternativeInputReport report, org.jdom.Element elem) Alternative Input Report Interface for data.voidsetCurrentDecisionInterval(int interval) Sets the current Decision Interval chosenbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetRegularType(int type) Sets Regular Type index for combobox selectionvoidsetStartDOM(int startDOM) Sets the Starting Day of MonthvoidsetStartDOW(int startDOW) Sets Starting Day of the Week index for comboboxvoidsetStartHour(int hour) Sets the Starting Hour index for combobox selectionvoidsetWeeklySchedule(Vector[] sch) Sets Weekly Schedule table values
-
Field Details
-
INTERVALTYPE_STEP
public static final int INTERVALTYPE_STEPInterval Option for decisions every time step- See Also:
-
INTERVALTYPE_REGULAR
public static final int INTERVALTYPE_REGULARInterval Option for decisions on a regular interval- See Also:
-
INTERVALTYPE_WEEKLYSCH
public static final int INTERVALTYPE_WEEKLYSCHInterval Option for decisions on a weekly schedule- See Also:
-
REGULARTYPE_1HR
public static final int REGULARTYPE_1HRRegular Interval Option for decisions every hour- See Also:
-
REGULARTYPE_2HR
public static final int REGULARTYPE_2HRRegular Interval Option for decisions every 2 hours- See Also:
-
REGULARTYPE_3HR
public static final int REGULARTYPE_3HRRegular Interval Option for decisions every 3 hours- See Also:
-
REGULARTYPE_4HR
public static final int REGULARTYPE_4HRRegular Interval Option for decisions every 4 hours- See Also:
-
REGULARTYPE_6HR
public static final int REGULARTYPE_6HRRegular Interval Option for decisions every 6 hours- See Also:
-
REGULARTYPE_8HR
public static final int REGULARTYPE_8HRRegular Interval Option for decisions every 8 hours- See Also:
-
REGULARTYPE_12HR
public static final int REGULARTYPE_12HRRegular Interval Option for decisions every 12 hours- See Also:
-
REGULARTYPE_DAILY
public static final int REGULARTYPE_DAILYRegular Interval Option for decisions once per day- See Also:
-
REGULARTYPE_WEEKLY
public static final int REGULARTYPE_WEEKLYRegular Interval Option for decisions once per week- See Also:
-
REGULARTYPE_MONTHLY
public static final int REGULARTYPE_MONTHLYRegular Interval Option for decisions once per month- See Also:
-
-
Constructor Details
-
DecisionSch
public DecisionSch()Default Constructor
-
-
Method Details
-
clone
Clone method (used primarily when object is copied for editing) -
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
Returns Weekly Schedule table cell values- Returns:
- Vector[] cell values
-
setWeeklySchedule
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
returns pre-determined flag indicating whether the given time step is a decision step.- Parameters:
rts-- Returns:
-
determineDecisionStep
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
return the precalculated number of decision steps for this time step- Parameters:
rts-- Returns:
-
calcNumDecisionSteps
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
return the last day for the calendar month -
initializeCompute
prepare for compute- Parameters:
rtw-- Returns:
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
outputReport
Description copied from interface:AltInputReportInfcAlternative Input Report Interface for data.- Specified by:
outputReportin interfaceAltInputReportInfc
-