Time-bounded window in Maximum/minumn aggregation block

What product/components do you use and which version/fix level are you on?

latest

Is your question related to the free trial, or to a production (customer) instance?

production

What are you trying to achieve? Please describe it in detail.

We want to caluclate maximum of packages per day. To achieve this we used the Maximum/Minimum processing block.
Here is the model.


In the maximum/minimum processing block,we set the window time to 86400 sec and we reset the cron timer to 12:00:01 am everyday.
We deployed the model today morning at 10:00:00 am.
Will the maximum output value be generated at 10.00:am next day?

Is this model correct to generate maximum packages per day?
Input block: Packages_count gives count value whenever there is a new package(for example at present there are 900 packages whenever a new package arrives it will be updated to 901 package)
Maximum block: It has time bounded window buffer of 86400 seconds.
Cron Timer: clear window contents everyday at 12:01:00 am.

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

yes.

this block probably does not do what you want. It will create an output every time a new minimum or maximum is reached. Also if you provide a time window, the min/max is an approximation.

The Discrete Statistics block serves your purpose better. Connect both the Sample and Reset inputs to separate Cron blocks (note the Sample should trigger before the Reset). Now once a day the maximum of that day is produced and and the maximum is reset.

Does the sample port that is connected to cron timer(11:00:00) in the discrete statistics block collects the input values and aggregate thoes values until 11:00:00 and provides the aggregated result at 11:00:00 ?

If the reset port in discrete statistics block is connected to the cront timer at 11:05:00 then block only collect values that are after 11:05:00 and aggregate thoes results.

Exactly, so you normally would want to keep the difference between them as small as possible (e.g. 1s). There needs to be a difference because when both fire simultaneously, the reset will be performed before the sample which in your case defeats the purpose.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.