How to avoid permutation condition in Genetic Algorithm?

4 visualizaciones (últimos 30 días)
Shibu Samson
Shibu Samson el 19 de Oct. de 2019
Comentada: Shibu Samson el 23 de Oct. de 2019
I want to minimize my objective fuction with with 8 variables using genetic algorithm. Considering my problem, all my 8 variables are integer and the arrangenment of my variable wont affect my objective function.
Example: output like 1 2 3 4 5 6 7 8 or 8 7 6 5 4 3 2 1 wont affect my objective function. But the GA considering both this set of variable as a separate gene. Kindly someone let me know how to avoid this condition in GA.
Thanks.

Respuestas (1)

Walter Roberson
Walter Roberson el 19 de Oct. de 2019
Use A and b constraints to enforce that the values are in sorted order. x(1) < x(2) if [1 -1]*x(1:2).' < 0 so
A = [1 -1 0 0 0 0 0 0
0 1 -1 0 0 0 0 0
0 0 1 -1 0 0 0 0
0 0 0 1 -1 0 0 0
0 0 0 0 1 -1 0 0
0 0 0 0 0 1 -1 0
0 0 0 0 0 0 1 -1]
b = [0; 0; 0; 0; 0; 0; 0; 0]
However, that particular matrix does not enforce that the values are different: it would be satisfied with x(1) = x(2) for example. Fortunately when you work with integer variables you can rewrite x(1) < x(2) as x(1) + 1 < x(2) which is x(1)-x(2) < -1 so instead of all 0'is in b, make it all -1's and duplicates would be ruled out.
  1 comentario
Shibu Samson
Shibu Samson el 23 de Oct. de 2019
Thank you so much for your suggession.
The constrain which you have suggested will avoid the repetation and arrange the out output in accending/decending order.
Suppose my range is 1 to 100(ie. want to pick 8 variable from 1 - 100), the whole result will depents on x(8). That means, if the algorithm pick x(8) as 50 then it will ignore all the values from 50-100 because of the constrain suggested by you.
Kindly give me a suggestion to over come this iisue.
Thanks.

Iniciar sesión para comentar.

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by