-
大小: 2.69MB文件类型: .zip金币: 2下载: 1 次发布日期: 2023-10-27
- 语言: Matlab
- 标签:
资源简介
谢菲尔德(Sheffield)遗传算法工具箱(Matlab_toolbox)新版(.m小写文件后缀)
代码片段和文件信息
% BS2RV.m - Binary string to real vector
%
% This function decodes binary chromosomes into vectors of reals. The
% chromosomes are seen as the concatenation of binary strings of given
% length and decoded into real numbers in a specified interval using
% either standard binary or Gray decoding.
%
% Syntax: Phen = bs2rv(ChromFieldD)
%
% Input parameters:
%
% Chrom - Matrix containing the chromosomes of the current
% population. Each line corresponds to one
% individual‘s concatenated binary string
% representation. Leftmost bits are MSb and
% rightmost are LSb.
%
% FieldD - Matrix describing the length and how to decode
% each substring in the chromosome. It has the
% following structure:
%
% [len; (num)
% lb; (num)
% ub; (num)
% code; (0=binary | 1=gray)
% scale; (0=arithmetic | 1=logarithmic)
% lbin; (0=excluded | 1=included)
% ubin]; (0=excluded | 1=included)
%
% where
% len - row vector containing the length of
% each substring in Chrom. sum(len)
% should equal the individual length.
% lb
% ub - Lower and upper bounds for each
% variable.
% code - binary row vector indicating how each
% substring is to be decoded.
% scale - binary row vector indicating where to
% use arithmetic and/or logarithmic
% scaling.
% lbin
% ubin - binary row vectors indicating whether
% or not to include each bound in the
% representation range
%
% Output parameter:
%
% Phen - Real matrix containing the population phenotypes.
%
% Author: Carlos Fonseca Updated: Andrew Chipperfield
% Date: 08/06/93 Date: 26-Jan-94
%
% Tested under MATLAB v6 by Alex Shenfield (17-Jan-03)
function Phen = bs2rv(ChromFieldD)
% Identify the population size (Nind)
% and the chromosome length (Lind)
[NindLind] = size(Chrom);
% Identify the number of decision variables (Nvar)
[sevenNvar] = size(FieldD);
if seven ~= 7
error(‘FieldD must have 7 rows.‘);
end
% Get substring properties
len = FieldD(1:);
lb = FieldD(2:);
ub = FieldD(3:);
code = ~(~FieldD(4:));
scale = ~(~FieldD(5:));
lin = ~(~FieldD(6:));
uin = ~(~FieldD(7:));
% Check substring properties for consistency
if sum(len) ~= Lind
error(‘Data in FieldD must agree with chromosome length‘);
end
if ~all(lb(scale).*ub(scale)>0)
error(‘Log-scaled variables must not include 0 in their range‘);
end
% Decode chromosomes
Phen = zeros(NindNvar);
lf = cumsum(len);
li = cumsum([1 len]);
Prec = .5 .^ len;
logsgn = sign(lb(scale));
lb(scale) = log( abs(lb(scale)) );
ub(scale) = log( abs(ub(scale)) );
delta = ub - lb;
Prec = .5 .^ len;
num = (~lin) .* Prec;
den = (lin + uin - 1) .* Prec;
for i = 1:Nvar
idx = li(i):lf(i);
if code(i) % Gray decoding
Chrom(:idx)=rem(cumsum(Chrom(:idx)‘)‘
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\
文件 3242 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\bs2rv.m
文件 1781 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\contents.m
文件 1192 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\crtba
文件 2198 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\crtbp.m
文件 2105 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\crtrp.m
目录 0 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\DOC\
文件 3850173 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\DOC\GAToolbox Documentation.pdf
文件 18046 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\LICENSE
文件 7124 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\migrate.m
文件 3962 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\mpga.m
文件 1610 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\mut.m
文件 3423 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\mutate.m
文件 4898 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\mutbga.m
文件 2648 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\objfun1.m
文件 2567 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\objharv.m
文件 4691 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\ranking.m
文件 1491 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\README.md
文件 1840 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\recdis.m
文件 1906 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\recint.m
文件 1963 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\reclin.m
文件 4879 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\recmut.m
文件 2505 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\recombin.m
文件 5518 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\reins.m
文件 1229 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\rep.m
文件 2091 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\resplot.m
文件 1134 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\rws.m
文件 1208 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\scaling.m
文件 2399 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\select.m
文件 2038 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\sga.m
文件 1345 2016-09-01 20:24 UoS-CODeM-GA-Toolbox-8ca5c5c\sus.m
............此处省略35个文件信息
相关资源
- 四元数MATLAB工具箱
- 代理模型MATLAB工具箱FAC Viana
- 四元数(quaternion)的Matlab工具箱
- 双聚类(Bi-clustering)Matlab工具箱
- “群体智能算法”Matlab工具箱 Versio
- 多任务高斯过程模型 Matlab工具箱 包括
- EWT 经验小波分解 matlab工具箱 toolbox
- DACE和OODACE,krigingMATLAB工具箱.zip
- 克里金插值法MATLAB工具箱
- RBMCDAbox - Matlab Toolbox of Rao-Blackwellize
- 降维技术matlab工具箱
- cplex 12.4 MATLAB工具箱
- 贝叶斯网络工具箱MATLAB工具箱
- chirplet变换matlab工具箱大全
- MATLAB程序——癫痫病人的脑电信号提
- 聚类数指标matlab工具箱
- 支持向量机matlab工具箱含资料及gui模
- 最新版,最小二乘支持向量机2010年
- 面向Matlab工具箱的神经网络理论与应
- MATLAB工具箱大全,各种算法
- GPS仿真-matlab工具箱
- 一个社团发现的MATLAB工具箱
- matlab工具箱LMI使用
- 两个处理三角网格文件(三维)的m
- HHT希尔伯特黄变换 MATLAB工具箱174211
- PCA LDA LLE各种降维方法Matlab工具箱
- MATLAB工具箱robotics toolbox 9.10
- BNT-MATLAB工具箱
- 随机森林matlab工具箱及其它实现方法
- CNN卷积神经网络MATLAB工具箱中文注释
评论
共有 条评论