How to configure the options of ga function ?

1 view (last 30 days)
Hello, i tried to configure the parametrs of ga function but i got this message.What to do ? thanks

Accepted Answer

Stephen23
Stephen23 on 28 Apr 2017
Edited: Stephen23 on 28 Apr 2017
The gaoptimset documentation states under the option MaxGenerations: "For gaoptimset, use Generations."
There are many other option names that are different when using gaoptions, so read that documentation carefully.
  2 Comments
houda mejri
houda mejri on 28 Apr 2017
thanks for your response. i tried to set generations to 200 but it did give me wrong results ! and also it didn't accept FunctionTolerance!
houda mejri
houda mejri on 28 Apr 2017
Please, i tried to simulate this code from this link https://fr.mathworks.com/help/gads/examples/solving-a-mixed-integer-engineering-design-problem-using-the-genetic-algorithm.html. and this is what i got.

Sign in to comment.

More Answers (0)

Categories

Find more on Optimization Toolbox 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!