?? algorithme_genetique.m
字號(hào):
%--------------------------------------------------------------------------------------------------------------
% programme d'un algorithme g閚閠ique pour maximiser la fonction f(x,y)= x+y
%
% SOUKRATI Anass
% Errais Mohammed
%
%
%
%--------------------------------------------------------------------------------------------------------------
clear all;
clc;
intervalle = [0.9, 1.8; 2.1, 2.4]; % intervalle pour les variables : 0.9?x?1.8 et 2.1?y?2.4
nbregeneration = 10;
taillepopulation= 10;
probdecroisement= 0.3;
probdemutation = 0.01;
nbredebits = 6;
nbredevariable = 2;
obj_fcn = 'mafonc';
ng = 10;
ni = 10;
pc = 0.3;
pm = 0.01;
% nb = 6;
fprintf('\n');
disp('-----------------------------------------------------------------------------------------');
disp(' Param鑤res de l''Algorithme G閚閠ique ');
disp('-----------------------------------------------------------------------------------------');
disp([' Nombre de G閚閞ations =',num2str(ng)]);
disp([' Nombre d''individus =',num2str(ni)]);
disp([' Probabilite de croisement =',num2str(pc)]);
disp([' Probabilit
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -