Hello, Iman. If x(1)=1, the x(3), x(4), x(6), x(7) values do not affect the objective values. These design variables can be ignored when you process the optimzation results. The optimization progress is not affected except for the efficiency. You may need more optimzation generations to get a good result.
The original code could not get the correct Pareto-front because the crossover and mutation strategies I used do not fit for the ZDT problem. In original code, all variables of an individual would mutate if it was selected to be mutated. In the version 1.3 code, I change the strategies to mutate several variables instead, and the correct solution could be get now.
Can someone help how to write a binary constraint, in particular a variable to take 1 or 0 value. I am working on a facility location problem and I need YES/NO decision constraints. One idea that I got (not working) was putting the boundaries of the variables 0 and 1, and plus writing a constraint like this:
cons(22) = x(2) - 1;
cons(23) = x(1) - 1;
I want the function to choose between the variable x(1) or x(2)
Thanks for your great work. I am researching on cognitive radios and use NPGM with integer coding. I have an binary assignment matrix and a cost matrix. Each population member represents an assignment matrix and the objective evaluated based on cost.
Each solution is a vector of size 90 with integer values in it. Even though, I set the 'options.vartype=2' for integer optimization, at the output result, I have seen real values in population member. How can I fix this issue? Thanks for your great effort and help.