I am trying to run a parsim of my Simulink model, varying the value of a resistor. The script seems to get the stage "Loading Model on Parallel Workers" however does not progress any further. My code is shown below.
model = 'ElectricalModel';
open_system(model,'loadonly');
resistances = linspace(100,110,2);
numSims = length(resistances);
simIn(1:numSims) = Simulink.SimulationInput(model);
for i = 1:numSims
simIn(i) = simIn(i).setBlockParameter([model '/Resistor'],'R',num2str(resistances(i)));
end
out = parsim(simIn, 'ShowProgress', 'on','ShowSimulationManager','on');
The script seems to be stuck in this while loop which is part of the JavaBackedFuture.m file.
while ~predicate(obj) && ~deadlineExpired
millisToWait = min(waitGranularity, iGetMillisRemaining(deadline));
deadlineExpired = (millisToWait == 0);
javaTask.await(millisToWait, millisUnit);
if ~predicate(obj)
iJavaLog(4, 'parallel.Future waiting for ID: %d', obj.ID);
drawnow();
end
end
Any suggestions would be greatly appreciated.