how can i formulate this fitness function ?

2 ビュー (過去 30 日間)
Ameer Kadhim
Ameer Kadhim 2018 年 3 月 10 日
コメント済み: Star Strider 2018 年 3 月 10 日
hello everybody...
my problem is : i have matrix consist of 4 columns and 200 rows , the fist column represent the index , the second column contain the values of weights ( in kg) , third column contain the values of length(in meter) , the fourth column contains the values of age(in days) . how i can formulate this problem in genetic algorithm (e.g NSGA-II)in matlab , such that finally i want the number vector or pareto-front that contain (low value of weight, high value of length, less value of age ) simultaneously. for example:
1 : 20 70 45
2: 49 10 67
3: 100 15 46
4: .... and so on .
And what is form of the fitness function? Please help me...
With sincere thanks and appreciation.....

採用された回答

Star Strider
Star Strider 2018 年 3 月 10 日
The function you want is gamultiobj (link).
I am not certain what you want to do, so I leave the design of the fitness function to you.
Something like this could work:
M = [(1:25)' randi(100, 25, 3)]; % Create Data Matrix
fitfcn = @(x) [x(1).*min(M(2)), x(2).*max(M(3)), x(3).*min(M(4))];
X = gamultiobj(fitfcn, 3)
Mval = [X(:,1).*min(M(:,2)), X(:,2).*max(M(:,3)), X(:,3).*min(M(:,4))];
figure(1)
scatter3(Mval(:,1), Mval(:,2), Mval(:,3), 'p')
grid on
figure(2)
stem3(Mval(:,1), Mval(:,2), Mval(:,3), 'p', 'Filled')
grid on
  6 件のコメント
Ameer Kadhim
Ameer Kadhim 2018 年 3 月 10 日
Do you know someone who can help me please. I'm tired. I did not find the solution ..
Star Strider
Star Strider 2018 年 3 月 10 日
There are probably people here on MATLAB Answers who have the expertise you need. That is the reason I suggested that you ask a new Question, this time describing the problem you actually want to solve.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by