Why is my parallel pool using undefined variables during a 'parsim' simulation?
Mostrar comentarios más antiguos
I am trying to run series of simulations in parallel using function 'parsim' in Simulink Release R2022b and Parallel Computing Toolbox. My call to 'parsim' is as follows:
simOut = parsim(simIn, 'TransferBaseWorkspaceVariables', 'Off', 'AttachedFiles','Vars.mat',...
'SetupFcn', @()evalin('base','load batchVars.mat') );
where 'simIn' is the 'Simulink.SimulationInput' object containing the various models I would like to run, and 'Vars.mat' is a MAT-file containing the data I would like the simulations to use.
The issue is that the results of the simulations do not correspond to the input variables I am providing in 'Vars.mat'. The parallel pool seems to be ignoring them! I even tried not supplying a necessary variable inside 'Vars.mat' hoping that the simulations would error, but they completed successfully with results I cannot relate to the inputs I am providing.
From where are the parallel workers getting the variables they are using?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Run Multiple Simulations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!