1 简介
生物地理学优化 (Biogeography-BasedOptimization,BBO) 算法自提出以来,因对问题依赖度小、算法参数少、易于实现等优点备受青睐.BBO 算法是一类基于种群和生物启发的群智能优化算法,其核心是栖息地间种群的迁移和变异过程,同时这两个过程也是算法实现优化操作的主要步骤。生物种群分布于不同的栖息地,各栖息地都可用 对 应 的 适 宜 度 指 数 (Habitat Suitability Index,HSI) 来表示。与 HSI 相关的特征包括栖息地的降雨量、植被的多样性和气候等因素,构成了一个描述栖息地适宜度的向量 SIV(SuitableIndexVector)。应用 BBO 算法求解优化问题时,一个栖息地对应优化问题的一个可行解,通过计算各栖息地的适宜度值来评价这些解的优劣程度。根据不同栖息地之间物种的迁移操作和栖息地内物种的变异操作,使适应度值较差的栖息地获得更多适应度值较好的栖息地的信息,实现栖息地的不断进化。
2 部分代码
% GSA-BBO HYBRIDIZATION ALGORITHM CODE
% Main function for using GSA algorithm.
clear all;clc
% inputs:
% N: Number of agents.
% max_it: Maximum number of iterations (T).
% ElitistCheck: If ElitistCheck=1, algorithm runs with eq.21 and if =0, runs with eq.15.
% Rpower: power of 'R' in eq.28.
% F_index: The index of the test function. See tables 1,2,3 of the mentioned article.
% Insert your own objective function with a new F_index in 'test_functions.m'
% and 'test_functions_range.m'.
% outputs:
% Fbest: Best result.
% Lbest: Best solution. The location of Fbest in search space.
% BestChart: The best so far Chart over iterations.
% MeanChart: The average fitnesses Chart over iterations.
% n=Smax:Maximum number of species
% Pos:original population size
k= 2; % elitism parameter: how many of the best habitats to keep from one generation to the next
I = 1; % max immigration rate for each island
E1 = 1; % max emigration rate, for each island
N=50;
Siv=4;%Suitability index variables(e.g;land,temperature,rainfall,diversity of vegetation)
n=N;
Pos=N;
max_it=1000;
ElitistCheck=1;
Rpower=1;
min_flag=1; % 1: minimization 0: maximization
F_index=1
[Fbest,Lbest,BestChart,MeanChart]=GSA(F_index,N,max_it,ElitistCheck,min_flag,Rpower,k,I,E1,Pos,Siv,n);Fbest,
semilogy(MeanChart,'--k');
title(['\fontsize{12}\bf F',num2str(F_index)]);
xlabel('\fontsize{12}\bf Iteration');ylabel('\fontsize{12}\bf Average Best-so-far');
legend('\fontsize{10}\bf GSA-BBO',1);
3 仿真结果
4 参考文献
[1]魏利胜, & 王宁. (). 基于新型生物地理学优化算法的作业车间调度研究. 电子测量与仪器学报, 32(3), 10.
部分理论引用网络文献,若有侵权联系博主删除。
5 MATLAB代码与数据下载地址
见博客主页