Calculation Basis (Core Services)
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
Defines the possible calculation options when performing summary calculations over time-series data. The following values are accepted:
-
TimeWeighted Weight the values in the calculation by the time over which they apply. Interpolation is based on whether the attribute is stepped. Interpolated events are generated at the boundaries if necessary.
-
EventWeighted Evaluate values with equal weighting for each event. No interpolation is done except in the case of expression calculations evaluated by the PI Server. There must be at least one event within the time range to perform a successful calculation. Two events are required for standard deviation. In handling events at the boundary of the calculation, the AF SDK uses following rules:
- use events at both boundaries when there is only one calculation interval;
- include events at start time in multiple intervals and the intervals are in ascending time order;
- include events at the end time in multiple intervals and the intervals are in descending time order.
-
TimeWeightedContinuous Apply weighting as in _TimeWeighted_, but do all interpolation between values as if they represent continuous data, (standard interpolation) regardless of whether the attribute is stepped.
-
TimeWeightedDiscrete Apply weighting as in TimeWeighted but interpolation between values is performed as if they represent discrete, unrelated values (stair step plot) regardless of the attribute is stepped.
-
EventWeightedExcludeMostRecentEvent The calculation behaves the same as _EventWeighted_, except in the handling of events at the boundary of summary intervals in a multiple intervals calculation. Use this option to prevent events at the intervals boundary from being double count at both intervals. With this option, events at the end time (most recent time) of an interval is not used in that interval.
-
EventWeightedExcludeEarliestEvent Similar to the option _EventWeightedExcludeMostRecentEvent_. Events at the start time(earliest time) of an interval is not used in that interval.
-
EventWeightedIncludeBothEnds Events at both ends of the interval boundaries are included in the event weighted calculation.