Aggregation defined by an algorithm

Algorithms also have properties for Aggregation and Rollup, which default to First. These examples use the same four BuildingX and MainKw points set up previously.
Figure 36.   Aggregation algorithm
Image

The screen capture shows the default values for Aggregation and Rollup.

Consider this very basic algorithm, which has a single data source with the data configured to hs:power and linked to a result block:

Figure 37.   Algorithm with a single data source
Image

The Data Source Block has a property named Use Request Aggregation with a default value of false, and an Aggregation property with a null value (not explicitly configured).

Figure 38.   Proxy extension with Data property configured
Image

Using the same control point with the analytics proxy extension and changing the Data property from hs:power to alg:Power results in an Out value that represents the sum of the four points (2352.8).

This happens even though the Aggregation property on the proxy extension is configured as Max, and the Data Source Block in the algorithm is configured to ignore the Aggregation property in the request, which causes it to default to the hs:power data definition.

You can configure the Aggregation function explicitly on the Data Source Block.

Figure 39.   Aggregation on the Data Source Block configured to Min
Image

This explicit configuration setting Aggregation to Min on the algorithm’s Data Source Block overrides the data definition Aggregation, which is set to the Sum function.

Figure 40.   Result after applying the algorithm
Image

The Out slot now reports the minimum value of the four points, 355.2. This means that explicit configuration of the Aggregation using the Wire Sheet’s Data Source Block has overwritten the Data property (alg:Power) and Aggregation (Max) as defined on the proxy extension.

Now go back to the algorithm’s Data Source Block and enable Use Request Aggregation.

Figure 41.   Use Request Aggregation enabled on the Data Source Block
Image

Changing Use Request Aggregation to true configures the data source to instead use the Aggregation property value as defined by the analytic request and configured on the analytic proxy extension.

Figure 42.   Analytic request as configured on the analytic proxy extension.
Image

The control point value now reports the maximum of the four points (865.5) because the Aggregation function configured by this analytic proxy extension property sheet is set in the analytic request to the algorithm, and the algorithm’s Data Source Block is configured to use the Aggregation function from the request, which overrides the data definition for hs:power.

 IMPORTANT: As mentioned in the introduction to these examples, each property, including Time Range, Rollup, Interval, Aggregation, Totalize and Missing Data Strategy has a default setting, which Analytics uses if you do not explicitly set the property. Each property should behave similarly to the Aggregation function as far as how the override behavior works when you configure the property on a data definition, analytic proxy extension, binding or Data Source Block.