Supply Name Format
A RiverWare model maintains a single instance of a Supply Name Format specification. This is editable in the Supply Name Format dialog, accessible from the Supply Manager’s Supply menu.
Changes made in the Supply Name Format are applied immediately, but can be canceled (reverted to the settings which were active when the dialog was shown) by selecting the Cancel Changes button.
The user can also restore RiverWare Default settings by selecting the
Restore Default button. See
“Default Supply Name Format” for a description of the default format.
Those two buttons are independently disabled if the edited settings already match these operations’ respective settings. The user can effectively toggle between the default settings and the current settings (those which were active when the dialog is shown) by alternating between the Restore Defaults and Cancel Changes buttons, assuming that those settings are different.
The Close button dismisses the Supply Name Format dialog.
Supply Name Part Sequence
In the new Supply Name Format dialog, the user defines a sequence of Supply Name Parts made up of the following entities:
• Upstream Object Name
• Upstream Account Name
• Upstream Account Water Type
• Upstream Account Water Owner
• Downstream Object Name
• Downstream Account Name
• Downstream Account Water Type
• Downstream Account Water Owner
• Supply Type Text (configurable in frame below)
• Any entered text having valid supply name characters (e.g. “to”)
The user can insert, append and remove Supply Name Parts (rows) using the Plus and Minus icon buttons. Up to 12 parts can be defined.
The user can provide Supply Type Text strings for each of the three types of supplies:
• Inflow/Outflow
• Diversion/Return (default is “Div”)
• Transfer (default is “Tran”)
Allowed characters in the Entered Text and Supply Type Text fields are letters (upper and lower case), digits, spaces and underscore characters. Also, a non-removable space tag (“<sp>”) can be entered to specify spaces which are not to be removed by the space removal and CamelCasing features (with some exceptions). (Other ‘<“ and ”>’ characters are silently removed from the final computed name).
Supply Name Generation Options
Option: Part Assembly, Space Removal and Camel Casing
The sequence of Supply Name Parts is assembled into a single string, with the parts initially separated by spaces. Multiple contiguous spaces are condensed into single spaces, and spaces are removed from the beginning and end.
The user can optionally specify that spaces be removed, either only within the individual parts or also in between the separate parts.
If CamelCasing is enabled, wherever a space is removed, if the subsequent character is a lower-case letter, that letter is changed to upper-case.
The translation of non-removable space tags (“<sp>”) occurs after the application of optional space removal and camel casing. However, all contiguous spaces (including “<sp>” tags) are condensed into a single space, and spaces are removed from the beginning and end of the generated name.
In the five examples below, the non-removable spaces around the “to” text part are preserved. Also, the space tag preceding “to” prevents that word from being camel cased. Otherwise, “to” would have been changed to “To” in the cases where camel casing is enabled. In the examples below, the effect of camel casing is illustrated with the treatment of “abv” (an abbreviation for “above”).
Option: Omit Repeated Object Name (e.g. in Transfer Supplies)
In RiverWare, transfer supplies represent the movement of water from one account on a simulation object to another account on the same object. The Upstream Object and the Downstream Object are the same. The default supply naming convention results in that object being included twice.
The user has the option of omitting repeated object names in generated supply names by selecting the Omit repeated Object Name toggle.
Option: Supply Name Uniqueness Suffix
All supply names in a RiverWare model must be unique and different than other simulation objects. It’s possible that a Supply Name Format will not generate unique names of supplies. Only in such cases, a numeric suffix is appended to the generated supply name.
Figure 3.22
The numeric uniqueness suffix generated for supplies, as needed, can be configured by the user in the following ways:
• The suffix can optionally start with a space or underscore Delimiter.
• The number field can have a fixed number of digits, padded with leading zeros. This is provided as a minimum number of digits; more digits will be used for any particular supply if the indicated digit count isn’t sufficient.
The dialog dynamically illustrates the effect of these two settings in the Example field (see
Figure 3.22). The effect is also illustrated within the Sample Supply box Format Result field, when needed for the application of the format to the chosen sample supply (see
“Supply Sample Box”). Generated supply names are made unique not only with respect to all existing supplies, but also with respect to all other top-level objects, including simulation objects (reservoirs, reaches, etc) and exchanges.
Supply Sample Box
This Supply Name Format dialog shows the result of the application of the current format to a single sample supply. The sample supply can be an actual existing supply or one of three simulated (fake) supplies -- one for each of the three Supply Types. The Sample Supply box shows three versions of the Supply name:
• Format Result. Name of the sample supply as computed using the current format.
• Default Name. Name of the sample supply, as computed using the default.
• Current Name. Current name of the sample supply (shown only when an actual existing supply is used as the sample).
Note: This dialog does not currently support renaming the sample supply using the configured format. Supply renaming can be done in the Supply Manager; see
“Operations on Selected Supplies” for details.
The Format Result field will show a uniqueness suffix if that is required for the particular sample supply. (In the case of the simulated samples, a uniqueness suffix is shown if the Supply Name Part list is empty or all blank).
When a uniqueness suffix is applied to the generated name, a red “S” character is shown to the right of the field.
Default Supply Name Format
The default Supply Name Format contains the following Supply Name Parts and does not perform space removal:
<Upstream Object> <Upstream Account> “ to ” <Downstream Object> <Downstream Account> <Type>
where <Type> is one of the following:
– Inflow/Outflow Supplies: (blank)
– Diversion/Return Supplies: “Div”
– Transfer Supplies: “Tran”
Supply Name Format Clipboard
A single instance of a Supply Name Format can be saved in a special clipboard. The clipboard format persists between RiverWare sessions, and can be used to copy a Supply Name Format from one RiverWare model to another.
The clipboard functions are under the File menu, as follows:
• Paste from Supply Name Format Clipboard
• Copy to Supply Name Format Clipboard
The Copy operation is confirmed with the Overwrite Suppl Name Format Clipboard dialog.
Showing Supply Format Differences
The Supply Manager has the ability to show the names computed for each of the existing supplies using the model’s current Supply Name Format, optionally with an indication that the computed name is different than the supply’s current name -- see example below. To do this select the Supply Name Format Difference in either Data Column 1 or Data Column 2 menus. The string “DIFF” indicates the supply is different than the Supply Name Format. The string “same” indicates they are identical.