public class ReservoirOp extends AbstractReservoirOp implements RssReturnStatusConstants, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static int |
NOEVAL_DNSTRM |
static int |
NOEVAL_GC |
static int |
NOEVAL_LOCAL |
static int |
NOEVAL_PERAVG |
static int |
NOEVAL_ROC |
static int |
NOEVAL_RULES |
_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTRTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEM| Constructor and Description |
|---|
ReservoirOp() |
| Modifier and Type | Method and Description |
|---|---|
OpSet |
addDuplicateOpSet(int oid,
java.lang.String name)
Duplicates an operation set identified by the id and gives it the name
identified by name.
|
OpSet |
addNewOpSet(java.lang.String name)
instatiates a new OpSet with the given name and adds it to the table.
|
void |
clearTSProxyList()
dumps all ts proxies
|
java.lang.Object |
clone()
Creates a new object of the same class as this object.
|
int |
computeHindcastStep(RunTimeStep rts) |
int |
computePumpbackStep(RunTimeStep rts)
after regular computations are complete for a time step, pumpback operation
moves a volume of water from the source reservoir to this reservoir
|
void |
copyInto(ReservoirOp rop)
Performs a deep copy that clones data of the given reservoirOp.
|
ConditionalBlock |
createNewConditionalBlock(java.lang.String name) |
void |
deletDownstreamRulesForParent(int dindex,
int pindex) |
ConditionalBlock |
deleteConditionalBlock(ConditionalBlock cb) |
ConditionalBlock |
deleteConditionalBlock(int cbIndex) |
void |
deleteControllerReferences(int ctrlId)
loops over OpSets, removing all references to a deleted controller
|
void |
deleteOpRule(OpRule rule) |
void |
deleteSystemHydropowerRulesForParent(int pindex) |
void |
deleteTandemSysOpRulesForParent(int pindex)
delete all TandemSysOpRules related to the given parent TandemOpParent index
|
void |
determinePhysicalLimits(OpController controller,
RunTimeStep rts) |
boolean |
doesOpSetExist(java.lang.String opSetName)
Tests to see if a given operation set exists.
|
void |
evaluateRuleLimits(RunTimeStep timestep,
int k) |
OpSet |
getActiveOpSet()
returns the active operations set for the current compute
|
java.util.List |
getActiveRules(RunTimeStep rts,
double elev,
java.util.List list)
returns the list of rules active for the given time step and elevation
|
java.util.List |
getActiveRules(RunTimeStep rts,
java.util.List list) |
void |
getActiveTSRecordProxies(java.util.Vector vec,
int iotype)
add the time series record proxies associated with the active operation set to the given vector
|
ConditionalBlock |
getConditionalBlock(int index) |
ConditionalBlock |
getConditionalBlock(java.lang.String name)
Returns a Conditional Block with the specified name.
|
java.util.List |
getConditionalBlocks() |
OpController |
getController()
Returns the primary controller for the reservoir
|
OpController |
getController(Element relElem)
Returns a controller by release element
|
OpController |
getController(int id)
Returns a controller by index
|
java.lang.String |
getControllerConstraintNameByID(int cnstrntid)
given the combined controller-constraint id that is saved to the OpController constraint
array, return the appropriate constraint name.
|
OpController |
getControllerForElement(Element elem)
returns the OpController associated with the given element, or null
|
java.lang.String[] |
getControllerNames()
Returns a list of controller names
|
java.lang.String |
getControllerRuleNameByID(int ruleid)
given the combined controller-rule id that is saved to the OpController decision
array, return the appropriate rule name.
|
java.util.Vector |
getControllers()
Returns a vector of controllers
|
void |
getDownstreamRuleNodes(int opid,
java.util.Hashtable nodetable)
adds all downstream nodes used as downstream control points to the given hashtable
|
void |
getDownstreamRules(int opid,
java.util.List ruleVec)
adds all downstream rules to the given vector
|
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
int |
getGmtOffset() |
double |
getGuideCurveStorage(RunTimeStep rts) |
double |
getInactiveStorage(RunTimeStep rts) |
int |
getNumDecisionSteps()
returns the number of decision steps in the current decision calculation
should be called only during a compute
|
OpSet |
getOperationSet(int id)
Returns an operation set by ID
|
OpSet |
getOperationSet(java.lang.String name)
Returns an operation set by name
|
java.lang.String[] |
getOperationSetNames()
Returns a list of reservoir operation set names
|
java.util.Vector |
getOperationSets()
Returns a Vector of reservoir operation sets
|
java.util.Vector |
getRequiredTSRecordProxies(java.util.Vector v)
returns the flow TSRecordProxies from upstream nodes on this element
and any TSRecordProxies required by active operating rules
|
ReservoirElement |
getReservoirElement()
returns the parent reservoir element
|
java.util.Vector |
getRules()
Returns a vector all rules in this ReservoirOp controllers
|
void |
getRules(int opid,
java.util.List ruleVec)
adds all downstream rules to the given vector
|
void |
getStorageZones(int opid,
java.util.List<StorageZone> zoneList)
adds all storage zones from the given opid to the given list
|
void |
getSystemHydropowerOpRules(int opid,
java.util.ArrayList ruleList)
adds all SystemHydropowerOpRules rules to the given ArrayList
|
int |
getUnitSystem() |
boolean |
hasDownstreamGoals(int opid)
returns true if any rules referenced in the given opset have downstream operating goals
|
boolean |
initializeCompute(RunTimeWindow rtw)
prepare for computations - to be called after setting the active operations set
|
int |
initPumpbackStep(RunTimeStep rts) |
boolean |
isRuleActive(OpRule rule,
RunTimeStep rts)
returns true if the given rule is active (included in the zone rules of the
current OpSet for this ReservoirOp).
|
boolean |
loadData()
this method should be called from the concrete class's
loadData method to ensure that the object references
get loaded correctly.
|
void |
loadSystemDownstreamRules()
Copies the current data for all DownstreamCntrlOpRules from the master
rules held by the RssSystem
|
void |
loadSystemSystemHydropowerRules()
Copies the current data for all SystemHydropowerRules from the master
rules held by the RssSystem
|
OpController |
newController()
make all new controllers for from here to manage indexing
|
void |
printErrorMessage(java.lang.String str)
forward printErrorMessage to parent RssSystem if available
|
void |
printMessage(java.lang.String str)
forward printMessage to parent RssSystem if available
|
void |
removeOpSet(int id) |
void |
removeOpSet(OpSet opset) |
void |
resetId()
reset this Objects id to undefined so that when a
ReservoirOp is cloned and saved to the DataList, it
won't overwrite the original object
|
void |
restoreFunctionState(int stateid)
restore the state of the rule matching the given
identifier - default behavior is to do nothing
|
boolean |
restoreHotstartState(HotstartState parent) |
void |
saveFunctionState(int stateid)
save the current state of the rule with the given
identifier - default behavior is to do nothing
|
void |
saveHotstartState(HotstartState parent,
int stateId) |
void |
setActiveOpSet(int id)
sets the active operations set for the current compute
|
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setReservoirElement(ReservoirElement res)
sets the parent reservoir element
|
void |
storeSystemDownstreamRules()
Saves the current data for all DownstreamCntrlOpRules to the master
rules held by the RssSystem, adding new rules and deleting rules no
longer used.
|
void |
storeSystemHydropowerRules() |
void |
storeTandemSysOpRules() |
int |
testOperationStep(RunTimeStep rts,
int iteration,
int flags,
OpRule excludeRule)
perform operation decision making without committing to the result.
|
int |
testOperationStep(RunTimeStep rts,
int iteration,
int flags,
OpRule excludeRule,
double elev)
perform operation decision making without committing to the result.
|
void |
updateDecisions(RunTimeStep rts,
int iteration)
process decision making for the given time step
|
void |
updateTSProxyList()
Have top level controller update the TSRecordProxy set for itself and all
child controllers and rules
|
boolean |
useRecursiveModifiedTest()
Indicates whether object uses recursive modified testing.
|
copyInto, copyInto, DataChanged, loadId, lockedaddObjectReference, addObserver, addPropertyChangeListener, addPropertyChangeListener, decrementRefCnt, delete, fireDataChangeEvent, getCommonDataListContainer, getData, getDataList, getId, getLocked, getObjectReferences, getParent, getRefCnt, incrementRefCnt, isLoaded, locked, reload, removeObjectReference, removeObjectReference, removeObserver, removePropertyChangeSupport, removePropertyChangeSupport, save, setDataList, setDescription, setId, setLocked, setModified, setName, setParentaddModifiableListener, compareTo, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, removeModifiableListener, rename, set, setIgnoreModifiedEvents, setIndex, setValid, toString, updateaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserversequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getName, isModifiedpublic static final int NOEVAL_LOCAL
public static final int NOEVAL_DNSTRM
public static final int NOEVAL_PERAVG
public static final int NOEVAL_GC
public static final int NOEVAL_ROC
public static final int NOEVAL_RULES
public java.lang.String getControllerRuleNameByID(int ruleid)
public java.lang.String getControllerConstraintNameByID(int cnstrntid)
public void evaluateRuleLimits(RunTimeStep timestep, int k)
public void updateDecisions(RunTimeStep rts, int iteration)
rts - iteration - public int initPumpbackStep(RunTimeStep rts)
public int computePumpbackStep(RunTimeStep rts)
rts - public ConditionalBlock deleteConditionalBlock(ConditionalBlock cb)
public ConditionalBlock deleteConditionalBlock(int cbIndex)
public ConditionalBlock createNewConditionalBlock(java.lang.String name)
public ConditionalBlock getConditionalBlock(int index)
public ConditionalBlock getConditionalBlock(java.lang.String name)
name - the name of the conditional block to retrievepublic java.util.List getConditionalBlocks()
public java.util.Vector getRequiredTSRecordProxies(java.util.Vector v)
public double getGuideCurveStorage(RunTimeStep rts)
public double getInactiveStorage(RunTimeStep rts)
public void saveHotstartState(HotstartState parent, int stateId)
public boolean restoreHotstartState(HotstartState parent)
public void saveFunctionState(int stateid)
stateid - identifier for the statepublic void restoreFunctionState(int stateid)
stateid - identifier for the statepublic void deletDownstreamRulesForParent(int dindex,
int pindex)
public void deleteSystemHydropowerRulesForParent(int pindex)
public void deleteTandemSysOpRulesForParent(int pindex)
pindex - public void loadSystemDownstreamRules()
public void loadSystemSystemHydropowerRules()
public void storeSystemHydropowerRules()
public void storeTandemSysOpRules()
public void storeSystemDownstreamRules()
public int getNumDecisionSteps()
public boolean isRuleActive(OpRule rule, RunTimeStep rts)
public java.lang.Object clone()
clone in class AbstractReservoirOppublic void clearTSProxyList()
public void updateTSProxyList()
public void getActiveTSRecordProxies(java.util.Vector vec,
int iotype)
public OpSet addDuplicateOpSet(int oid, java.lang.String name)
public void printErrorMessage(java.lang.String str)
public void printMessage(java.lang.String str)
public int computeHindcastStep(RunTimeStep rts)
public int testOperationStep(RunTimeStep rts, int iteration, int flags, OpRule excludeRule)
public int testOperationStep(RunTimeStep rts, int iteration, int flags, OpRule excludeRule, double elev)
public void determinePhysicalLimits(OpController controller, RunTimeStep rts)
public boolean initializeCompute(RunTimeWindow rtw)
public void setActiveOpSet(int id)
public OpSet getActiveOpSet()
public java.util.List getActiveRules(RunTimeStep rts, java.util.List list)
public java.util.List getActiveRules(RunTimeStep rts, double elev, java.util.List list)
rts - elev - list - List to store rules in, may be nullpublic void setReservoirElement(ReservoirElement res)
public void deleteControllerReferences(int ctrlId)
public void deleteOpRule(OpRule rule)
public ReservoirElement getReservoirElement()
public void getDownstreamRuleNodes(int opid,
java.util.Hashtable nodetable)
public void getStorageZones(int opid,
java.util.List<StorageZone> zoneList)
public java.util.Vector getRules()
public void getRules(int opid,
java.util.List ruleVec)
public void getDownstreamRules(int opid,
java.util.List ruleVec)
public void getSystemHydropowerOpRules(int opid,
java.util.ArrayList ruleList)
public boolean hasDownstreamGoals(int opid)
public boolean doesOpSetExist(java.lang.String opSetName)
name - - name of the operation set to search forpublic OpSet addNewOpSet(java.lang.String name)
public void removeOpSet(int id)
public void removeOpSet(OpSet opset)
public boolean loadData()
AbstractDataObjectloadData in interface DataObjectloadData in class AbstractDataObjectpublic void copyInto(ReservoirOp rop)
public OpController getController()
public java.util.Vector getControllers()
public OpController getController(int id)
public OpController getController(Element relElem)
public OpController getControllerForElement(Element elem)
elem - public java.lang.String[] getControllerNames()
public java.util.Vector getOperationSets()
public java.lang.String[] getOperationSetNames()
public OpSet getOperationSet(java.lang.String name)
public OpSet getOperationSet(int id)
public OpController newController()
public void resetId()
public boolean useRecursiveModifiedTest()
useRecursiveModifiedTest in class NamedTypepublic int getGmtOffset()
getGmtOffset in class AbstractDataObjectpublic int getUnitSystem()
getUnitSystem in class AbstractDataObjectpublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class AbstractDataObjectfld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class AbstractDataObjectfld - The java field object representing the member field to be setfobj - The data to set in that field