资源简介
粒子群优化算法工具箱....

代码片段和文件信息
%%
% INPUT VARIABLES
% Bird_in_swarm=Number of particle=agents=candidate
% Number_of_quality_in_Bird=Number of Variable
%
% MinMaxRange: jx2 matrix; jth row contains minimum and maximum values of the jth variable
% say you have a variable N1
% which can have maximum value M1 and minimum value m1
% then your matrix will be [m1 M1]
% for more:
% [m1 M1; m2 M2; mj Mj]
%
% Food_availability=objective function with one input variable (for more than one variable you may use array)
% example for two variable
% function f = funfunc(array)
% a=array(1);
% b=array(2);
% f = a+b ;
% end
% Food_availability is a string for above example : ‘funfunc‘
%
% availability_type is string ‘min‘ or ‘max‘ to check depending upon need to minimize or maximize the Food_availability
% velocity_clamping_factor (normally 2)
% cognitive_constant=c1=individual learning rate (normally 2)
% social_constant=c2=social parameter (normally 2)
% normally C1+C2>=4
%
% Inertia_weight=At the beginning of the search procedure diversification is heavily weighted while intensification is heavily weighted at the end of the search procedure.
% Min_Inertia_weight=min of inertia weight (normally 0.4)
% Max_Inertia_weight=max of inertia weight (normally 0.9)
% max_iteration=how many times readjust the position of the flock/swarm of birds its quest for food
%
%
% OUTPUT VARIABLE
% optimised_parameters : Optimal parameters
%%
function [ optimised_parameters ] = Particle_Swarm_Optimization (Bird_in_swarm Number_of_quality_in_Bird MinMaxRange Food_availability availability_type velocity_clamping_factor cognitive_constant social_constant Min_Inertia_weight Max_Inertia_weight max_iteration)
%{
Checking all functions are present
%}
if (exist (‘MinMaxCheck.m‘)==0)
clc;
fprintf (‘Please download the following submission from: MATLAB File Exchange (Click here to open link) \ndownload code by clicking “Download Submission“ button \nthen extract and put MinMaxCheck.m in current directory and try again\n‘);
return;
end
%{
Checking all parameteres are entered
%}
if nargin < 11
error(‘Missing input parameter(s)!‘)
end
%{
universalize availability type
%}
availability_type=lower(availability_type(1:3));
%{
Checking for proper boundary Values and entered Matrix
%}
[rowcol]=size(MinMaxRange);
if row~=Number_of_quality_in_Bird || col~=2
error(‘Not a proper MinMaxRange Matrix‘)
end
for i=1:Number_of_quality_in_Bird
if MinMaxRange(i1)>=MinMaxRange(i2)
error(‘Minimum value greater than Maximum value!!!‘)
end
end
%{
counter to display % of completion
%}
N=Bird_in_swarm*max_iteration;
q=0;
%{
distinguishing min and max range
%}
bird_min_range=MinMaxRange(:1);
bird_max_range=MinMaxRange(:2);
%{
%}
format long;
for i=1:Number_of_quality_in_Bird
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5308 2016-06-15 00:49 Particle_Swarm_Optimization.m
文件 1313 2016-06-15 00:49 license.txt
相关资源
- 编程实现二维DCT变换
- 图像二值化
- 用FFT对信号进行频谱分析
- Tone-Reservation
- QGA 量子遗传算法
- 差分形式的阻滞增长模型
- 遗传算法的M文件
- 爱普生(EPSON)L3151 3153 3156 3157 3158不
- 简单二阶互联系统的非线性动力学分
- EPSON打印机程序设计指南(ESC/POS指令
- epson 2020黑白激光打印机驱动 win7/win
- L111墨水恢复软件
- EPSON T50 x86 32bit v6.62 爱普生打印机简
- 手写数字识别-模板匹配法
- Stock_Watson_动态因子分析模型
- 果蝇优化算法优化支持向量回归程序
- 自己做的一个简单GUI扑克纸牌识别-
- 基于PSO优化BP神经网络的水质预测研究
- multi output SVR
- epson wf2750 64位 驱动
- AR过程的线性建模过程与各种功率谱估
- PCNN TOOLBOX
- plstoolbox.zip
- 基于Spark的PSO并行计算
- 中国国家基础地理信息系统GIS数据
- 粒子群微电网优化调度
- 矩阵分析-经典教材-中文版-Roger.A.Ho
- 微电网PSO优化算法
- 压缩感知TwIST
- 基于最小错误率的贝叶斯手写数字分
评论
共有 条评论