Context: I would like to run an elaborate SLX model in parallel with parsim for numeric optimization (evolution) with approximately changing 100 parameters, with rapid accelerator mode. I tried this Mathworks Example in Matlab 2017b and this works fine. I get the results, and I can use those results to determine new parameters, and call another parsim with new params, and another etc. for each 'generation' of the evolutionary optimization.
However, what takes up so much time is the setup function that needlessly (re)builds the model every time I call parsim, because of
But if I don't build the r.a. target in the setup function, all simulation-runs will fail with error: 'Executable not found.'.
Question: I cannot find the(se) executable(s) anywhere, how can I force the system to keep them/it such that the next parsim call can immediately reuse them/it?
An alternative would be that parsim just keeps running (waiting) indefinitely and I never have to recall it, and I append new simulations to some job queue, but then I need to read-out outputdata from N simulations that just finished. I don't know if this is even possible.
Any other methods to achieve the same are also welcome. I first tried this through parfor, but get confused with all the workspaces and annoyed that it build N times for N workers.