I am highly confused about the eventController.initSt method.
As far as I understand the manual, it should be executed ahead of any other init methods.
I got now the situation, that my method being called from the eventController.initSt should initialize the model in a controlled manner. I assumed (obviously wrongly) that all other init methods are executed afterwards, because the first ordinary init methods are starting to interfering with the initst method call.
your understanding is correct.
In the attached model it is working fine.
Can you please have a look?
Would be interesting to know what's different in your model.
My Initialisation works a few minutes. When it starts in around 30 seconds later, the first ordinary init object is executed, while another method runs (and does not trigger any further method).
As well, the model starts to run even when the method given by the initst is not yet finished.
I only got a "sleep(0.00000001, false);" statement inside of one submethod to view the proceeding of the initial planning algorithm.
It seems, this triggers all other methods even when the initial one is not finished.
if you use sleep it explains what happens.
The sleep with second argument set to false suspends the method execution of your init control and gives other methods the chance of being executed.
This is the intended purpose.
If you just want to update the UI you can use the SimTalk function 'updateGUI'.
It's explained in the online manual starting with V11.
In previous versions it was an undocumented internal feature.
It would be interesting, how many additional "undocumented features" exist.
I am sure, all your clients will appreciate to paying 3% more next year on license fees when being disclosed just a subset of functinalities / features of PlantSimulation at the same time.
putting a focus on (some) undocumented Plant Simulation features is to my understanding a
bit too academic.
Even if you knew the complete documentation by heart you wouldn' t dominate this tool.
Working professionally with this tool means to study and understand its behaviour.
And this is a matter of experience and not looking for undocumented features.
I tend to agree with simulator.
And there are really only a few undocumented things, and these are undocumented for good reason (Side effects, stability, ...).