Thuật Toán Tối Ưu Bầy Đàn PSO - 123doc
Có thể bạn quan tâm
Code Mẫu Thuật Toán Tối Ưu Bầy Đàn Áp Dụng Cho Các Bài Toán Tối Ưu. Áp dụng đơn giản vào bài toán một cách dễ dàng. Đây là code mẫu theo lưu đồ giải thuật PSO, chỉ cần xác định được hàm mục tiêu, các ràng buộc là áp dụng được.
Trang 1Code · March 2016
DOI: 10.13140/RG.2.1.1078.7608
CITATIONS
4
READS
114,791
1 author:
Some of the authors of this publication are also working on these related projects:
Application of operation research on solving electrical engineering problems View project
Networked Microgrids View project
Mahamad Nabab Alam
Indian Institute of Technology Roorkee
20PUBLICATIONS 134CITATIONS
SEE PROFILE
Trang 2Codes in MATLAB for Particle Swarm Optimization
Mahamad Nabab Alam, Research Scholar Particle swarm optimization (PSO) codes in MATLAB suitable for solving constrained optimization problem
Save the following codes in MATLAB script file (*.m) and save as ofun.m
-start
% objective function (minimization)
of=10*(x(1)-1)^2+20*(x(2)-2)^2+30*(x(3)-3)^2;
% constraints (all constraints must be converted into <=0 type)
% if there is no constraints then comments all c0 lines below
c0=[];
% defining penalty for each constraint
c(i)=1;
c(i)=0;
end
-end Save the following main program codes in MATLAB script file (*.m) as run_pso.m (any name can be used) and run
-start tic
clc
% pso parameters values
% pso main program -start
Trang 3maxrun=10; % set maximum number of runs need to be
run
x0(i,j)=round(LB(j)+rand()*(UB(j)-LB(j)));
f0(i,1)=ofun(x0(i,:));
[fmin0,index0]=min(f0);
ite=1;
tolerance=1;
while ite<=maxite && tolerance>10^-12
+c2*rand()*(gbest(1,j)-x(i,j));
x(i,j)=x(i,j)+v(i,j);
x(i,j)=LB(j);
x(i,j)=UB(j);
f(i,1)=ofun(x(i,:));
Trang 43
pbest(i,:)=x(i,:);
f0(i,1)=f(i,1);
gbest=pbest(index,:);
fmin0=fmin;
tolerance=abs(ffmin(ite-100,run)-fmin0);
ite=ite+1;
gbest;
fvalue=10*(gbest(1)-1)^2+20*(gbest(2)-2)^2+30*(gbest(3)-3)^2;
fff(run)=fvalue;
rgbest(run,:)=gbest;
end
% pso main program -end
[bestfun,bestrun]=min(fff)
best_variables=rgbest(bestrun,:)
toc
% PSO convergence characteristic
%########################################################################## -end Enjoy with PSO;
******************************************************************************************
Từ khóa » Thuật Toán Tối ưu Hóa Bầy đàn
-
Tối ưu Bầy đàn – Wikipedia Tiếng Việt
-
Thuật Toán Tối ưu Hóa Bầy đàn Sử Dụng Phương Pháp Xử Lý Ràng ...
-
(PDF) ỨNG DỤNG THUẬT TOÁN TỐI ƯU TIẾN HÓA BẦY ĐÀN MỜ ...
-
[PDF] SỬ DỤNG THUẬT TOÁN TỐI ƯU HÓA BẦY ĐÀN PSO ĐỂ TỐI ƯU ...
-
[PDF] ÁP DỤNG CÁC THUẬT TOÁN DỰA TRÊN TÌM KIẾM BẦY ĐÀN ĐỂ ...
-
[PDF] NGHIÊN CỨU KHUNG THUẬT TOÁN CHUNG PSO ĐỂ GIẢI BÀI ...
-
Tối ưu Hóa Bầy Hạt - Particle Swarm Optimization
-
Tìm Hiểu Về Tối Ưu Hóa Bầy Mèo (Cat Swarm Optimization) - Viblo
-
Ứng Dụng Thuật Toán Tối ưu Bầy đàn (PSO) để Tối ưu Dung Lượng Và ...
-
Dùng Thuật Toán Bầy đàn Tối ưu Hóa Hình Học, Trọng Lượng Cầu Lớn
-
[PDF] Thuật Toán Bầy đàn Pso, Giải Thuật Di Truyền Và ứng Dụng Giải Các Bài ...
-
Cải Tiến Thuật Toán Tối ưu Hoá Bầy đàn Cho Bài Toán Lập Quỹ đạo Bay ...
-
Hệ Thống Gợi ý Sử Dụng Thuật Toán Tối ưu Bầy đàn
-
Tổng Quan Và Ví Dụ Giải Thuật Bầy Đàn (PSO-Particle Swarm ...