Ga toolbox answers optimtool

조회 수: 7 (최근 30일)
ravindra
ravindra 2011년 5월 2일
답변: Vidhi Agarwal 2025년 5월 30일
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