Ga toolbox answers optimtool

1 次查看(过去 30 天)
ravindra
ravindra 2011-5-2
Hello Friemds, I have solved small classroom examples in gatool box using ga and gamultiobjective. I got the answers but when I prerss start tab again, it gives different answers for the same problem. Also after solving gamultiobjective problem, we get no of objective function values and corresponding value of the variable x. Form these how to find out the single values for both the objectives. Like in Lp we get only one value of the objective function.

回答(1 个)

Vidhi Agarwal
Vidhi Agarwal 2025-5-30
Genetic algorithms are stochastic, meaning they use randomness (like mutation, crossover, and selection). Therefore:
  • Running the same problem twice will usually give slightly different solutions
  • This is expected behavior
  • If you want reproducible results, you need to set the random seed before running the GA:
rng(1);
"gamultiobj" is for multi-objective optimization. It doesn’t give a single solution like LP does, because:
  • There is no single "best" solution when you have multiple objectives (like minimize cost and maximize quality)
  • Instead, it gives a set of Pareto optimal solutions so no solution in the set is better than another in all objectives and each solution represents a different trade-off.
Since you have multiple Pareto-optimal solutions, you can choose one based on your preference or apply decision-making techniques.
  1. Manual Selection: Choose a point based on which objective you prioritize more or pick the "knee point" (best trade-off) manually.
  2. Automatic Selection: If aim is to reduce it to a single objective, define a weighted sum:
For better understanding of genetic algorithms and "gamultiobj" refer to the following documentation:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by