资源简介
头脑风暴优化算法原算法代码。
代码片段和文件信息
function best_fitness = bso2(funn_pn_dn_crang_lrang_rmax_iteration)
% fun = fitness_function
% n_p; population size
% n_d; number of dimension
% n_c: number of clusters
% rang_l; left boundary of the dynamic range
% rang_r; right boundary of the dynamic range
prob_one_cluster = 0.8; % probability for select one cluster to form new individual;
stepSize = ones(1n_d); % effecting the step size of generating new individuals by adding random values
popu = rang_l + (rang_r - rang_l) * rand(n_pn_d); % initialize the population of individuals
popu_sorted = rang_l + (rang_r - rang_l) * rand(n_pn_d); % initialize the population of individuals sorted according to clusters
n_iteration = 0; % current iteration number
% initialize cluster probability to be zeros
prob = zeros(n_c1);
best = zeros(n_c1); % index of best individual in each cluster
centers = rang_l + (rang_r - rang_l) * rand(n_cn_d); % initialize best individual in each cluster
centers_copy = rang_l + (rang_r - rang_l) * rand(n_cn_d); % initialize best individual-COPY in each cluster FOR the purpose of introduce random best
best_fitness = 1000000*ones(max_iteration1);
fitness_popu = 1000000*ones(n_p1); % store fitness value for each individual
fitness_popu_sorted = 1000000*ones(n_p1); % store fitness value for each sorted individual
indi_temp = zeros(1n_d); % store temperary individual
% calculate fitness for each individual in the initialized population
for idx = 1:n_p
fitness_popu(idx1) = fun(popu(idx:));
end
while n_iteration < max_iteration
cluster = kmeans(popu n_c‘Distance‘‘cityblock‘‘Start‘centers‘EmptyAction‘‘singleton‘); % k-mean cluster
% clustering
fit_values = 100000000000000000000000000.0*ones(n_c1); % assign a initial big fitness value as best fitness for each cluster in minimization problems
number_in_cluster = zeros(n_c1); % initialize 0 individual in each cluster
for idx = 1:n_p
number_in_cluster(cluster(idx1)1)= number_in_cluster(cluster(idx1)1) + 1;
% find the best individual in each cluster
if fit_values(cluster(idx1)1) > fitness_popu(idx1) % minimization
fit_values(cluster(idx1)1) = fitness_popu(idx1);
best(cluster(idx1)1) = idx;
end
end
% form population sorted according to clusters
counter_cluster = zeros(n_c1); % initialize cluster counter to be 0
acculate_num_cluster = zeros(n_c1); % initialize accumulated number of individuals in previous clusters
for idx =2:n_c
acculate_num_cluster(idx1) = acculate_num_cluster((idx-1)1) + number_in_cluster((idx-1)1);
end
%st
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1146368 2012-12-18 14:44 BSO\gr\bso.xls
文件 6411 2013-01-03 20:50 BSO\gr\bso2.m
文件 74314 2012-12-18 14:45 BSO\gr\BSO_10.mat
文件 275246 2012-12-18 12:10 BSO\gr\BSO_100.mat
文件 152001 2012-12-18 14:38 BSO\gr\BSO_20.mat
文件 288402 2012-12-18 12:26 BSO\gr\BSO_200.mat
文件 183126 2012-12-18 14:29 BSO\gr\BSO_30.mat
文件 284817 2012-12-18 12:48 BSO\gr\BSO_300.mat
文件 239 2012-09-21 10:39 BSO\gr\Griewangk.m
文件 3299 2012-12-18 14:38 BSO\gr\test.m
文件 5928 2012-12-18 14:44 BSO\gr\UUB.mat
文件 1227776 2012-12-18 14:46 BSO\rastrigin\bso.xls
文件 6411 2012-12-18 12:00 BSO\rastrigin\bso2.m
文件 43264 2012-12-18 14:48 BSO\rastrigin\BSO_10.mat
文件 81539 2012-12-18 12:16 BSO\rastrigin\BSO_100.mat
文件 71395 2012-12-18 14:39 BSO\rastrigin\BSO_20.mat
文件 79757 2012-12-18 12:39 BSO\rastrigin\BSO_200.mat
文件 81011 2012-12-18 14:32 BSO\rastrigin\BSO_30.mat
文件 78224 2012-12-18 13:08 BSO\rastrigin\BSO_300.mat
文件 145 2011-08-10 23:03 BSO\rastrigin\rastrigin.m
文件 3299 2012-12-18 14:40 BSO\rastrigin\test.m
文件 2575 2012-12-18 14:46 BSO\rastrigin\UUB.mat
文件 1146368 2013-01-03 19:53 BSO\sch1.2\bso.xls
文件 7060 2013-01-03 15:46 BSO\sch1.2\bso2.asv
文件 6569 2012-12-18 14:25 BSO\sch1.2\bso2.m
文件 155274 2012-12-18 13:02 BSO\sch1.2\BSO_10.mat
文件 84624 2013-01-03 17:47 BSO\sch1.2\BSO_100.mat
文件 149458 2012-12-18 14:36 BSO\sch1.2\BSO_20.mat
文件 99145 2012-12-18 14:49 BSO\sch1.2\BSO_30.mat
文件 111685 2013-01-03 16:15 BSO\sch1.2\DBSO\BSO_30.mat
............此处省略36个文件信息
- 上一篇:安居猫智能家居商业计划书
- 下一篇:MPC5634 REFERENCE
相关资源
- 头脑风暴优化算法
- 灰狼优化算法(Grey Wolf Optimizer).pd
- 智能优化算法蚁群算法、狼群算法、
- 粒子群优化算法(详细易懂_很多)
- 多QOS约束的组播路由优化算法
- 智能优化算法及其应用 王凌
- 智能优化算法及其应用.pdf
- 樽海鞘群算法SSA.zip
- 果蝇优化算法
- 粒子群优化算法在阵列天线方向图中
- 《粒子群优化算法》 李丽 牛奔著
- 多目标智能优化算法及其应用pdf
- 智能优化算法及程序、试题
- 灰狼优化算法和粒子群优化算法比较
- 数学建模算法模型汇总
- 鲸鱼优化算法
- 卷积神经网络+网络优化算法+目标检测
- 多目标智能优化算法及其应用-雷德明
- An Introduction to Optimization 4th Edition179
- 粒子群优化算法的RBF模型,做预测
- 蚁狮优化算法最新2016
- 多目标智能优化算法及其应用.zip
- 粒子群优化算法与多目标优化.zip
- 优化算法汇总与对比分析.rar
- 集装箱优化算法设计
- NSGA2多目标优化算法
- WOA鲸鱼优化算法工具箱
- 顺丰科技2019秋招运筹优化算法工程师
- 粒子群优化算法编码
- 量子计算与量子优化算法附录程序
评论
共有 条评论