fuzzy logic optimization genetic algorithm
5 views (last 30 days)
Show older comments
Hello everyone, please help me
i want to do an optimization with genetic algorithm to fuzzy logic
and i have done with fuzzy logic
this is the code of fuzzy logic
Beasiswa=newfis('Beasiswa');
% Tambahkan input IPK
Beasiswa=addvar(Beasiswa,'input','IPK',[3 4]);
% Tambahkan fungsi keanggotaan PELAYANAN: Jelek, Sedang, Bagus
Beasiswa=addmf(Beasiswa,'input',1,'Rendah','trimf',[3 3 3.4]);
Beasiswa=addmf(Beasiswa,'input',1,'Sedang','trimf',[3.2 3.5 3.8]);
Beasiswa=addmf(Beasiswa,'input',1,'Tinggi','trimf',[3.6 4 4]);
% plot input PELAYANAN utk melihat hasilnya
Beasiswa=addvar(Beasiswa,'input','skorperilaku',[0 10]);
Beasiswa=addmf(Beasiswa,'input',2,'Rendah','trimf',[0 0 4]);
Beasiswa=addmf(Beasiswa,'input',2,'Sedang','trimf',[3 5 7]);
Beasiswa=addmf(Beasiswa,'input',2,'Tinggi','trimf',[6 10 10]);
Beasiswa=addvar(Beasiswa,'input','gajibeban',[0 15000000]);
Beasiswa=addmf(Beasiswa,'input',3,'Rendah','trimf',[0 0 5000000]);
Beasiswa=addmf(Beasiswa,'input',3,'Sedang','trimf',[4000000 6000000 10000000]);
Beasiswa=addmf(Beasiswa,'input',3,'Tinggi','trimf',[9000000 15000000 21000000]);
Beasiswa=addvar(Beasiswa,'output','Kelayakan',[0 1]);
Beasiswa=addmf(Beasiswa,'output',1,'Rendah','trimf',[0 0 0.3]);
Beasiswa=addmf(Beasiswa,'output',1,'Sedang','trimf',[0.3 0.5 0.7]);
Beasiswa=addmf(Beasiswa,'output',1,'Tinggi','trimf',[0.7 1 1]);
%rules = [1 1 1 1 1 1
% 2 1 1 1 1 1];
rules = [1 1 1, 2 1 1
1 1 2 2 1 1
1 1 3 1 1 1
1 2 1 2 1 1
1 2 2 2 1 1
1 2 3 1 1 1
1 3 1 2 1 1
1 3 2 1 1 1
1 3 3 1 1 1
2 1 1 3 1 1
2 1 2 3 1 1
2 1 3 1 1 1
2 2 1 2 1 1
2 2 2 2 1 1
2 2 3 1 1 1
2 3 1 1 1 1
2 3 2 1 1 1
2 3 3 1 1 1
3 1 1 3 1 1
3 1 2 3 1 1
3 1 3 1 1 1
3 2 1 3 1 1
3 2 2 2 1 1
3 2 3 1 1 1
3 3 1 2 1 1
3 3 2 2 1 1
3 3 3 1 1 1];
Beasiswa = addrule(Beasiswa,rules);
and i want to do optimization with genetic algorithm
can anyone help?
any source code or reffrences will helpful
Thanks
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!