필터 지우기
필터 지우기

why the penalty of ga, when all the population violates the nonlinear constraints, is smaller than the penalty of feasible populations?

조회 수: 3 (최근 30일)
I have integer problem with nonlinear constraints. So, at the beggining there are only few integer options (the problem's boundary increases through time) and sometimes all the populations my violate the non-linear constraint. For example, the penalityt value of the first generation with feasible population is 5, then ga assignes penality value 1 when the entire population in the second generation violates the non-linear constraint.
  댓글 수: 4
Matt J
Matt J 2022년 11월 17일
편집: Matt J 2022년 11월 17일
How are you observing the population size? How are you observing the penalty values? What code can we run to illustrate what you are seeing?
Emebet Gedlu
Emebet Gedlu 2022년 11월 17일
Well, I have a very complex problem but here is the idea.
f=@(n_Tx)CMPC_vector(n_Tx,u_past,decide,Setup,Hist_temp, plan_OP,trainedNet,Rem_step);
nonlcon=@(x)MaxTorqueLim(x,Setup,Rem_step,decide);
options=optimoptions('ga', 'Display', 'iter','MaxTime',120,...
'PopulationSize',PP_Size,'UseVectorized',true,...
'CrossoverFraction',0.5,'EliteCount',floor(1+PP_Size/3),'MaxStallGenerations',15);
[n_Tx_float,f_val]=ga(f,Setup.NInput*Rem_step,[],[],[],[],lb,ub,nonlcon,1:Setup.NInput*Rem_step,options);
function JJ= CMPC_vector(x,u_past,decide,Setup,Hist, plan_OP,trainedNet,Rem_step)
...
end
I just put a brake point in the first line of the "CMPC_vector" function to obesrve what is in x. Then I give higher penality value if it is empy, but what appear in the display is just 1 all way till the maximum stall.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jasvin
Jasvin 2023년 9월 21일
Hi Emebet,
So, this is a problem that exists with all optimization algorithms in MATLAB. The following MATLAB Answers post would help you gain more insight into what is happening and provide helpful links:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by