Info

This question is closed. Reopen it to edit or answer.

遺伝的アルゴリズムのFunction CountとPopulation Sizeの関係について

1 view (last 30 days)
Yohei
Yohei on 6 Oct 2021
Closed: Yohei on 8 Oct 2021
gaを用いて、非線形制約付きの整数のパラメータ最適化を行っているのですが、Function Countについて教えてください。
今回、36パラメータを最適化しようとしているため、Population Sizeは下記のドキュメントを参照すると、mixed-integer problemsに該当するため、一世代{min(max(10*nvars,40),100)}→{min(max(10*36,40),100)}→{min(360,100)}→100個体になると考えていました。
Positive integer | {50} when numberOfVariables <= 5, {200} otherwise | {min(max(10*nvars,40),100)} for mixed-integer problems
https://jp.mathworks.com/help/gads/ga.html?searchHighlight=ga%20options&s_tid=srchtitle#mw_4a8bfdb9-7c4c-4302-8f47-d260b7a43e26
しかし、実際に動かしてみると最初は200で、以降95ずつ増えているようでした。
最初が多く、以降も100になっていない理由は何でしょうか。
Best Mean Stall
Generation Func-count Penalty Penalty Generations
1 200 -1.166e+06 -1.166e+06 0
2 295 -1.166e+06 -5.83e+04 1
3 390 -1.166e+06 -5.83e+04 2
4 485 -1.166e+06 -5.83e+04 3
5 580 -1.166e+06 -5.83e+04 4
6 675 -1.166e+06 -5.83e+04 5
7 770 -1.166e+06 -5.83e+04 6
8 865 -1.166e+06 -5.83e+04 7
9 960 -1.166e+06 -5.83e+04 8
10 1055 -1.166e+06 -5.83e+04 9
11 1150 -1.166e+06 -5.83e+04 10
Optimization terminated: average change in the penalty fitness value less than options.FunctionTolerance
and constraint violation is less than options.ConstraintTolerance.
今回の問題でのoptionは下記のとおりです。
options =
ga オプション:
設定されているプロパティ:
ConstraintTolerance: 0.5000
CreationFcn: []
Display: 'iter'
InitialPopulationMatrix: [1×36 double]
MaxGenerations: 10000
MaxStallGenerations: 10
PlotFcn: {@gaplotbestf}
UseParallel: 1
既定のプロパティ:
CrossoverFcn: @crossoverscattered
CrossoverFraction: 0.8000
EliteCount: '0.05*PopulationSize'
FitnessLimit: -Inf
FitnessScalingFcn: @fitscalingrank
FunctionTolerance: 1.0000e-06
HybridFcn: []
InitialPopulationRange: []
InitialScoresMatrix: []
MaxStallTime: Inf
MaxTime: Inf
MutationFcn: {@mutationgaussian [1] [1]}
NonlinearConstraintAlgorithm: 'auglag'
OutputFcn: []
PopulationSize: '50 when numberOfVariables <= 5, else 200'
PopulationType: 'doubleVector'
SelectionFcn: @selectionstochunif
UseVectorized: 0
よろしくお願い致します。
  1 Comment
Yohei
Yohei on 6 Oct 2021
試しにPopulation sizeを明示的に100とした場合でも上記と同じ結果になりました。
また、Population sizeを200とした場合は下記の様に最初だけ400で、以降195ずつ増える結果になりました。
Best Mean Stall
Generation Func-count Penalty Penalty Generations
1 400 -1.166e+06 -1.166e+06 0
2 595 -1.166e+06 -2.915e+04 1
3 790 -1.166e+06 -2.915e+04 2
4 985 -1.166e+06 -2.915e+04 3
5 1180 -1.166e+06 -2.915e+04 4
6 1375 -1.166e+06 -1.166e+06 5
7 1570 -1.166e+06 -2.915e+04 6
8 1765 -1.166e+06 -1.166e+06 7
9 1960 -1.166e+06 -2.915e+04 8
10 2155 -1.166e+06 -2.915e+04 9
11 2350 -1.166e+06 -2.915e+04 10

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!