⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ga_ex23a.m

📁 其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載
💻 M
字号:
% GA_ex23A.m file
% Fin min of a function of 3 varaibles

% PenChen Chou, 7-1-2001

%**********************************************************/
%       User can modify the following in blocks
%**********************************************************/
global MIN_offset LOCUS x_data y_data
MIN_offset=100; LOCUS=0; x_data=[]; y_data=[];
obj_fcn = 'GA_f23';	% Objective function
range = [-5.12 -5.12 -5.12
          5.12  5.12  5.12];	% Range of the input variables
IC=[]; elite=1; 
gen_no=200;
popuSize=70;
bit_n=40;
xover_rate=0.8;
mutate_rate=0.05;
%************************************************************
% call GA written by Chang
tic
% [popu, popu_real, fcn_value, upper, average,...
%  lower, popuSize, gen_no]=GA_genetic(obj_fcn, range, IC, elite,...
%  gen_no, popuSize, bit_n, xover_rate, mutate_rate);
[popu, popu_real, fcn_value, upper, average, lower, ...
        popuSize, gen_no] = GA_genetic(obj_fcn, range,...
        IC, elite, gen_no, popuSize, bit_n, xover_rate,...
        mutate_rate);
t=toc/60;
fprintf('==>  Computation time is (%.2f) minutes.\n',t);            
            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -