Data Object Slot Groups for RiverWare 6.8 -- Design
Phil Weinstein, David Neumann, Edie Zagona, CADSWES -- Edit: 9-08-2015 (a).
This document describes a design for new RiverWare capability based on this feature request from TVA:
Create Slot Groups on Data Objects: Allow arbitrary sets of slots to be grouped together (such as SEPA data, Policy Data, etc). Allow the group and slots to be copied/pasted.
Earlier, we examined a snapshot of a model currently under development by TVA to understand how Slot Groups might be used. This model has been put aside here:
In discussion with TVA, the following two tentative examples of desirable Slot Group configurations within that model were identified. (This applies to the yellow "Con" Data Objects associated with each Reservoir):
Group: Elevation Slots:
|
Group: Flow Constraint Slots:
|
Two iterations of analysis preceded this design. A couple design and architecture ideas have been put aside based on both internal review and review with TVA. These documents are:
![]() |
As primarily a new display provision of the Open Object Dialog for Data Objects, we will support grouping slots together in a slot treeview.
This is somewhat analogous to the slot treeview displayed in Open Object Dialog for Aggregate Objects. See image to the right. However, slots not in a slot group would be displayed as top-level tree items.
Slot Groups can be copied from one Data Object to multiple other Data Objects in a single operation. It will be possible to do this both with, and without copying the source Slot Group's contained slots.
When Deleting a Slot Group, the user will have the options of also deleting the contained slots, or retaining them. In the latter case, they will just become ungrouped, shown as top-level treeview slot items.
As time permits, or possibly as a future enhancement, RPL Predefined Functions will be devised and implemented to support slot list enumerations based on Slot Group names.
![]() |
A recently developed enhancement for RiverWare 6.8 (future release) supports the copying of a set of slots from any simulation object (including from a Data Object) to multiple other Data Objects. This makes use of the dialog shown to the right. This dialog is shown after selecting the slots to be copied from an Open Object Dialog and selecting the "Copy Slots to Data Objects" operation (see below).
This capability will be extended to support the copying of Slot Groups and their slots to multiple other Data Objects. The related operation of replicating Slot Groups from one Data Object to multiple other Data Objects will also be supported with an enhancement to this "Copy Slots to Data Objects" tool.
The newly developed functionality is described in this internal feature document:
Open Object Dialog, Slot Copy/Paste Enhancements for RiverWare 6.8
R:\doc\openObject\CopySlots\OpenObjCopyPasteEnh-Aug2015.docx
Below is a mockup of the Open Object Dialog for a Data Object showing added support for slot groups. This has a "Group" menu (in place of the "Element" menu for Aggregate Objects):
When the "Show Slot Groups" checkbox is off, slots will be presented in the traditional way, as a single-level list of slot items. See the image below. When this option is off:
The "Expand-" and "Collapse All Slot Groups" actions open or close all slot group tree items, effectively showing or hiding the list items for slots within the slot groups.
The "Move Slots to Group" submenu moves the selected slots to a Slot Group on the Data Object. The first item in this submenu is "None" -- selecting that removes the selected slots its group (i.e. those slots in a Slot Group). The last item is "New Slot Group" -- this creates a default-named slot group, and moves the selected slots to that grou. Note that any particular slot instance can be a member of only one Slot Group. So, moving a slot to a group removes it from a slot group it was previously a member of.
"Create New Slot Group" adds a default-named Slot Group.
"Delete Slot Groups" (enabled only when at least one Slot Group item is selected in the slot list) deletes the selected Slot Groups, after showing a confirmation dialog having these three buttons:
|
![]() |
To provide a meaningful name to a newly created Slot Group (i.e. after performing Create New Slot Group), the user can edit the group's list item's name directly, but double clicking on it. (This is similar to how Aggregate Object Elements' names are assigned). The edited name must be distinct from the names of all Slots and other Slot Groups on the object, and cannot be "None".
|
![]() |
The slot list context menu on slot items will now contain these two actions. (These have been described above). See the following image.
The following mockup shows the Open Object Dialog's slot ordering controls for a data object having slot groups.
Slot Group items in the Open Object Dialog (for Data Objects) are included in the custom orderings implemented for Slots. When the "Custom
for this Object" ordering is selected (e.g. as opposed to Column Sort) slots and slot groups can be moved up or down using the blue arrow icon
buttons below the slot list/tree.
Custom slot ordering now includes these new provisions:
The blue arrow icon buttons are disabled if BOTH Slot and Slot Group items are selected -- only one or the other type can be moved up or down at any given time. However, any arbitrary Slot selection can be active when moving slots, including both slots in, and not in, slot groups, as illustrated above.
Background: The RiverWare Slot Clipboard currently contains references to existing slots in the loaded RiverWare model. That is, "copying slots" causes references to those slots to be placed in that clipboard. Most applications which can "paste" slots into a slot list (e.g. the Chart output device configuration dialog, one of many examples) make use of those slot references as references. Only the Open Object Dialog for Data Objects actually make copies (new cloned instances) of the slots when pasting from the slot clipboard.
The RiverWare Slot Clipboard will be enhanced to support references Slot Groups. At any given time, the Slot Clipboard will contain references to only slots or slot groups. But when the Slot Clipboard contains references to Slot Groups, any application within RiverWare which queries the Slot Clipboard for slots -- e.g. the (Pie-) Chart output device configuration dialog -- will "see" references to all of the slots within the clipboard's current Slot Groups.
The Open Object Dialog supports pasting of slots from the Slot Clipboard only when that dialog is for a Data Object. It will support different behaviors for the two cases of the Slot Clipboard containing slots vs. slot groups. If the slot clipboard contains groups, a new Slot Group will be created on the Data Object if that object doesn't already have a Slot Group with that name. Then, any slots within the clipboard's referenced Slot Groups will be copied (cloned) into those Slot Groups in the dialog's Data Object.
The two variants of slot / slot group pasting will implement the same slot name uniqueness algorithm. That is, if the Data Object already has a slot with copied slot's name, the newly created slot on the Data Object will be given the next available four-digit numeric suffix to insure slot name uniqueness.
Data Objects maintain a set of Slot Groups as dynamically allocated C++ objects. Slot Groups maintain a list of references to the slots in the group -- however, groups don't "own" those slots. The relationship between a Data Object and its slots will not change -- slot instances will still be managed directly by their containing object.
Other Data Model tasks:
In parallel with the OpenObjectDlg::SlotListViewItem class (a Qt4 QTreeWidgetItem subclass), a new SlotGroupListViewItem class will be developed to represent SlotGroup list items.
The following tasks wouldn't be done in this exact order. GUI provisions will be implemented as the required data model provisions are put in place.
Task | Est. Hours |
Description |
Data Model Development Tasks: | ||
1.1 | 16.0 | Basic Slot Group Data Model |
1.2 | 4.0 | Revise slot-name uniqueness algorithms to ensure that the names of slots and slot groups are distinct (on any particular object). |
1.3 | 12.0 | SlotOrderManager Data Model enhancement to support Slot Group (names) AMONG an ordered list of Slots. |
1.4 | 8.0 | Internal Slot Clipboard enhancements to support inclusion of whole (Object-) Slot Groups. Slot Groups placed in the slot clipboard need to be expanded to a sequence of slots for Slot Clipboard clients that don't support Slot Groups. |
User Interface Development Tasks: | ||
1.5 | 16.0 | Open Object Dialog Slot TreeView. Implement two-level tree support for Slots in a Slot Group, loosely based on the similar current support for Slots on Aggregate Object Element Objects. |
1.6 | 6.0 | Slot Group Name editing -- inline, within the TreeView. |
1.7 | 6.0 | (Conventional, manual) Slot and Slot Group Copy/Paste operations. |
1.8 | 4.0 | Relevant context menu operation adjustments for Slot Group list items. |
1.9 | 8.0 | Slot Custom Order "Move Up and Down" re-implementation to keep Slots within their Slot Group, and to move whole Groups up and down. |
1.10 | 6.0 | Other Slot/Slot Group Ordering implementations |
Other Relevant Tasks | ||
1.11 | 6.0 | Completeness and Usability Testing and Resolution. |
1.12 | 6.0 | Post-development review and revisions. |
1.13 | 6.0 | Completed Feature Documentation |
104 | TOTAL [Hours] (Estimate revision: 8-25-2015, Phil). |
---