How can I avoid trivial solution (norm(x) =0) for binary ga optimization?

Hi, I'm trying to do an optimization using binary ga and after 25 hours of processing, the best result of the algorithm was the trivial solution. How can I insert a constraint for norm(x)=0?

 Respuesta aceptada

If you have a vector of unknowns x(i) with each x(i) = 0 or 1, then include a linear constraint:
A*x <= -1
where A is a row vector of negative ones.
Alan Weiss
MATLAB mathematical toolbox documentation

3 comentarios

Dear Alan,
Unfortunately, binary ga doesn't allow constraints.
I'll associate null solution with high value to avoid its choice. Thank you very much!
Perhaps you are using the bitstring data type. Indeed, this data type does not allow for constraints.
However, you can formulate the problem for binary GA by using mixed integer optimization, and setting lower bounds of 0 and upper bounds of 1. You can use linear inequality constraints with mixed integer GA.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Optimization Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 8 de En. de 2014

Comentada:

el 8 de En. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by