Aggregation Series Slots in RiverWare 6.3
Duplicate for Objects Operation
Phil Weinstein / 6-05-2012

This page illustrates the "Duplicate for Objects" high level function on the new Time Aggregation Series Slots. This operation is available in the Open Object dialog for Data Objects.

In a single operation, the user can duplicate a Time Aggregation Series Slot for the aggregation of the referenced series slot on multiple other selected simulation objects. For example, if a given time aggregation slot is annually summing the Energy slot on a power reservoir, similar aggregation slots can be created in a single operation for all other power reservoirs in the RiverWare model, in a single operation.

For context, the following two rows of images depict the creation and configuration of a Time Aggregation Series Slot on a Data Object.


The "Duplicate for Objects" operation is enabled only when the selected slot item is a Time Aggregation Series Slot which has a defined Series Slot reference (i.e. the Series Slot being aggregated).

Technical note: Slot class hierarchy "hooks" were devised such that this operation could be implemented also for Statistical Table Slots, which also represent a computation based on a single referenced series slot. See these three virtual Slot class methods, and their implementation in the SeriesSlot class:

  • virtual bool supportsReferencedSlotParam() const { return false; }
  • virtual Slot* referencedSlotParam() const { return NULL; }
  • virtual Slot* cloneForObjForRefSlotParam (SimObj*, okstat&) const { return NULL; }

Activating the "Duplicate for Objects..." menu item brings up the simulation object selector where multiple objects can be selected. The selector is initialized to show objects of the same type as the object containing the reference slot (e.g. in this example, Power Reservoirs). Ultimately though, the user can select a broader range of simulation objects.

The names of the new slots are devised as follows:

If the originally selected time aggregation slot's name contains the name of the referenced slot's containing object, then the new names are that name, with the original containing object name replaced by the new selected objects. In the following example, the original time aggregation slot is aggregating the "BlueMesa.Energy" slot (on the BlueMesa power reservoir).

However, if the originally selected time aggregation slot's name does not contain the name of the referenced slot's containing object, no direct name substitution is possible. Instead, the names of the new selected objects are appended to the slot name for the new slots. In this example, the name of the originally selected time aggregation slot is "Annual Agg.Energy Agg", and it aggregates (temporily) the "BlueMesa.Energy" slot. Note that the set of newly created time aggregation slots includes one also for the "BlueMesa" power reservoir, since that reservoir had been included in the selection made by the user within the object selector (in this example).

--- (end) ---