gafmax
% [BestPop,Trace]=fmaxga(FUN,LB,UB,eranum,popsize,pcross,pmutation)
% Finds a maximum of a function of several variables.
% fmaxga solves problems of the form:
% max F(X) subject to: LB <= X <= UB
% BestPop--------最优的群体即为最优的染色体群
% Trace----------最佳染色体所对应的目标函数值
% FUN------------目标函数
% LB-------------自变量下限
% UB-------------自变量上限
% eranum---------种群的代数,取100--1000(默认1000)
% popsize--------每一代种群的规模;此可取50--100(默认50)
% pcross---------交叉的概率,此概率一般取0.5--0.85之间较好(默认0.8)
% pmutation------变异的概率,该概率一般取0.05-0.2左右较好(默认0.1)
% options--------1×2矩阵,options(1)=0二进制编码(默认0),option(1)~=0十进制编码,option(2)设定求解精度(默认1e-4)( [BestPop, Trace] = fmaxga (FUN, LB, UB, eranum, popsize, pcross, pmutation) Finds a maximum of a function of several variables. Fmaxga solves problems of the form: max F (X) subject to : LB <= X <= UB BestPop-------- optimal chromosome groups is the best group Trace---------- chromosome corresponding to the best objective function value FUN------------ objective function LB------------- variable lower limit since the UB------------- variable upper limit eranum--------- populations algebra, take 100- 1000 (default 1000) popsize-------- population size of each generation this desirable 50- 100 (default 50) pcross--------- crossover probability, the probability of a general check 0.5- 0.85 between the better (default 0.8) pmutation------ mutation probability, the probability of 0.05 general admission better about-0.2 (default 0.1) options-------- 1 × 2 matrix, options (1) = 0 binary code (default 0), option (1) ~ = 0 decimal coding, option (2 ) set accuracy (default 1e-4))
- 2006-10-18 16:07:48下载
- 积分:1