GA violates the linear inequality constraints

2 ビュー (過去 30 日間)
Umber Saleem
Umber Saleem 2019 年 4 月 4 日
コメント済み: Umber Saleem 2019 年 4 月 20 日
Hi. I have mixed integer non-linear optimization problem with two optimization variables, each of size K*M*N. For now I have tried the linear inequality constraitns. The result of opt. variable does not meet the constraints.
I have attached the complete code. Please highlight the issues.
Also, can ga solve this problem?
Thanking you in advance.

採用された回答

Alan Weiss
Alan Weiss 2019 年 4 月 4 日
You have expressed your constraints as nonlinear inequality constraints, not as linear inequality constraints. If the constraints are truly linear (they don't look linear to me), then you might have better luck expressing them in the format of linear inequality constraints.
You have a relatively large number of binary variables, and a small population. I would not expect ga to perform well on this kind of problem. And I do not understand why you set EliteCount to 1.
It seems to me that you have 23 binary variables. That is only 8388608 possibilities. Perhaps exhaustive search would work.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  3 件のコメント
Alan Weiss
Alan Weiss 2019 年 4 月 18 日
As far as options go, I suggest that you do not set values for parameters that you do not understand. You current settings are
options=gaoptimset('Generations',1000,'PopulationSize',100,'EliteCount',1,'TolFun',1e-8);
In particular, I suggest that you do not set EliteCount or Generations. I strongly suggest that you set PopulationSize to something much, much larger, perhaps 1e4 or even more. This setting will slow down your optimization a great deal, but you will have a much better chance of arriving at a good answer. To see what the various option settings do, see Genetic Algorithm Options.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Umber Saleem
Umber Saleem 2019 年 4 月 20 日
Thank you sir.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by