MATLAB Answers

why do i get 50 outputs for multi objective genetic algorithm?

2 views (last 30 days)
hello, i am trying to use multi objective genetic algorithm. i have 3 vectors..each of size 11x1
i am getting an output... though the output is 50x2
could someone please explain why it is so...or is there any way to change it. i am new to matlab please help me with this thank you

Accepted Answer

Walter Roberson
Walter Roberson on 8 Feb 2018
gamultiobj returns a sampling of the Pareto fronts.
Your code needs to stop overwriting the parameter x in your fitness function: you are computing the same thing every time.
You are telling the optimizer that you have 2 variables but your computation is for a vector of length 11.
I wonder if what you are trying to optimize is some kind of mixing coefficients, in which case it might make sense to be optimizing on 2 or 3 variables.
  11 Comments
Walter Roberson
Walter Roberson on 8 Feb 2018
"which ever is much further away from constraints in more suitable."
Each linear constraint defines a plane that divides the 11-dimensional solution space in two. Multiple linear constraints force the acceptable points to be "inside" all of the planes. Asking which point is furthest from the constraints would require finding the distance between the candidate point and all of the planes. That can be done, but it leads back to the question of how you decide which is best since you have multiple distances involved. Do you take the sum of squares of the euclidean distance to the closest point on each of the dividing planes? Even if the closest point on the plane is "outside" of the volume defined by the planes ?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!