资源简介

代码片段和文件信息
% 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
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)‘)‘2);
end
Phen(:i) = Chrom(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3217 1998-04-22 10:44 gatbx\bs2rv.m
文件 222 2017-08-27 09:26 gatbx\change.bat
文件 1835 1998-04-22 10:44 gatbx\contents.m
文件 1168 1998-04-22 10:44 gatbx\crtba
文件 2187 1998-04-22 10:44 gatbx\crtbp.m
文件 2090 2008-11-14 16:35 gatbx\crtrp.m
文件 12501 2005-11-28 15:21 gatbx\DOC\ga toolbox frequently asked questions.txt
文件 16715 2005-12-02 09:07 gatbx\DOC\gatbxa0.pdf
文件 53484 1998-04-22 11:14 gatbx\DOC\gatbxa0.ps
文件 109101 2005-12-02 09:10 gatbx\DOC\gatbxa1.pdf
文件 204230 1998-04-22 11:14 gatbx\DOC\gatbxa1.ps
文件 101958 2005-12-02 09:16 gatbx\DOC\gatbxa2.pdf
文件 200234 1998-04-22 11:14 gatbx\DOC\gatbxa2.ps
文件 18351 2005-11-28 15:25 gatbx\DOC\gpl.txt
文件 1525 2005-11-28 15:25 gatbx\DOC\readme.txt
文件 98687 2005-11-28 16:18 gatbx\DOC\the mathworks - 1-18gtu why do i get an error in matlab 6_0 (r12) where i got a warning in r11 with reference to uninitialized variables.mht
文件 7205 1998-04-22 10:44 gatbx\migrate.m
文件 4019 1998-04-22 10:44 gatbx\mpga.m
文件 1609 1998-04-22 10:44 gatbx\mut.m
文件 3437 1998-04-22 10:44 gatbx\mutate.m
文件 4943 1998-04-22 10:44 gatbx\mutbga.m
文件 2642 2017-08-30 01:37 gatbx\objfun1.m
文件 2559 1998-04-22 10:44 gatbx\objharv.m
文件 4709 1998-04-22 10:44 gatbx\ranking.m
文件 1825 1998-04-22 10:44 gatbx\recdis.m
文件 1895 1998-04-22 10:44 gatbx\recint.m
文件 1953 1998-04-22 10:44 gatbx\reclin.m
文件 4852 1998-04-22 10:44 gatbx\recmut.m
文件 2438 1998-04-22 10:44 gatbx\recombin.m
文件 5574 1998-04-22 10:44 gatbx\reins.m
............此处省略49个文件信息
- 上一篇:包括多机器人避障算法.rar
- 下一篇:生物地理学优化BBO的matlab实现
相关资源
- MATLAB 实现各类常见算法
- matlab编写的量子遗传算法
- 协同进化遗传算法求解函数优化问题
- 基于遗传算法的旅游全国的路径最优
- 基于遗传算法的机器人路径规划matl
- 多种群遗传算法的函数优化算法(源
- 遗传算法完整MATLAB程序实数法,轮盘
- 遗传算法解决最优路径、选址问题
- 遗传算法GA车间调度Matlab代码
- 求解多旅行商(MTSP)的遗传算法的
- 基于遗传算法的小波神经网络在股票
- matlab开发-基于遗传算法的机器人运动
- 《Matlab遗传算法工具箱及应用》源码
- 遗传算法图像分割matlab+源代码
- 神经网络、遗传算法、支持向量机、
- 谢菲尔德(Sheffield)遗传算法工具箱
- 遗传算法优化支持向量机GASVM
- 遗传算法工具箱
- MATLAB遗传算法工具箱及应用.zip
- 《MATLAB 遗传算法工具箱及应用》PDF完
- 遗传算法(Genetic Algorithm)MATLAB案例详
- MATLAB遗传算法工具箱及应用》pdf版.
- 基于遗传算法的自动排课系统设计
- MATLAB.遗传算法和粒子群算法程序设计
- 多目标优化文档及代码
- 超完整规范的多目标遗传优化算法M
- 遗传算法 -- matlab ga工具箱
- MATLAB遗传算法工具箱及应用 包含PDF电
- 神经网络的43个源程序及数据
- 基于BP算法和遗传算法的自适应噪声抵
评论
共有 条评论