I am running a parsim simulation for a simulink model in R2023B. Here, I experience single workers getting stuck in the simulation, during compilation or in a 'queued' state, some of these later aborting the simulation.
For exploratory simulation, it is not necessary for my simulation run to have every simulation successfully run, I can tolerate a few fails for overall speed gain.
So, my idea would be to set a timeout for each simulation and prematurely stop the simulation, ideally with a timeout error for later processing, if the overall worker occupation of a single run exceeds a set time. This should include queueing and compilation.
I have found this related article on stopping the whole pool using a postSimFunction, and plan to use this to evaluate the run time of each other worker after one simulation has finished, stopping these that take too long. However, I fail to measure single worker duration and aborting a single simulation on a worker from this postSimfunction. Are there any good ways on how to do that?
If that cannot be done, is it possible to place some form or real-time clock in a simulink simulation to detect simulation duration and finish the simulation based on that criterion?
Thank you for your help.