Using Simulink Fast Restart in a parallel computed optimization problem
Mostra commenti meno recenti
Hi, I have a Simulink Model which works perfect when i turn on fast restart. I can change the Values of my parameters A1, A2 and i by hand and it does not need to recompile.
Now i want to use this model in a parameter optimization problem using parallel computing AND fast restart. It would save a lot of time to cut out the recompiling time. The Problem is parallel computing works great but the model compiles for every iteration.
I set up the optzimization like this
% Simulator set up with experiment data, multiple experiments
Simulator = createSimulator(Exp(1));
Simulator = fastRestart(Simulator,'On'); %Fast Restart ON??
% estimation function handle, sdo requires function with just one input
% argument
estFcn = @(param) ObjectiveFun(param,Simulator,Exp);
% optimization options
parpool
opt = sdo.OptimizeOptions;
opt.Method = 'surrogateopt';
opt.UseParallel = true;
opt.OptimizedModel = 'Model';
opt.ParallelFileDependencies = files;
opt.MethodOptions.PlotFcn = 'surrogateoptplot';
opt.MethodOptions.MaxFunctionEvaluations = Iterations;
% Optimization
vOpt = sdo.optimize(estFcn,param,opt);
I just tried running the same code without parallel computing (opt.UseParallel = false) and fast restart works.. but not with parallel computing
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Surrogate Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!