Genetic algorithm error when running for non-linear function constroined by non-linear non-smooths equalities

Hello,
I am trying to perform minimization of a non-linear function which depends on 23 variables and constrained by 12 non-linear equalities.
When running "ga" I got the following error message. Hope anyone could come up with a suggestion. Matrix "A" is the result of vertical concatenation of linear equalities. in the function "eqnsolv".
Thank you!
Error using norm
First argument must be single or double.
Error in eqnsolv (line 29)
normRow = norm(A(i,:));
Error in preProcessLinearConstr (line 93)
[XOUT,Aineq,Bineq,Aeq,Beq,msg,how,exitflag]= eqnsolv(XOUT,Aineq,Bineq,Aeq,Beq,LB,UB,tol,verbosity);
Error in gacommon (line 97)
[Iterate.x,Aineq,bineq,Aeq,beq,lb,ub,msg,exitFlag] = preProcessLinearConstr( ...
Error in ga (line 363)
NonconFcn,options,Iterate,type] = gacommon(nvars,fun,Aineq,bineq,Aeq,beq,lb,ub, ...
Error in B57integ (line 155)
[xop,fvalo]=ga(objective,23,A,B,'','',lbo,ubo,nlincon,options2);
Error in run (line 91)
evalin('caller', strcat(script, ';'));
eqnsolv code in which error occurred
A = [Aeq;Aineq];
B = [Beq;Bineq];
% Total number of constraints
ncstr = size(A,1);
% Normalize constraints
for i=1:ncstr
normRow = norm(A(i,:));
if (normRow >= tolDep)
A(i,:) = A(i,:)/normRow;
B(i) = B(i)/normRow;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Computations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by