Real-time request configuration

The framework provides complex yet flexible methods to configure the application, which may sometimes give you seemingly unexpected results It is important to understand the various ways properties in an analytic request might be set or overridden. These examples set up a real-time aggregation in different ways to demonstrate how the framework evaluates settings.

Each property, including Time Range, Rollup, Interval, Aggregation, Totalize and Missing Data Strategy has a default setting, which the framework uses if you do not explicitly set the property.

Consider the following station real-time configuration where there are four BFolder components named BuildingX each with a NumericPoint named MainKw. The MainKw points have the a:a and hs:power marker tags. Each point has returned a different value.

Figure 29.   Example of four slots to aggregate
Image

There are a number of ways to submit an analytic request, such as using a control point with an analytic proxy extension in the station, a label in a Px with an analytic value binding, a data definition, or an algorithm with a Data Source Block.

Aggregation combines multiple data sources into a single result using some function like Sum, Avg (average), Min (minimum), Max (maximum), etc. The Aggregation property on the Proxy Ext or binding defines the function to use.

Figure 30.   Default result
Image

The example above does not explicitly set the Aggregation property, and it is not obvious from looking at this property sheet, that if you do not configure the Aggregation property, it defaults to First, which returns the first value in the combination.

When the framework resolves this example request, it returns an Out value of 510.0 kw, which is the value reported by the first data source (Building1), that is, the first component in slot sheet order.

Reordering the BuildingX folders under the Campus folder so that Building2 is now before Building1 in the slot sheet changes the result.

Figure 31.   Reordered slots
Image

After invoking the refresh cache action on the AnalyticService, and without any change to the Aggregation property on the Proxy Ext, the aggregation result is now 355.2 KW because Building2’s point with the hs:power tag is now the first slot on the Campus slot sheet.

Figure 32.   Result after reordering the slots
Image
 TIP: Explicitly configuring each configuration property based on your requirements is a good idea.