Thanks for the great work!!!
You have explained about constraints (Your manual Page 1)
But if constraints are like say,
Then how to modify the code in objective function (Page 3)
Thanks and regards,
Great work, thanks a lot for sharing!
In the first few generations, some individuals of the population have violated constraints. I was expecting to find the actual contraints variables in results.pops.cons, but there were all zero. I only found the *number* of violations in results.pops.nViol.
I was able to improve this by adding one line in evaluate.m:
% Save the objective values and constraint violations
indi.obj = y; % <<<< ADDED LINE >>>
if( ~isempty(indi.cons) )
indi.cons = cons;
idx = find( cons );