public class RssSystem extends Manager implements hec.map.MapObjectInterface, TSManager, RssReturnStatusConstants, ComputeCanceledCallback
RssRun,
RssNode,
Element,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_PULSE_FLOW_ENGLISH
The Constant DEFAULT_PULSE_FLOW_ENGLISH.
|
static double |
DEFAULT_PULSE_FLOW_SI
The Constant DEFAULT_PULSE_FLOW_SI.
|
static int |
DIVERSION
The Constant DIVERSION.
|
static java.lang.String |
DIVERSION_STR
The Constant DIVERSION_STR.
|
static int |
JUNCTION
The Constant JUNCTION.
|
static java.lang.String |
JUNCTION_STR
The Constant JUNCTION_STR.
|
static java.lang.String |
KEYDELIM
The Constant KEYDELIM.
|
static java.lang.String |
KEYMARK
The Constant KEYMARK.
|
static int |
NUM_ELEM_STATES
The Constant NUM_ELEM_STATES.
|
static int |
REACH
The Constant REACH.
|
static java.lang.String |
REACH_STR
The Constant REACH_STR.
|
static int |
RESERVOIR
The Constant RESERVOIR.
|
static java.lang.String |
RESERVOIR_STR
The Constant RESERVOIR_STR.
|
static int |
SPILLWAY
The Constant SPILLWAY.
|
static int |
VERSION
version 1021 instantiates an independent variable for older zone and set default type to Date.
|
LASTMODIFIED_STRING_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENTRTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEM| Constructor and Description |
|---|
RssSystem()
Instantiates a new rss system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInputTSData(java.lang.String name)
Deprecated.
|
void |
addReservoir(ReservoirElement resElem)
Adds a reservoir element to the system.
|
void |
addReservoirSysOp(ReservoirSysOp resSysOp) |
void |
addWaterAccountSet(WaterAccountSet set)
Adds the water account set.
|
void |
applyHindcastData(java.util.Vector hdvec)
applies hindcast data to computeable objects.
|
boolean |
backupFile(java.lang.String backupDir) |
void |
breakReach(ReachElement oldreach,
hec.map.WorldPt wpt,
JunctionElement newjunc)
split the given reach into two reaches at the given world point.
|
ElementGraph |
buildElementGraph(int computeType,
boolean considerRules) |
ElementGraph |
buildElementGraph(int computeType,
boolean considerRules,
boolean returnOnlyIfSuccess) |
void |
cleanupFromDeSerialization()
Cleanup from de serialization.
|
void |
cleanVectors()
Clean vectors.
|
void |
clearStreamAlignment()
Clear stream alignment.
|
void |
clearTSProxyList()
Loops over all elements and reservoir system operations clearing
set of TSRecordProxies for all computation modes.
|
int |
compute(RunTimeWindow rtw,
RssRun run,
int computeType,
boolean runHindcastCompute)
New version 3.0 computations supporting single step execution,
flexible decision intervals, and downstream operation by multiple reservoirs
|
Element |
createDiversion(hec.watershed.model.Diversion divproj,
hec.watershed.model.Reservoir resproj)
Adds either a Diversion of DivertedOutlet based on a Diversion Project.
|
DiversionElement |
createDiversion(RssNode node0,
RssNode node1,
java.util.Vector ptVec,
double tol)
Adds a new Diversion into the System.
|
ReservoirSysOp |
createNewReservoirSysOp(java.lang.String name,
java.lang.String description)
Creates a new reservoir system operations set.
|
RssNode |
createNode(hec.watershed.model.ComputationPoint cp)
Adds a RssNode to the system based on a Common Computation Point.
|
RssNode |
createNode(Node n)
Adds a RssNode to the system based on a Node from a Reservoir Project.
|
RssNode |
createNode(hec.map.WorldPt pt)
Adds a RssNode to the system.
|
ReachElement |
createReach(JunctionElement junc0,
JunctionElement junc1,
RssNode node0,
RssNode node1,
java.lang.String reachName)
add a Reach into the System
|
ReachElement |
createReach(RssNode node0,
RssNode node1,
double tol)
Deprecated.
|
ReservoirElement |
createReservoir(hec.watershed.model.Reservoir resProject)
Adds a new Reservoir Region into the system.
|
ReservoirElement |
createReservoir(hec.map.WorldRegion reg)
Deprecated.
|
ReservoirElement |
createReservoir(hec.map.WorldRegion reg,
java.util.Vector nodeVec,
java.util.Vector ndirVec,
double tol,
java.lang.String name,
java.lang.String descrip)
Adds a new Reservoir Region into the system.
|
java.lang.String |
createReservoirSysOpName(java.lang.String name)
Creates the reservoir sys op name.
|
SystemHydropowerRule |
createSystemHydropowerRule()
Creates the system hydropower rule.
|
TandemOpParent |
createTandemOpParent(TandemSysOpRule tandemSysRule)
create a new TandemOp for the given rule and initialize data to that of the
given rule.
|
boolean |
deleteDiversion(java.lang.String name)
Delete diversion.
|
void |
deleteDownstreamOp(int nodeIndex)
deletes the downstreamOp referenced by the node index.
|
void |
deleteDownstreamOpRule(int dindex,
int rindex)
Delete downstream op rule.
|
boolean |
deleteGlobalVariable(hec.rss.model.globalvariable.GlobalVariable gv)
Delete global variable.
|
void |
deleteInputTSData(java.lang.String name)
Deprecated.
|
boolean |
deleteJunction(java.lang.String name)
Delete junction.
|
void |
deleteNode(RssNode node)
Delete node.
|
boolean |
deleteReach(java.lang.String name)
Delete reach.
|
boolean |
deleteReservoir(java.lang.String name)
Delete reservoir.
|
void |
deleteReservoirSysOp(ReservoirSysOp sysOp)
delete a reservoir system operations object.
|
boolean |
deleteStateVariable(StateVariable sv)
Delete state variable.
|
void |
deleteSystemHydropowerRule(int rindex)
Delete system hydropower rule.
|
void |
deleteTandemOpParent(int id)
delete the TandemOp matching the id and have the all TandemSysOpRule objects
that reference that TandemOp be deleted.
|
void |
deleteWaterAccountSet(WaterAccountSet set) |
void |
deleting()
called when the manager proxy is deleting the manager.
|
boolean |
deserializeString(AsciiSerializable obj,
java.lang.String data)
deserialize the AsciiSerialiable object from the String data.
|
boolean |
didConversionOccur()
Did conversion occur.
|
void |
finalize() |
void |
finalizeCompute()
called when compute is complete to allow system to dump unneeded resources.
|
AdjustableParameter |
findAdjParam(java.lang.String elemName,
java.lang.String function,
java.lang.String param)
Find adj param.
|
DiversionElement |
findDiversion(java.lang.String name)
Finds a diversion by name.
|
DiversionElement |
findDiversion(hec.map.WorldPt wpt,
double tol)
Finds a diversion that Contains the given World Point.
|
DivertedOutletElement |
findDivertedOutlet(java.lang.String name)
Finds a diverted outlet by name.
|
DivertedOutletElement |
findDivertedOutlet(hec.map.WorldPt wpt,
double tol)
Finds a diverted outlet that Contains the given World Point.
|
RssNode |
findDownstreamNode(int streamIndex,
double coord)
Find downstream node.
|
Element |
findElement(int idx)
Finds an element with the given index from the network's element vector,
does not recurse into child elements.
|
Element |
findElement(java.lang.String name)
Find element.
|
hec.rss.model.globalvariable.ScalarGlobalVariable |
findGlobalScalar(java.lang.String name)
get Global Scalar Variable by name.
|
java.util.List<hec.rss.model.globalvariable.ScalarGlobalVariable> |
findGlobalScalars()
get list of Global Scalars.
|
hec.rss.model.globalvariable.StringGlobalVariable |
findGlobalString(java.lang.String name)
get Global String Variable by name.
|
java.util.List<hec.rss.model.globalvariable.StringGlobalVariable> |
findGlobalStrings()
get a List of Global Variable Strings.
|
hec.rss.model.globalvariable.TableGlobalVariable |
findGlobalTable(java.lang.String name)
get Global Table Variable by name.
|
java.util.List<hec.rss.model.globalvariable.TableGlobalVariable> |
findGlobalTables()
get list of Global Tables.
|
java.util.List<hec.rss.model.globalvariable.TimeSeriesGlobalVariable> |
findGlobalTimeSeries()
get list of Global Time Series Variables.
|
hec.rss.model.globalvariable.TimeSeriesGlobalVariable |
findGlobalTimeSeries(java.lang.String name)
get Global Time Series Variable by name.
|
java.util.List<hec.rss.model.globalvariable.ScalarGlobalVariable> |
findGloblScalars(hec.rss.model.globalvariable.ScalarDataType type)
get the Scala Global Variables of a specified ScalarDataType
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
findInputGlobals()
get a List of all the Input GlobalVariables
|
JunctionElement |
findJunction(hec.watershed.model.ComputationPoint cp)
find a JunctionElement by computation point id.
|
JunctionElement |
findJunction(java.lang.String name)
Finds a junction by name.
|
JunctionElement |
findJunction(hec.map.WorldPt wpt,
double tol)
Finds a Reach that Contains the given World Point.
|
RssNode |
findNode(java.lang.String name)
Find node.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
findOutputGlobals()
get a List of all the Output GlobalVariables
|
ReachElement |
findReach(int streamIndex,
double coord)
Find reach.
|
ReachElement |
findReach(java.lang.String name)
Find reach.
|
ReachElement |
findReach(hec.map.WorldPt wpt,
double tol)
Finds a Reach that Contains the given World Point.
|
ReservoirElement |
findReservoir(int id)
Finds a reservoir by its ID.
|
ReservoirElement |
findReservoir(int streamIndex,
double coord)
Find reservoir by stream index and coordinate.
|
ReservoirElement |
findReservoir(java.lang.String name)
Finds an Reservoir by name.
|
ReservoirElement |
findReservoir(hec.map.WorldPt wpt)
Finds an Reservoir the Contains the given World Point.
|
double[] |
findTSArray(java.lang.String locType,
java.lang.String locName,
java.lang.String param)
Find ts array.
|
RssNode |
findUpstreamNode(int streamIndex,
double coord)
Find upstream node.
|
java.lang.String |
generateUniquePathPart(java.util.List nameElements,
java.lang.String delimeter)
Generate unique path part.
|
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.
|
java.util.Vector |
getActiveTSProxies(java.util.Vector vec,
int iotype,
int computeType)
returns a vector of required input, or generated output TSRecordProxies
used in the current alternative.
|
StreamAlignment |
getAlignment()
Gets the alignment.
|
RssAlt |
getAlternative()
Returns the current RssAlt alternative used for this Network- returns null if not available.
|
java.lang.String |
getBaseDirectory()
Gets the base directory.
|
int |
getComputeDecisionElemCounter()
returns the counter index of the decision element loop within an element block
in the RssSystem.compute method or -1 if outside the loop.
|
int |
getComputeElemBlockCounter()
returns the counter index of the element block loop in the RssSystem.compute method
or -1 if outside the loop.
|
int |
getComputePassCounter()
returns the counter index of the solution pass loop in the RssSystem.compute method
or -1 if outside the loop.
|
int |
getComputeRoutingStepCounter()
returns the counter index of the routing step loop in the RssSystem.compute method
or -1 if outside the loop.
|
int |
getComputeTimeStepCounter()
returns the counter index of the time step loop in the RssSystem.compute method
or -1 if outside the loop.
|
int |
getComputeType()
Gets the compute type.
|
hec.watershed.model.Condition |
getConfiguration()
Gets the configuration.
|
long |
getConfigurationId()
Gets the configuration id.
|
RssNode |
getConnectionNode(hec.map.WorldPt pt,
double tol,
int idir)
Gets the connection node.
|
hec.map.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem() |
DownstreamOptions |
getDefaultDownstreamOptions()
Default Downstream Rule Options.
|
double |
getDefaultPulseFlow()
Base flow value for computing pulse routing, RssSystem default.
|
void |
getDefaultPulseFlow(hec.data.ParamDouble pd)
Gets the default pulse flow.
|
java.util.Vector |
getDivContolTSRecordProxies()
returns a vector of ts record proxies used to identify adjustable diversion elements and their
time series
|
java.lang.String[] |
getDiversionNames()
/**
get and array of strings containing the names of all diversion elements.
|
java.util.Vector |
getDownstreamElements(Element startingElem)
returns a vector of elements that are downstream of the given element following
the flow path - not following any diversions.
|
java.util.Vector |
getDownstreamElements(Element startingElem,
boolean sort)
Gets the downstream elements.
|
boolean |
getDownstreamNodeList(Element startingElem,
java.util.List nodeList)
fills the given list of downstream nodes associated with elements that are
downstream of the given element following
the flow path - not following any diversions.
|
DownstreamOp |
getDownstreamOp(int nodeIndex)
Gets a the DownstreamOp for the given node index, will return null if the
DownstreamOp does not already exist.
|
DownstreamOp |
getDownstreamOp(int nodeIndex,
boolean createIfNull)
Gets a the DownstreamOp for the given node index.
|
DownstreamOpRule |
getDownstreamOpRule(java.lang.String name)
Gets the downstream op rule.
|
java.util.Vector |
getDownstreamOpRulesBlwElement(ReservoirElement res,
java.util.Vector vec)
Gets the downstream op rules blw element.
|
java.lang.String |
getDssPairedDataFilePath()
Gets the dss paired data file path.
|
Element |
getElement(int idx)
Finds an element with the given index from the network's element vector or
from the elements children by recursing into child elements.
|
Element |
getElementByOrder(int iorder)
return the element from the Active Element Vector based on the id's listed in array returned from getElementOrder()
|
int |
getElementCount()
Gets the element count.
|
int |
getElementCount(java.lang.String classname)
count the elements of the given classname in the element vector.
|
int |
getElementCountByFunction(java.lang.String classname)
count the elements of the given classname in the element vector.
|
java.lang.String[] |
getElementNames(java.lang.String classname)
get and array of strings containing the names of all elements of the given class.
|
java.util.Vector |
getElementNameVector(java.lang.String classname)
returns a vector of string with element names of the given class.
|
java.util.Vector |
getElementNameVectorByFunction(java.lang.String classname)
returns a vector of string with element names of the given class.
|
int[] |
getElementOrder()
Gets the element order.
|
java.util.Vector |
getElementVector()
get a reference to the element vector.
|
<T> java.util.Vector<T> |
getElementVectorByClass(java.lang.Class<T> c)
returns a vector of elements of the given class.
|
java.util.Vector |
getElementVectorByClass(java.lang.String classname)
returns a vector of elements of the given class.
|
hec.map.WorldRect |
getExtent() |
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()
returns a vector of ts record proxies used to identify adjustable flow elements and their
time series
2008-03-03 corrected to return all controlled objects in reservoirs.
|
hec.rss.model.globalvariable.GlobalVariable |
getGlobalVariable(int id)
Gets the global variable.
|
hec.rss.model.globalvariable.GlobalVariable |
getGlobalVariable(java.lang.String name)
Gets the user-defined GlobalVariable named by the given string
"name", or null if no match is found.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
getGlobalVariableList()
get a reference to the GlobalVariable List.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
getGlobalVariables(hec.rss.model.globalvariable.GlobalVariableType gvType) |
java.util.List<JunctionElement> |
getHeadwaterJunctions()
get the headwater junctions for this network.
|
java.util.Vector |
getHindcastDataList()
gets a vector of HindcastData objects from all elements in the system
that require hindcast information.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
getInputGlobalVariables()
get Global Variable List of input usage type.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
getInputGlobalVariables(hec.rss.model.globalvariable.GlobalVariableType gvType)
get Global Variable List of input usage type for the type of global variable.
|
GVDataSet |
getInputGvDataSet() |
java.util.Vector |
getInputTSDataList()
Deprecated.
|
TSDataSet |
getInputTSDataSet() |
java.lang.String[] |
getJunctionNames()
get and array of strings containing the names of all junction elements.
|
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.
|
hec.map.MapIdentifier |
getMapIdentifier() |
java.lang.String |
getNameForKeyString(java.lang.String key)
returns the display name for key string.
|
java.lang.String |
getNextDefaultName(int type)
returns a suggested name that is unique for given element type.
|
int |
getNextResOpId()
Gets the next res op id.
|
int |
getNextResSysOpId()
Gets the next res sys op id.
|
RssNode |
getNode(int idx)
Gets the node.
|
java.lang.String[] |
getNodeNames(java.lang.String type)
Deprecated.
|
java.util.Vector |
getNodeVector()
get a reference to the node vector.
|
NamedType |
getObjectForKeyString(java.lang.String keystr)
Takes a key string and returns the object of class Element, Function,
Node, OpController, or OpRule
This should be a TSManager method.
|
java.util.Vector |
getObservedDataTSProxies(java.util.Vector vec)
Gets the observed data ts proxies.
|
java.lang.String |
getOriginalNetworkName()
Returns to original network's name that was used when creating an alternative.
|
java.util.List<hec.rss.model.globalvariable.GlobalVariable> |
getOutputGlobalVariables()
get Global Variable List of output usage type.
|
GVDataSet |
getOutputGVDataSet() |
TSDataSet |
getOutputTSDataSet() |
java.lang.String[] |
getReachNames()
get and array of strings containing the names of all reach elements.
|
java.lang.String[] |
getReservoirNames()
get an array of Strings containing the names of all reservoir elements.
|
CommonDataList |
getReservoirOpDataList()
Deprecated.
- now stores data in it's own DBF file
get a reference to the reservoir data list
|
ReservoirSysOp |
getReservoirSysOp(java.lang.String name)
Retreives a Reservoir System Operation by name.
|
CommonDataList |
getReservoirSysOpDataList()
Deprecated.
- now stores data in it's own DBF file
get a reference to the reservoir system data list
|
ReservoirSysOp[] |
getReservoirSysOps()
Gets the reservoir sys ops.
|
hec.io.dbf.DbfFile |
getResOpDbfFile()
open/return the ReservoirOperations DbfFile.
|
hec.io.dbf.DbfFile |
getResSysOpDbfFile()
open/return the ReservoirSystem Operations DBF file.
|
RssRun |
getRssRun()
get the active run.
|
static java.util.List |
getScriptableMethodNames()
Gets the scriptable method names.
|
StateVariable |
getStateVariable(int id)
Gets the state variable.
|
StateVariable |
getStateVariable(java.lang.String name)
Gets the user-defined StateVariable named by the given string
"name", or null if no match is found.
|
java.util.List |
getStateVariableList()
get a reference to the StateVariable List.
|
SystemHydropowerRule |
getSystemHydropowerRule(int ruleIndex)
Retrives the SystemHydropowerRule for a given ruleIndex.
|
SystemHydropowerRule |
getSystemHydropowerRule(java.lang.String ruleName)
Retrives the SystemHydropowerRule by name.
|
java.util.List |
getSystemHydropowerRules()
Returns a list of SystemHydropowerRule(s).
|
java.util.List<OpRule> |
getSystemRules() |
TandemOp |
getTandemOp()
return the tandemOp, creating it if necessary.
|
TandemOpParent |
getTandemOpParent(int id)
retreive a TandemOp object by integer index.
|
java.util.List |
getTandemOps()
get a List of all TandemOp objects.
|
TSRecord |
getTimeSeries(int elementType,
java.lang.String elementName,
int vid)
return a
TSRecord for the specified arguments. |
TSRecord |
getTimeSeries(int computeType,
java.lang.String elementType,
java.lang.String elementName,
int varId)
return a
TSRecord for the specified arguments. |
TSRecord |
getTimeSeries(int computeType,
java.lang.String elementType,
java.lang.String elementName,
java.lang.String childElementName,
java.lang.String tsRecordParam)
return a
TSRecord for the specified arguments. |
TSRecord |
getTimeSeries(java.lang.String elementType,
java.lang.String elementName,
java.lang.String childElementName,
java.lang.String tsRecordParam)
return an output(computed)
TSRecord for the specified arguments. |
TSRecord |
getTimeSeries(java.lang.String elementType,
java.lang.String elementName,
java.lang.String childElementName,
java.lang.String tsRecordParam,
boolean wantsInputRecord)
return a
TSRecord for the specified arguments. |
RssTSLocation |
getTimeSeriesLocation(int elementType,
java.lang.String elementName)
return a RssTLocation object of the given type and name.
|
RssTSLocation |
getTimeSeriesLocation(java.lang.String elementType,
java.lang.String elementName)
return a RssTLocation object of the given type and name.
|
java.util.Vector |
getTSRecordProxies()
Deprecated.
|
java.util.Vector |
getTSRecordProxies(boolean isInput)
Deprecated.
|
TSRecordProxy |
getTSRecordProxy(java.lang.String name,
int varid)
Gets the tS record proxy.
|
int |
getVersion()
Return the current version id of the RssSystem.
|
WaterAccount |
getWaterAccount(int id)
Gets the Water Account.
|
WaterAccountSet |
getWaterAccountSet(int index)
Gets the water accoutn set.
|
WaterAccountSet |
getWaterAccountSet(java.lang.String name) |
java.util.List<WaterAccountSet> |
getWaterAccountSetList()
Gets the water account set list.
|
boolean |
hasDownstreamGoals()
returns true if the system has any downstream goals in the active operation set.
|
void |
init() |
int |
initDownstreamPulse()
Calls the initialization routine for all DownstreamOp objects in
preparation for compute.
|
boolean |
initForPostProcessing(TSDataSet inputTS,
TSDataSet outputTS,
int computeType,
RunTimeWindow rtw)
Prepares this run for post processing in the ResSim Simulation Module.
|
void |
initHotstart(RunTimeWindow rtw)
initialize the hotstart settings.
|
boolean |
initialize(Operations op,
TSDataSet inputTS,
TSDataSet outputTS,
GVDataSet inputGvDataSet,
GVDataSet outputGvDataSet)
Deprecated.
|
boolean |
initialize(TSDataSet inputTS,
TSDataSet outputTS,
GVDataSet inputGvDataSet,
GVDataSet outputGvDataSet,
int computeType,
RunTimeWindow rtw)
initialize prior to a compute, called by RssRun.
|
boolean |
initializeGlobalVariables() |
boolean |
initializeStateVariables(int computeType)
Initialize state variables' Time Series Records for all
State Variables.
|
void |
initTandemOpForecastStep(RunTimeStep rts)
initialize the tandemOp, creating it if necessary.
|
boolean |
isComputeCanceled()
Checks if is compute canceled.
|
boolean |
isKeyString(java.lang.String str)
checks to see if string is a key string.
|
void |
load()
Loads the system from disk into memory.
|
void |
loadReservoirSysOps(boolean force)
This method is used to ensure that the Reservoir System Ops have been loaded
|
boolean |
modifiyForSaveAs()
called during saveAs to allow managers to modify themselves as necessary, returns true if there are
changes made.
|
DiversionElement |
newDiversionElement()
create a new reach element with a default name and add it to the element list.
|
DiversionElement |
newDiversionElement(java.lang.String name)
create a new reach element and add it to the element list.
|
Element |
newElement(boolean addtolist)
create a new element and add it to the element list.
|
hec.rss.model.globalvariable.GlobalVariable |
newGlobalVariable(java.lang.String name,
hec.rss.model.globalvariable.GlobalVariable gv)
New global variable.
|
hec.rss.model.globalvariable.GlobalVariable |
newGlobalVariable(java.lang.String name,
hec.rss.model.globalvariable.GlobalVariableType type)
New global variable.
|
JunctionElement |
newJunctionElement()
create a new junction element with a default name and add it to the element list.
|
JunctionElement |
newJunctionElement(hec.watershed.model.ComputationPoint cp)
create a new junction element and add it to the element list.
|
JunctionElement |
newJunctionElement(java.lang.String name)
create a new junction element and add it to the element list.
|
RssNode |
newNode()
create a new node and add it to the list.
|
ReachElement |
newReachElement()
create a new reach element with a default name and add it to the element list.
|
ReachElement |
newReachElement(java.lang.String name)
create a new reach element and add it to the element list.
|
StateVariable |
newStateVariable(java.lang.String name)
New state variable.
|
StateVariable |
newStateVariable(java.lang.String name,
StateVariable sv)
New state variable.
|
TandemOpParent |
newTandemOpParent(java.lang.String name)
Creates a new TandemOp with the given name, no checking is done to ensure
unique names.
|
int |
nextElementIndex()
Next element index.
|
int |
nextWaterAccountSetIndex() |
boolean |
orderElementsForCompute_old(int computeType)
Deprecated.
|
boolean |
orderElementsForCompute()
Develop correct element ordering for compute.
|
boolean |
orderElementsForCompute(int computeType)
Develop correct element ordering for given compute type including creation of iteration blocks.
|
boolean |
prepCumLocFlowCompute()
sets active state of elements and nodes in preparation for a cumulative local flow simulation.
|
boolean |
prepHoldoutCompute(java.lang.String resname)
sets active elements for computing holdouts for a specific reservoir.
|
boolean |
prepPulseRoutingCompute(ReservoirElement res,
int opid,
int outletId)
Sets active elements for computing a pulse change in flow for a specific reservoir outlet.
|
boolean |
prepRegulatedFlowCompute()
sets all elements and nodes active in preparation for a regulated flow simulation.
|
boolean |
prepUnregulatedFlowCompute()
sets active state of elements and nodes in preparation for a unregulated flow simulation.
|
void |
printGlobalScalarsToComputeLog(int detailLevel)
print the Scalar GLobalVariables to the compute log
|
void |
printGlobalStringsToComputeLog(int detailLevel)
print the String GlobalVariables to the compute log
|
void |
printGlobalTablesToComputeLog(int detailLevel) |
void |
printGlobalTimeSeriesToComputeLog(int detailLevel) |
boolean |
readFile(Identifier id)
Retrieves the RssSystem data from the specified ASCII file.
|
boolean |
refreshData(Manager otherMgr)
refresh this managers data from the origMgr's data
|
void |
renamed(Identifier id)
called to rename the manager.
|
void |
renameDamElementChildren()
fix naming of dam and diverted outlet default child elements.
|
void |
renameInputTSData(java.lang.String old,
java.lang.String newr)
Deprecated.
|
void |
renameResChildrenUpNodes()
fix naming of dam and diverted outlet default child elements.
|
void |
renameReservoirSysOp(java.lang.String oldName,
java.lang.String newName)
Rename reservoir sys op.
|
void |
renameWaterAccountSet(java.lang.String currentName,
java.lang.String newName) |
void |
resetAndSaveOperations()
cause the ReservoirOps and RerservoirSysOps to save correctly
when the the dbf filenames have changed.
|
void |
resetParentElement()
reset parent element assignment to all child elements.
|
boolean |
runStateVariableInitScripts(int computeType)
Runs the Init script for the state variables.
|
Manager |
saveManagerAs(java.lang.String directory,
java.lang.String filePrefix,
ManagerProxyListContainer container)
duplicate our data file to a new file and add a new Manager that uses it
to the ManagerProxyListContainer specified
|
Manager |
saveManagerAs(java.lang.String directory,
java.lang.String filePrefix,
ManagerProxyListContainer container,
Identifier destId,
RssSystem copy)
Save manager as.
|
java.lang.StringBuffer |
serializeObjectToString(AsciiSerializable obj)
serialize an AsciiSerializable object to a StringBuffer.
|
void |
setAlternative(RssAlt alt)
set the alternative for the current compute.
|
void |
setComputeCanceled(boolean canceled) |
void |
setConfiguration(hec.watershed.model.Study study,
hec.watershed.model.Condition config)
Sets the configuration (Condition) causing elements to be created based
on projects and control points in the configuration.
|
void |
setConfigurationForImport(hec.watershed.model.Condition config)
set a new configuration when importing this network into another watershed.
|
void |
setDefaultDownstreamOptions(DownstreamOptions dOps)
Sets the default downstream options.
|
void |
setDefaultPulseFlow(double basePulseFlow)
Sets the default pulse flow.
|
void |
setDefaultPulseFlow(hec.data.ParamDouble pd)
Sets the default pulse flow.
|
void |
setExtent(hec.map.WorldRect rc) |
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 |
setInputTSDataSet(TSDataSet tsData)
Sets the input ts data set.
|
void |
setMapIdentifier(hec.map.MapIdentifier id) |
void |
setOperations(Operations op)
Sets the operations.
|
void |
setOutputTSDataSet(TSDataSet tsData)
Sets the output ts data set.
|
void |
setRssRun(RssRun run)
sets the run for the active compute.
|
void |
setupForSerialization()
Called just before ascii serialization.
|
void |
setWaterAccountSetList(java.util.List<WaterAccountSet> waterAccountSetList)
Sets the water account set list.
|
boolean |
shouldSaveHotstartAtTimeStep(int step,
int computeType)
Should save hotstart at time step.
|
int |
simulateForecast(RunTimeWindow rtw,
int computeType,
IterationBlock iterblk,
boolean runHindcastCompute)
Perform forecast simulation.
|
int |
simulateForecastStep(RunTimeStep rts,
int computeType,
IterationBlock iterblk,
boolean computeall,
boolean runHindcastCompute,
java.util.List pumpResList,
int iteration,
int elemStart)
Perform forecast simulation step, only recomputes elements that have been flagged as dirty.
|
int |
simulateForecastWithLocalDecisions(RunTimeWindow rtw,
int computeType,
IterationBlock iterblk,
boolean runHindcastCompute,
int maxtrial)
Perform forecast simulation with local decision making.
|
int |
simulateHindcast(RunTimeWindow rtw,
int computeType)
Perform hindcast simulation.
|
void |
unload()
called when the MapGlyph unloads this Manager.
|
void |
unloading()
called when the ManagerProxy unloads this Manager.
|
void |
updateConfiguration()
Updates all nodes and elements associated with configuration objects.
|
void |
updateGlobalVariable(int id,
hec.rss.model.globalvariable.GlobalVariable updatedGV) |
void |
updateTSProxyList()
Loops over all elements and reservoir system operations updating the
set of TSRecordProxies for all computation modes.
|
boolean |
writeFile(Identifier id) |
void |
writeHotstartStates(RunTimeWindow rtw)
Write hotstart states.
|
addModifiableListener, copyFile, deleteFile, getCallback, getCommonDataList, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFileManager, getFilename, getGmtOffset, getIdentifier, getInputITSDataSet, getLastModifiedTime, getLastModifiedTimeString, getOutputITSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getUnitSystem, getUserInterface, getWorkspace, getWorkspacePath, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, newFile, newTSRecordProxy, newTSRecordProxy, notify, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, saveChildManagers, saveManager, saveManagerAs, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toStringclone, compareTo, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserverspublic static final java.lang.String REACH_STR
public static final java.lang.String RESERVOIR_STR
public static final java.lang.String JUNCTION_STR
public static final java.lang.String DIVERSION_STR
public static final int REACH
public static final int RESERVOIR
public static final int JUNCTION
public static final int DIVERSION
public static final int SPILLWAY
public static final java.lang.String KEYMARK
public static final java.lang.String KEYDELIM
public static final int VERSION
public static final int NUM_ELEM_STATES
public static final double DEFAULT_PULSE_FLOW_ENGLISH
public static final double DEFAULT_PULSE_FLOW_SI
public void finalize()
throws java.lang.Throwable
public ElementGraph buildElementGraph(int computeType, boolean considerRules)
public ElementGraph buildElementGraph(int computeType, boolean considerRules, boolean returnOnlyIfSuccess)
public boolean orderElementsForCompute(int computeType)
computeType - the compute typepublic int getComputeElemBlockCounter()
public int getComputePassCounter()
public int getComputeTimeStepCounter()
public int getComputeDecisionElemCounter()
public int getComputeRoutingStepCounter()
public int getComputeType()
public TandemOp getTandemOp()
public void initTandemOpForecastStep(RunTimeStep rts)
rts - the rtspublic TandemOpParent getTandemOpParent(int id)
id - TandemOp indexpublic java.util.List getTandemOps()
public TandemOpParent newTandemOpParent(java.lang.String name)
name - Name of new TandemOppublic TandemOpParent createTandemOpParent(TandemSysOpRule tandemSysRule)
tandemSysRule - the tandem sys rulepublic void deleteTandemOpParent(int id)
id - the idpublic int initDownstreamPulse()
public DownstreamOpRule getDownstreamOpRule(java.lang.String name)
name - the namepublic void deleteDownstreamOpRule(int dindex,
int rindex)
dindex - the dindexrindex - the rindexpublic void deleteDownstreamOp(int nodeIndex)
nodeIndex - the node indexpublic SystemHydropowerRule createSystemHydropowerRule()
public SystemHydropowerRule getSystemHydropowerRule(int ruleIndex)
ruleIndex - the rule indexpublic SystemHydropowerRule getSystemHydropowerRule(java.lang.String ruleName)
ruleName - the rule namepublic void deleteSystemHydropowerRule(int rindex)
rindex - the rindexpublic DownstreamOp getDownstreamOp(int nodeIndex)
nodeIndex - RssNode indexpublic DownstreamOptions getDefaultDownstreamOptions()
public void setDefaultDownstreamOptions(DownstreamOptions dOps)
dOps - the new default downstream optionspublic DownstreamOp getDownstreamOp(int nodeIndex, boolean createIfNull)
nodeIndex - RssNode indexcreateIfNull - if true a DownstreamOp will be created if necessarypublic java.util.List getSystemHydropowerRules()
public java.util.Vector getDownstreamOpRulesBlwElement(ReservoirElement res, java.util.Vector vec)
res - the resvec - the vecpublic TSRecordProxy getTSRecordProxy(java.lang.String name, int varid)
name - the namevarid - the varidpublic boolean isKeyString(java.lang.String str)
str - the strpublic java.lang.String getOriginalNetworkName()
public java.lang.String getNameForKeyString(java.lang.String key)
key - the keypublic java.lang.String getKeyStringForObject(java.lang.Object obj)
obj - the objpublic NamedType getObjectForKeyString(java.lang.String keystr)
keystr - the keystrpublic java.lang.String generateUniquePathPart(java.util.List nameElements,
java.lang.String delimeter)
nameElements - the name elementsdelimeter - the delimeterpublic void setupForSerialization()
public void cleanupFromDeSerialization()
public java.lang.String getBaseDirectory()
public java.lang.String getDssPairedDataFilePath()
public java.util.Vector getHindcastDataList()
public void setConfiguration(hec.watershed.model.Study study,
hec.watershed.model.Condition config)
Elements created are as follows:
Common Computation Point -> Junction with one downstream node, uses name and station
Reservoir -> Reservoir, uses name, associated junctions and region
Diversion -> Diversion, uses name, associated junctions and line
study - the studyconfig - the configpublic hec.watershed.model.Condition getConfiguration()
public long getConfigurationId()
public void setConfigurationForImport(hec.watershed.model.Condition config)
config - the new configuration for importpublic void updateConfiguration()
public boolean modifiyForSaveAs()
modifiyForSaveAs in class Manager@Deprecated public void addInputTSData(java.lang.String name)
name - the name@Deprecated public java.util.Vector getInputTSDataList()
@Deprecated public void deleteInputTSData(java.lang.String name)
name - the name@Deprecated
public void renameInputTSData(java.lang.String old,
java.lang.String newr)
old - the oldnewr - the newrpublic void setRssRun(RssRun run)
run - the new rss runpublic RssRun getRssRun()
public void setAlternative(RssAlt alt)
alt - the new alternativepublic RssAlt getAlternative()
public WaterAccountSet getWaterAccountSet(java.lang.String name)
public void renameWaterAccountSet(java.lang.String currentName,
java.lang.String newName)
public void deleteWaterAccountSet(WaterAccountSet set)
public ReservoirSysOp[] getReservoirSysOps()
public java.util.Vector getDownstreamElements(Element startingElem)
startingElem - the starting elempublic java.util.Vector getDownstreamElements(Element startingElem, boolean sort)
startingElem - the starting elemsort - the sortpublic boolean getDownstreamNodeList(Element startingElem, java.util.List nodeList)
startingElem - the starting elemnodeList - the node list@Deprecated public CommonDataList getReservoirOpDataList()
@Deprecated public CommonDataList getReservoirSysOpDataList()
public void renameReservoirSysOp(java.lang.String oldName,
java.lang.String newName)
oldName - the old namenewName - the new namepublic ReservoirSysOp getReservoirSysOp(java.lang.String name)
name - the namepublic java.lang.String createReservoirSysOpName(java.lang.String name)
name - the namepublic void loadReservoirSysOps(boolean force)
public ReservoirSysOp createNewReservoirSysOp(java.lang.String name, java.lang.String description)
name - the namedescription - the descriptionpublic void addReservoirSysOp(ReservoirSysOp resSysOp)
public void deleteReservoirSysOp(ReservoirSysOp sysOp)
sysOp - the sys oppublic boolean prepRegulatedFlowCompute()
public boolean prepCumLocFlowCompute()
public boolean prepUnregulatedFlowCompute()
public boolean prepHoldoutCompute(java.lang.String resname)
resname - the resnamepublic boolean prepPulseRoutingCompute(ReservoirElement res, int opid, int outletId)
res - the resopid - the opidoutletId - the outlet idpublic void clearStreamAlignment()
public StreamAlignment getAlignment()
public int getElementCount()
public int getElementCount(java.lang.String classname)
classname - the classnamepublic int getElementCountByFunction(java.lang.String classname)
classname - the classnamepublic java.util.Vector getElementNameVector(java.lang.String classname)
classname - the classnamepublic java.util.Vector getElementNameVectorByFunction(java.lang.String classname)
classname - the classnamepublic Element newElement(boolean addtolist)
addtolist - the addtolistpublic ReachElement newReachElement()
public ReachElement newReachElement(java.lang.String name)
name - the namepublic DiversionElement newDiversionElement()
public DiversionElement newDiversionElement(java.lang.String name)
name - the namepublic hec.rss.model.globalvariable.GlobalVariable newGlobalVariable(java.lang.String name,
hec.rss.model.globalvariable.GlobalVariableType type)
name - the namepublic hec.rss.model.globalvariable.GlobalVariable newGlobalVariable(java.lang.String name,
hec.rss.model.globalvariable.GlobalVariable gv)
name - the nameGlobalVariable - that will be added as "new"public void printGlobalScalarsToComputeLog(int detailLevel)
detailLevel - 1 same as ScalarGlobalVariable.printToComputeLog()
2 print more details of the ScalarGlobalVariableBaseGlobalVariable.printToComputeLog()public void printGlobalStringsToComputeLog(int detailLevel)
detailLevel - 1 same to StringGlobalVariable.printToComputeLog()
2 print greater detail about the String GlobalVariableBaseGlobalVariable.printToComputeLog()public void printGlobalTablesToComputeLog(int detailLevel)
detailLevel - public void printGlobalTimeSeriesToComputeLog(int detailLevel)
detailLevel - public void updateGlobalVariable(int id,
hec.rss.model.globalvariable.GlobalVariable updatedGV)
public StateVariable newStateVariable(java.lang.String name)
name - the namepublic StateVariable newStateVariable(java.lang.String name, StateVariable sv)
name - the nameStateVariable - that will be added as "new"public WaterAccount getWaterAccount(int id)
id - the idpublic hec.rss.model.globalvariable.GlobalVariable getGlobalVariable(int id)
id - the idpublic hec.rss.model.globalvariable.GlobalVariable getGlobalVariable(java.lang.String name)
name - String containing the name of a GlobalVariablepublic StateVariable getStateVariable(int id)
id - the idpublic StateVariable getStateVariable(java.lang.String name)
name - String containing the name of a StateVariablepublic double getDefaultPulseFlow()
public void getDefaultPulseFlow(hec.data.ParamDouble pd)
pd - the pdpublic void setDefaultPulseFlow(double basePulseFlow)
basePulseFlow - the new default pulse flowpublic void setDefaultPulseFlow(hec.data.ParamDouble pd)
pd - the new default pulse flowpublic JunctionElement newJunctionElement()
public JunctionElement newJunctionElement(java.lang.String name)
name - the namepublic JunctionElement newJunctionElement(hec.watershed.model.ComputationPoint cp)
cp - the cppublic DivertedOutletElement findDivertedOutlet(java.lang.String name)
name - the namepublic DivertedOutletElement findDivertedOutlet(hec.map.WorldPt wpt, double tol)
wpt - the wpttol - the tolpublic DiversionElement findDiversion(hec.map.WorldPt wpt, double tol)
wpt - the wpttol - the tolpublic DiversionElement findDiversion(java.lang.String name)
name - the namepublic boolean deleteDiversion(java.lang.String name)
name - the namepublic ReachElement findReach(hec.map.WorldPt wpt, double tol)
wpt - the wpttol - the tolpublic ReachElement findReach(java.lang.String name)
name - the namepublic void breakReach(ReachElement oldreach, hec.map.WorldPt wpt, JunctionElement newjunc)
oldreach - the oldreachwpt - the wptnewjunc - the newjuncpublic boolean deleteStateVariable(StateVariable sv)
sv - the svpublic boolean deleteGlobalVariable(hec.rss.model.globalvariable.GlobalVariable gv)
gv - the gvpublic boolean deleteReach(java.lang.String name)
name - the namepublic JunctionElement findJunction(hec.map.WorldPt wpt, double tol)
wpt - the wpttol - the tolpublic JunctionElement findJunction(java.lang.String name)
name - the namepublic JunctionElement findJunction(hec.watershed.model.ComputationPoint cp)
cp - the cppublic boolean deleteJunction(java.lang.String name)
name - the namepublic void cleanVectors()
public ReservoirElement findReservoir(hec.map.WorldPt wpt)
wpt - the wptpublic ReservoirElement findReservoir(int id)
id - the idpublic ReservoirElement findReservoir(java.lang.String name)
name - the name of the ReservoirElementpublic ReservoirElement findReservoir(int streamIndex, double coord)
streamIndex - the stream indexcoord - the coordpublic void addReservoir(ReservoirElement resElem)
resElem - the res elempublic boolean deleteReservoir(java.lang.String name)
name - the name@Deprecated public ReservoirElement createReservoir(hec.map.WorldRegion reg)
reg - the regpublic ReservoirElement createReservoir(hec.map.WorldRegion reg, java.util.Vector nodeVec, java.util.Vector ndirVec, double tol, java.lang.String name, java.lang.String descrip)
reg - the regnodeVec - the node vecndirVec - the ndir vectol - the tolname - the namedescrip - the descrippublic int getNextResOpId()
public int getNextResSysOpId()
public ReservoirElement createReservoir(hec.watershed.model.Reservoir resProject)
resProject - the res projectpublic RssNode getConnectionNode(hec.map.WorldPt pt, double tol, int idir)
pt - the pttol - the tolidir - the idirpublic ReachElement createReach(JunctionElement junc0, JunctionElement junc1, RssNode node0, RssNode node1, java.lang.String reachName)
junc0 - the inflow junctionjunc1 - the outflow junctionnode0 - the inflow nodenode1 - the outflow nodereachName - the name of the new Reach@Deprecated public ReachElement createReach(RssNode node0, RssNode node1, double tol)
node0 - the node0node1 - the node1tol - the tolpublic DiversionElement createDiversion(RssNode node0, RssNode node1, java.util.Vector ptVec, double tol)
node0 - the node0node1 - the node1ptVec - the pt vectol - the tolpublic Element createDiversion(hec.watershed.model.Diversion divproj, hec.watershed.model.Reservoir resproj)
divproj - the divprojresproj - the resprojpublic ReachElement findReach(int streamIndex, double coord)
streamIndex - the stream indexcoord - the coordpublic java.util.Vector getElementVector()
public java.util.List getStateVariableList()
public java.util.List<hec.rss.model.globalvariable.GlobalVariable> getGlobalVariableList()
public java.util.List<hec.rss.model.globalvariable.GlobalVariable> getInputGlobalVariables()
public java.util.List<hec.rss.model.globalvariable.GlobalVariable> getInputGlobalVariables(hec.rss.model.globalvariable.GlobalVariableType gvType)
gvType - the type of GlobalVariable to returnpublic java.util.List<hec.rss.model.globalvariable.GlobalVariable> getGlobalVariables(hec.rss.model.globalvariable.GlobalVariableType gvType)
public java.util.List<hec.rss.model.globalvariable.GlobalVariable> getOutputGlobalVariables()
public java.util.List<hec.rss.model.globalvariable.ScalarGlobalVariable> findGlobalScalars()
public hec.rss.model.globalvariable.ScalarGlobalVariable findGlobalScalar(java.lang.String name)
name - public java.util.List<hec.rss.model.globalvariable.ScalarGlobalVariable> findGloblScalars(hec.rss.model.globalvariable.ScalarDataType type)
type - public java.util.List<hec.rss.model.globalvariable.StringGlobalVariable> findGlobalStrings()
public hec.rss.model.globalvariable.StringGlobalVariable findGlobalString(java.lang.String name)
name - the name of the String Global Variablepublic java.util.List<hec.rss.model.globalvariable.TableGlobalVariable> findGlobalTables()
public hec.rss.model.globalvariable.TableGlobalVariable findGlobalTable(java.lang.String name)
name - public java.util.List<hec.rss.model.globalvariable.TimeSeriesGlobalVariable> findGlobalTimeSeries()
public hec.rss.model.globalvariable.TimeSeriesGlobalVariable findGlobalTimeSeries(java.lang.String name)
name - public java.util.List<hec.rss.model.globalvariable.GlobalVariable> findInputGlobals()
public java.util.List<hec.rss.model.globalvariable.GlobalVariable> findOutputGlobals()
public java.util.Vector getNodeVector()
public java.util.Vector getElementVectorByClass(java.lang.String classname)
classname - the classnamepublic <T> java.util.Vector<T> getElementVectorByClass(java.lang.Class<T> c)
c - the cpublic int[] getElementOrder()
public Element getElementByOrder(int iorder)
iorder - public Element getElement(int idx)
idx - the idxpublic Element findElement(int idx)
idx - the idxpublic Element findElement(java.lang.String name)
name - the name@Deprecated public java.lang.String[] getNodeNames(java.lang.String type)
type - the typepublic AdjustableParameter findAdjParam(java.lang.String elemName, java.lang.String function, java.lang.String param)
elemName - the elem namefunction - the functionparam - the parampublic double[] findTSArray(java.lang.String locType,
java.lang.String locName,
java.lang.String param)
locType - the loc typelocName - the loc nameparam - the param@Deprecated public boolean initialize(Operations op, TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet)
op - the opinputTS - the input tsoutputTS - the output tspublic boolean initialize(TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet, int computeType, RunTimeWindow rtw)
inputTS - the input tsoutputTS - the output tscomputeType - the compute typertw - the rtwpublic boolean initializeGlobalVariables()
public boolean initForPostProcessing(TSDataSet inputTS, TSDataSet outputTS, int computeType, RunTimeWindow rtw)
public boolean initializeStateVariables(int computeType)
computeType - the compute typepublic boolean runStateVariableInitScripts(int computeType)
computeType - the compute typepublic void finalizeCompute()
public void initHotstart(RunTimeWindow rtw)
rtw - the rtwpublic int compute(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute)
rtw - time window of the computerun - the runcomputeType - Regulated, Unregulated, Cum-Loc, PulserunHindcastCompute - true if hindcast is to be runpublic int simulateHindcast(RunTimeWindow rtw, int computeType)
rtw - the rtwcomputeType - the compute typepublic int simulateForecastStep(RunTimeStep rts, int computeType, IterationBlock iterblk, boolean computeall, boolean runHindcastCompute, java.util.List pumpResList, int iteration, int elemStart)
rts - the rtscomputeType - the compute typeiterblk - the iterblkcomputeall - the computeallrunHindcastCompute - the run hindcast computepumpResList - the pump res listiteration - the iterationelemStart - the elem startpublic int simulateForecast(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute)
rtw - the rtwcomputeType - the compute typeiterblk - the iterblkrunHindcastCompute - the run hindcast computepublic int simulateForecastWithLocalDecisions(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute, int maxtrial)
rtw - the rtwcomputeType - the compute typeiterblk - the iterblkrunHindcastCompute - the run hindcast computemaxtrial - the maxtrialpublic void setOperations(Operations op)
op - the new operationspublic void setInputTSDataSet(TSDataSet tsData)
tsData - the new input ts data setpublic TSDataSet getInputTSDataSet()
getInputTSDataSet in class Managerpublic GVDataSet getInputGvDataSet()
public GVDataSet getOutputGVDataSet()
public void setOutputTSDataSet(TSDataSet tsData)
tsData - the new output ts data setpublic TSDataSet getOutputTSDataSet()
getOutputTSDataSet in class Managerpublic RssNode findNode(java.lang.String name)
name - the namepublic RssNode getNode(int idx)
idx - the idxpublic boolean readFile(Identifier id)
The file must have type=param formatting. The following types and parameters are defined.
System Name= (String) name of the System
Description= (String) description of the System
RssNode= (int) zero-based array location of a new node
Element= (int) zero-based array location of a new element
The RssNode and Element line types generate new RssNode and Element objects respectively. The new objects are places in the _nodeVector or _elementVector at the specified index location. The readData method of the new object is called to process RssNode and Element specific data. Control is returned to this method when a RssNode End or Element End line type is found. Note that a RssNode= line type must be matched by a RssNode End line type or the file will not be processed correctly. Similary, Element= must be matched by Element End.
readFile in class Managerid - the idRssNode.readData(java.io.BufferedReader),
Element.readData(java.io.BufferedReader)public boolean writeFile(Identifier id)
public int getVersion()
public void setMapIdentifier(hec.map.MapIdentifier id)
setMapIdentifier in interface hec.map.MapObjectInterfacepublic hec.map.MapIdentifier getMapIdentifier()
getMapIdentifier in interface hec.map.MapObjectInterfacepublic void setExtent(hec.map.WorldRect rc)
setExtent in interface hec.map.MapObjectInterfacepublic hec.map.WorldRect getExtent()
getExtent in interface hec.map.MapObjectInterfacepublic void load()
throws java.io.IOException
load in interface hec.map.MapObjectInterfacejava.io.IOException - Signals that an I/O exception has occurred.public void unload()
unload in interface hec.map.MapObjectInterfacepublic void unloading()
public java.util.Vector getFlowContolTSRecordProxies()
public java.util.Vector getDivContolTSRecordProxies()
public void clearTSProxyList()
public void updateTSProxyList()
public void applyHindcastData(java.util.Vector hdvec)
hdvec - the hdvecpublic java.util.Vector getObservedDataTSProxies(java.util.Vector vec)
vec - the vecpublic java.util.Vector getActiveTSProxies(java.util.Vector vec,
int iotype)
vec - the veciotype - the iotypepublic java.util.Vector getActiveTSProxies(java.util.Vector vec,
int iotype,
int computeType)
vec - the veciotype - the iotypecomputeType - the compute type@Deprecated public java.util.Vector getTSRecordProxies()
getTSRecordProxies in interface TSManager@Deprecated public java.util.Vector getTSRecordProxies(boolean isInput)
getTSRecordProxies in interface TSManagerisInput - the is inputpublic java.lang.String getNextDefaultName(int type)
type - the typepublic java.lang.String[] getElementNames(java.lang.String classname)
classname - the classnamepublic java.lang.String[] getReservoirNames()
public java.lang.String[] getReachNames()
public java.lang.String[] getJunctionNames()
public java.lang.String[] getDiversionNames()
public RssNode newNode()
public RssNode createNode(hec.map.WorldPt pt)
pt - the ptpublic RssNode createNode(hec.watershed.model.ComputationPoint cp)
cp - the cppublic RssNode createNode(Node n)
n - the npublic void deleteNode(RssNode node)
node - the nodepublic RssNode findDownstreamNode(int streamIndex, double coord)
streamIndex - the stream indexcoord - the coordpublic RssNode findUpstreamNode(int streamIndex, double coord)
streamIndex - the stream indexcoord - the coordpublic boolean orderElementsForCompute()
@Deprecated public boolean orderElementsForCompute_old(int computeType)
computeType - the compute typepublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class Managerfld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class Managerfld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic int nextElementIndex()
public void resetParentElement()
public void renameDamElementChildren()
public void renameResChildrenUpNodes()
public boolean hasDownstreamGoals()
public boolean backupFile(java.lang.String backupDir)
backupFile in class Managerpublic Manager saveManagerAs(java.lang.String directory, java.lang.String filePrefix, ManagerProxyListContainer container)
ManagersaveManagerAs in class Managerpublic Manager saveManagerAs(java.lang.String directory, java.lang.String filePrefix, ManagerProxyListContainer container, Identifier destId, RssSystem copy)
directory - the directoryfilePrefix - the file prefixcontainer - the containerdestId - the dest idcopy - the copypublic boolean refreshData(Manager otherMgr)
ManagerrefreshData in class Managerpublic void deleting()
public void renamed(Identifier id)
Managerpublic void resetAndSaveOperations()
public hec.io.dbf.DbfFile getResOpDbfFile()
public hec.io.dbf.DbfFile getResSysOpDbfFile()
public boolean deserializeString(AsciiSerializable obj, java.lang.String data)
obj - the object to deserialize data intodata - the AsciiSerialized datapublic java.lang.StringBuffer serializeObjectToString(AsciiSerializable obj)
obj - the object to AsciiSerializepublic void setComputeCanceled(boolean canceled)
setComputeCanceled in interface ComputeCanceledCallbackpublic boolean isComputeCanceled()
public RssTSLocation getTimeSeriesLocation(java.lang.String elementType, java.lang.String elementName)
elementType - the element typeelementName - the element namepublic RssTSLocation getTimeSeriesLocation(int elementType, java.lang.String elementName)
elementType - The type of element. One of REACH,
RESERVOIR, JUNCTION, DIVERSIONelementName - The name of the elementpublic TSRecord getTimeSeries(java.lang.String elementType, java.lang.String elementName, java.lang.String childElementName, java.lang.String tsRecordParam)
TSRecord for the specified arguments.elementType - the type of element. One of RESERVOIR_STR, REACH_STR, JUNCTION_STR, DIVERSION_STRelementName - the element namechildElementName - the child element name or nulltsRecordParam - the name of the TimeSeries Recordpublic TSRecord getTimeSeries(int computeType, java.lang.String elementType, java.lang.String elementName, int varId)
TSRecord for the specified arguments.computeType - one of RssRun.COMPUTE_CUMLOC,
RssRun.COMPUTE_UNREG, RssRun.COMPUTE_REGelementType - the type of element. One of RESERVOIR_STR, REACH_STR, JUNCTION_STR, DIVERSION_STRelementName - the element namevarId - the Variable IDpublic TSRecord getTimeSeries(int computeType, java.lang.String elementType, java.lang.String elementName, java.lang.String childElementName, java.lang.String tsRecordParam)
TSRecord for the specified arguments.computeType - one of RssRun.COMPUTE_CUMLOC,
RssRun.COMPUTE_UNREG, RssRun.COMPUTE_REGelementType - the type of element. One of RESERVOIR_STR, REACH_STR, JUNCTION_STR, DIVERSION_STRelementName - the element namechildElementName - the child element name or nulltsRecordParam - the name of the TimeSeries Recordpublic TSRecord getTimeSeries(java.lang.String elementType, java.lang.String elementName, java.lang.String childElementName, java.lang.String tsRecordParam, boolean wantsInputRecord)
TSRecord for the specified arguments.elementType - the type of element. One of RESERVOIR_STR, REACH_STR, JUNCTION_STR, DIVERSION_STRelementName - the element namechildElementName - the child element name or nulltsRecordParam - the name of the TimeSeries RecordwantsInputRecord - true if a input TSRecord is wantedpublic TSRecord getTimeSeries(int elementType, java.lang.String elementName, int vid)
TSRecord for the specified arguments.elementType - the type of element. One of RESERVOIR, REACH, JUNCTION, DIVERSIONelementName - the element namevid - the variable IDpublic static java.util.List getScriptableMethodNames()
public void writeHotstartStates(RunTimeWindow rtw)
rtw - the rtwpublic boolean shouldSaveHotstartAtTimeStep(int step,
int computeType)
step - the stepcomputeType - the compute typepublic java.util.List<JunctionElement> getHeadwaterJunctions()
public boolean didConversionOccur()
public void setWaterAccountSetList(java.util.List<WaterAccountSet> waterAccountSetList)
waterAccountSetList - the new water account set listpublic java.util.List<WaterAccountSet> getWaterAccountSetList()
public void addWaterAccountSet(WaterAccountSet set)
set - the setpublic WaterAccountSet getWaterAccountSet(int index)
index - the indexpublic int nextWaterAccountSetIndex()
public hec.map.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem in interface hec.map.MapObjectInterfacepublic java.util.List<OpRule> getSystemRules()