openGA icon indicating copy to clipboard operation
openGA copied to clipboard

Optimization Issue in Example_SO1: Convergence Failure and Lack of Retained Optimal Samples in Iterative Process

Open 1278741833 opened this issue 1 year ago • 1 comments

Hi, thanks for this great tool and contribution. Why hasn't this instance converged? After multiple runs, the optimal samples were not retained. Even when the optimal samples appeared during the iteration, they were not preserved. The program being run is example_so1.cpp, and the last_generation.chromosomes did not update according to the results of the iteration. Is this correct? 微信图片_20240403183919 image image

1278741833 avatar Apr 03 '24 10:04 1278741833

Hi, I got the same problem. I believe that it is related to the fact that new_generation_fronts.empty() is always true in case of single objective optimization, thus I fixed it by adding || (is_single_objective()) to the test:

if ((!new_generation.fronts.empty()) || (is_single_objective()))
                	last_generation = new_generation; ```

ababaritECN avatar Apr 17 '24 07:04 ababaritECN