Package hec.rss.model
Class DiversionOp
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.DiversionOp
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,ElementOp,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
- See Also:
-
Field Summary
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDuplicateOpSet(int oid, String name) Create a new OpSet by cloning and existing OpSetaddNewOpSet(String name) instatiates a new OpSet with the given name and adds it to the table.clone()Creates a new object of the same class as this object.voidcopyInto(DiversionOp dop) Performs a deep copy that clones data of the given reservoirOp.deleteConditionalBlock(int cbIndex) voiddeleteControllerReferences(int ctrlId) voiddeleteOpRule(OpRule rule) voiddeterminePhysicalLimits(OpController opController, RunTimeStep rts) booleandoesOpSetExist(String opSetName) Tests to see if a given operation set exists.returns the active operations set for the current computevoidgetActiveTSRecordProxies(Vector vec, int iotype) add the time series record proxies associated with the active operation set to the given vectorgetConditionalBlock(int index) getConditionalBlock(String name) getController(int controllerIndex) getController(Element re) getControllerConstraintNameByID(int cnstrntid) getControllerRuleNameByID(int ruleid) Returns a vector of controllersgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.intgetOperationSet(int opsetId) getOperationSet(String name) String[]Returns a Vector of reservoir operation setsgetRules()Returns a vector all rules in this ReservoirOp controllersvoidadds all rules to the given vectorintbooleanprepare for computations - to be called after setting the active operations setbooleanisRuleActive(OpRule rule, RunTimeStep rts) voidprintErrorMessage(String message) voidprintMessage(String message) voidremoveOpSet(int id) voidremoveOpSet(OpSet opset) voidsetActiveOpSet(int id) sets the active operations set for the current computevoidvoidsetDiversionElement(DiversionElement diversionElement) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidupdateDecisions(RunTimeStep rts, int iteration) process decision making for the given time stepvoidHave top level controller update the TSRecordProxy set for itself and all child controllers and rulesMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
DiversionOp
public DiversionOp()
-
-
Method Details
-
updateDecisions
process decision making for the given time step- Parameters:
rts-iteration-
-
initializeCompute
prepare for computations - to be called after setting the active operations set -
doesOpSetExist
Tests to see if a given operation set exists. Returns true if it does, otherwise false.- Parameters:
opSetName- - name of the operation set to search for
-
addNewOpSet
instatiates a new OpSet with the given name and adds it to the table. -
removeOpSet
public void removeOpSet(int id) -
removeOpSet
-
setActiveOpSet
public void setActiveOpSet(int id) sets the active operations set for the current compute -
setDefaultOpSetActive
public void setDefaultOpSetActive() -
getActiveOpSet
returns the active operations set for the current compute- Specified by:
getActiveOpSetin interfaceElementOp- Returns:
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classNamedType- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
getControllers
Returns a vector of controllers- Specified by:
getControllersin interfaceElementOp
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin classNamedType- 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
-
getController
- Specified by:
getControllerin interfaceElementOp- Returns:
-
getDiversionElement
- Returns:
-
getOperationsElement
- Specified by:
getOperationsElementin interfaceElementOp- Returns:
-
getUnitSystem
public int getUnitSystem()- Specified by:
getUnitSystemin interfaceElementOp- Returns:
-
setDiversionElement
- Parameters:
diversionElement-
-
getGmtOffset
public int getGmtOffset()- Specified by:
getGmtOffsetin interfaceElementOp
-
getOperationSet
- Specified by:
getOperationSetin interfaceElementOp- Parameters:
opsetId-- Returns:
-
getOperationSet
- Specified by:
getOperationSetin interfaceElementOp- Parameters:
name-- Returns:
-
getOperationSets
Returns a Vector of reservoir operation sets- Specified by:
getOperationSetsin interfaceElementOp- Returns:
-
getController
- Specified by:
getControllerin interfaceElementOp- Parameters:
controllerIndex-- Returns:
-
newController
- Specified by:
newControllerin interfaceElementOp- Returns:
-
deleteControllerReferences
public void deleteControllerReferences(int ctrlId) - Specified by:
deleteControllerReferencesin interfaceElementOp- Parameters:
ctrlId-
-
printErrorMessage
- Specified by:
printErrorMessagein interfaceElementOp
-
printMessage
- Specified by:
printMessagein interfaceElementOp
-
getControllerRuleNameByID
- Specified by:
getControllerRuleNameByIDin interfaceElementOp- Parameters:
ruleid-- Returns:
-
getControllerConstraintNameByID
- Specified by:
getControllerConstraintNameByIDin interfaceElementOp- Parameters:
cnstrntid-- Returns:
-
getController
- Specified by:
getControllerin interfaceElementOp- Parameters:
re-- Returns:
-
determinePhysicalLimits
- Specified by:
determinePhysicalLimitsin interfaceElementOp- Parameters:
opController-rts-
-
getOpSetTable
- Specified by:
getOpSetTablein interfaceElementOp- Returns:
-
getOperationSetNames
- Returns:
-
addDuplicateOpSet
Create a new OpSet by cloning and existing OpSet- Parameters:
oid- ID of the existing OpSet to clonename- name to assign to the new OpSet- Returns:
- newly created OpSet
-
getConditionalBlock
- Parameters:
name-- Returns:
-
createNewConditionalBlock
- Parameters:
name-- Returns:
-
getConditionalBlocks
- Returns:
-
deleteConditionalBlock
- Parameters:
cBlock-
-
deleteConditionalBlock
-
deleteOpRule
- Specified by:
deleteOpRulein interfaceElementOp- Parameters:
rule-
-
getRules
Returns a vector all rules in this ReservoirOp controllers -
getRules
adds all rules to the given vector -
isRuleActive
- Specified by:
isRuleActivein interfaceElementOp- Parameters:
rule-rts-- Returns:
-
clone
Creates a new object of the same class as this object.
It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
constructor is called. -
copyInto
Performs a deep copy that clones data of the given reservoirOp. This method is used by the reservoir editor. -
getConditionalBlock
- Specified by:
getConditionalBlockin interfaceElementOp- Parameters:
index-- Returns:
-
getActiveTSRecordProxies
add the time series record proxies associated with the active operation set to the given vector -
updateTSProxyList
public void updateTSProxyList()Have top level controller update the TSRecordProxy set for itself and all child controllers and rules
-