MATLAB Answers

'ga' function - change in feasibility check of linear constraint > R2016b

3 ビュー (過去 30 日間)
Frank Niessen
Frank Niessen 2019 年 7 月 22 日
Commented: Frank Niessen 2019 年 7 月 30 日
Hi everyone,
I have been writing a program that solves an optimization problem (rotation of one vector out of a specific group of vectors onto a second vector with rotational constraints). This worked quite well in MATLAB 2016b using the 'ga' function. As I want to make my code accessible for users of older versions of MATLAB as well I installed MATLAB R2014a and R2015a to check the downward compatibility of my code. It turned out that the convergence of the 'ga' algorithm was nothing like running the code in R2016b. When running with the older versions the solver would run into a local optimum quite abruptly and get stuck there, sometimes even violating the constraints ('Linear constraints are not satisfied within constraint tolerance'). This has never occured in 2016b.
I found this release note for 2016b:
Linear Constraints in ga and patternsearch: Different algorithm
When there are linear constraints in a problem, the ga and patternsearch solvers internally use linprog to ensure feasibility. In previous releases, the solvers internally used the linprog 'active-set' and 'simplex' algorithms. However, these algorithms were removed in R2016b. So the solvers now use the linprog 'dual-simplex' and 'interior-point' algorithms.
Compatibility Considerations
When your problem has linear constraints, your ga and patternsearch results can differ from previous versions. This difference is likely to be inconsequential.
I tried to check different starting parameters for the ga algorithm in the older versions but am not able to get it to converge smoothly. Is there anythin I can do to get a better behavior of my code for ga versions < R2016b?
Thank you for your help
R2014a vs. R2016b

  0 件のコメント

サインイン to comment.

件の回答 (2)

Frank Niessen
Frank Niessen 2019 年 7 月 25 日
Hey guys, no suggestions?

  0 件のコメント

サインイン to comment.

Ganesh Regoti
Ganesh Regoti 2019 年 7 月 30 日
There was a bug fix between 14a and 16b related to ga function. Refer this
Hope this helps!

  1 件のコメント

Frank Niessen
Frank Niessen 2019 年 7 月 30 日
Hi Ganesh,
thanks for the suggestion. I checked this bug, but it is not what is causing the problem in my case (I have an initial population of 100, so an EliteCount of 5 by default).

サインイン to comment.

サインイン してこの質問に回答します。




Translated by