STEM help / Calculation framework

10.3.3 Collections

Elements are grouped together either using the Collection button on the toolbar or by using drag and drop. The icon menu for a homogeneous Collection contains all the usual data items for that type of element, and selection of a menu item displays a tabular dialog showing the data side-by-side for each element in the Collection – see 9.2 Using Collections to group elements.

In the Results program, Collection results are calculated as an aggregation over the corresponding elements in the Collection. The aggregation mechanism is straightforward for most results, but for quotient-like results an appropriate measure is specified in the standard results configuration, default.cnf, in order to calculate a weighted average – see 5.7 Viewing results for collections.

Example

The simplest application for a Collection element is to provide an arbitrary grouping and aggregation mechanism. For example, it may be convenient to group a number of Resources representing various local-loop costs from a number of Functions.

Figure 1: Grouping Resources in the Local Loop

Alternatively you could develop the Market Segment example described in 4.11.1 Creating Services for a Market Segment by cross-aggregating the POTS and ISDN Services.

Figure 2: Cross-Aggregating POTS and ISDN Services

Using overlapping Collections to group a model in different ways

Unlike Market Segments, which are disjoint collections of Services (i.e., a Service can be associated with at most one Market Segment), Collections can overlap with each other, so that a given element can appear in more than one Collection. This facility means that models can be grouped on more than one basis. For example, you might want to impose an alternative categorisation in the Resource example above (see Figure 1), to aggregate results for equipment made by a particular manufacturer.

Figure 3: Grouping Resources in different ways

Using Collections of Collections to impose a hierarchy of aggregation

Collections can even be nested within other Collections if you want to define a hierarchy of aggregation. In fact STEM is very flexible in this regard. For example, you can have a Collection which includes individual Resources as well as other Collections of Resources. In all cases, the Collection icon will contain a miniature Resource icon, and the icon menu will inherit items for Resource data.

The corresponding tabular dialogs compare the data for each of the inferred Resources (which are shown just once, even if they are contained in more than one Collection in the Collection). The only difference from tabular dialogs for a simple Collection is that these dialogs retain no connection with the original Collection element, so that subsequent modifications to the Collection will not affect the number of columns in the table, nor will insertions in the table affect the population of the Collection. In fact these dialogs behave in the same way as a tabular dialog created for a multiple selection of elements – see 4.5.6 Accessing tabular dialogs.

Figure 4: A hybrid Collection of Resources

Similarly the Results program will calculate aggregate results for such a Collection, just like a straightforward Collection of Resources, summing over each of the inferred Resources precisely once.

Note: If you have a Collection of empty Collections, the icon would appear as a miniature ring within the larger ring; but this would not be terribly useful!

Collections of Market Segments

If you construct a Collection of Market Segments, the icon menu will have items for the Collection Details, Market Segment Details and User Data, and the usual Service data (Demand, Tariffs etc).

Figure 5: A Collection of Market Segments

The Collection Details dialog shows the elements in the Collection, whereas the Market Segment Details item shows a tabular dialog for the Market Segments in the Collection. The Demand item shows a tabular dialog with columns for all of the Services in each of the Market Segments. As the Services are only indirectly associated with the Collection, this latter dialog behaves like a tabular dialog created for a multiple selection of elements – see 4.5.6 Accessing tabular dialogs.

Since Market Segments can be thought of as Collections of Services, it is also possible to group together several Market Segments with a number of independent Services, and treat the resulting Collection as a Collection of Services, in which case the icon menu just loses the Market Segment items. Try it!

Figure 6: A Collection of Market Segments and Services


 

© Implied Logic Limited