代码搜索:种群进化
找到约 1,664 项符合「种群进化」的源代码
代码结果 1,664
www.eeworm.com/read/253692/12205245
m main2.m
%本程序是两步式多目标遗传算法。第一步寻找PARETO部分解,第二步寻找PARETO整个边界
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%初始化
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nind=input('种群大小nind=')
nvar=inp
www.eeworm.com/read/338537/12294865
m mainf.m
function mainf(popnum,x,y)
%popnum 种群数,x输入数值,y输出数值
output1=[];
bestfit=[];
strArray = java_array('java.lang.String',popnum);
strArray1 = java_array('java.lang.String',popnum);
for i=1:20
www.eeworm.com/read/149541/12367079
m intinti.m
function [pop]=INTinti(num,bounds)
%[pop]=INTinti(num,bounds)
%inti 编码函数
%num 种群数
%bounds 边界约束
% 作者:机自01-2班曾新海
% zxh21st@163.com
n=size(bounds,1);
L=bounds(:,2)-
www.eeworm.com/read/149368/12384909
m example5_36.m
function NewChrom = mut(OldChrom,Pm,BaseV)
% OldChrom-当代种群的染色体
% Pm-变异概率
% BaseV-染色体基
[Nind, Lind] = size(OldChrom) ;
if nargin < 2, Pm = 0.7/Lind ; end
if isnan(Pm), Pm = 0.7/Lind; end
if (n
www.eeworm.com/read/149368/12384977
m example5_4.m
function[newPop] = Select(oldPop,options)
q=options(2); % 选择最优的概率
e = size(oldPop,2);
n = size(oldPop,1); % 种群中个体的数目
newPop = zeros(n,e); % 初始化
fit = zeros(n,1); % 初始化
x=z
www.eeworm.com/read/149368/12384988
m example5_38.m
%每个种群中的个体数目
NIND = 20;
%最大代数
MAXGEN = 100;
GGAP = .8;
SEL_F = 'sus'; % 选择函数
XOV_F = 'xovsp'; % 交叉函数
MUT_F = 'mut'; % 变异函数
OBJ_F = 'objfun1'; % 目标
www.eeworm.com/read/129306/14253080
cpp genetic.cpp
#include
#include
#include
#include
#define scale 100 //定义种群大小
#define amount 10 //定义城市数目
int * random(void); //随机函数产生一个解序列
cl
www.eeworm.com/read/114381/15055911
m example5_36.m
function NewChrom = mut(OldChrom,Pm,BaseV)
% OldChrom-当代种群的染色体
% Pm-变异概率
% BaseV-染色体基
[Nind, Lind] = size(OldChrom) ;
if nargin < 2, Pm = 0.7/Lind ; end
if isnan(Pm), Pm = 0.7/Lind; end
if (n
www.eeworm.com/read/114381/15055964
m example5_4.m
function[newPop] = Select(oldPop,options)
q=options(2); % 选择最优的概率
e = size(oldPop,2);
n = size(oldPop,1); % 种群中个体的数目
newPop = zeros(n,e); % 初始化
fit = zeros(n,1); % 初始化
x=z
www.eeworm.com/read/114381/15055974
m example5_38.m
%每个种群中的个体数目
NIND = 20;
%最大代数
MAXGEN = 100;
GGAP = .8;
SEL_F = 'sus'; % 选择函数
XOV_F = 'xovsp'; % 交叉函数
MUT_F = 'mut'; % 变异函数
OBJ_F = 'objfun1'; % 目标