Use Matlab R2019a to solve integer programing , why I get warning that selection function is ignored?
4 views (last 30 days)
Show older comments
Warning: Problem has integer constraints. The following options will be ignored by GA: CreationFcn SelectionFcn
0 Comments
Answers (1)
Walter Roberson
on 25 May 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 Comments
John D'Errico
on 25 May 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.
See Also
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!