生物地理学优化算法(BBO)解读(含源码)

目录

一、算法原理:

1.迁移:

2.变异

二、算法流程:

三、matlab代码解读:

三、算法改进思路:

四、算法应用:

四、算法应用:

参考文献



生物地理学优化算法(Biogeography-based optimization)是Dan Simon 教授在2008年提出来的。生物地理学优化算法是受生物地理学原理启发,可以理解为大自然通过物种在地理区域间迁移和漂流,最终达到一种平衡态;这里的物种信息就是优化问题的决策变量。与其他基于种群的优化算法一样,BBO算法也是通过对物种信息的迁移和变异操作的迭代,每一代筛选最适应度值最有的个体作为全局最优值,通过种群的迭代和评估,最终得到最优个体。

原始论文下链链接:

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4475427

一、算法原理:

BBO算法的基本思想来源于生物地理学理论。如图1所示,生物物种生活在多个栖息地(Habitat)上,每个栖息地用栖息适宜指数(Habitat Suitability Index,HSI)表示,与HSI相关的因素有降雨量、植被多样性、地貌特征、土地面积、温度和湿度等,将其称为适宜指数变量(Suitability Index Variables,SIV)
 

生物地理学优化算法的解的更新机制主要依赖两种操作:迁移和变异。其原理就是受生物地理学启发得到的。

1.迁移:

首先是物种迁移,物种的迁移是有物理模型的,当然这种模型也是统计模型,但是道理是一样的。比如线性模型、余弦模型、二次模型、指数模型。

2.变异

为了增加算法的多样性,引入了变异操作;变异操作就和遗传算法中的一样,但是要根据公式来的。

二、算法流程:

BBO算法的具体流程为:
step1. 初始化BBO算法参数,包括栖息地数量N 、迁入率最大值I 和迁出率最大值E、最大突变率 等参数。
step2. 初始化栖息地,也就是解的初始化,对每个栖息地及物种进行随机或者启发式初始化。
step3. 计算每个栖息地的适宜指数HSI(也就是目标函数的适应度值);

step4.判断是否达到迭代停止条件,如果满足就停止迭代,输出最优解,否则转step5。
step5. 对所有的栖息地执行迁移操作,对每个栖息地计算其迁入率和迁出率,对SIV进行修改,重新计算适宜指数HSI。
step6. 对所有栖息地执行突变操作,根据突变算子更新栖息地物种,重新计算适宜指数HSI。
step7. 转到步骤3进行下一次迭代。

三、matlab代码解读:

算法参数初始化:

function [OPTIONS, MinCost, AvgCost, InitFunction, CostFunction, FeasibleFunction, ...
MaxParValue, MinParValue, Population] = Init(DisplayFlag, ProblemFunction, RandSeed)

% Initialize population-based optimization software.

% WARNING: some of the optimization routines will not work if population size is odd.
OPTIONS.popsize = 50; % total population size
OPTIONS.Maxgen = 50; % generation count limit
OPTIONS.numVar = 20; % number of genes in each population member
OPTIONS.pmutate = 0; % mutation probability

if ~exist('RandSeed', 'var')
    RandSeed = round(sum(100*clock));
end
rand('state', RandSeed); % initialize random number generator
if DisplayFlag
    disp(['random # seed = ', num2str(RandSeed)]);
end

% Get the addresses of the initialization, cost, and feasibility functions.
[InitFunction, CostFunction, FeasibleFunction] = ProblemFunction();
% Initialize the population.
[MaxParValue, MinParValue, Population, OPTIONS] = InitFunction(OPTIONS);
% Make sure the population does not have duplicates. 
Population = ClearDups(Population, MaxParValue, MinParValue);
% Compute cost of each individual  
Population = CostFunction(OPTIONS, Population);
% Sort the population from most fit to least fit
Population = PopSort(Population);
% Compute the average cost
AverageCost = ComputeAveCost(Population);
% Display info to screen
MinCost = [Population(1).cost];
AvgCost = [AverageCost];
if DisplayFlag
    disp(['The best and mean of Generation # 0 are ', num2str(MinCost(end)), ' and ', num2str(AvgCost(end))]);
end

return;

GetSpeciesCounts函数: 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [Population] = GetSpeciesCounts(Population, P)

% Map cost values to species counts.

% This loop assumes the population is already sorted from most fit to least fit.
for i = 1 : length(Population)
    if Population(i).cost < inf
        Population(i).SpeciesCount = P - i;
    else
        Population(i).SpeciesCount = 0;
    end
end
return;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

代码运行结果: 

random # seed = 210433
The best and mean of Generation # 0 are 6798.1881 and 8425.6765
The best and mean of Generation # 1 are 6191.0463 and 7712.3762
The best and mean of Generation # 2 are 5975.7976 and 7145.1543
The best and mean of Generation # 3 are 5548.1582 and 6854.2149
The best and mean of Generation # 4 are 5402.7062 and 6284.0483
The best and mean of Generation # 5 are 4136.2399 and 5806.3381
The best and mean of Generation # 6 are 3802.5443 and 5336.0506
The best and mean of Generation # 7 are 3802.5443 and 4818.2664
The best and mean of Generation # 8 are 3424.4632 and 4389.6728
The best and mean of Generation # 9 are 2885.6755 and 3908.8695
The best and mean of Generation # 10 are 2063.7531 and 3485.6253
The best and mean of Generation # 11 are 2063.7531 and 3098.9484
The best and mean of Generation # 12 are 1776.1285 and 2711.0083
The best and mean of Generation # 13 are 1776.1285 and 2531.2169
The best and mean of Generation # 14 are 1776.1285 and 2244.1648
The best and mean of Generation # 15 are 1498.5574 and 2116.3916
The best and mean of Generation # 16 are 1479.9849 and 1957.3969
The best and mean of Generation # 17 are 1239.8981 and 1806.5861
The best and mean of Generation # 18 are 1239.8981 and 1630.9923
The best and mean of Generation # 19 are 1199.4821 and 1505.7131
The best and mean of Generation # 20 are 1173.6721 and 1426.8884
The best and mean of Generation # 21 are 1173.6721 and 1395.8198
The best and mean of Generation # 22 are 1173.6721 and 1349.173
The best and mean of Generation # 23 are 1173.6721 and 1298.9352
The best and mean of Generation # 24 are 1173.6721 and 1366.31
The best and mean of Generation # 25 are 1173.6721 and 1448.2162
The best and mean of Generation # 26 are 1171.9469 and 1332.6789
The best and mean of Generation # 27 are 1171.9469 and 1401.491
The best and mean of Generation # 28 are 1119.6099 and 1293.9546
The best and mean of Generation # 29 are 1038.4718 and 1347.819
The best and mean of Generation # 30 are 1036.7466 and 1347.0559
The best and mean of Generation # 31 are 982.6845 and 1329.0154
The best and mean of Generation # 32 are 976.182 and 1279.9247
The best and mean of Generation # 33 are 976.182 and 1311.9903
The best and mean of Generation # 34 are 976.182 and 1274.8326
The best and mean of Generation # 35 are 974.4569 and 1225.205
The best and mean of Generation # 36 are 974.4569 and 1179.6202
The best and mean of Generation # 37 are 974.4569 and 1135.61
The best and mean of Generation # 38 are 974.4569 and 1149.5376
The best and mean of Generation # 39 are 974.4569 and 1152.9323
The best and mean of Generation # 40 are 974.4569 and 1219.1953
The best and mean of Generation # 41 are 974.4569 and 1176.0811
The best and mean of Generation # 42 are 974.4569 and 1234.05
The best and mean of Generation # 43 are 897.0742 and 1176.734
The best and mean of Generation # 44 are 897.0742 and 1169.1137
The best and mean of Generation # 45 are 897.0742 and 1188.9399
The best and mean of Generation # 46 are 895.349 and 1160.2358
The best and mean of Generation # 47 are 895.349 and 1149.5594
The best and mean of Generation # 48 are 894.3968 and 1224.6265
The best and mean of Generation # 49 are 815.3731 and 1099.1538
The best and mean of Generation # 50 are 815.3731 and 1084.9362
0 duplicates in final population.
50 legal individuals in final population.
Best chromosome = 637   697   722   737   755   897   907   910   915   926   927   967  1033  1042  1063  1066  1098  1127  1238  7845
Diversity measure = 7694
MinCost =
   1.0e+03 *
  列 1 至 15
    6.7982    6.1910    5.9758    5.5482    5.4027    4.1362    3.8025    3.8025    3.4245    2.8857    2.0638    2.0638    1.7761    1.7761    1.7761
  列 16 至 30
    1.4986    1.4800    1.2399    1.2399    1.1995    1.1737    1.1737    1.1737    1.1737    1.1737    1.1737    1.1719    1.1719    1.1196    1.0385
  列 31 至 45
    1.0367    0.9827    0.9762    0.9762    0.9762    0.9745    0.9745    0.9745    0.9745    0.9745    0.9745    0.9745    0.9745    0.8971    0.8971
  列 46 至 51
    0.8971    0.8953    0.8953    0.8944    0.8154    0.8154
Hamming =
        7694

迭代收敛曲线: 

watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5pm66IO95LyY5YyWX-aVsOaNruWIhuaekF9BSeeul-azlQ==,size_11,color_FFFFFF,t_70,g_se,x_16

完成代码可以私信获取。

三、算法改进思路:

1.与其他算法(如遗传算法、差分进化、灰狼等算法)的结合;

2.引入其他变异、交叉算子;

3.改进迁移和变异的公式;

四、算法应用:

BBO算法具有诸多优点,提出以来被应用于诸多应用,除了基本的测试函数,参数辨识应用外,主要有:

1.基于BBO算法图像分割中的应用;

2.基于BBO算法的PID参数整定中的应用;

3.基于BBO算法的交通规划中的应用研究;

4.基于BBO算法的动态车间调度中的应用研究;

5.基于BBO算法神经网络(BP)、SVM参数(结构)优化

6.基于BBO算法的无线传感器网WSN覆盖问题

7.基于BBO算法的医院管理资源调度研究(代码)

四、算法应用:

基于生物地理信息的多目标进化算法

源码获取:

🍞正在为您运送作品详情

参考文献

[1] Simon D.Biogeography-based optimization[J].IEEE Trans-actions on Evolutionary Computation,2008(6):702-713.

[2]徐志丹, 莫宏伟. 基于生物地理信息的多目标进化算法[J].  2010.


  • 2
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

智能优化_数据分析_AI算法

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值