Genetic Algorithm fitness value chart

Hi I am using genetic algorithm for a mixed integer linear programming. I used this command to show genetic algorithm "fitness value" chart:
x=ga(problem); problem.options.PlotFcns = @gaplotbestf;
But matlab gives me "penalty value" chart! Also I want to adjust generation value as 200 but I don't know how can I do that!
Can anyone help me?

 採用された回答

Alan Weiss
Alan Weiss 2019 年 10 月 29 日

1 投票

Your problem probably has integer constraints. Maybe nonlinear constraints, too. The solver behaves very differently with tose kinds of constraints. See Mixed Integer Optimization and Nonlinear Constraint Solver Algorithms.
For more help, please shw us your option settings and ga call, and tell us what you want to accomplish (setting a generation value to 200 is not what you want to accomplish; you might want to solve a problem to a certain accuracy, or in a certain time, but I find it hard to believe that setting a generation value of 200 is really the goal).
Alan Weiss
MATLAB mathematical toolbox documentation

7 件のコメント

S AsZ
S AsZ 2019 年 10 月 29 日
My code is exist Here
That's true I have both integer and equality constraints. But I eliminate the eqality constraints by converting them to inequality constraints. I want to solve my problem with considering generation 200 as stopping criteria condition.
Alan Weiss
Alan Weiss 2019 年 10 月 30 日
You can set the MaxGenerations option to 200 if you like. See ga options.
Alan Weiss
MATLAB mathematical toolbox documentation
S AsZ
S AsZ 2019 年 11 月 10 日
編集済み: S AsZ 2019 年 11 月 11 日
Is there any way that MATLAB will display fitness value chart instead of penalty value chart, when I have a mixed integer programming with linear constraints?
Because I need fitness value chart not penalty value chart!
Alan Weiss
Alan Weiss 2019 年 11 月 24 日
You can create a custom output function (or custom plot function) to do what you want.
Alan Weiss
MATLAB mathematical toolbox documentation
S AsZ
S AsZ 2019 年 11 月 28 日
Thank you so much ?
S AsZ
S AsZ 2019 年 11 月 28 日
編集済み: S AsZ 2019 年 11 月 28 日
Excuse me again I have an author question: How can I write multi objective functions with Optimproblem format? My mean is using problem based method not using solver based method.
Alan Weiss
Alan Weiss 2019 年 12 月 2 日
I suggest that you open a new question for this. I do not quite understand what you are asking.
Alan Weiss
MATLAB mathematical toolbox documentation

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

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019b

質問済み:

2019 年 10 月 26 日

コメント済み:

2019 年 12 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by