资源简介
粒子群优化算法工具箱....
代码片段和文件信息
%%
% 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
相关资源
- 粒子群优化算法训练小波神经网络-
- 脉搏信号数据-HumanData1.rar
- 风力发电系统的风力机模型-风力发电
- 悬吊式起重机动力学仿真-悬吊式起重
- IMM交互多模型算法
- PSO算法求解作业车间调度问题
- 单面透镜光路和像差计算
- DOA估计信源的个数,以及角度
- 数字语音处理之中心削波
- EpsonL351清零
- 《合成孔径雷达成像算法与实现》一
-
VCPA-ba
sed hybrid strategy.zip - 16QAM星座图仿真及误码率仿真
- 经典的基本PSO粒子群优化算法的测试
- 适合卡尔曼滤波的初学者,仿真了匀
- 求信号的信息熵,完美运行,一看就
- 有限元一维编程
- 相机标定棋盘图
- 土狼优化算法
- 粒子群算法PSO和万有引力算法GSA结合
- D_star Lite.zip
- 马尔可夫链状态空间的分解实验报告
- 粒子群优化算法的简单
- 计算方法A上机作业
- 相位屏仿真方法.rar
- 基于高斯混合模型的背景减除
- 基于co-training的手写数字识别Multiple
- 多普勒脉冲雷达回波仿真
- kpca lda mds降维 人脸数据
- 光伏在MPPT下的boost电路
评论
共有 条评论