Particle Swarm Optimization

버전 3.1.0.1 (3.29 KB) 작성자: Lateef Adewale Kareem
Function for searching for minimizer of a function
다운로드 수: 250
업데이트 날짜: 2023/7/1

라이선스 보기

% This minimizes the function fun, subject to the inequality constraints
% funCInEq and Equality constrants funCEq within the hyperbox between lb
% and ub
% fun = function handle for the function to be minimized
% funCInEq = function handle for the inequality condition (set to
% empty matrix when there is no inequality condition)
% funCEq = function handle for the equality condition (set to
% empty matrix when there is no equality condition)
% lb = vector of lower bounds
% ub = vector of upper bounds
% penalty = scale violation of constrain conditions (usually between 10
% and 100)
% popsize = population size (usually 30 to 50)
% maxiter = maximum iteration(less than 500)
% maxrun = maximum number of runs( 10 or less)
%% %%%%%%%%%%%%%%%% Examples %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1.
% Roosenbrook = @(x) (1 - x(1))^2 + 100*(x(2) - x(1)^2)^2;
% PartSwamOpt(Roosenbrook, [], [], [-2;-1], [2;3], 0, 30, 500, 10);
% 2.
% Adjiman = @(x) cos(x(1))*sin(x(2)) – x(1)/(x(2)^2 + 1);
% PartSwamOpt(Adjiman, [], [], [-1;-1], [2;1], 0, 30, 500, 10);
% 3.
% Beale = @(x) (1.5-x(1) + x(1)*x(2))^2 + (2.25-x(1) + x(1)*x(2)^2)^2 + (2.625-x(1) + x(1)*x(2)^3)^2;
% PartSwamOpt(Beale, [], [], [-1;-1], [2;1], 0, 30, 500, 10);

인용 양식

Lateef Adewale Kareem (2025). Particle Swarm Optimization (https://kr.mathworks.com/matlabcentral/fileexchange/58034-particle-swarm-optimization), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2012b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Particle Swarm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
3.1.0.1

We moved the compound objective function into the body of the main function, just to ease readability

3.1.0.0

Bugs on Equality and InEquality constrain handling were corrected. and Examples provided.
same as example used here.
https://www.mathworks.com/help/optim/ug/fmincon.html

3.0.0.0

bug in velocity reversal was corrected

2.0.0.0

Changes to the plot function to identify the minimum point

1.0.0.0

Image thumbnail