Use Matlab R2019a to solve integer programing , why I get warning that selection function is ignored?

4 visualizaciones (últimos 30 días)
Warning: Problem has integer constraints. The following options will be ignored by GA: CreationFcn SelectionFcn

Respuestas (1)

Walter Roberson
Walter Roberson el 25 de Mayo de 2020
When you use integer constraints then ga() implements that by using its own creation function and selection function.
If you want to have your own creation and selection functions then you need to turn off integer constraints, and instead have your creation and selection functions just happen to produce values that meet the constraints. You will probably also need to implement your own crossoverfcn.
  3 comentarios
John D'Errico
John D'Errico el 25 de Mayo de 2020
You have 4 variables, that each take on only binary values. Why not just evaluate the objective at each possible value, and then take the best one? Using GA to solve that problem is like using a Mack truck to carry a pea to Boston.
亚清 左
亚清 左 el 25 de Mayo de 2020
Yeah. You're right! I am just trying to test GA! And I have to use GA for a mixed-integer linear programming problem! But I am trapped here!

Iniciar sesión para comentar.

Categorías

Más información sobre Quadratic Programming and Cone Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by