MATLAB Answers

why ga generates different fval and penalty values

11 ビュー (過去 30 日間)
BOWEN LI
BOWEN LI 2019 年 8 月 21 日
Answered: Alan Weiss 2019 年 8 月 22 日
Hello everyone, I have a question when I check the result after i using GA on my integer (binary) minimization problem that the generated fval and penalty value are not the same. Even when i tried to type like myfun(x), the result of that differs from fval and penalty value.
Also, for the penalty value, I am not sure why GA generates that because all my constraints are linear.
Thank you!

  0 件のコメント

サインイン to comment.

件の回答 (1)

Alan Weiss
Alan Weiss 2019 年 8 月 22 日
Most likely, your x value is infeasible. See Integer ga Algorithm, which states:
The penalty function value of a member of a population is:
  • If the member is feasible, the penalty function is the fitness function.
  • If the member is infeasible, the penalty function is the maximum fitness function among feasible members of the population, plus a sum of the constraint violations of the (infeasible) point.
Alan Weiss
MATLAB mathematical toolbox documentation

  0 件のコメント

サインイン to comment.

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


Translated by