필터 지우기
필터 지우기

Induviduals dissapearing after some iterations using GA algorithm and parsim.

조회 수: 2 (최근 30일)
Jesper Ramsberg
Jesper Ramsberg 2023년 3월 29일
답변: Sugandhi 2023년 8월 23일
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