skip to main content
User Interface : Slots : Finding Slot References
Finding Slot References
RiverWare models are often built by multiple modelers over many years. Sometimes, slots are created for a particular task. When the task is over, the slot is set aside and may never be used again, but no one wants to delete the slot for fear that it is accessed somewhere else. In addition, you may want to know where a slot on a simulation object is used. Are there any plots or output devices for Reservoir.Outflow? Is it imported or exported by any DMIs? There are many places in RiverWare where a slot can be referenced. Finding these references for a particular slot would be a very tedious and time-consuming task. For this reason, a utility was created to centralize and streamline this search process. This section describes this utility which searches through a model to find references to specified slots.
The utility then lists where the slot is referenced and you can investigate the matches. If you determine that the slots are obsolete or no longer necessary, you can delete the slots (custom slots) directly from this utility.
Find Slot References Dialog
The Find Slot References dialog is available from the Workspace, then Slots menu.
The general work flow of the dialog is as follows:
1. Add slots to the list.
2. Select the areas to search.
3. Initiate the search for references to the chosen slots.
4. Found references are listed as items under the slot. Double-click an item to open that reference.
5. Slots no longer needed can be selected and deleted from the model using the Delete Selected Slots from Model button.
The following sections describe these steps and configuration options in more detail.
Selecting Slots to Search
The Slots frame is where you select the slots for which to look for references.
• Add Slots. Opens the slot selector to choose slots to add to the list.
• Clear All Slots. Removes all slots from the slot list.
• Clear Selected Slots. Removes only the selected slots from the list.
Selecting Areas to Search
Check the areas where you would like to search for references to your slots and select the Search button to initiate the search. Search results are listed as items under each slot. Sorting the search results by selecting the row header will group together slots with results versus slots without results. Following is a description of the areas to search:
• RPL Sets. Search through the following RPL expressions/sets open in the RiverWare session:
– Expression Slots (i.e. the RPL expressions shown on the open slot dialog)
– Expression Slot Functions Set
– Global Functions Sets
– Initialization Rules Set
– Iterative MRM Rules Set
– Object Level Accounting Method Set
– Optimization Goal Sets
– Rulebased Simulation Rulesets
The two options allow for the search string to be the “Slot” name or the complete “Object.Slot” name. Any occurrences of the specified string in RPL will be located, so may identify places that are not actually references to the slot. For example, if you have BigRes.Inflow in the slot list, the following will occur:
– “Slot” Any occurrence of the string “Inflow” will be found including references to the Inflow on each reservoir, reach, control point, etc in the model. But, this setting is useful to search RPL logic where the slot names are created during RPL evaluation. For example a FOR loop that is looping over reservoirs and creating the slot using the expression: Res.“Inflow”.
– “Object.Slot” Only occurrences of the slot/string “BigRes.Inflow” will be found. The search is a basic text search, so the utility will find references to BigRes.Inflow and BigRes.Inflow Sum.
Double-clicking a RPL result item will open the associated RPL set dialog so you can examine the reference.
• Output Devices. Search through output devices to see if the specified slots are referenced in the configuration of the device. An output device result line gives the type of the device and the device’s name. Double-clicking the line will open the configuration dialog for the device.
• SCTs. Search open SCTs to find specified slots in the configuration of the SCT. An SCT result line gives the name of the SCT and double-clicking the line brings up the associated SCT dialog.
Note:  A slot may be used in the configuration of a custom summary row for the SCT that might not be visible under the current SCT view orientation.
• Scripts. Search scripts in the model to find references to the specified slots in script actions. A script result line gives the name of the script and double-clicking the line opens the script editor dialog. Note, you can search within a particular script for a slot using the script editor Search. See Searching for Actions in Automation Tools.
• Slot Sets. Search for references to the specified slots in Slot Sets. A result line gives the name of the Slot Set. Double-click the line to open the Slot Set Manager.
• DMIs. Search DMIs in the model to find if the specified slots are imported or exported with the DMI. A DMI result line gives the type of the DMI and its name. Searching control file-executable and trace directory type DMIs requires parsing the associated control file. If there is a problem during this DMI validation, error messages will be posted in the diagnostic window. Double-clicking a DMI result line will open the DMI’s edit dialog.
Deleting Slots
If you search for references to one or more slots and find that they are no longer needed, you can use the Delete Selected Slots From Model button at the bottom of the dialog to permanently delete them from the model. This is only allowed for custom slots. If the slot is a simulation slot, these are not deleted; a warning message is issued indicating the number of slots not deleted.
Revised: 01/05/2024