Induviduals dissapearing after some iterations using GA algorithm and parsim.

2 次查看(过去 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!

回答(1 个)

Sugandhi
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:
  1. Check the Simulink model and ensure that it is configured correctly, without any errors or issues that could cause simulations to fail.
  2. Review the output and error messages from the parsim function to identify any specific simulation failures or errors that may be occurring.
  3. Verify the constraints in your optimization problem and ensure that they are correctly defined and feasible for the given parameter bounds.
  4. Monitor the parallel computing environment and check if there are any limitations or resource constraints that could affect the number of available workers.

类别

Help CenterFile Exchange 中查找有关 Run Multiple Simulations 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by