故障检测 免疫算法 源码我要分享

Immune algorithm for fault detection source code

matlab 算法 源码 检测 免疫 故障

关注次数: 258

下载次数: 0

文件大小: 8.19 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 1积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明: 应用 MATLAB编写的 故障检测 的 免疫算法源程序。好用绝对! clc; clear all; global popsize length min max N code; N=12;               % 每个染色体段数(十进制编码位数) M=20;               % 进化代数 popsize=20;         %设置初始参数,群体大小 length=10;          % length为每段基因的二进制编码位数 chromlength=N*length;  %字符串长度(个体长度),染色体的二进制编码长度 pc=0.7;                %设置交叉概率,本例中交叉概率是定值,若想设置变化的交叉概率可用表达式表示,或从写一个交叉概率函数,例如用神经网络训练得到的值作为交叉概率 pm=0.3;               %设置变异概率,同理也可设置为变化的 bound={-100*ones(popsize,1),zeros(popsize,1)};min=bound{1};max=bound{2}; pop=initpop(popsize,chromlength);   


English Description:

Fault detection of immune algorithm source program written in MATLAB. Well absolutely! clc; clear all; global popsize length min max N code; N=12; % Number of each chromosome segments (decimal code digits) M=20; % Evolution algebra popsize=20; % Set the initial parameters, population size length=10; %Length for each gene of binary-coded bits chromlength=N*length; % String length (length of the individual), chromosome length binary encoding pc=0.7; % Set the crossover probability, crossover probability is a value in this case, if you want to set the crossover probability is represented by an expression, or from writing a crossover probability functions, such as using the neural network training value as crossover probability pm=0.3; % Set the mutation probability, so also can be set to change bound={-100*ones(popsize,1),zeros(popsize,1)};min=bound{1};max=bound{2}; pop=initpop(popsize,chromlength);


代码预览