- Check the Simulink model and ensure that it is configured correctly, without any errors or issues that could cause simulations to fail.
- Review the output and error messages from the ‘parsim’ function to identify any specific simulation failures or errors that may be occurring.
- Verify the constraints in your optimization problem and ensure that they are correctly defined and feasible for the given parameter bounds.
- Monitor the parallel computing environment and check if there are any limitations or resource constraints that could affect the number of available workers.
Induviduals dissapearing after some iterations using GA algorithm and parsim.
3 次查看(过去 30 天)
显示 更早的评论
Hi!
When using the built in GA algorithm optimising on a simulink model using parsim the number of simulations ran each iterations seem to reduce by two after one or two iterations. What can the explaination be for this.
options2 = optimoptions('ga',...
'Display','diagnose',...
'MaxTime',5000,...
'MaxStallGenerations',10,...
'PopulationSize',population,...
'MaxGenerations',10,...
'FunctionTolerance',0.001,...
'UseVectorized',true,...
'PlotFcn',{@gaplotbestf,@gaplotstopping, @gaplotbestindiv});
x = ga(@CostFunction3,nvars,A,B,[],[],lb,ub,[],options2);
In function
results = parsim(SimIn,'TransferBaseWorkspaceVariables','on','ShowProgress','on','UseFastRestart','on','StopOnError','on');
I thought as long as I dont use non linear constraint i would get as many simulation runs as population size. In this case the population was 40, but already on the second iteration I got only 38 simulation runs.
Thanks!
0 个评论
回答(1 个)
Sugandhi
2023-8-23
Hi Jesper Ramsberg,
I understand that when you are using the built in GA algorithm optimising on a Simulink model using ‘parsim’, individuals disappearing after some iterations.
Few of the possible workarounds could be:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Manual Performance Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!