Hi Harry and others
I have been racking my brain for a while now on how I might supersede the entity logger and output summarised values directly, so that the produced log file is not so very large. The size of the log file I produce can exceed 5gb when running at the capacity needed for my model. This information summarised into a json would be a fraction, which would greatly speed up downstream processes and storage for audit needs.
By summarised I mean instead of getting a row for each record, records are compiled and counted.
The absolute best I can do without trying to make a new java class for jaamsim myself (which I am woefully unprepared for), is to try and use the ExternalProgramServer object in tandem with a python server to read in the entity's attributes, send that information to a new thread which stores it in a json and summarises it every so often, then return a dummy to jaamsim to get it to continue. I have attached my python and an extremely reduced cfg example for inspection (you will obviously need to change the python version).
However, inherently, the I/O process and requirement to constantly flush the console adds significant overhead to the timing of the model run (1.5-2x) when tested on my model proper. There may be timing improvements possible but the bottleneck is the I/O and I'm not really sure how to go about improving it any further.
There may be improvements to be made with the overall model sequencing. For example, would having more ExternalProgramServer nodes where data is recorded split this up so it can run in parallel? Do I need to regulate how objects queue and hit the ExternalProgramServer object?
Ultimately -
1) Am I missing a way to do this in jaamsim? I looked at the statistics object but I would need to define thousands of combinations to count.
2) Am I missing an efficiency in my cfg or python code?
3) Would this feature be addable in the future?