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

📄 ga_fdex4coley.m

📁 其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載
💻 M
字号:
% GA_fdex4coley.m file
% Fin max of (x1,x2) of Example 4 on P.30 of Cpley

%**********************************************************/
%       User can modify the following in blocks
%**********************************************************/
obj_fcn = 'func_ex4';	% Objective function
range = [-100  -100
          100   100];	% Range of the input variables
bit_n = 78;		% Bit number for each input variable
generation_n = 332;	% Number of generations
popuSize = 58;		% Population size
xover_rate = 0.7;	% Crossover rate (BETTER)
mutate_rate = 0.04;	% Mutation rate (BETTER)
elite=1;
tic
[popu, popu_real, fcn_value, upper, average, lower, popuSize]=GA_genetic(...
               obj_fcn, range, [ ], elite, generation_n , ...
               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 + -