Package hec.rss.model
Class ReservoirElement
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.Element
hec.rss.model.ReservoirElement
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,TSLocation,OperationsElement,PlotVariableConstants,ReleaseElement,AltInputReportInfc,RssModelVariableConstants,RssReturnStatusConstants,RssTSLocation,hec.watershed.res.model.PlottableObject,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
public class ReservoirElement
extends Element
implements Cloneable, ReleaseElement, AltInputReportInfc, OperationsElement
Composite element that represents a simple reservoir.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final intstatic final Stringstatic final intstatic final intFields inherited from class hec.rss.model.Element
DIVERSION_ELEMENT_ID, DIVERTEDOUTLET_ELEMENT_ID, INFLOW, JUNCTION_ELEMENT_ID, OUTFLOW, REACH_ELEMENT_ID, RESERVIOR_ELEMENT_IDFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTFields inherited from interface hec.rss.model.PlotVariableConstants
PV_ELEVATION, PV_REGULATED_FLOW, PV_REGULATED_STAGE, PV_STORAGE, PV_TOTAL_RELEASE, PV_UNREGULATED_FLOW, PV_UNREGULATED_STAGEFields inherited from interface hec.rss.model.RssModelVariableConstants
CUMLOC_OUTPUT_DATA, GRPID_DIVERSION, GRPID_JUNCTION, GRPID_REACH, GRPID_RESERVOIR, HINDCAST_IDS, HOLDOUT_OUTPUT_DATA, INPUT_DATA, OUTPUT_DATA, PULSE_OUTPUT_DATA, UNREG_OUTPUT_DATA, VID_ADJPARAM_FLOW, VID_CAPACITY_FACTOR, VID_CTRLOUT_HINDFLW, VID_CTRLOUT_RELEASE, VID_DAM_LEAK, VID_DAM_RELEASE, VID_DIV_FLOW, VID_DIV_FLOW_ROUTED, VID_DIV_HINDFLW, VID_DIV_RELEASE, VID_DIVOUT_FLOW, VID_DIVOUT_FLOW_ROUTED, VID_ENERGYREQUIRED_TSINPUT, VID_FIRST, VID_FOREBAY_ELEV, VID_FOREBAY_HEADLOSS, VID_GATE_OPENING, VID_GATE_PERCENTOPEN, VID_JUNC_ELEV, VID_JUNC_FLOW_CUMLOC, VID_JUNC_FLOW_DIV, VID_JUNC_FLOW_HOLD, VID_JUNC_FLOW_IN, VID_JUNC_FLOW_LIMIT, VID_JUNC_FLOW_LOCAL, VID_JUNC_FLOW_PULSE, VID_JUNC_FLOW_REG, VID_JUNC_FLOW_UNREG, VID_JUNC_FLOW_VIOL, VID_JUNC_HINDFLOW, VID_JUNC_INFLOW, VID_JUNC_INFLOW_LOCAL_TOTAL, VID_JUNC_STAGE, VID_JUNC_STAGE_LIMIT, VID_JUNC_STAGE_REG, VID_JUNC_STAGE_UNREG, VID_JUNC_STAGE_VIOL, VID_LAST, VID_NODE_FLOW, VID_NODE_HINDFLW, VID_NODE_HINDSTG, VID_NODE_KNOWNFLOW, VID_NODE_STAGE, VID_OPCTRL_CONSTRAINTID, VID_OPCTRL_DECISION, VID_OPCTRL_MAXLIMIT, VID_OPCTRL_MINLIMIT, VID_OPCTRL_RULEID, VID_OPCTRL_ZONEID, VID_OPRULE_FLOW_SPACE, VID_OPRULE_MAX, VID_OPRULE_MAX_STAGE, VID_OPRULE_MIN, VID_OPRULE_MIN_STAGE, VID_OPRULE_PRIORITY, VID_OPRULE_ROUTE_LAG, VID_OPRULE_ROUTE_MAXOFFSET, VID_OPRULE_ROUTE_MINOFFSET, VID_OPRULE_SPEC, VID_OPRULE_STOR_BAL, VID_OPRULE_STOR_BAL_INDEX, VID_OPRULE_VIOL_ELEV, VID_OPRULE_VIOL_FLOW, VID_OPRULE_VIOL_STAGE, VID_OPRULE_VIOL_STOR, VID_OPRULE_WQCD_ELEV, VID_OPRULEFL_CUMLOC, VID_OPRULETS_TSINPUT, VID_OPSET_ACTIVEZONE, VID_OPSET_GC_ELEV, VID_OPSET_GC_STOR, VID_OPSET_KNOWNZONEELEV, VID_OPSET_PROJECTEDELEV, VID_OPSET_ZONEELEV, VID_OPSET_ZONESTOR, VID_OUTGRP_RELEASE, VID_POOL_AREA, VID_POOL_ELEV, VID_POOL_ELEV_EST, VID_POOL_ELEVROC, VID_POOL_EVAP, VID_POOL_FLOWINTOSTOR, VID_POOL_HINDELEV, VID_POOL_HINDSTOR, VID_POOL_HOLDOUT, VID_POOL_INFLOW, VID_POOL_INPUTEVAP, VID_POOL_NETINFLOW, VID_POOL_OUTFLOW, VID_POOL_OUTFLOW_EST, VID_POOL_SEEP, VID_POOL_STOR, VID_PULSE_BACKQ, VID_PULSE_PULSEQ, VID_PUMP_FLOWAVG, VID_PUMP_VOL, VID_PUMPRULE_FLOWAVG, VID_PUMPRULE_FLOWAVG_CAP, VID_PUMPRULE_FLOWINST, VID_PUMPRULE_FLOWINST_CAP, VID_PUMPRULE_HOURS, VID_PUMPRULE_HOURS_CAP, VID_PUMPRULE_NUMPUMP, VID_PUMPRULE_NUMPUMP_CAP, VID_PUMPRULE_UNITHOURS, VID_PUMPRULE_UNITHOURS_CAP, VID_PUMPRULE_VOL, VID_PUMPRULE_VOL_CAP, VID_PWR_CAPABILITY, VID_PWR_EFF, VID_PWR_ENGYGEN, VID_PWR_ENGYPATTERN, VID_PWR_ENGYPERGEN, VID_PWR_ENGYPERREQD, VID_PWR_ENGYREQD, VID_PWR_ENGYVIOL, VID_PWR_FLWPWR, VID_PWR_HDPWR, VID_PWR_HYDLSS, VID_PWR_MAXCAPACITY, VID_PWR_PER_BALGEN, VID_PWR_PER_GCGEN, VID_PWR_PER_MINPUMPGEN, VID_PWR_PER_MINRELGEN, VID_PWR_PER_POWGEN, VID_PWR_PER_PUMPGEN, VID_PWR_PLNTFAC, VID_PWR_PWRCAP, VID_PWR_REQUIRED, VID_PWR_SPILL, VID_PWR_VIOL, VID_RCH_SEEP, VID_REACH_FLOW_CUMLOC, VID_REACH_FLOW_IN, VID_REACH_FLOW_REG, VID_REACH_FLOW_UNREG, VID_RES_GCRELEASE, VID_RES_HOLDOUT, VID_RES_RELEASE, VID_SPILL_FLOW, VID_SPILL_HINDFLOW, VID_STATE_VAR, VID_STATE_VAR_HIND, VID_TAIL_ELEV, VID_UNCTOUT_FLOW, VID_UNCTOUT_HINDFLW, VID_WA_ACCOUNT_DEMAND, VID_WA_ACCOUNT_INFLOW, VID_WA_CHARGES, VID_WA_CREDIT, VID_WA_CURRENT_MAX_VOLUME, VID_WA_CURRENT_VOLUME, VID_WA_HINDSTOR, VID_WA_LOSSES, VID_WA_PUMPBACK, VID_WA_RULE_DEMAND, VID_WA_SURPLUS, VID_WA_TRANSFERS, WQID_OFFSETFields inherited from interface hec.rss.model.RssReturnStatusConstants
RTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidoverride add node to make connections to child elementsvoidcalcPeriodRelAndGenLimits(RunTimeStep rts, int istep, int periodSteps, ReservoirLimitSet limitSet, OpRule callingRule) Calculate the release, release volume, and energy generation limits for the remaing part of the given period.doublecalcPumpbackVolCap(RunTimeStep rts, int istep, int periodSteps) calculates the maximum pump volume for all active pump rules at the given time step and starting elevation over the given perioddoublecalcPumpbackVolMin(RunTimeStep rts, int istep, int periodSteps) voiddumps all ts proxiesclone()Creates a new object of the same class as this object.intcomputeForecast(RunTimeWindow rtw, int computeFlag) performs a compute over the runtime window using forecast logicintcomputes a single forecast time stepintcomputeHindcast(RunTimeWindow rtw, int computeFlag) performs a compute over the runtime window using hindcast logicintcomputes a single hindcast time stepintafter regular computations are complete for a time step, pumpback operation moves a volume of water from the source reservoir to this reservoirvoidPerforms a deep copy that clones data of the given ReservoirElement.createDivertedOutlet(RssNode node0, RssNode node1, Vector ptVec, double tol) Adds a new DivertedOutlet to the reservoirprotected ElementHotstartStatefindRuleRefsFor(Element elem) find all the OpRuleRefs that have their release element is elem.findRulesFor(Element elem) getActiveTSProxies(Vector vec, int iotype) returns a vector of required input, or generated output TSRecordProxies used in the current alternative default implementation elements, assume all records are activegetConditionalBlockRefs(int opid, List<ConditionalBlockRef> condList) Adds all ConditionalBlockRefs utilized by the Operation Set matching the given OpSet Id.Returns a list of Model Variables that are used in the default plot required by PlottableObject interfacegetDownstreamNodes(List vec) returns all downstream nodes in the node list does not recurse through child elementsgetDownstreamRuleNodes(int opid) gets a Hashtable of nodes used by downstream operating ruls for the given OpSetvoidgetDownstreamRules(int opid, List rulevec) adds downstream rule references to the given vectordoublereturns elevation for the given RunTimeStep at the upstream end of this element.getElementOp(boolean init) doublegetExpectedNetInflowVol(RunTimeStep rts, int steps, OpRule rule) compute the expected net inflow volume that will occur between the end of the current time step and the end of number of steps given considering the net inflow as well as expected rule related releases other than the given rule.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.special handling for reservoir element, overrides default implementation in Element.javaDeprecated.doubleintgetModelVariables(Vector variableList) returns a vector of all plottable model variables for reservoirsgetNextChildName(String classname, String basename) returns the next unique name for the given child element class and base nameReturns a list of power plants attached to this reservoir element.doublereturns elevation for one time step prior to the given RunTimeStep at the upstream end of this element.Pump[]getPumps()Returns a list of pumps attached to this reservoir element.hec.map.WorldPtReturns a reservoir reference pointhec.map.WorldRegionReturns the reservoir regionreturns the flow TSRecordProxies from upstream nodes on this element and any TSRecordProxies required by active operating rulesprotected booleanretrieve the reservoir op from the network's dbf fileadds all ReservoirOutletElement children to the given List.longreturns the reservoir system operations object that is assiciated with this reservoir if one exists.protected booleanretrieve the reservoir sys op from the network's dbf filereturn the name of the ReservoirOp object associated with this elementReturns a List of RuleConnectivityRef objects identifying all rule references to other objects in the network.voidAdds rule references to the given vector.getStorageZone(int opid, int zoneid) gets a specific storage zone based on the zone id.voidgetStorageZones(int opid, List<StorageZone> zoneList) Adds storage zones to the given listgets the stream segment vectorprotected doubleSums up all energy generation for the given time step that can be used to contribute to system hydropowerprotected doublegetSystemGenerationLimits(RunTimeStep rts, SystemHydropowerRule rule, double[] max, double[] min, int n, int nsteps) Calculates the maximum energy this reservoir could generate to satisfy the given system hydropower rule over the given time step.doublegetSystemGenerationLimits2(RunTimeStep rts, OpRule rule, double[] max, double[] min, int istep, int periodSteps) temp method called by SystemPowerRule evaluate method to get generation limitsvoidgetSystemHydropowerOpRules(int opid, ArrayList ruleList) adds SystemHydropwerOpRule references to the given ArrayListdoublegetTotalCompositeRelease(double elev) get the total composite release for the elevationoverrides Element.getTSRecordProxies to also get proxies from active reservoir operationsgetTSRecords(ModelVariable plotVariable, Vector proxyList, Vector runs) gets the TSRecordProxies that match the requested model variablesbooleanhasDownstreamGoals(int opid) returns true if the current operating rule set has any downstream goalsbooleandetermines whether reservoir has one or more power plantsbooleanhasPump()determines whether reservoir has one or more power plantsbooleandetermines whether reservoir has one or more WQ Control DevicesbooleanimportFrom(ReservoirImport ri, StringBuffer results) import the Physical and Operations elments from riintInitializes adjustable parameter values over forecast time windowbooleanPrepares this run for post processing in the ResSim Simulation Module.booleaninitialize(RunTimeWindow rtw) initialize prior to a computeintprotected voidinitTSVals(int istep) set estimated values for un-initialized time series variables at the given time stepvoidoutputReport(AlternativeInputReport report, org.jdom.Element elem) Alternative Input Report Interface for data.booleanSet state of elements and nodes in preparation of cumulative local flow compute.booleansets up reservoir to act as a headwater for holdout flow computationsbooleanprepPulseRoutingCompute(int outletId) sets up reservoir to act as a headwater for pulse routing computationsbooleanSet state of elements and nodes in preparation of regulated flow compute.booleanprepUnregulatedFlowCompute(boolean disableDivertedOutlets) Set state of elements and nodes in preparation of unregulated flow compute.voidreconnectDivertedOutlet(RssNode node1) voidvoidrestoreElementState(int stateid) restore the state of the element and its function matching the given identifiervoidsaveElementState(int stateid) save the current state of the element and its function with the given identifiervoidvoidsetEvaporationTS(boolean useTS) Deprecated.booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetLabelPosition(int p) voidsetName()over-ride setName to echo rename to child elements - not implemented yetvoidsetReferencePt(hec.map.WorldPt wpt) voidsetRegion(hec.map.WorldRegion reg) Sets the reservoir regionvoidsetReservoirOp(ReservoirOp resOp) Sets a ReservoirOp to the dbf.voidsetReservoirProjectId(long id) voidsetReservoirSysOp(ReservoirSysOp resSysOp) Sets a ReservoirSysOpvoidsetStorageFunction(Storage storage) voidsetStreamSegmentVector(Vector<StreamSegment> segvec) sets the stream segment vectorvoidcalled just before ascii serializationvoidsetUseOverridesForThisReservoir(boolean set) Sets the flag used in the Release Overrides that tells the override options to use another alternative's info to override this reservoir's outletsvoidtoString()over toString to return name - check if ok to move to namedtypevoidupdateDecisions(RunTimeStep rts, int iteration) make operations decisions for this time stepvoidrecalculates segments based on associated nodes and current stream alignmentvoidoverrides Element.updateTSProxyList to also get proxies from active reservoir operationsbooleanGets the flag used in the Release Overrides that tells the override options to use another alternative's info to override this reservoir's outletsMethods inherited from class hec.rss.model.Element
addChildElement, addChildElementAt, addNode, applyHindcastData, calcSeepageFlow, children, cleanupFromDeSerialization, cleanVectors, computeForecastStep, computeSubStepFlow, copyInto, dispose, dispose, downStreamFrom, findAdjParam, findAdjParam, findElement, getActiveStateVariables, getChildElementAt, getChildElementCount, getComputedTSRecordProxies, getComputedTSRecordProxies_old, getDisplayName, getDownstreamElements, getDownstreamNode, getElement, getElementByName, getElementsByClass, getElementType, getElementTypeId, getElementVector, getForebayHeadLoss, getForecastEquation, getFullName, getFunction, getHindcastDataList, getHindcastEquation, getKeyStringForObject, getLinkedElementList, getNode, getNodeCount, getNodeDir, getNodeDirVector, getNodeVector, getObjectForKeyString, getObjectTypeId, getObsDataVector, getOutletElementList, getOutletElementList, getOutputBPart, getParent, getPlotTypeDirectory, getPlotTypeFile, getPlotTypeNames, getPlotTypes, getReleaseElements, getSystem, getTailwaterElevationObjects, getTopParent, getTopParentName, getTSDataSet, getTSRecordProxy, getTSRecordProxy, getTSRecords, getUnitSystem, getUpstreamNode, getUpstreamNodes, getWaterControlDevice, hasElementsOfClass, hasForebayHeadLoss, hasWaterControlDevice, importObservedData, initForecastLoop, initHindcastLoop, isActive, isDirty, isDisposed, isNodeComputed, readData, removeAllChildElements, removeChild, removeNode, resetParentElement, restoreHotstartState, saveHotstartState, setActive, setActive, setDirty, setFunction, setHasForebayHeadLoss, setName, setObsDataVector, setParentElement, setWaterControlDevice, updateWQTSProxyList, writeDataMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setValid, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.rss.model.OperationsElement
getChildElementAt, getChildElementCount, getElementType, getIndex, getName, getSystem, getUnitSystem
-
Field Details
-
KNOWN_STORAGE
- See Also:
-
KNOWN_ELEVATION
- See Also:
-
KNOWN_RELEASE
- See Also:
-
KNOWN_EVAPORATION
- See Also:
-
KNOWN_SPILL
- See Also:
-
ELEVATION
-
STORAGE
-
EVAPORATION
- See Also:
-
SPILL
- See Also:
-
STORAGE_ID
public static final int STORAGE_ID- See Also:
-
DNSTRM_ID
public static final int DNSTRM_ID- See Also:
-
DAM_ID
public static final int DAM_ID- See Also:
-
OUTLET_ID
public static final int OUTLET_ID- See Also:
-
SPILL_ID
public static final int SPILL_ID- See Also:
-
TAILWATER_ID
public static final int TAILWATER_ID- See Also:
-
-
Constructor Details
-
ReservoirElement
public ReservoirElement() -
ReservoirElement
-
-
Method Details
-
initTSVals
protected void initTSVals(int istep) set estimated values for un-initialized time series variables at the given time step- Overrides:
initTSValsin classElement- Parameters:
istep-
-
setVerticalDatumSettings
-
getVerticalDatumSettings
- Specified by:
getVerticalDatumSettingsin interfaceOperationsElement- Returns:
-
getEffectiveElev
returns elevation for the given RunTimeStep at the upstream end of this element. Considers any "forebay" head loss associated with this and all parent elements For the first implementation, this method will only work for reservoirs and their child elements- Overrides:
getEffectiveElevin classElement- Returns:
- double elevation or RMAConst.UNDEF_DOUBLE if elevation data not available
-
getPrevEffectiveElev
returns elevation for one time step prior to the given RunTimeStep at the upstream end of this element. Considers any "forebay" head loss associated with this and all parent elements For the first implementation, this method will only work for reservoirs and their child elements- Overrides:
getPrevEffectiveElevin classElement- Returns:
- double elevation or RMAConst.UNDEF_DOUBLE if elevation data not available
-
getFlowContolTSRecordProxies
special handling for reservoir element, overrides default implementation in Element.java- Overrides:
getFlowContolTSRecordProxiesin classElement
-
getReservoirOutletElements
adds all ReservoirOutletElement children to the given List. If the given list is null, a new ArrayList is created.- Parameters:
list-- Returns:
- the given or newly created list filled with ReservoirOutletElement
-
getPowerPlants
Returns a list of power plants attached to this reservoir element. The list is guaranteed to be non null and of size 0 if there are no power plants on this reservoir.- Returns:
- an array of PowerPlant objects.
-
getPumps
Returns a list of pumps attached to this reservoir element. The list is guaranteed to be non null and of size 0 if there are no pumps on this reservoir.- Returns:
- an array of PowerPlant objects.
-
getRequiredTSRecordProxies
returns the flow TSRecordProxies from upstream nodes on this element and any TSRecordProxies required by active operating rules- Overrides:
getRequiredTSRecordProxiesin classElement
-
getRuleConnectivityRefs
Returns a List of RuleConnectivityRef objects identifying all rule references to other objects in the network.- Overrides:
getRuleConnectivityRefsin classElement- Returns:
- ArrayList RuleConnectivityRef objects
-
getGuideCurveStorage
-
saveElementState
public void saveElementState(int stateid) save the current state of the element and its function with the given identifier- Overrides:
saveElementStatein classElement- Parameters:
stateid- identifier for the state
-
restoreElementState
public void restoreElementState(int stateid) Description copied from class:Elementrestore the state of the element and its function matching the given identifier- Overrides:
restoreElementStatein classElement- Parameters:
stateid- identifier for the state
-
createHotstartState
- Overrides:
createHotstartStatein classElement
-
updateDecisions
make operations decisions for this time step- Specified by:
updateDecisionsin interfaceReleaseElement- Parameters:
rts-iteration-
-
initForecastOperations
Initializes adjustable parameter values over forecast time window- Specified by:
initForecastOperationsin interfaceReleaseElement
-
getCompositeRelease
- Specified by:
getCompositeReleasein interfaceOperationsElement
-
getTotalCompositeRelease
public double getTotalCompositeRelease(double elev) get the total composite release for the elevation -
getModelVariables
returns a vector of all plottable model variables for reservoirs- Specified by:
getModelVariablesin interfacehec.watershed.res.model.PlottableObject- Overrides:
getModelVariablesin classElement
-
hasPump
public boolean hasPump()determines whether reservoir has one or more power plants- Returns:
- true if there is at least one power plant
-
useOverridesForThisReservoir
public boolean useOverridesForThisReservoir()Gets the flag used in the Release Overrides that tells the override options to use another alternative's info to override this reservoir's outlets- Returns:
- boolean if true, uses overrides on this reservoir
-
setUseOverridesForThisReservoir
public void setUseOverridesForThisReservoir(boolean set) Sets the flag used in the Release Overrides that tells the override options to use another alternative's info to override this reservoir's outlets- Parameters:
set- true, uses overrides on this reservoir
-
hasPowerPlant
public boolean hasPowerPlant()determines whether reservoir has one or more power plants- Returns:
- true if there is at least one power plant
-
hasWaterControlDeviceOnRes
public boolean hasWaterControlDeviceOnRes()determines whether reservoir has one or more WQ Control Devices- Returns:
- true if there is at least one WQ Control Device
-
getWaterControlDevicesOnRes
-
getDefaultModelVariables
Returns a list of Model Variables that are used in the default plot required by PlottableObject interface- Specified by:
getDefaultModelVariablesin interfacehec.watershed.res.model.PlottableObject- Overrides:
getDefaultModelVariablesin classElement- Returns:
- list of ModelVariable objects
-
getTSRecords
gets the TSRecordProxies that match the requested model variables- Specified by:
getTSRecordsin interfacehec.watershed.res.model.PlottableObject- Overrides:
getTSRecordsin classElement
-
setupForSerialization
public void setupForSerialization()Description copied from class:Elementcalled just before ascii serialization- Overrides:
setupForSerializationin classElement
-
updateSegments
public void updateSegments()recalculates segments based on associated nodes and current stream alignment -
getStreamSegmentVector
gets the stream segment vector -
setStreamSegmentVector
sets the stream segment vector -
setReservoirProjectId
public void setReservoirProjectId(long id) -
getReservoirProjectId
public long getReservoirProjectId() -
getNextDivertedOutletName
-
getNextControlledOutletName
-
getNextUncontrolledOutletName
-
getNextWaterControlDeviceName
-
getNextOutletGroupName
-
getNextPumpName
-
getNextPowerPlantName
-
getNextReversiblePumpName
-
setDefaultWaterAccount
-
getDefaultWaterAccount
-
getNextChildName
returns the next unique name for the given child element class and base name -
getDivertedOutlets
-
createDivertedOutlet
public DivertedOutletElement createDivertedOutlet(RssNode node0, RssNode node1, Vector ptVec, double tol) Adds a new DivertedOutlet to the reservoir -
reconnectDivertedOutlet
-
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 ReservoirElement. This method is used by the reservoir editor. -
initialize
initialize prior to a compute- Overrides:
initializein classElement
-
initForPostProcessing
Prepares this run for post processing in the ResSim Simulation Module. This routing sets up all data model connectivity, but does not load time series arrays.- Overrides:
initForPostProcessingin classElement- Returns:
- RTN_NOPROBLEM if successful
-
prepRegulatedFlowCompute
public boolean prepRegulatedFlowCompute()Set state of elements and nodes in preparation of regulated flow compute. For regulated flow the child elements are used. The nodes computed by the child element functions must be set active. -
prepCumLocFlowCompute
public boolean prepCumLocFlowCompute()Set state of elements and nodes in preparation of cumulative local flow compute. -
prepUnregulatedFlowCompute
public boolean prepUnregulatedFlowCompute(boolean disableDivertedOutlets) Set state of elements and nodes in preparation of unregulated flow compute. For unregulated flow the child elements are not used, the reservoir element acts like a junction. The nodes computed by the child element functions must be set inactive. -
prepHoldoutCompute
public boolean prepHoldoutCompute()sets up reservoir to act as a headwater for holdout flow computations -
prepPulseRoutingCompute
public boolean prepPulseRoutingCompute(int outletId) sets up reservoir to act as a headwater for pulse routing computations -
setName
public void setName()over-ride setName to echo rename to child elements - not implemented yet -
computeHindcast
Description copied from class:Elementperforms a compute over the runtime window using hindcast logic- Overrides:
computeHindcastin classElement
-
computeHindcastStep
Description copied from class:Elementcomputes a single hindcast time step- Overrides:
computeHindcastStepin classElement
-
computeForecast
Description copied from class:Elementperforms a compute over the runtime window using forecast logic- Overrides:
computeForecastin classElement
-
computeForecastStep
Description copied from class:Elementcomputes a single forecast time step- Overrides:
computeForecastStepin classElement
-
initPumpbackStep
-
computePumpbackStep
after regular computations are complete for a time step, pumpback operation moves a volume of water from the source reservoir to this reservoir- Parameters:
rts-- Returns:
-
resetOpsIds
public void resetOpsIds() -
getResOpName
return the name of the ReservoirOp object associated with this element -
setReservoirOp
Sets a ReservoirOp to the dbf. Removes any ReservoirOp that may exist -
getReservoirOp
-
getReservoirOpFromDbf
protected boolean getReservoirOpFromDbf()retrieve the reservoir op from the network's dbf file- Returns:
-
setReservoirSysOp
Sets a ReservoirSysOp -
getReservoirSysOp
returns the reservoir system operations object that is assiciated with this reservoir if one exists. -
getReservoirSysOpFromDbf
protected boolean getReservoirSysOpFromDbf()retrieve the reservoir sys op from the network's dbf file- Returns:
-
addNode
override add node to make connections to child elements -
getStorageElement
-
getStorageFunction
- Specified by:
getStorageFunctionin interfaceOperationsElement- Returns:
-
setStorageFunction
-
setEvaporationTS
Deprecated.sets evaporation to time series input if useTS is true -
getRegion
public hec.map.WorldRegion getRegion()Returns the reservoir region -
getReferencePt
public hec.map.WorldPt getReferencePt()Returns a reservoir reference point- Overrides:
getReferencePtin classElement
-
setReferencePt
public void setReferencePt(hec.map.WorldPt wpt) -
setRegion
public void setRegion(hec.map.WorldRegion reg) Sets the reservoir region -
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 classElement- 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- Overrides:
setFieldObjectin classElement- 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
-
getGatedFlowFunction
Deprecated.to be removed -
toString
over toString to return name - check if ok to move to namedtype -
hasDownstreamGoals
public boolean hasDownstreamGoals(int opid) returns true if the current operating rule set has any downstream goals -
getDownstreamNodes
returns all downstream nodes in the node list does not recurse through child elements- Overrides:
getDownstreamNodesin classElement
-
getDownstreamRuleNodes
gets a Hashtable of nodes used by downstream operating ruls for the given OpSet -
getStorageZones
Adds storage zones to the given list- Parameters:
opid-zoneList-
-
getStorageZone
gets a specific storage zone based on the zone id.- Parameters:
opid-zoneid-- Returns:
-
getRules
Adds rule references to the given vector. -
getConditionalBlockRefs
public List<ConditionalBlockRef> getConditionalBlockRefs(int opid, List<ConditionalBlockRef> condList) Adds all ConditionalBlockRefs utilized by the Operation Set matching the given OpSet Id. This method is intended to provide the list of ConditionalBlockRef that may be utilized during a compute in order to evaluate the logical connectivity within the reservoir network. This method may be called within or outside a compute.- Parameters:
opid- id number for an existing OpSetcondList- list object to hold the set of ConditionalBlockRef objects found by this method- Returns:
- the list of ConditionalBlockRef objects
-
getDownstreamRules
adds downstream rule references to the given vector -
getSystemHydropowerOpRules
adds SystemHydropwerOpRule references to the given ArrayList -
getSystemEnergyGeneration
Sums up all energy generation for the given time step that can be used to contribute to system hydropower- Parameters:
rts- time step- Returns:
- energy generated in MWH
-
getSystemGenerationLimits
protected double getSystemGenerationLimits(RunTimeStep rts, SystemHydropowerRule rule, double[] max, double[] min, int n, int nsteps) Calculates the maximum energy this reservoir could generate to satisfy the given system hydropower rule over the given time step.- Parameters:
rts- time steprule- calling system hydropower rule- Returns:
- energy generation capacity in MWH
-
getSystemGenerationLimits2
public double getSystemGenerationLimits2(RunTimeStep rts, OpRule rule, double[] max, double[] min, int istep, int periodSteps) temp method called by SystemPowerRule evaluate method to get generation limits- Parameters:
rts-rule-max-min-istep-periodSteps-- Returns:
-
calcPeriodRelAndGenLimits
public void calcPeriodRelAndGenLimits(RunTimeStep rts, int istep, int periodSteps, ReservoirLimitSet limitSet, OpRule callingRule) Calculate the release, release volume, and energy generation limits for the remaing part of the given period. Results are stored in the given ReleaseLimitSet.- Parameters:
rts-istep-periodSteps-callingRule-
-
calcPumpbackVolCap
calculates the maximum pump volume for all active pump rules at the given time step and starting elevation over the given period- Parameters:
rts-istep-periodSteps-- Returns:
- the max pump volume in ac-ft or m^3
-
calcPumpbackVolMin
-
getExpectedNetInflowVol
compute the expected net inflow volume that will occur between the end of the current time step and the end of number of steps given considering the net inflow as well as expected rule related releases other than the given rule. Net inflow is the net inflow to the reservoir less minimum or specified release from the reservoir.- Parameters:
rts- current time stepsteps- number of steps into the future to lookrule- the rule needing this estimate- Returns:
- expected volume in acft or m^3
-
clearTSProxyList
public void clearTSProxyList()dumps all ts proxies- Overrides:
clearTSProxyListin classElement
-
updateTSProxyList
public void updateTSProxyList()overrides Element.updateTSProxyList to also get proxies from active reservoir operations- Overrides:
updateTSProxyListin classElement
-
getActiveTSProxies
returns a vector of required input, or generated output TSRecordProxies used in the current alternative default implementation elements, assume all records are active- Overrides:
getActiveTSProxiesin classElement
-
getTSRecordProxies
overrides Element.getTSRecordProxies to also get proxies from active reservoir operations- Overrides:
getTSRecordProxiesin classElement
-
importFrom
import the Physical and Operations elments from ri- Parameters:
ri-results- put the import results- Returns:
- true if the import was sucessful
-
setLabelPosition
public void setLabelPosition(int p) -
getLabelPosition
public int getLabelPosition() -
findRulesFor
-
findRuleRefsFor
find all the OpRuleRefs that have their release element is elem.- Parameters:
elem- the release element to look for.- Returns:
- the list of OpRuleRefs for elem.
-
outputReport
Description copied from interface:AltInputReportInfcAlternative Input Report Interface for data.- Specified by:
outputReportin interfaceAltInputReportInfc
-
getElementOp
- Specified by:
getElementOpin interfaceOperationsElement- Returns:
-
getElementOp
- Specified by:
getElementOpin interfaceOperationsElement
-