Effacer les filtres
Effacer les filtres

Why GA becomes error when we try to click running in second time?

1 vue (au cours des 30 derniers jours)
Chantrea Lean
Chantrea Lean le 29 Juin 2015
Commenté : Chantrea Lean le 29 Juin 2015
I wonder when I try to run the program optimization using GA in second time ,It becomes error but it will be running after i click many times to run.
  1 commentaire
Walter Roberson
Walter Roberson le 29 Juin 2015
We would need the source to have any hope of debugging this.

Connectez-vous pour commenter.

Réponse acceptée

Alan Weiss
Alan Weiss le 29 Juin 2015
I imagine that your nonlinear constraint function returns complex or Inf or NaN results for some population members. Remember, the initial population is, by default, random, and if your nonlinear constraint returns a non-real result for the initial population, then ga cannot continue.
To fix this, perhaps you can give tight bounds so that all nonlinear constraints are real. If you cannot do that, then you can simply give a feasible initial population. If you want a random initial population, then generate one, but make sure all population members are feasible (replace the ones that are not) before starting ga.
Alan Weiss
MATLAB mathematical toolbox documentation

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by