Class RssSystem
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,LockableObject,hec.map.MapObjectInterface,ComputeCanceledCallback,MessagePrinter,TSManager,TsRecordContainer,RssReturnStatusConstants,Serializable,Cloneable,Comparable,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intflag indicating use of version 3X compute enginestatic final intflag indicating use of version 4A compute engine based on message passingstatic final intflag indicating use of version 4B compute engine based on modified simplex methodstatic booleanStatic flag that triggers detailed output to analyze convergence of the decision algorithmstatic final doubleThe Constant DEFAULT_PULSE_FLOW_ENGLISH.static final doubleThe Constant DEFAULT_PULSE_FLOW_SI.static final intThe Constant DIVERSION.static final StringThe Constant DIVERSION_STR.static final Stringstatic final intThe Constant HINDCAST_ELEM_STATE.static final intThe Constant INNER_TIME_ELEM_STATE.static final intThe Constant JUNCTION.static final StringThe Constant JUNCTION_STR.static final StringThe Constant KEYDELIM.static final StringThe Constant KEYMARK.static final intThe Constant NUM_ELEM_STATES.static final intThe Constant OUTER_TIME_ELEM_STATE.static final intThe Constant PRE_COMPUTE_ELEM_STATE.static final intThe Constant REACH.static final StringThe Constant REACH_STR.static final intThe Constant RESERVOIR.static final StringThe Constant RESERVOIR_STR.static final intThe Constant SPILLWAY.static final intThe Constant TIME_BLOCK_ELEM_STATE.static final intThe Constant TIME_BLOCK_ELEM_STATE2.static final intThe Constant TRIAL_ELEM_STATE.static final intversion 1029 updated diversions with no rules in ResSim version 3.5 filesFields inherited from class hec.clientapp.model.Manager
_callBack, _dssFileManagerWrapper, _identifier, _lastModifiedTime, _modifiableListeners, _proxyList, _readOnly, _reloadFailed, _reloadOk, _uiWrapper, _userInterface, _wkspPath, _Workspace, LASTMODIFIED_STRINGFields 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.RssReturnStatusConstants
RTN_CANCELED, RTN_NOPROBLEM, RTN_OPCHANGE, RTN_PROBLEM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInputTSData(String name) Deprecated.voidaddReservoir(ReservoirElement resElem) Adds a reservoir element to the system.voidaddReservoirSysOp(ReservoirSysOp resSysOp) voidAdds the water account set.addWQModelVariables(Collection<hec.wqenginecore.Constituent> conlist) Add ModelVariables to the global list of model variables for each water quality constituent modeled included in the current alternativevoidapplyHindcastData(Vector hdvec) applies hindcast data to computeable objects.booleanbackupFile(String backupDir) voidbreakReach(ReachElement oldreach, hec.map.WorldPt wpt, JunctionElement newjunc) split the given reach into two reaches at the given world point.buildElementGraph(int computeType, boolean considerRules) buildElementGraph(int computeType, boolean considerRules, boolean returnOnlyIfSuccess) buildSysRuleStack(RunTimeStep rts, List<Element> decisionElemVec, double[] delemElev, List<OpRule>[] resRuleList) build the system rule stackvoidCleanup from de serialization.voidClean vectors.voidClear stream alignment.voidLoops over all elements and reservoir system operations clearing set of TSRecordProxies for all computation modes.intcompute(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) intcompute_DevOld(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) New version 3.3 computations with system iteration for all reservoir elevations and evaluation of tandem operation considering routing lagintcompute3x(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 reservoirsintcomputeEventQueue(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) first try at ResSim v 4.0 compute processintcomputeRS4(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) ResSim v 4.0 compute processvoidcopyGlobalVariableTables(RssSystem otherSys) createDiversion(RssNode node0, RssNode node1, Vector ptVec, double tol) Adds a new Diversion into the System.createDiversion(hec.watershed.model.Diversion divproj, hec.watershed.model.Reservoir resproj) Adds either a Diversion of DivertedOutlet based on a Diversion Project.createNewReservoirSysOp(String name, String description) Creates a new reservoir system operations set.createNode(hec.map.WorldPt pt) Adds a RssNode to the system.createNode(Node n) Adds a RssNode to the system based on a Node from a Reservoir Project.createNode(hec.watershed.model.ComputationPoint cp) Adds a RssNode to the system based on a Common Computation Point.createReach(JunctionElement upstreamJunc, JunctionElement downstreamJunc, RssNode inflowNode, RssNode outflowNode, String reachName) add a Reach into the SystemcreateReach(RssNode node0, RssNode node1, double tol) Deprecated.createReservoir(hec.map.WorldRegion reg) Deprecated.createReservoir(hec.map.WorldRegion reg, Vector nodeVec, Vector ndirVec, double tol, String name, String descrip) Adds a new Reservoir Region into the system.createReservoir(hec.watershed.model.Reservoir resProject) Adds a new Reservoir Region into the system.Creates the reservoir sys op name.Creates the system hydropower rule.createTandemOpParent(TandemSysOpRule tandemSysRule) create a new TandemOp for the given rule and initialize data to that of the given rule.booleandeleteDiversion(String name) Delete diversion.voiddeleteDownstreamOp(int nodeIndex) deletes the downstreamOp referenced by the node index.voiddeleteDownstreamOpRule(int dindex, int rindex) Delete downstream op rule.booleanDelete global variable.voiddeleteInputTSData(String name) Deprecated.booleandeleteJunction(String name) Delete junction.voiddeleteNode(RssNode node) Delete node.booleandeleteReach(String name) Delete reach.booleandeleteReservoir(String name) Delete reservoir.protected voiddeleteReservoirOps(rma.util.IntVector resOpIds) delete the ReservoirOp with the record numbers in resOpIds.voiddelete a reservoir system operations object.protected voiddeleteReservoirSysOps(rma.util.IntVector resSysOpIds) delete the ReservoirSysOps with the record numbers in resSysOpIds.booleanDelete state variable.voiddeleteSystemHydropowerRule(int rindex) Delete system hydropower rule.voiddeleteTandemOpParent(int id) delete the TandemOp matching the id and have the all TandemSysOpRule objects that reference that TandemOp be deleted.voidvoiddeleting()called when the manager proxy is deleting the manager.booleandeserializeString(AsciiSerializable obj, String data) deserialize the AsciiSerialiable object from the String data.booleanDid conversion occur.intevalStateVariables(RunTimeStep rts, List svlist) walks over list of all state variables and calls their evaluate method for the given time step.voidfinalize()voidcalled when compute is complete to allow system to dump unneeded resources.findAdjParam(String elemName, String function, String param) Find adj param.findDiversion(hec.map.WorldPt wpt, double tol) Finds a diversion that Contains the given World Point.findDiversion(String name) Finds a diversion by name.findDivertedOutlet(hec.map.WorldPt wpt, double tol) Finds a diverted outlet that Contains the given World Point.findDivertedOutlet(String name) Finds a diverted outlet by name.findDownstreamNode(int streamIndex, double coord) Find downstream node.findElement(int idx) Finds an element with the given index from the network's element vector, does not recurse into child elements.findElement(String name) Find element.findGlobalScalar(String name) get Global Scalar Variable by name.get list of Global Scalars.findGlobalString(String name) get Global String Variable by name.get a List of Global Variable Strings.findGlobalTable(String name) get Global Table Variable by name.get list of Global Tables.get list of Global Time Series Variables.findGlobalTimeSeries(String name) get Global Time Series Variable by name.get the Scala Global Variables of a specified ScalarDataTypeget a List of all the Input GlobalVariablesfindJunction(hec.map.WorldPt wpt, double tol) Finds a Reach that Contains the given World Point.findJunction(hec.watershed.model.ComputationPoint cp) find a JunctionElement by computation point id.findJunction(String name) Finds a junction by name.findJunctions(Predicate<hec.map.WorldPt> predicate) Find node.get a List of all the Output GlobalVariablesfindReach(int streamIndex, double coord) Find reach.findReach(hec.map.WorldPt wpt, double tol) Finds a Reach that Contains the given World Point.Find reach.findReaches(Predicate<hec.map.WorldLine> predicate) findReservoir(int id) Finds a reservoir by its ID.findReservoir(int streamIndex, double coord) Find reservoir by stream index and coordinate.findReservoir(hec.map.WorldPt wpt) Finds an Reservoir the Contains the given World Point.findReservoir(String name) Finds an Reservoir by name.findReservoirs(Predicate<Object> predicate) double[]findTSArray(String locType, String locName, String param) Find ts array.findUpstreamNode(int streamIndex, double coord) Find upstream node.generateUniquePathPart(List nameElements, String delimeter) Generate unique path part.getActiveTSProxies(Vector vec, int iotype) returns a vector of required input, or generated output TSRecordProxies used in the current alternative.getActiveTSProxies(Vector vec, int iotype, int computeType) returns a vector of required input, or generated output TSRecordProxies used in the current alternative.getActiveWaterQualityTSProxies(hec.rss.wq.model.WQRun wqRun) Gets the alignment.Returns the current RssAlt alternative used for this Network- returns null if not available.Gets the base directory.intreturns the counter index of the decision element loop within an element block in the RssSystem.compute method or -1 if outside the loop.intreturns the counter index of the element block loop in the RssSystem.compute method or -1 if outside the loop.intreturns the counter index of the solution pass loop in the RssSystem.compute method or -1 if outside the loop.intreturns the counter index of the routing step loop in the RssSystem.compute method or -1 if outside the loop.intreturns the counter index of the time step loop in the RssSystem.compute method or -1 if outside the loop.intGets the compute type.hec.watershed.model.ConditionGets the configuration.longGets the configuration id.getConnectionNode(hec.map.WorldPt pt, double tol, int idir) Gets the connection node.hec.map.crs.CoordinateReferenceSystemReturns the coordinate reference system that describes the location of this map.protected mil.army.usace.hec.rmi.io.dbf.DbfFilegetDbfFile(String path) given a file path open, and create if necessary, the corresponding DbfFile.Default Downstream Rule Options.doubleBase flow value for computing pulse routing, RssSystem default.voidgetDefaultPulseFlow(hec.data.ParamDouble pd) Gets the default pulse flow.returns a vector of ts record proxies used to identify adjustable diversion elements and their time seriesString[]/** get and array of strings containing the names of all diversion elements.getDownstreamElements(Element startingElem) returns a vector of elements that are downstream of the given element following the flow path - not following any diversions.getDownstreamElements(Element startingElem, boolean sort) Gets the downstream elements.booleangetDownstreamNodeList(Element startingElem, List<RssNode> 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.booleangetDownstreamOp(int nodeIndex) Gets a the DownstreamOp for the given node index, will return null if the DownstreamOp does not already exist.getDownstreamOp(int nodeIndex, boolean createIfNull) Gets a the DownstreamOp for the given node index.getDownstreamOpRule(String name) Gets the downstream op rule.Gets the downstream op rules blw element.Gets the dss paired data file path.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.getElementByOrder(int iorder) return the element from the Active Element Vector based on the id's listed in array returned from getElementOrder()intGets the element count.intgetElementCount(String classname) count the elements of the given classname in the element vector.intgetElementCountByFunction(String classname) count the elements of the given classname in the element vector.String[]getElementNames(String classname) get and array of strings containing the names of all elements of the given class.getElementNameVector(String classname) returns a vector of string with element names of the given class.getElementNameVectorByFunction(String classname) returns a vector of string with element names of the given class.int[]Gets the element order.get a reference to the element vector.<T> Vector<T> getElementVectorByClass(Class<T> c) returns a vector of elements of the given class.getElementVectorByClass(String classname) returns a vector of elements of the given class.hec.map.WorldRectGets the Extent attribute of the MapObjectInterface objectgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.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.getGlobalVariable(int id) Gets the global variable.getGlobalVariable(String name) Gets the user-defined GlobalVariable named by the given string "name", or null if no match is found.get a reference to the GlobalVariable List.getGlobalVariables(GlobalVariableType gvType) get the headwater junctions for this network.gets a vector of HindcastData objects from all elements in the system that require hindcast information.get Global Variable List of input usage type.get Global Variable List of input usage type for the type of global variable.Deprecated.Returns the working list of iteration blocks for the current compute.String[]get and array of strings containing the names of all junction elements.Takes a object of class Element, Function, RssNode, OpController, or OpRule and returns a unique string identifying that object.get the last version of ResSim the network was saved inhec.map.MapIdentifierGets the MapIdentifier attribute of the MapObjectInterface objectreturns the display name for key string.getNextDefaultName(int type) returns a suggested name that is unique for given element type.intGets the next res op id.intGets the next res sys op id.getNode(int idx) Gets the node.String[]getNodeNames(String type) Deprecated.get a reference to the node vector.getObjectForKeyString(String keystr) Takes a key string and returns the object of class Element, Function, Node, OpController, or OpRule This should be a TSManager method.Gets the observed data ts proxies.Returns to original network's name that was used when creating an alternative.get Global Variable List of output usage type.String[]get and array of strings containing the names of all reach elements.String[]get an array of Strings containing the names of all reservoir elements.Deprecated.- now stores data in it's own DBF file get a reference to the reservoir data listgetReservoirSysOp(String name) Retreives a Reservoir System Operation by name.Deprecated.- now stores data in it's own DBF file get a reference to the reservoir system data listGets the reservoir sys ops.mil.army.usace.hec.rmi.io.dbf.DbfFileopen/return the ReservoirOperations DbfFile.protected Stringget the path to the ReservoirOp DBF file.mil.army.usace.hec.rmi.io.dbf.DbfFileopen/return the ReservoirSystem Operations DBF file.protected Stringget the path to the ReservoirSysOp DBF file.get the active run.static ListGets the scriptable method names.getStateVariable(int id) Gets the state variable.getStateVariable(String name) Gets the user-defined StateVariable named by the given string "name", or null if no match is found.get a reference to the StateVariable List.getSystemHydropowerRule(int ruleIndex) Retrives the SystemHydropowerRule for a given ruleIndex.getSystemHydropowerRule(String ruleName) Retrives the SystemHydropowerRule by name.Returns a list of SystemHydropowerRule(s).return the tandemOp, creating it if necessary.getTandemOpParent(int id) retreive a TandemOp object by integer index.get a List of all TandemOp objects.getTimeSeries(int elementType, String elementName, int vid) return aTSRecordfor the specified arguments.getTimeSeries(int computeType, String elementType, String elementName, int varId) return aTSRecordfor the specified arguments.getTimeSeries(int computeType, String elementType, String elementName, String childElementName, String tsRecordParam) return aTSRecordfor the specified arguments.getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam) return an output(computed)TSRecordfor the specified arguments.getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam, boolean wantsInputRecord) return aTSRecordfor the specified arguments.getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam, String computeType) return an output(computed)TSRecordfor the specified arguments.getTimeSeriesLocation(int elementType, String elementName) return a RssTLocation object of the given type and name.getTimeSeriesLocation(String elementType, String elementName) return a RssTLocation object of the given type and name.Deprecated.getTSRecordProxies(boolean isInput) Deprecated.getTSRecordProxy(String name, int varid) Gets the tS record proxy.getTSRecordProxy(String elementType, String elementName, String childElementName, String tsRecordParam, boolean wantsInputRecord) getUpstreamElements(Element startingElem) Gets the downstream elements.intReturn the current version id of the RssSystem.getWaterAccount(int id) Gets the Water Account.getWaterAccountSet(int index) Gets the water accoutn set.getWaterAccountSet(String name) Gets the water account set list.hec.rss.wq.model.WQRungetWQRun()Gets the Water Quality Run.booleanglobalVariableExists(int index, GlobalVariableType type) booleanreturns true if the system has any downstream goals in the active operation set.voidinit()intCalls the initialization routine for all DownstreamOp objects in preparation for compute.booleaninitForPostProcessing(TSDataSet inputTS, TSDataSet outputTS, int computeType, RunTimeWindow rtw) Prepares this run for post processing in the ResSim Simulation Module.voidinitialize the hotstart settings.booleaninitialize(TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet, int computeType, RunTimeWindow rtw) initialize prior to a compute, called by RssRun.booleaninitialize(Operations op, TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet) Deprecated.booleanbooleaninitializeStateVariables(int computeType) Initialize state variables.voidinitialize the tandemOp, creating it if necessary.voidinitZBruleArray(IterationBlock iterblk, RunTimeWindow rtw) Initializes mapping of reservoir elements to zone boundary rule array indices.booleanChecks if is compute canceled.booleanisKeyString(String str) checks to see if string is a key string.voidload()Loads the system from disk into memory.voidloadReservoirSysOps(boolean force) This method is used to ensure that the Reservoir System Ops have been loadedbooleancalled during saveAs to allow managers to modify themselves as necessary, returns true if there are changes made.create a new reach element with a default name and add it to the element list.newDiversionElement(String name) create a new reach element and add it to the element list.newElement(boolean addtolist) create a new element and add it to the element list.newGlobalVariable(String name, GlobalVariable gv) New global variable.newGlobalVariable(String name, GlobalVariableType type) New global variable.create a new junction element with a default name and add it to the element list.newJunctionElement(hec.watershed.model.ComputationPoint cp) create a new junction element and add it to the element list.newJunctionElement(String name) create a new junction element and add it to the element list.newNode()create a new node and add it to the list.create a new reach element with a default name and add it to the element list.newReachElement(String name) create a new reach element and add it to the element list.newStateVariable(String name) New state variable.newStateVariable(String name, StateVariable sv) New state variable.newTandemOpParent(String name) Creates a new TandemOp with the given name, no checking is done to ensure unique names.newTimeStepRoutingElement(boolean addToList) intNext element index.intbooleanorderElementsForCompute(int computeType) Develop correct element ordering for given compute type including creation of iteration blocks.booleansets active state of elements and nodes in preparation for a cumulative local flow simulation.booleanprepHoldoutCompute(String resname) sets active elements for computing holdouts for a specific reservoir.booleanprepPulseRoutingCompute(ReservoirElement res, int opid, int outletId) Sets active elements for computing a pulse change in flow for a specific reservoir outlet.booleansets all elements and nodes active in preparation for a regulated flow simulation.booleansets active state of elements and nodes in preparation for a unregulated flow simulation.voidprintGlobalScalarsToComputeLog(int detailLevel) print the Scalar GLobalVariables to the compute logvoidprintGlobalStringsToComputeLog(int detailLevel) print the String GlobalVariables to the compute logvoidprintGlobalTablesToComputeLog(int detailLevel) voidprintGlobalTimeSeriesToComputeLog(int detailLevel) booleanreadFile(Identifier id) Retrieves the RssSystem data from the specified ASCII file.booleanrefreshData(Manager otherMgr) refresh this managers data from the origMgr's datavoidrenamed(Identifier id) called to rename the manager.voidfix naming of dam and diverted outlet default child elements.voidrenameInputTSData(String old, String newr) Deprecated.voidfix naming of dam and diverted outlet default child elements.voidrenameReservoirSysOp(String oldName, String newName) Rename reservoir sys op.voidrenameWaterAccountSet(String currentName, String newName) voidcause the ReservoirOps and RerservoirSysOps to save correctly when the the dbf filenames have changed.voidreset parent element assignment to all child elements.booleanrunStateVariableInitScripts(int computeType) Runs the Init script for the state variables.saveManagerAs(String directory, String filePrefix, ManagerProxyListContainer container) duplicate our data file to a new file and add a new Manager that uses it to the ManagerProxyListContainer specifiedsaveManagerAs(String directory, String filePrefix, ManagerProxyListContainer container, Identifier destId, RssSystem copy) Save manager as.Sserialize an AsciiSerializable object to a StringBuffer.voidsetAlternative(RssAlt alt) set the alternative for the current compute.voidsetComputeCanceled(boolean canceled) voidsetConfiguration(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.voidsetConfigurationForImport(hec.watershed.model.Condition config) set a new configuration when importing this network into another watershed.voidSets the default downstream options.voidsetDefaultPulseFlow(double basePulseFlow) Sets the default pulse flow.voidsetDefaultPulseFlow(hec.data.ParamDouble pd) Sets the default pulse flow.voidsetExtent(hec.map.WorldRect rc) Sets the Extent attribute of the MapObjectInterface objectbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetInputTSDataSet(TSDataSet tsData) Sets the input ts data set.voidsetMapIdentifier(hec.map.MapIdentifier id) Sets the MapIdentifier attribute of the MapObjectInterface objectvoidSets the operations.voidsetOutputTSDataSet(TSDataSet tsData) Sets the output ts data set.voidsets the run for the active compute.voidCalled just before ascii serialization.voidsetWaterAccountSetList(List<WaterAccountSet> waterAccountSetList) Sets the water account set list.booleanshouldSaveHotstartAtTimeStep(int step, int computeType) Should save hotstart at time step.intsimulateForecast(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute) Perform forecast simulation.intsimulateForecastStep(RunTimeStep rts, int computeType, IterationBlock iterblk, boolean computeall, boolean runHindcastCompute, List pumpResList, int iteration, int elemStart, boolean lastTSEval, List pumpRuleList) Perform forecast simulation step, only recomputes elements that have been flagged as dirty.intsimulateForecastWithLocalDecisions(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute, int maxtrial) Perform forecast simulation with local decision making.intsimulateHindcast(RunTimeWindow rtw, int computeType) Perform hindcast simulation.intsimulatePumpbackStep32(RunTimeStep rts, List pumpResList, int iteration) voidunload()called when the MapGlyph unloads this Manager.voidcalled when the ManagerProxy unloads this Manager.voidUpdates all nodes and elements associated with configuration objects.voidvoidupdateGlobalVariable(int id, GlobalVariable updatedGV) voidLoops over all elements and reservoir system operations updating the set of TSRecordProxies for all computation modes.booleanwriteFile(Identifier id) voidWrite hotstart states.Methods inherited from class hec.clientapp.model.Manager
addModifiableListener, computeComplete, copyFile, deleteFile, getCallback, getCommonDataList, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFileManager, getFilename, getGmtOffset, getIdentifier, getInputITSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUnitSystem, getUserInterface, getWorkspace, getWorkspacePath, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, newFile, newTSRecordProxy, newTSRecordProxy, notify, notifyModifiableListeners, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, saveChildManagers, saveManager, saveManagerAs, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toString, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, 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, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.map.MapObjectInterface
getNameMethods inherited from interface rma.lang.Modifiable
isModified
-
Field Details
-
REACH_STR
The Constant REACH_STR.- See Also:
-
RESERVOIR_STR
The Constant RESERVOIR_STR.- See Also:
-
JUNCTION_STR
The Constant JUNCTION_STR.- See Also:
-
DIVERSION_STR
The Constant DIVERSION_STR.- See Also:
-
REACH
public static final int REACHThe Constant REACH.- See Also:
-
RESERVOIR
public static final int RESERVOIRThe Constant RESERVOIR.- See Also:
-
JUNCTION
public static final int JUNCTIONThe Constant JUNCTION.- See Also:
-
DIVERSION
public static final int DIVERSIONThe Constant DIVERSION.- See Also:
-
SPILLWAY
public static final int SPILLWAYThe Constant SPILLWAY.- See Also:
-
KEYMARK
The Constant KEYMARK.- See Also:
-
KEYDELIM
The Constant KEYDELIM.- See Also:
-
VERSION
public static final int VERSIONversion 1029 updated diversions with no rules in ResSim version 3.5 files- See Also:
-
HINDCAST_ELEM_STATE
public static final int HINDCAST_ELEM_STATEThe Constant HINDCAST_ELEM_STATE.- See Also:
-
OUTER_TIME_ELEM_STATE
public static final int OUTER_TIME_ELEM_STATEThe Constant OUTER_TIME_ELEM_STATE.- See Also:
-
TRIAL_ELEM_STATE
public static final int TRIAL_ELEM_STATEThe Constant TRIAL_ELEM_STATE.- See Also:
-
INNER_TIME_ELEM_STATE
public static final int INNER_TIME_ELEM_STATEThe Constant INNER_TIME_ELEM_STATE.- See Also:
-
TIME_BLOCK_ELEM_STATE
public static final int TIME_BLOCK_ELEM_STATEThe Constant TIME_BLOCK_ELEM_STATE.- See Also:
-
TIME_BLOCK_ELEM_STATE2
public static final int TIME_BLOCK_ELEM_STATE2The Constant TIME_BLOCK_ELEM_STATE2.- See Also:
-
PRE_COMPUTE_ELEM_STATE
public static final int PRE_COMPUTE_ELEM_STATEThe Constant PRE_COMPUTE_ELEM_STATE.- See Also:
-
NUM_ELEM_STATES
public static final int NUM_ELEM_STATESThe Constant NUM_ELEM_STATES.- See Also:
-
COMPUTE_ENGINE_3X
public static final int COMPUTE_ENGINE_3Xflag indicating use of version 3X compute engine- See Also:
-
COMPUTE_ENGINE_4A
public static final int COMPUTE_ENGINE_4Aflag indicating use of version 4A compute engine based on message passing- See Also:
-
COMPUTE_ENGINE_4B
public static final int COMPUTE_ENGINE_4Bflag indicating use of version 4B compute engine based on modified simplex method- See Also:
-
GLOBAL_VARIABLE_TABLES_DSS
- See Also:
-
DEFAULT_PULSE_FLOW_ENGLISH
public static final double DEFAULT_PULSE_FLOW_ENGLISHThe Constant DEFAULT_PULSE_FLOW_ENGLISH.- See Also:
-
DEFAULT_PULSE_FLOW_SI
public static final double DEFAULT_PULSE_FLOW_SIThe Constant DEFAULT_PULSE_FLOW_SI.- See Also:
-
DEBUG_CONV
public static boolean DEBUG_CONVStatic flag that triggers detailed output to analyze convergence of the decision algorithm
-
-
Constructor Details
-
RssSystem
public RssSystem()Instantiates a new rss system.
-
-
Method Details
-
finalize
-
getStateRts
-
buildElementGraph
-
buildElementGraph
public ElementGraph buildElementGraph(int computeType, boolean considerRules, boolean returnOnlyIfSuccess) -
orderElementsForCompute
public boolean orderElementsForCompute(int computeType) Develop correct element ordering for given compute type including creation of iteration blocks. collect all tsrecord and set up array that holds them- Parameters:
computeType- the compute type- Returns:
- true, if successful
-
getComputeElemBlockCounter
public int getComputeElemBlockCounter()returns the counter index of the element block loop in the RssSystem.compute method or -1 if outside the loop.- Returns:
- the counter index of the element
-
getComputePassCounter
public int getComputePassCounter()returns the counter index of the solution pass loop in the RssSystem.compute method or -1 if outside the loop.- Returns:
- the counter index of the solution pass
-
getComputeTimeStepCounter
public int getComputeTimeStepCounter()returns the counter index of the time step loop in the RssSystem.compute method or -1 if outside the loop.- Returns:
- the counter index of the time step
-
getComputeDecisionElemCounter
public 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.- Returns:
- the counter index of the time decision element
-
getComputeRoutingStepCounter
public int getComputeRoutingStepCounter()returns the counter index of the routing step loop in the RssSystem.compute method or -1 if outside the loop.- Returns:
- the counter index of the routing step
-
getComputeType
public int getComputeType()Gets the compute type.- Returns:
- the compute type
-
getTandemOp
return the tandemOp, creating it if necessary.- Returns:
- the tandemOp
-
initTandemOpForecastStep
initialize the tandemOp, creating it if necessary.- Parameters:
rts- the rts
-
getTandemOpParent
retreive a TandemOp object by integer index. If the TandemOp does not exist the method returns null- Parameters:
id- TandemOp index- Returns:
- TandemOp or null
-
getTandemOps
get a List of all TandemOp objects.- Returns:
- a new ArrayList containing TandemOp objects
-
newTandemOpParent
Creates a new TandemOp with the given name, no checking is done to ensure unique names.- Parameters:
name- Name of new TandemOp- Returns:
- new TandemOp
-
createTandemOpParent
create a new TandemOp for the given rule and initialize data to that of the given rule.- Parameters:
tandemSysRule- the tandem sys rule- Returns:
- a new TandemOp
-
deleteTandemOpParent
public void deleteTandemOpParent(int id) delete the TandemOp matching the id and have the all TandemSysOpRule objects that reference that TandemOp be deleted.- Parameters:
id- the id
-
initDownstreamPulse
public int initDownstreamPulse()Calls the initialization routine for all DownstreamOp objects in preparation for compute.- Returns:
- RTN_NOPROBLEM if initialization is successful
-
getDownstreamOpRule
Gets the downstream op rule.- Parameters:
name- the name- Returns:
- the downstream op rule
-
deleteDownstreamOpRule
public void deleteDownstreamOpRule(int dindex, int rindex) Delete downstream op rule.- Parameters:
dindex- the dindexrindex- the rindex
-
deleteDownstreamOp
public void deleteDownstreamOp(int nodeIndex) deletes the downstreamOp referenced by the node index.- Parameters:
nodeIndex- the node index
-
createSystemHydropowerRule
Creates the system hydropower rule.- Returns:
- the system hydropower rule
-
getSystemHydropowerRule
Retrives the SystemHydropowerRule for a given ruleIndex. If there is not HydropowerRule for that index then a null value is returned.- Parameters:
ruleIndex- the rule index- Returns:
- the system hydropower rule
-
getSystemHydropowerRule
Retrives the SystemHydropowerRule by name. If there is not HydropowerRule for that name then a null value is returned. Note: this is a slower retrieval than using the SystemHydropowerRule's Index.- Parameters:
ruleName- the rule name- Returns:
- the system hydropower rule
-
deleteSystemHydropowerRule
public void deleteSystemHydropowerRule(int rindex) Delete system hydropower rule.- Parameters:
rindex- the rindex
-
getDownstreamOp
Gets a the DownstreamOp for the given node index, will return null if the DownstreamOp does not already exist.- Parameters:
nodeIndex- RssNode index- Returns:
- DownstreamOp object or null
-
getDefaultDownstreamOptions
Default Downstream Rule Options.- Returns:
- the default downstream options
-
setDefaultDownstreamOptions
Sets the default downstream options.- Parameters:
dOps- the new default downstream options
-
getDownstreamOp
Gets a the DownstreamOp for the given node index. If the DownstreamOp does not already exist. one will be created when the createIfNull parameter if true.- Parameters:
nodeIndex- RssNode indexcreateIfNull- if true a DownstreamOp will be created if necessary- Returns:
- DownstreamOp object
-
getSystemHydropowerRules
Returns a list of SystemHydropowerRule(s). This list is guaranteed to be non null. If the RssSystem does not have any hydropower rules than a list of size 0 will be returned.- Returns:
- the list of SystemHydropowerRules.
-
getDownstreamOpRulesBlwElement
Gets the downstream op rules blw element.- Parameters:
res- the resvec- the vec- Returns:
- the downstream op rules blw element
-
getTSRecordProxy
Gets the tS record proxy.- Parameters:
name- the namevarid- the varid- Returns:
- the tS record proxy
-
isKeyString
checks to see if string is a key string.- Parameters:
str- the str- Returns:
- true, if is key string
-
getOriginalNetworkName
Returns to original network's name that was used when creating an alternative. Background - when a user uses a network to create an alternative, the network name is changed to the alternative key + ":" + original network name. The original network is actually getting copied and renamed when used in a different alternative.- Returns:
- the original network selected for the alternative at the time the alternative was created.
-
getNameForKeyString
returns the display name for key string.- Parameters:
key- the key- Returns:
- the name for key string
-
getKeyStringForObject
Takes a object of class Element, Function, RssNode, OpController, or OpRule and returns a unique string identifying that object.- Parameters:
obj- the obj- Returns:
- the key string for object
-
getObjectForKeyString
Takes a key string and returns the object of class Element, Function, Node, OpController, or OpRule This should be a TSManager method.- Parameters:
keystr- the keystr- Returns:
- the object for key string
-
generateUniquePathPart
Generate unique path part.- Parameters:
nameElements- the name elementsdelimeter- the delimeter- Returns:
- the string
-
setupForSerialization
public void setupForSerialization()Called just before ascii serialization. Prepares all subcomponets for serialization. -
cleanupFromDeSerialization
public void cleanupFromDeSerialization()Cleanup from de serialization. -
getBaseDirectory
Gets the base directory.- Returns:
- the base directory
-
getDssPairedDataFilePath
Gets the dss paired data file path.- Returns:
- the dss paired data file path
-
getHindcastDataList
gets a vector of HindcastData objects from all elements in the system that require hindcast information.- Returns:
- the hindcast data list
-
setConfiguration
public 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. This method is called right after creating a new RssSystem, and is only called on the client side.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
- Parameters:
study- the studyconfig- the config
-
getConfiguration
public hec.watershed.model.Condition getConfiguration()Gets the configuration.- Returns:
- the configuration
-
getConfigurationId
public long getConfigurationId()Gets the configuration id.- Returns:
- the configuration id
-
setConfigurationForImport
public void setConfigurationForImport(hec.watershed.model.Condition config) set a new configuration when importing this network into another watershed.- Parameters:
config- the new configuration for import
-
updateConfiguration
public void updateConfiguration()Updates all nodes and elements associated with configuration objects. Update operations include the following: Rename junctions, reservoirs, diversions. Move junctions, reservoir polygons, diversion lines. Add new junctions, reservoirs, diversions. If an object has a configuration id, but that id is not found, it looks for a link by name. -
modifiyForSaveAs
public boolean modifiyForSaveAs()called during saveAs to allow managers to modify themselves as necessary, returns true if there are changes made.- Overrides:
modifiyForSaveAsin classManager- Returns:
- true, if successful
-
addInputTSData
Deprecated.adds and Input TSDataSet to this system.- Parameters:
name- the name
-
getInputTSDataList
Deprecated.returns a Vector of input TSDataSet names.- Returns:
- the input ts data list
-
deleteInputTSData
Deprecated.deletes the input TSDataSet.- Parameters:
name- the name
-
renameInputTSData
Deprecated.renames an input TSDataSet.- Parameters:
old- the oldnewr- the newr
-
setRssRun
sets the run for the active compute.- Parameters:
run- the new rss run
-
getRssRun
get the active run.- Returns:
- the rss run
-
getWQRun
public hec.rss.wq.model.WQRun getWQRun()Gets the Water Quality Run. This is called from scripted rules for operating a Water Quality Control Device.- Returns:
- the WQ Run
-
setAlternative
set the alternative for the current compute.- Parameters:
alt- the new alternative
-
getAlternative
Returns the current RssAlt alternative used for this Network- returns null if not available.- Returns:
- RssAlt the Alternative used
-
getWaterAccountSet
-
renameWaterAccountSet
-
deleteWaterAccountSet
-
getReservoirSysOps
Gets the reservoir sys ops.- Returns:
- the reservoir sys ops
-
getUpstreamElements
Gets the downstream elements.- Parameters:
startingElem- the starting elem- Returns:
- the downstream elements
-
getDownstreamElements
returns a vector of elements that are downstream of the given element following the flow path - not following any diversions. Returns null if there is a connectivity error.- Parameters:
startingElem- the starting elem- Returns:
- the downstream elements
-
getDownstreamElements
Gets the downstream elements.- Parameters:
startingElem- the starting elemsort- the sort- Returns:
- the downstream elements
-
getDownstreamNodeList
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. This method does follow all downstream branches for elements with more than one downstream node. The filled list will not contain duplicate nodes Includes the downstream node of the given element. Returns returns false if there is a connectivity error, otherwise returns true.- Parameters:
startingElem- the starting elemnodeList- the node list- Returns:
- the downstream node list
-
getDownstreamNodeList
-
getReservoirOpDataList
Deprecated.- now stores data in it's own DBF file get a reference to the reservoir data listGets the reservoir op data list.- Returns:
- the reservoir op data list
-
getReservoirSysOpDataList
Deprecated.- now stores data in it's own DBF file get a reference to the reservoir system data listGets the reservoir sys op data list.- Returns:
- the reservoir sys op data list
-
renameReservoirSysOp
Rename reservoir sys op.- Parameters:
oldName- the old namenewName- the new name
-
getReservoirSysOp
Retreives a Reservoir System Operation by name. If there is a reservoir system operation with the given name it is returned. Otherwise a null value is returned.- Parameters:
name- the name- Returns:
- the reservoir sys op
-
createReservoirSysOpName
Creates the reservoir sys op name.- Parameters:
name- the name- Returns:
- the string
-
loadReservoirSysOps
public void loadReservoirSysOps(boolean force) This method is used to ensure that the Reservoir System Ops have been loaded -
createNewReservoirSysOp
Creates a new reservoir system operations set.- Parameters:
name- the namedescription- the description- Returns:
- the reservoir sys op
-
addReservoirSysOp
-
deleteReservoirSysOp
delete a reservoir system operations object.- Parameters:
sysOp- the sys op
-
deleteReservoirOps
protected void deleteReservoirOps(rma.util.IntVector resOpIds) delete the ReservoirOp with the record numbers in resOpIds.- Parameters:
resOpIds- the List of ReservoirOp dbf record numbers to delete
-
deleteReservoirSysOps
protected void deleteReservoirSysOps(rma.util.IntVector resSysOpIds) delete the ReservoirSysOps with the record numbers in resSysOpIds.- Parameters:
resSysOpIds- the List of ReservoirSysOp dbf record numbers to delete
-
prepRegulatedFlowCompute
public boolean prepRegulatedFlowCompute()sets all elements and nodes active in preparation for a regulated flow simulation.- Returns:
- true, if successful
-
prepCumLocFlowCompute
public boolean prepCumLocFlowCompute()sets active state of elements and nodes in preparation for a cumulative local flow simulation.- Returns:
- true, if successful
-
prepUnregulatedFlowCompute
public boolean prepUnregulatedFlowCompute()sets active state of elements and nodes in preparation for a unregulated flow simulation.- Returns:
- true, if successful
-
prepHoldoutCompute
sets active elements for computing holdouts for a specific reservoir.- Parameters:
resname- the resname- Returns:
- true, if successful
-
prepPulseRoutingCompute
Sets active elements for computing a pulse change in flow for a specific reservoir outlet. Set active only elements between reservoir outlet tailwater and downstream most element(s). All reservoirs downstream of outlet are set to uncontrolled behavior, so pulse will not flow down diverted outlets of downstream reservoirs.- Parameters:
res- the resopid- the opidoutletId- the outlet id- Returns:
- true, if successful
-
init
public void init() -
clearStreamAlignment
public void clearStreamAlignment()Clear stream alignment. -
getAlignment
Gets the alignment.- Returns:
- the alignment
-
getElementCount
public int getElementCount()Gets the element count.- Returns:
- the element count
-
getElementCount
count the elements of the given classname in the element vector.- Parameters:
classname- the classname- Returns:
- the element count
-
getElementCountByFunction
count the elements of the given classname in the element vector.- Parameters:
classname- the classname- Returns:
- the element count by function
-
getElementNameVector
returns a vector of string with element names of the given class.- Parameters:
classname- the classname- Returns:
- the element name vector
-
getElementNameVectorByFunction
returns a vector of string with element names of the given class.- Parameters:
classname- the classname- Returns:
- the element name vector by function
-
newElement
create a new element and add it to the element list.- Parameters:
addtolist- the addtolist- Returns:
- the element
-
newReachElement
create a new reach element with a default name and add it to the element list.- Returns:
- the reach element
-
newReachElement
create a new reach element and add it to the element list.- Parameters:
name- the name- Returns:
- the reach element
-
newTimeStepRoutingElement
-
newDiversionElement
create a new reach element with a default name and add it to the element list.- Returns:
- the diversion element
-
newDiversionElement
create a new reach element and add it to the element list.- Parameters:
name- the name- Returns:
- the diversion element
-
newGlobalVariable
New global variable.- Parameters:
name- the name- Returns:
- the global variable
-
newGlobalVariable
New global variable.- Parameters:
name- the namegv- GlobalVariable that will be added as "new"- Returns:
- the global variable
-
printGlobalScalarsToComputeLog
public void printGlobalScalarsToComputeLog(int detailLevel) print the Scalar GLobalVariables to the compute log- Parameters:
detailLevel- 1 same as ScalarGlobalVariable.printToComputeLog() 2 print more details of the ScalarGlobalVariable- See Also:
-
printGlobalStringsToComputeLog
public void printGlobalStringsToComputeLog(int detailLevel) print the String GlobalVariables to the compute log- Parameters:
detailLevel- 1 same to StringGlobalVariable.printToComputeLog() 2 print greater detail about the String GlobalVariable- See Also:
-
printGlobalTablesToComputeLog
public void printGlobalTablesToComputeLog(int detailLevel) - Parameters:
detailLevel-
-
printGlobalTimeSeriesToComputeLog
public void printGlobalTimeSeriesToComputeLog(int detailLevel) - Parameters:
detailLevel-
-
updateGlobalVariable
-
newStateVariable
New state variable.- Parameters:
name- the name- Returns:
- the state variable
-
newStateVariable
New state variable.- Parameters:
name- the namesv- StateVariable that will be added as "new"- Returns:
- the state variable
-
getWaterAccount
Gets the Water Account.- Parameters:
id- the id- Returns:
- the Water Account
-
getGlobalVariable
Gets the global variable.- Parameters:
id- the id- Returns:
- the global variable
-
getGlobalVariable
Gets the user-defined GlobalVariable named by the given string "name", or null if no match is found. The match is not case-sensitive.- Parameters:
name- String containing the name of a GlobalVariable- Returns:
- GlobalVariable
-
getStateVariable
Gets the state variable.- Parameters:
id- the id- Returns:
- the state variable
-
getStateVariable
Gets the user-defined StateVariable named by the given string "name", or null if no match is found. The match is not case-sensitive.- Parameters:
name- String containing the name of a StateVariable- Returns:
- StateVariable
-
getDefaultPulseFlow
public double getDefaultPulseFlow()Base flow value for computing pulse routing, RssSystem default. This value may be overriden by the individual ReservoirOutletElement- Returns:
- default pulse flow
-
getDefaultPulseFlow
public void getDefaultPulseFlow(hec.data.ParamDouble pd) Gets the default pulse flow.- Parameters:
pd- the pd
-
setDefaultPulseFlow
public void setDefaultPulseFlow(double basePulseFlow) Sets the default pulse flow.- Parameters:
basePulseFlow- the new default pulse flow
-
setDefaultPulseFlow
public void setDefaultPulseFlow(hec.data.ParamDouble pd) Sets the default pulse flow.- Parameters:
pd- the new default pulse flow
-
newJunctionElement
create a new junction element with a default name and add it to the element list.- Returns:
- the junction element
-
newJunctionElement
create a new junction element and add it to the element list.- Parameters:
name- the name- Returns:
- the junction element
-
newJunctionElement
create a new junction element and add it to the element list.- Parameters:
cp- the cp- Returns:
- the junction element
-
findDivertedOutlet
Finds a diverted outlet by name.- Parameters:
name- the name- Returns:
- DivertedOutletElement with the name or null
-
findDivertedOutlet
Finds a diverted outlet that Contains the given World Point.- Parameters:
wpt- the wpttol- the tol- Returns:
- the diverted outlet element
-
findDiversion
Finds a diversion that Contains the given World Point.- Parameters:
wpt- the wpttol- the tol- Returns:
- the diversion element
-
findDiversion
Finds a diversion by name.- Parameters:
name- the name- Returns:
- DiversionElement with the name or null
-
deleteDiversion
Delete diversion.- Parameters:
name- the name- Returns:
- true, if successful
-
findReach
Finds a Reach that Contains the given World Point.- Parameters:
wpt- the wpttol- the tol- Returns:
- the reach element
-
findReaches
-
findReach
Find reach.- Parameters:
name- the name- Returns:
- the reach element
-
breakReach
split the given reach into two reaches at the given world point.- Parameters:
oldreach- the oldreachwpt- the wptnewjunc- the newjunc
-
deleteStateVariable
Delete state variable.- Parameters:
sv- the sv- Returns:
- true, if successful
-
deleteGlobalVariable
Delete global variable.- Parameters:
gv- the gv- Returns:
- true, if successful
-
deleteReach
Delete reach.- Parameters:
name- the name- Returns:
- true, if successful
-
findJunction
Finds a Reach that Contains the given World Point.- Parameters:
wpt- the wpttol- the tol- Returns:
- the junction element
-
findReservoirs
-
findJunctions
-
findJunction
Finds a junction by name.- Parameters:
name- the name- Returns:
- JunctionElement with the name or null
-
findJunction
find a JunctionElement by computation point id.- Parameters:
cp- the cp- Returns:
- the junction element
-
deleteJunction
Delete junction.- Parameters:
name- the name- Returns:
- true, if successful
-
cleanVectors
public void cleanVectors()Clean vectors. -
findReservoir
Finds an Reservoir the Contains the given World Point.- Parameters:
wpt- the wpt- Returns:
- the reservoir element
-
findReservoir
Finds a reservoir by its ID.- Parameters:
id- the id- Returns:
- the reservoir element
-
findReservoir
Finds an Reservoir by name.- Parameters:
name- the name of the ReservoirElement- Returns:
- the ReservoirElement with the name of name or null
-
findReservoir
Find reservoir by stream index and coordinate.- Parameters:
streamIndex- the stream indexcoord- the coord- Returns:
- the reservoir element
-
addReservoir
Adds a reservoir element to the system. Does no checking to see if it already exists.- Parameters:
resElem- the res elem
-
deleteReservoir
Delete reservoir.- Parameters:
name- the name- Returns:
- true, if successful
-
createReservoir
Deprecated.Adds a new Reservoir Region into the system.- Parameters:
reg- the reg- Returns:
- the reservoir element
-
createReservoir
public ReservoirElement createReservoir(hec.map.WorldRegion reg, Vector nodeVec, Vector ndirVec, double tol, String name, String descrip) Adds a new Reservoir Region into the system.- Parameters:
reg- the regnodeVec- the node vecndirVec- the ndir vectol- the tolname- the namedescrip- the descrip- Returns:
- the reservoir element
-
getNextResOpId
public int getNextResOpId()Gets the next res op id.- Returns:
- the next res op id
-
getNextResSysOpId
public int getNextResSysOpId()Gets the next res sys op id.- Returns:
- the next res sys op id
-
createReservoir
Adds a new Reservoir Region into the system.- Parameters:
resProject- the res project- Returns:
- the reservoir element
-
getConnectionNode
Gets the connection node.- Parameters:
pt- the pttol- the tolidir- the idir- Returns:
- the connection node
-
createReach
public ReachElement createReach(JunctionElement upstreamJunc, JunctionElement downstreamJunc, RssNode inflowNode, RssNode outflowNode, String reachName) add a Reach into the System- Parameters:
upstreamJunc- the inflow junctiondownstreamJunc- the outflow junctioninflowNode- the inflow nodeoutflowNode- the outflow nodereachName- the name of the new Reach- Returns:
- the new ReachElement
-
createReach
Deprecated.Adds a new Reach into the System.- Parameters:
node0- the node0node1- the node1tol- the tol- Returns:
- the reach element
-
createDiversion
Adds a new Diversion into the System.- Parameters:
node0- the node0node1- the node1ptVec- the pt vectol- the tol- Returns:
- the diversion element
-
createDiversion
public Element createDiversion(hec.watershed.model.Diversion divproj, hec.watershed.model.Reservoir resproj) Adds either a Diversion of DivertedOutlet based on a Diversion Project.- Parameters:
divproj- the divprojresproj- the resproj- Returns:
- the element
-
findReach
Find reach.- Parameters:
streamIndex- the stream indexcoord- the coord- Returns:
- the reach element
-
getElementVector
get a reference to the element vector.- Returns:
- the element vector
-
getStateVariableList
get a reference to the StateVariable List.- Returns:
- the state variable list
-
getGlobalVariableList
get a reference to the GlobalVariable List.- Returns:
- the global variable list
-
getInputGlobalVariables
get Global Variable List of input usage type.- Returns:
- the global variable list with usage type of input
-
getInputGlobalVariables
get Global Variable List of input usage type for the type of global variable.- Parameters:
gvType- the type of GlobalVariable to return- Returns:
- the global variable list with usage type of input
-
getGlobalVariables
-
getOutputGlobalVariables
get Global Variable List of output usage type.- Returns:
- the global variable list with usage type of output
-
findGlobalScalars
get list of Global Scalars.- Returns:
- the list of Scalar Global Variables
-
findGlobalScalar
get Global Scalar Variable by name.- Parameters:
name-- Returns:
- the Scalar Global Variable
-
findGloblScalars
get the Scala Global Variables of a specified ScalarDataType- Parameters:
type-- Returns:
-
findGlobalStrings
get a List of Global Variable Strings.- Returns:
- the list of String Global Variables
-
findGlobalString
get Global String Variable by name.- Parameters:
name- the name of the String Global Variable- Returns:
- the String Global Variable
-
findGlobalTables
get list of Global Tables.- Returns:
- the list of Table Global Variables
-
findGlobalTable
get Global Table Variable by name.- Parameters:
name-- Returns:
- the Table Global Variable
-
findGlobalTimeSeries
get list of Global Time Series Variables.- Returns:
- the list of Time Series Global Variables
-
findGlobalTimeSeries
get Global Time Series Variable by name.- Parameters:
name-- Returns:
- the Time Series Global Variable
-
findInputGlobals
get a List of all the Input GlobalVariables- Returns:
- the List of Input GlobalVariables
-
findOutputGlobals
get a List of all the Output GlobalVariables- Returns:
- the List of Output GlobalVariables
-
getNodeVector
get a reference to the node vector.- Returns:
- the node vector
-
getElementVectorByClass
returns a vector of elements of the given class.- Parameters:
classname- the classname- Returns:
- the element vector by class
-
getElementVectorByClass
returns a vector of elements of the given class.- Parameters:
c- the c- Returns:
- the element vector by class
-
getElementOrder
public int[] getElementOrder()Gets the element order.- Returns:
- the element order
-
getElementByOrder
return the element from the Active Element Vector based on the id's listed in array returned from getElementOrder()- Parameters:
iorder-- Returns:
- Element, may be null if iorder is out of range or active element vec is not initialized.
-
getElement
Finds an element with the given index from the network's element vector or from the elements children by recursing into child elements.- Parameters:
idx- the idx- Returns:
- the element
-
findElement
Finds an element with the given index from the network's element vector, does not recurse into child elements.- Parameters:
idx- the idx- Returns:
- the element
-
findElement
Find element. Use this method with caution since it will find the first element with the name specified not caring what the Element type is (Reservoir, Reach, Junction, etc). Better to use the find method for the appropriate Element type wanted (findReservoir(), findReach() etc)- Parameters:
name- the name- Returns:
- the element
-
getNodeNames
Deprecated.Gets the node names.- Parameters:
type- the type- Returns:
- the node names
-
findAdjParam
Find adj param.- Parameters:
elemName- the elem namefunction- the functionparam- the param- Returns:
- the adjustable parameter
-
findTSArray
Find ts array.- Parameters:
locType- the loc typelocName- the loc nameparam- the param- Returns:
- the double[]
-
initialize
@Deprecated public boolean initialize(Operations op, TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet) Deprecated.Initializes the system to use a particual operations, inputTS, and outputTS in preparation for a compute used only by RssLpAlt, no longer supported.- Parameters:
op- the opinputTS- the input tsoutputTS- the output ts- Returns:
- true, if successful
-
initialize
public boolean initialize(TSDataSet inputTS, TSDataSet outputTS, GVDataSet inputGvDataSet, GVDataSet outputGvDataSet, int computeType, RunTimeWindow rtw) initialize prior to a compute, called by RssRun.- Parameters:
inputTS- the input tsoutputTS- the output tscomputeType- the compute typertw- the rtw- Returns:
- true, if successful
-
initializeGlobalVariables
public boolean initializeGlobalVariables() -
initForPostProcessing
public boolean initForPostProcessing(TSDataSet inputTS, TSDataSet outputTS, int computeType, RunTimeWindow rtw) 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.- Returns:
- RTN_NOPROBLEM if successful
-
initializeStateVariables
public boolean initializeStateVariables(int computeType) Initialize state variables.- Parameters:
computeType- the compute type- Returns:
- true, if successful
-
runStateVariableInitScripts
public boolean runStateVariableInitScripts(int computeType) Runs the Init script for the state variables.- Parameters:
computeType- the compute type- Returns:
- true, if successful
-
finalizeCompute
public void finalizeCompute()called when compute is complete to allow system to dump unneeded resources. -
evalStateVariables
walks over list of all state variables and calls their evaluate method for the given time step.- Parameters:
rts- time step for the evaluationsvlist- the svlist- Returns:
- the int
-
initHotstart
initialize the hotstart settings.- Parameters:
rtw- the rtw
-
compute3x
New version 3.0 computations supporting single step execution, flexible decision intervals, and downstream operation by multiple reservoirs- Parameters:
rtw- time window of the computerun- the runcomputeType- Regulated, Unregulated, Cum-Loc, PulserunHindcastCompute- true if hindcast is to be run- Returns:
- RTN_NOPROBLEM if compute successful
-
simulateHindcast
Perform hindcast simulation.- Parameters:
rtw- the rtwcomputeType- the compute type- Returns:
- the int
-
simulateForecastStep
public int simulateForecastStep(RunTimeStep rts, int computeType, IterationBlock iterblk, boolean computeall, boolean runHindcastCompute, List pumpResList, int iteration, int elemStart, boolean lastTSEval, List pumpRuleList) Perform forecast simulation step, only recomputes elements that have been flagged as dirty.- Parameters:
rts- the rtscomputeType- the compute typeiterblk- the iterblkcomputeall- the computeallrunHindcastCompute- the run hindcast computepumpResList- the pump res listiteration- the iterationelemStart- the elem start- Returns:
- the int
-
simulateForecast
public int simulateForecast(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute) Perform forecast simulation.- Parameters:
rtw- the rtwcomputeType- the compute typeiterblk- the iterblkrunHindcastCompute- the run hindcast compute- Returns:
- the int
-
simulateForecastWithLocalDecisions
public int simulateForecastWithLocalDecisions(RunTimeWindow rtw, int computeType, IterationBlock iterblk, boolean runHindcastCompute, int maxtrial) Perform forecast simulation with local decision making.- Parameters:
rtw- the rtwcomputeType- the compute typeiterblk- the iterblkrunHindcastCompute- the run hindcast computemaxtrial- the maxtrial- Returns:
- the int
-
setOperations
Sets the operations.- Parameters:
op- the new operations
-
setInputTSDataSet
Sets the input ts data set.- Parameters:
tsData- the new input ts data set
-
getInputTSDataSet
- Overrides:
getInputTSDataSetin classManager
-
getInputGvDataSet
- Returns:
-
getOutputGVDataSet
- Returns:
-
setOutputTSDataSet
Sets the output ts data set.- Parameters:
tsData- the new output ts data set
-
getOutputTSDataSet
- Overrides:
getOutputTSDataSetin classManager
-
findNode
Find node.- Parameters:
name- the name- Returns:
- the rss node
-
getNode
Gets the node.- Parameters:
idx- the idx- Returns:
- the node
-
readFile
Retrieves the RssSystem data from the specified ASCII file. If no path name is given, the method uses the current pathname of the Run.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 elementThe 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.
-
updateDiversionAndDivertedOutletElementsToTimeStep
public void updateDiversionAndDivertedOutletElementsToTimeStep() -
writeFile
-
getVersion
public int getVersion()Return the current version id of the RssSystem. This represents the version id of the RssSystem as read from the file.- Returns:
- the version
-
getLastSavedInResSimVersion
get the last version of ResSim the network was saved in- Returns:
- the last version of ResSim the network was saved in
-
setMapIdentifier
public void setMapIdentifier(hec.map.MapIdentifier id) Description copied from interface:hec.map.MapObjectInterfaceSets the MapIdentifier attribute of the MapObjectInterface object- Specified by:
setMapIdentifierin interfacehec.map.MapObjectInterface- Parameters:
id- The new MapIdentifier value
-
getMapIdentifier
public hec.map.MapIdentifier getMapIdentifier()Description copied from interface:hec.map.MapObjectInterfaceGets the MapIdentifier attribute of the MapObjectInterface object- Specified by:
getMapIdentifierin interfacehec.map.MapObjectInterface- Returns:
- The MapIdentifier value
-
setExtent
public void setExtent(hec.map.WorldRect rc) Description copied from interface:hec.map.MapObjectInterfaceSets the Extent attribute of the MapObjectInterface object- Specified by:
setExtentin interfacehec.map.MapObjectInterface- Parameters:
rc- The new Extent value
-
getExtent
public hec.map.WorldRect getExtent()Description copied from interface:hec.map.MapObjectInterfaceGets the Extent attribute of the MapObjectInterface object- Specified by:
getExtentin interfacehec.map.MapObjectInterface- Returns:
- The Extent value
-
load
Loads the system from disk into memory.- Specified by:
loadin interfacehec.map.MapObjectInterface- Throws:
IOException- Signals that an I/O exception has occurred.
-
unload
public void unload()called when the MapGlyph unloads this Manager.- Specified by:
unloadin interfacehec.map.MapObjectInterface
-
unloading
public void unloading()called when the ManagerProxy unloads this Manager. -
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.- Returns:
- the flow contol ts record proxies
-
getDivContolTSRecordProxies
returns a vector of ts record proxies used to identify adjustable diversion elements and their time series- Returns:
- the diversion control ts record proxies
-
clearTSProxyList
public void clearTSProxyList()Loops over all elements and reservoir system operations clearing set of TSRecordProxies for all computation modes. -
updateTSProxyList
public void updateTSProxyList()Loops over all elements and reservoir system operations updating the set of TSRecordProxies for all computation modes. -
addWQModelVariables
Add ModelVariables to the global list of model variables for each water quality constituent modeled included in the current alternative- Parameters:
conlist- set of constituents- Returns:
- list of ModelVariable objects created for each constituent
-
applyHindcastData
applies hindcast data to computeable objects.- Parameters:
hdvec- the hdvec
-
getObservedDataTSProxies
Gets the observed data ts proxies.- Parameters:
vec- the vec- Returns:
- the observed data ts proxies
-
getActiveTSProxies
returns a vector of required input, or generated output TSRecordProxies used in the current alternative.- Parameters:
vec- the veciotype- the iotype- Returns:
- the active ts proxies
-
getActiveTSProxies
returns a vector of required input, or generated output TSRecordProxies used in the current alternative.- Parameters:
vec- the veciotype- the iotypecomputeType- the compute type- Returns:
- the active ts proxies
-
getActiveWaterQualityTSProxies
-
getTSRecordProxies
Deprecated.gets all time-series record proxies from nodes. Implementation for TSManager interface.- Specified by:
getTSRecordProxiesin interfaceTSManager- Returns:
- the tS record proxies
-
getTSRecordProxies
Deprecated.Returns a list of all TSRecordProxies for an input or output data set This is only returning the proxies required for the current computation mode.- Specified by:
getTSRecordProxiesin interfaceTSManager- Parameters:
isInput- the is input- Returns:
- the tS record proxies
-
getNextDefaultName
returns a suggested name that is unique for given element type.- Parameters:
type- the type- Returns:
- the next default name
-
getElementNames
get and array of strings containing the names of all elements of the given class.- Parameters:
classname- the classname- Returns:
- the element names
-
getReservoirNames
get an array of Strings containing the names of all reservoir elements.- Returns:
- the array of ReservoirElement names
-
getReachNames
get and array of strings containing the names of all reach elements.- Returns:
- the array of ReachElement names
-
getJunctionNames
get and array of strings containing the names of all junction elements.- Returns:
- the array of JunctionElement names
-
getDiversionNames
/** get and array of strings containing the names of all diversion elements.- Returns:
- the array of DiversionElement names
-
newNode
create a new node and add it to the list.- Returns:
- the rss node
-
createNode
Adds a RssNode to the system.- Parameters:
pt- the pt- Returns:
- the rss node
-
createNode
Adds a RssNode to the system based on a Common Computation Point.- Parameters:
cp- the cp- Returns:
- the rss node
-
createNode
Adds a RssNode to the system based on a Node from a Reservoir Project.- Parameters:
n- the n- Returns:
- the rss node
-
deleteNode
Delete node.- Parameters:
node- the node
-
findDownstreamNode
Find downstream node.- Parameters:
streamIndex- the stream indexcoord- the coord- Returns:
- the hec.rss.model. rss node
-
findUpstreamNode
Find upstream node.- Parameters:
streamIndex- the stream indexcoord- the coord- Returns:
- the hec.rss.model. rss node
-
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 classManager- 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 classManager- 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
-
nextElementIndex
public int nextElementIndex()Next element index.- Returns:
- the int
-
resetParentElement
public void resetParentElement()reset parent element assignment to all child elements. -
renameDamElementChildren
public void renameDamElementChildren()fix naming of dam and diverted outlet default child elements. -
renameResChildrenUpNodes
public void renameResChildrenUpNodes()fix naming of dam and diverted outlet default child elements. -
hasDownstreamGoals
public boolean hasDownstreamGoals()returns true if the system has any downstream goals in the active operation set.- Returns:
- true, if successful
-
backupFile
- Overrides:
backupFilein classManager
-
saveManagerAs
public Manager saveManagerAs(String directory, String filePrefix, ManagerProxyListContainer container) Description copied from class:Managerduplicate our data file to a new file and add a new Manager that uses it to the ManagerProxyListContainer specified- Overrides:
saveManagerAsin classManager- Returns:
- the new Manager
-
saveManagerAs
public Manager saveManagerAs(String directory, String filePrefix, ManagerProxyListContainer container, Identifier destId, RssSystem copy) Save manager as.S- Parameters:
directory- the directoryfilePrefix- the file prefixcontainer- the containerdestId- the dest idcopy- the copy- Returns:
- the manager
-
refreshData
Description copied from class:Managerrefresh this managers data from the origMgr's data- Overrides:
refreshDatain classManager
-
copyGlobalVariableTables
-
getGlobalVariableTablesFile
-
deleting
public void deleting()called when the manager proxy is deleting the manager. -
renamed
Description copied from class:Managercalled to rename the manager. -
resetAndSaveOperations
public void resetAndSaveOperations()cause the ReservoirOps and RerservoirSysOps to save correctly when the the dbf filenames have changed. Used for renaming and saveAs -
getResOpDbfFileName
get the path to the ReservoirOp DBF file.- Returns:
- the Reservoir Opertations file path
-
getResSysOpDbfFileName
get the path to the ReservoirSysOp DBF file.- Returns:
- the Reservoir System Operations file path
-
getResOpDbfFile
public mil.army.usace.hec.rmi.io.dbf.DbfFile getResOpDbfFile()open/return the ReservoirOperations DbfFile.- Returns:
- the DbfFile for the ReservoirOperations
-
getResSysOpDbfFile
public mil.army.usace.hec.rmi.io.dbf.DbfFile getResSysOpDbfFile()open/return the ReservoirSystem Operations DBF file.- Returns:
- the DbfFile for the ReservoirSystem Operations
-
getDbfFile
given a file path open, and create if necessary, the corresponding DbfFile.- Parameters:
path- the file path to open- Returns:
- the DbfFile for path
-
deserializeString
deserialize the AsciiSerialiable object from the String data.- Parameters:
obj- the object to deserialize data intodata- the AsciiSerialized data- Returns:
- whether the deserialization was successful
-
serializeObjectToString
serialize an AsciiSerializable object to a StringBuffer.- Parameters:
obj- the object to AsciiSerialize- Returns:
- the AsciiSerialized obj in the form of a StringBuffer
-
setComputeCanceled
public void setComputeCanceled(boolean canceled) - Specified by:
setComputeCanceledin interfaceComputeCanceledCallback
-
isComputeCanceled
public boolean isComputeCanceled()Checks if is compute canceled.- Returns:
- true, if is compute canceled
-
getTimeSeriesLocation
return a RssTLocation object of the given type and name.- Parameters:
elementType- the element typeelementName- the element name- Returns:
- the time series location
-
getTimeSeriesLocation
return a RssTLocation object of the given type and name.- Parameters:
elementType- The type of element. One ofREACH,RESERVOIR,JUNCTION,DIVERSIONelementName- The name of the element- Returns:
- the time series location
-
getTimeSeries
public TSRecord getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam) return an output(computed)TSRecordfor the specified arguments.- Parameters:
elementType- the type of element. One ofRESERVOIR_STR,REACH_STR,JUNCTION_STR,DIVERSION_STRelementName- the element namechildElementName- the child element name or nulltsRecordParam- the name of the TimeSeries Record- Returns:
- the TSRecord or null if not found
-
getTimeSeries
public TSRecord getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam, String computeType) return an output(computed)TSRecordfor the specified arguments.- Parameters:
elementType- the type of element. One ofRESERVOIR_STR,REACH_STR,JUNCTION_STR,DIVERSION_STRelementName- the element namechildElementName- the child element name or nulltsRecordParam- the name of the TimeSeries RecordcomputeType- 'unreg' or 'cumloc' to get the record from either the unreg or cumloc compute- Returns:
- the TSRecord or null if not found
-
getTimeSeries
return aTSRecordfor the specified arguments.- Parameters:
computeType- one ofRssRun.COMPUTE_CUMLOC,RssRun.COMPUTE_UNREG,RssRun.COMPUTE_REGelementType- the type of element. One ofRESERVOIR_STR,REACH_STR,JUNCTION_STR,DIVERSION_STRelementName- the element namevarId- the Variable ID- Returns:
- the TSRecord or null if not found
-
getTimeSeries
public TSRecord getTimeSeries(int computeType, String elementType, String elementName, String childElementName, String tsRecordParam) return aTSRecordfor the specified arguments.- Parameters:
computeType- one ofRssRun.COMPUTE_CUMLOC,RssRun.COMPUTE_UNREG,RssRun.COMPUTE_REGelementType- the type of element. One ofRESERVOIR_STR,REACH_STR,JUNCTION_STR,DIVERSION_STRelementName- the element namechildElementName- the child element name or nulltsRecordParam- the name of the TimeSeries Record- Returns:
- the TSRecord or null if not found
-
getTimeSeries
public TSRecord getTimeSeries(String elementType, String elementName, String childElementName, String tsRecordParam, boolean wantsInputRecord) return aTSRecordfor the specified arguments.- Parameters:
elementType- the type of element. One ofRESERVOIR_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 wanted- Returns:
- the TSRecord or null if not found is an input record
-
getTSRecordProxy
public TSRecordProxy getTSRecordProxy(String elementType, String elementName, String childElementName, String tsRecordParam, boolean wantsInputRecord) -
getTimeSeries
return aTSRecordfor the specified arguments.- Parameters:
elementType- the type of element. One ofRESERVOIR,REACH,JUNCTION,DIVERSIONelementName- the element namevid- the variable ID- Returns:
- the TSRecord or null if not found
-
getScriptableMethodNames
Gets the scriptable method names.- Returns:
- the scriptable method names
-
writeHotstartStates
Write hotstart states.- Parameters:
rtw- the rtw
-
shouldSaveHotstartAtTimeStep
public boolean shouldSaveHotstartAtTimeStep(int step, int computeType) Should save hotstart at time step.- Parameters:
step- the stepcomputeType- the compute type- Returns:
- true, if successful
-
getHeadwaterJunctions
get the headwater junctions for this network. Headwater junctions have no inflow nodes.- Returns:
- a non null List of the headwater junctions.
-
didConversionOccur
public boolean didConversionOccur()Did conversion occur.- Returns:
- true, if successful
-
setWaterAccountSetList
Sets the water account set list.- Parameters:
waterAccountSetList- the new water account set list
-
getWaterAccountSetList
Gets the water account set list.- Returns:
- the water account set list
-
addWaterAccountSet
Adds the water account set.- Parameters:
set- the set
-
getWaterAccountSet
Gets the water accoutn set.- Parameters:
index- the index- Returns:
- the water accoutn set
-
nextWaterAccountSetIndex
public int nextWaterAccountSetIndex() -
getCoordinateReferenceSystem
public hec.map.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()Description copied from interface:hec.map.MapObjectInterfaceReturns the coordinate reference system that describes the location of this map. Users can return NULL if they don't have CoordinateReferenceSystem.- Specified by:
getCoordinateReferenceSystemin interfacehec.map.MapObjectInterface- Returns:
-
getSystemRules
- Returns:
-
compute
-
computeRS4
ResSim v 4.0 compute process- Parameters:
rtw-run-computeType-runHindcastCompute-- Returns:
-
computeEventQueue
public int computeEventQueue(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) first try at ResSim v 4.0 compute process- Parameters:
rtw-run-computeType-runHindcastCompute-- Returns:
-
compute_DevOld
public int compute_DevOld(RunTimeWindow rtw, RssRun run, int computeType, boolean runHindcastCompute) New version 3.3 computations with system iteration for all reservoir elevations and evaluation of tandem operation considering routing lag- Parameters:
rtw- time window of the computecomputeType- Regulated, Unregulated, Cum-Loc, PulserunHindcastCompute- true if hindcast is to be run- Returns:
- RTN_NOPROBLEM if compute successful
-
simulatePumpbackStep32
-
buildSysRuleStack
public List<OpRule> buildSysRuleStack(RunTimeStep rts, List<Element> decisionElemVec, double[] delemElev, List<OpRule>[] resRuleList) build the system rule stack- Parameters:
rts- current time stepdecisionElemVec- list of all decision elementsdelemElev- elevation for all decision elements- Returns:
- priority ordered rule stack
-
initZBruleArray
Initializes mapping of reservoir elements to zone boundary rule array indices. Initializes ZB rule array. -
getIterationBlockList
Returns the working list of iteration blocks for the current compute. This method will only return valid list once the RssSystem has been initialized for a compute.- Returns:
- iteration block vector
-
globalVariableExists
-