GA violates the linear inequality constraints

2 vues (au cours des 30 derniers jours)
Umber Saleem
Umber Saleem le 4 Avr 2019
Commenté : Umber Saleem le 20 Avr 2019
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.

Réponse acceptée

Alan Weiss
Alan Weiss le 4 Avr 2019
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 commentaires
Alan Weiss
Alan Weiss le 18 Avr 2019
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 le 20 Avr 2019
Thank you sir.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by