Rank: 613 based on 179 downloads (last 30 days) and 1 file submitted
photo

Sam

E-mail
Company/University
University of Western Ontario

Personal Profile:

B.Sc. Mechanical Engineering, Queen's University
M.A.Sc. Mechanical Engineering, Royal Military College of Canada
M.D. Candidate, Schulich School of Medicine and Dentistry, Western University

Professional Interests:

 

Watch this Author's files

 

Files Posted by Sam
Updated   File Tags Downloads
(last 30 days)
Comments Rating
01 Apr 2014 Screenshot Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam optimization, particle swarm, pso, swarm intelligence, trajectory, important 179 147
  • 4.65517
4.7 | 35 ratings
Comments and Ratings by Sam View all
Updated File Comments Rating
10 Jun 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam

Stephen,

psoplotswarm is meant to plot particle positions in a 3-dimensional axes. I use it in the PSODEMO file to make it easier to visualize how the swarm behaves. IIRC the ijk variable is a 3-element array where you specify which dimension of your problem you want to plot (for example, if you have a problem with 12 dimensions and you want to plot the particle positions along the 4th, 7th, and 11th dimensions on a 3D plot).

Sam

22 Apr 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam

Hi parinya,

Can you email me a copy of your nonlinear constraints function through the Contact Author link? I will have a look at it.

Sam

03 Apr 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam

Thanks for pointing that out, Aman.

b should really be a column vector [2;1] so that it will fit the equation

[1 0 ; 0 1]*[x1; x2] ≤ [2; 1]

however it looks like GA is robust enough to check for and correct that error.

I will add a small piece of input-checking code in the next release so that PSO will yield the same behavior as GA.

01 Apr 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam

Aman, I'm glad your problem is working properly now. Sorry for the inconvenience! Erik, you are very welcome; is it OK if I add your name to the list of acknowledgements for this toolbox?

31 Mar 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam

Erik, I have discovered a typo in one of the helper functions for PSO which is causing the bug that you describe. I have submitted an update which should appear over the next few days. This should also improve performance for anyone who is using lower and upper bound constraints for their optimization problems.

Comments and Ratings on Sam's Files View all
Updated File Comment by Comments Rating
12 Sep 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam Esmeral, Maria

Good Morning,

I want to know if I need the optimization toolbox in order to use the pso.m function?

Thank you for your help

03 Sep 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam Anand

Dear Sam !
thank you very much for providing very nice optimizing toolbox .
in my optimization problem i have 4 optimizing parameter. i want to plot it with generation (generation vs var(1) ,generation vs var(2),generation vs var(3) etc ...)

31 Aug 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam amanita

28 Aug 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam ZhG

I found something in one of your comments here. On 15 May 2013

"I've also made a small change to ensure that only feasible solutions are selected as global optima when the penalty-based constraint enforcement method is used."

What does this mean? We can obtain an relatively optimal result among all iterations? Is there an example of this kind of application. Or it is just set with options.ConstrBoundary = 'penalize' ? Thanks.

26 Aug 2014 Another Particle Swarm Toolbox Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox. Author: Sam ZhG

And another problem about population size and generation. I assigned this kind of value to these two variables.
f.option.PopulationSize = 500000; % Same to GA.
f.options.Generations = 1000 ;

But I always obtain the result like this:
rt2 =

x: [1.8990 0.9206 2.0019 -0.3474 -0.0901]
fval: -1.2477
exitflag: 3
output: [1x1 struct]
population: [40x5 double]
scores: [40x1 double]
data1: [50x5 double]
real_v: [1x50 double]

The population dimension is 40*5.
I called the function this way:

fitnessfcn = str2func('mytest');
options = fitnessfcn('init') ;

issue1 = options;

issue1.fitnessfcn = fitnessfcn;
issue1.nvars = 5;
issue1.options.DemoMode = 'fast' ;

[x,fval,exitflag,output,population,scores] = pso(issue1);

Contact us