GA violates the linear inequality constraints

1 次查看(过去 30 天)
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver 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