public class Element extends NamedType implements RssTSLocation, RssReturnStatusConstants, hec.res.model.PlottableObject, PlotVariableConstants, RssModelVariableConstants
| Modifier and Type | Field and Description |
|---|---|
static int |
DIVERSION_ELEMENT_ID |
static int |
DIVERTEDOUTLET_ELEMENT_ID |
static int |
INFLOW |
static int |
JUNCTION_ELEMENT_ID |
static int |
OUTFLOW |
static int |
REACH_ELEMENT_ID |
static int |
RESERVIOR_ELEMENT_ID |
_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTRTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEMPV_ELEVATION, PV_REGULATED_FLOW, PV_REGULATED_STAGE, PV_STORAGE, PV_TOTAL_RELEASE, PV_UNREGULATED_FLOW, PV_UNREGULATED_STAGECUMLOC_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_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_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_ELEVROC, VID_POOL_EVAP, VID_POOL_HINDELEV, VID_POOL_HINDSTOR, VID_POOL_HOLDOUT, VID_POOL_INFLOW, VID_POOL_INPUTEVAP, VID_POOL_NETINFLOW, VID_POOL_OUTFLOW, 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_CURRENT_MAX_VOLUME, VID_WA_CURRENT_VOLUME, VID_WA_HINDSTOR, VID_WA_RULE_DEMAND| Constructor and Description |
|---|
Element() |
Element(RssSystem sys,
int idx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildElement(Element child) |
void |
addChildElementAt(Element child,
int idx) |
void |
addNode(RssNode node,
int idir)
adds a node to this element
|
void |
addNode(RssNode node,
int idir,
boolean makeTS)
Deprecated.
|
void |
applyHindcastData(HindcastData hd)
applies specific hindcast data for compute
|
double |
calcSeepageFlow(double flow) |
java.util.Enumeration |
children() |
void |
cleanupFromDeSerialization() |
void |
cleanVectors() |
void |
clearTSProxyList()
dumps all ts proxies
|
java.lang.Object |
clone()
clone method
|
int |
computeForecast(RunTimeWindow rtw,
int computeType)
performs a compute over the runtime window using forecast logic
|
int |
computeForecastStep(RunTimeStep rts)
computes a single forecast time step
|
int |
computeForecastStep(RunTimeStep rts,
double[] xt,
double[] et,
int tcount)
computes a single forecast time step with additional arguments
containing an elevation trace over the time step
|
int |
computeHindcast(RunTimeWindow rtw,
int computeType)
performs a compute over the runtime window using hindcast logic
|
int |
computeHindcastStep(RunTimeStep rts)
computes a single hindcast time step
|
double |
computeSubStepFlow(RunTimeStep rts,
double xt,
double et)
computes a single forecast time step with additional arguments
containing an elevation trace over the time step
|
void |
copyInto(Element re)
Performs a deep copy that clones data of the given Element.
|
void |
dispose()
dispose element and downstream nodes
|
void |
dispose(boolean disposeAllNodes)
Release references to other objects
|
boolean |
downStreamFrom(Element element)
This tests to see if this element is downstream of the passed in
parameter element.
|
AdjustableParameter |
findAdjParam(java.lang.String fname,
java.lang.String param) |
AdjustableParameter |
findAdjParam(java.lang.String elemName,
java.lang.String function,
java.lang.String param) |
Element |
findElement(java.lang.String name) |
java.util.List |
getActiveStateVariables(java.util.List svlist)
returns a vector of state variables in physical parts of element
|
java.util.Vector |
getActiveTSProxies(java.util.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 active
|
Element |
getChildElementAt(int i) |
int |
getChildElementCount() |
java.util.Vector |
getComputedTSRecordProxies_old()
Deprecated.
|
java.util.Vector |
getComputedTSRecordProxies()
requests vector of computed ts proxies from function
|
java.util.Vector |
getDefaultModelVariables()
return the list of Default ModelVariables to be used by the default plot
|
java.lang.String |
getDisplayName()
returns the the elements name appended to its parents full name
|
java.util.Vector |
getDownstreamElements(java.util.Vector vec)
returns all elements downstream of this element
|
RssNode |
getDownstreamNode()
returns the first downstream node in the node list
|
java.util.List |
getDownstreamNodes(java.util.List vec)
returns all downstream nodes in the node list
does not recurse through child elements
|
double |
getEffectiveElev(RunTimeStep rts)
returns elevation for the given RunTimeStep at the upstream end of this element.
|
Element |
getElement(int idx)
returns the child element with the given index, else returns null
|
Element |
getElementByName(java.lang.String name)
returns the child element with the given index, else returns null
|
java.util.Vector |
getElementsByClass(java.lang.Class eclass,
java.util.Vector vec)
returns a vector of child elements of the given class
or the elements function is of the given class
|
java.lang.String |
getElementType() |
int |
getElementTypeId()
get the unique element type Id.
|
java.util.Vector |
getElementVector()
provide access to the child element vector - use carefully!
|
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
java.util.Vector |
getFlowContolTSRecordProxies() |
ForebayHeadLoss |
getForebayHeadLoss()
returns the forebay head loss object, may return null
|
java.lang.String |
getFullName()
returns the the elements name appended to its parents full name
|
Function |
getFunction() |
void |
getHindcastDataList(java.util.Vector hvec)
compiles a vector of required hindcast data
|
java.lang.String |
getKeyStringForObject(java.lang.Object obj)
Takes a object of class Element, Function, RssNode, OpController, or OpRule
and returns a unique string identifying that object
pass request to RssSystem
This should be a TSLocation method
|
java.util.List<Element> |
getLinkedElementList(int direction)
return a new List
|
java.util.Vector |
getModelVariables(java.util.Vector variableList) |
RssNode |
getNode(int idx) |
int |
getNodeCount() |
int |
getNodeDir(int idx) |
java.util.Vector |
getNodeDirVector() |
java.util.Vector |
getNodeVector() |
java.lang.Object |
getObjectForKeyString(java.lang.String keystr)
Takes a key string and returns the object of class Element, Function,
Node, OpController, or OpRule
Pass request to RssSystem
This should be a TSLocation method
|
static int |
getObjectTypeId(ModelVariable mv)
get the element object type id for the object type
|
java.util.Vector |
getObsDataVector() |
java.util.Vector |
getOutletElementList() |
void |
getOutletElementList(java.util.Vector vec) |
Element |
getParent()
gets the immediate parent element
|
java.lang.String |
getPlotTypeDirectory() |
java.io.BufferedReader |
getPlotTypeFile(java.lang.String name)
given the name of a system PlotType return a File for it
|
java.util.Vector |
getPlotTypeNames() |
java.util.Vector |
getPlotTypes() |
double |
getPrevEffectiveElev(RunTimeStep rts)
returns elevation for one time step prior to the given RunTimeStep at the
upstream end of this element.
|
hec.map.WorldPt |
getReferencePt() |
java.util.List |
getReleaseElements(java.util.List vec)
Deprecated.
|
java.util.Vector |
getRequiredTSRecordProxies()
returns the flow TSRecordProxies from upstream nodes on this element
|
java.util.List |
getRuleConnectivityRefs()
Returns a List of RuleConnectivityRef objects identifying all rule
references to other objects in the network.
|
RssSystem |
getSystem()
get the parent system of this element
|
java.util.List |
getTailwaterElevationObjects(java.util.List list)
walks over all children and their functions collecting a list of
TailwaterElevation Objects
|
Element |
getTopParent()
gets the top most parent element
|
java.lang.String |
getTopParentName()
get the name of the top most parent element
|
TSDataSet |
getTSDataSet(boolean isInput)
returns the input or output TSData set currently associated with this loation
|
java.util.Vector |
getTSRecordProxies()
Deprecated.
|
TSRecordProxy |
getTSRecordProxy(int varid)
gets TSRecordProxy from its function or child elements
|
TSRecordProxy |
getTSRecordProxy(java.lang.String param)
Deprecated.
|
java.util.Vector |
getTSRecords(ModelVariable modelVariable,
java.util.Vector vec) |
java.util.Vector |
getTSRecords(ModelVariable modelVariable,
java.util.Vector vec,
java.util.Vector runs) |
int |
getUnitSystem() |
RssNode |
getUpstreamNode()
returns the first upstream node in the node list
|
boolean |
hasElementsOfClass(java.lang.Class eclass)
returns a vector of child elements of the given class
or the elements function is of the given class
|
boolean |
hasForebayHeadLoss()
returns true if the element has a forebay head loss object, otherwise
returns false.
|
boolean |
initForecastLoop(RunTimeWindow rtw)
initialize prior to Forecast computation loop
|
boolean |
initHindcastLoop(RunTimeWindow rtw)
initialize prior to hindcast computation loop
|
boolean |
initialize(RunTimeWindow rtw)
initialize prior to a compute
|
boolean |
isActive()
returns whether element is active for computation
|
boolean |
isDirty()
returns whether element is dirty and needs to be recomputed
|
boolean |
isDisposed()
Checks if this object can be thrown away
|
boolean |
isNodeComputed(RssNode nd) |
boolean |
readData(java.io.BufferedReader input)
Deprecated.
|
void |
removeAllChildElements() |
void |
removeChild(Element child) |
void |
removeNode(RssNode node) |
void |
resetParentElement()
reset parent element assignment to all child elements
|
void |
restoreElementState(int stateid)
restore the state of the element and its function matching the given
identifier
|
boolean |
restoreHotstartState(HotstartState parentState) |
void |
saveElementState(int stateid)
save the current state of the element and its function with the given
identifier
|
void |
saveHotstartState(HotstartState parentState,
int stateId) |
void |
setActive(boolean active)
Sets whether element is active for computation.
|
void |
setActive(boolean active,
boolean recurse)
Sets whether element is active for computation.
|
void |
setDirty(boolean dirty)
Sets whether element is dirty and needs to be recomputed.
|
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 |
setFunction(Function f) |
void |
setHasForebayHeadLoss(boolean b)
creates or deletes a forebay head loss object based on the given boolean.
|
void |
setName(java.lang.String name)
echo name change to nodes whose names are based on this elements name
not needed any more?? with use of key strings??
|
void |
setObsDataVector(java.util.Vector obsDataList) |
void |
setParentElement(Element e) |
void |
setupForSerialization()
called just before ascii serialization
|
java.lang.String |
toString()
toString method decodes key string
|
void |
updateTSProxyList()
loops through function and child elements telling them to update there
sets of TSRecordProxies()
|
boolean |
writeData(java.io.BufferedWriter out)
Deprecated.
|
addModifiableListener, compareTo, getDescription, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setValid, update, useRecursiveModifiedTestpublic static final int RESERVIOR_ELEMENT_ID
public static final int REACH_ELEMENT_ID
public static final int JUNCTION_ELEMENT_ID
public static final int DIVERSION_ELEMENT_ID
public static final int DIVERTEDOUTLET_ELEMENT_ID
public static final int OUTFLOW
public static final int INFLOW
public Element()
public Element(RssSystem sys, int idx)
public boolean hasForebayHeadLoss()
public void setHasForebayHeadLoss(boolean b)
public ForebayHeadLoss getForebayHeadLoss()
public double getEffectiveElev(RunTimeStep rts)
public double getPrevEffectiveElev(RunTimeStep rts)
public java.util.List getTailwaterElevationObjects(java.util.List list)
list - an existing List object or nullpublic java.util.List getRuleConnectivityRefs()
public static int getObjectTypeId(ModelVariable mv)
public java.lang.String toString()
public void setupForSerialization()
public void cleanupFromDeSerialization()
public java.util.List getReleaseElements(java.util.List vec)
public java.lang.String getDisplayName()
getDisplayName in class NamedTypepublic java.lang.String getFullName()
public java.lang.String getTopParentName()
public void applyHindcastData(HindcastData hd)
public void getHindcastDataList(java.util.Vector hvec)
public java.util.Vector getOutletElementList()
public void getOutletElementList(java.util.Vector vec)
public int getChildElementCount()
public Element getChildElementAt(int i)
public java.util.Enumeration children()
public int getUnitSystem()
public void copyInto(Element re)
public boolean downStreamFrom(Element element)
element - The element to test if it is downstream of.public void resetParentElement()
public boolean isActive()
public void setActive(boolean active)
public void setActive(boolean active,
boolean recurse)
public boolean isDirty()
public void setDirty(boolean dirty)
public java.lang.String getKeyStringForObject(java.lang.Object obj)
public java.lang.Object getObjectForKeyString(java.lang.String keystr)
public Element getTopParent()
public Element getParent()
public void setParentElement(Element e)
public void addChildElement(Element child)
public void addChildElementAt(Element child, int idx)
public void removeChild(Element child)
public void removeAllChildElements()
public boolean initialize(RunTimeWindow rtw)
public boolean initHindcastLoop(RunTimeWindow rtw)
public boolean initForecastLoop(RunTimeWindow rtw)
public void saveElementState(int stateid)
stateid - identifier for the statepublic void saveHotstartState(HotstartState parentState, int stateId)
public boolean restoreHotstartState(HotstartState parentState)
public void restoreElementState(int stateid)
stateid - identifier for the statepublic RssSystem getSystem()
public java.util.Vector getElementVector()
public java.util.Vector getElementsByClass(java.lang.Class eclass,
java.util.Vector vec)
public boolean hasElementsOfClass(java.lang.Class eclass)
public Element getElementByName(java.lang.String name)
public Element getElement(int idx)
public void dispose()
public void dispose(boolean disposeAllNodes)
public void cleanVectors()
public boolean isNodeComputed(RssNode nd)
public boolean isDisposed()
public java.util.Vector getNodeVector()
public java.util.Vector getNodeDirVector()
public RssNode getDownstreamNode()
public RssNode getUpstreamNode()
public java.util.List getDownstreamNodes(java.util.List vec)
public java.util.Vector getDownstreamElements(java.util.Vector vec)
vec - a vector to hold the downstream elements (may be null)public java.util.List<Element> getLinkedElementList(int direction)
direction: - Element.OUTFLOW or Element.INFLOWpublic void addNode(RssNode node, int idir, boolean makeTS)
public void addNode(RssNode node, int idir)
public void removeNode(RssNode node)
public hec.map.WorldPt getReferencePt()
public Function getFunction()
public void setFunction(Function f)
public AdjustableParameter findAdjParam(java.lang.String fname, java.lang.String param)
public AdjustableParameter findAdjParam(java.lang.String elemName, java.lang.String function, java.lang.String param)
public Element findElement(java.lang.String name)
public TSDataSet getTSDataSet(boolean isInput)
TSLocationgetTSDataSet in interface TSLocationpublic int getNodeCount()
public RssNode getNode(int idx)
public int getNodeDir(int idx)
public int computeHindcastStep(RunTimeStep rts)
public int computeForecastStep(RunTimeStep rts)
public int computeForecastStep(RunTimeStep rts, double[] xt, double[] et, int tcount)
public double computeSubStepFlow(RunTimeStep rts, double xt, double et)
public int computeHindcast(RunTimeWindow rtw, int computeType)
public int computeForecast(RunTimeWindow rtw, int computeType)
public boolean readData(java.io.BufferedReader input)
The data stream must have type=param formatting. The following types and parameters are defined.
Element Name= (String) name of the Element
Element Nodes= (comma delimited ints) list of nodes connected by this element
Element NodeDir= (comma delimited ints) list of node directions
Element Function= (String) function type name
Element End
There must one NodeDir value for each RssNode associated with the element. A NodeDir value of 1 indicates positive flow at the node is an inflow to this element, 0 indicates a positive flow is an outflow.
The function type name must be a valid Function Class name. The currently
implemented classes include CoefRouting, Storage, Junction, Dam, and
AdjustableFlow.
The Element Function line type generate new Function according to the
specified class name. The readData method of the new object is
called to process class specific data. Control is returned to
this method when a Element Function End line type is found. Note that
a Element Function= line type must be matched by a Element Function End line
type or the file will not be processed correctly.
input - BufferedReader connected to the ASCII file containing the
RssSystem data.RssSystem.readFile(hec.io.Identifier),
Function.readData(java.io.BufferedReader),
Function.readData(java.io.BufferedReader),
Junction.readData(java.io.BufferedReader),
Function.readData(java.io.BufferedReader),
Function.readData(java.io.BufferedReader)public boolean writeData(java.io.BufferedWriter out)
public java.util.Vector getRequiredTSRecordProxies()
public java.util.Vector getFlowContolTSRecordProxies()
public java.util.Vector getComputedTSRecordProxies_old()
public java.util.Vector getComputedTSRecordProxies()
public void clearTSProxyList()
public void updateTSProxyList()
public java.util.Vector getActiveTSProxies(java.util.Vector vec,
int iotype)
public java.util.Vector getTSRecordProxies()
public java.util.List getActiveStateVariables(java.util.List svlist)
public TSRecordProxy getTSRecordProxy(int varid)
getTSRecordProxy in interface RssTSLocationpublic TSRecordProxy getTSRecordProxy(java.lang.String param)
public void setName(java.lang.String name)
public double calcSeepageFlow(double flow)
public java.util.Vector getModelVariables(java.util.Vector variableList)
getModelVariables in interface hec.res.model.PlottableObjectpublic java.util.Vector getDefaultModelVariables()
hec.res.model.PlottableObjectgetDefaultModelVariables in interface hec.res.model.PlottableObjectpublic java.util.Vector getPlotTypes()
getPlotTypes in interface hec.res.model.PlottableObjectpublic java.io.BufferedReader getPlotTypeFile(java.lang.String name)
public java.lang.String getPlotTypeDirectory()
public java.util.Vector getPlotTypeNames()
public java.lang.String getElementType()
public int getElementTypeId()
public java.util.Vector getTSRecords(ModelVariable modelVariable, java.util.Vector vec)
public java.util.Vector getTSRecords(ModelVariable modelVariable, java.util.Vector vec, java.util.Vector runs)
getTSRecords in interface hec.res.model.PlottableObjectpublic void setObsDataVector(java.util.Vector obsDataList)
obsDataList - public java.util.Vector getObsDataVector()
public java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class NamedTypefld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class NamedTypefld - The java field object representing the member field to be setfobj - The data to set in that field