I'm trying to minimaze a non linear function with non linear costraints with a ga (i have attached the files with the functions), but whenever i run the code i have the following errors:
Error using constrValidate (line 59)
Constraint function must return real value.
Error in gacommon (line 125)
[LinearConstr, Iterate,nineqcstr,neqcstr,ncstr] = constrValidate(NonconFcn, …
Error in ga (line 363)
NonconFcn,options,Iterate,type] = gacommon(nvars,fun,Aineq,bineq,Aeq,beq,lb,ub, …
Error in main (line 28)
[x, fval] = ga(ObjFcn,nvars,A, b, Aeq, beq, [], [], CostraintFunction);
How can i fix that?
Thanks for helping
Best Answer