I am experimenting with the Group Statistics block and am noticing a number of limitations:
window and sample interval are configured as block parameters. For the Discrete Statistics block we instead have inputs to sample and reset which effectively do the same. There are probably good use cases for both behaviours and ideally both blocks would support configuration via parameters (to e.g. use template parameters) and inputs similar to what most Output blocks support. Are there any plans for this?
I think the primary use case of the block is to aggregate data from multiple devices and write it to a single output. It looks like this can effectively only be achieved when selecting an Asset’s devices as input and the asset itself as as an output. With groups it is not possible as they cannot be selected as output and using “triggering” device does not make sense. Is my understanding correct?
Also I noticed what looks like a bug: If I select Asset’s devices as input and the asset itself as output and I am using the same fragment and series on input and output, I get an error on activation that the model is in a cycle with it self. This is not really the case though as input is from the devices and output is to the asset. So the output should not trigger the model?
There is no current plan to add it to the block. The sample input port in other aggregate blocks is there to force current calculation and produce output. Doing that for the group statistics block may have an adverse performance effect and does not make much sense. The group statistics block periodically collects aggregate data from all devices (all model partitions) and calculates the group aggregates. This can be potentially expensive. So if a ‘sample’ input port is added to the block, any device in the group would be able to trigger it at any time. This means that there could be a possibility of many devices of the group triggering this around the same time. Can you provide your use case where this functionality would be useful? If we do add a ‘sample’ port to the block, it would have to be backed by some kind of time-based threshold (say 5 seconds) so that only one device can trigger it within 5 seconds.
Adding a ‘reset’ input port should be possible without any issue - data of each device can be reset independently. I’ll raise an internal ticket for it.
The reason for not allowing output of group statistics block to a group is for backward compatibility reason. When a group is selected as target in an output block in a model using device groups, it gets intereted at Trigger Device (mostly used in parameterised models). Changing the behaviour to output got a group may cause existing models to break. The asset did not had any such issue, so it was allowed to output group statistics to an asset.
It is a limitation of partitioned models and its interaction with model chains. For calculation of model connections - an asset and device group are internally treated as ‘all inputs’ - that is it can potentially receive from anything. Because of this a cycle is detected. I’ll file an internal defect to fix it.