Hi Harry,
Here's a simple example. I have two queues. Each queue object maintains the maximum length (e.g. [Queue1].QueueLengthMaximum) that the queue reached during a run - so far so good. But I'm also interested in the _combined_ length of the two queues. Therefore, I use an ExpressionEntity (call it, for instance, CombinedQueueLength) to calculate [Queue1].QueueLength+[Queue2].QueueLength - and that obviously works fine too. But I'd like to find the maximum value, reached during a run, of the combined length of the two queues. Hence the idea of extending the ExpressionEntity object to capture this.
I do see the problem of capturing a maximum value of an ExpressionEntity if it were dependent upon a continuous variable, as you say - and that might be a good reason not to try to extend the functionality of an ExpressionEntity object. In the example, however, this is not the case since the queue lengths only depend only upon events. An ExpressionLogger object can record any/all changes seen in the ExpressionEntity I defined (CombinedQueueLength) using ValueTraceList. I can analyse the resulting log file to find the maximum value (which is, of course, absolutely right). However, I'd like to capture the maximum value within the model to display it during a run.
Your thinking of a new ExpressionStatistics object - that may be a better idea. It's a sort of combination of elements of existing functionality: (a) Statistics (i.e. something that captures Max, Min, etc) and (b) ExpresssionLogger with ValueTraceList (i.e. something that captures any change in the monitored value). I think Max and Min are pretty unambiguous values to calculate/report. I've not thought through Average, Standard Deviation, in this context, but whatever the existing logic/functionality used in the Statistics object I guess will continue to make sense.
Perhaps, in summary, we are talking about a new ExpressionStatistics object that is like the existing Statistics object, but whose values/calcs/outputs are updated based on ValueTraceList logic, instead of an entity passing through it?
Does that make sense?
Best wishes,
John