Genetic Algorithm Fails at galincon Line 99

I have built a genetic algorithm that is basically defined as following:
y=ga(@fitnessFunction,Vars,[],[],[],[],lb,ub,[],options);
The function was working fine as I was not using any linear and non-linear constrains, thus A,b,Aeq,beq are empty arrays. Today I got a matrix multiplication error, and the code was crashing on line 99 in galincon, on the following code.
output.maxconstraint = norm([Aeq*x'-beq; max([Aineq*x' - bineq;x' - ub(:);lb(:) - x'],0)],Inf);
Where Aeq, bineq are 0x10 matrices, thus Matlab does not regard them as empty. I have just commented the line out for now as it is not needed in my code. Let me know if you have any answers, please.

Respuestas (0)

Productos

Versión

R2018b

Preguntada:

el 21 de Mzo. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by