4.15873

4.2 | 68 ratings Rate this file 464 Downloads (last 30 days) File Size: 744.68 KB File ID: #7506
image thumbnail

Particle Swarm Optimization Toolbox

by Brian Birge

 

22 Apr 2005 (Updated 20 Mar 2006)

With Trelea, Common, and Clerc types along with ...

| Watch this File

File Information
Description

Robust Particle Swarm toolbox implementing Trelea, Common, and Clerc types along with an alpha version of change detection.

This toolbox is designed for researchers in Computational Intelligence as well as application developers, students, and classroom labs. It is robust enough that several papers have been developed using it but it is also in constant development and very easy to hack. Users of MATLAB's Optimization Toolbox should feel right at home but even if you don't use that toolbox this will be easy to figure. Extensive help is included.

Anyone from serious AI researchers to beginning students should get something out of this.

This toolbox is constantly evolving and I welcome suggestions.

Current feature set:
* Trelea, Clerc, and Common Types
* Vectorized and non-vectorized versions, you can investigate thousands of particles at once with the proper cost function.
* custom plotting plug ins
* neural net trainer (requires Matlab's neural net toolbox)
* PDF Particle Swarm Introduction
* Alpha version of change detection, will track dynamic environments
* includes suite of test functions commonly used in the CI/optimization community.

Acknowledgements
This submission has inspired the following:
PSO solution to economic dispatch, Improved PSO program to solve Economic Dispatch, Another Particle Swarm Toolbox, Neural Network add-in for PSORT
Required Products Neural Network Toolbox
MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements * current version works in Matlab 7 but has been in development since Matlab 5 so might work in the earlier versions too.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (97)
08 Aug 2005 zhuohua duan  
07 Oct 2005 Kurt Lewis

I don't know much about theis, but if the program won't run on the example included in the help, then I think I can't use it:

> out = pso_Trelea('f6',2)
??? Error using ==> f6
Too many input arguments.

Error in ==> pso_Trelea at 203
    out(j)=eval(evstrg); % evaluate desired function with particle j

22 Nov 2005 sione palu

Brian, could you please give a more examples. I find it excellent for a new learner like me about the subject.

27 Jan 2006 John D'Errico

A nice, sophisticated PSO toolbox. The only flaw is it feels like the interface & documentation needs some attention - apparent defaults that did not seem to default as the documentation implies. A simple test crashed for no apparent reason. I noted that the documentation did not even tell you the correct name of the function used to drive the optimizer. Once you get past these minor points and learn how to drive it properly, I think this is a nice toolbox. I'd like to give it about a 3.75 rating.

29 Jan 2006 KHALED ABO-AL-EZ  
13 Mar 2006 shark spear

I am wondering if this PSO can deal with discrete parameter optimization problems. Thanks a lot!

08 Apr 2006 John D'Errico

I like the cleanup that was done, so I thought it was time to revisit this (nice, sophisticated) tool. Great graphics, at least where this is possible. If I want to complain about anything, its the fact that PSOt REQUIRES its function in the form of an m-file. Neither inline or anonymous functions are supported. Its a silly constraint, because my guess is the only reason is to include the function name on the generated graphics. Otherwise feval should be insensitive to these alternatives. The advantages that anonymous functions (especially) offer suggests fixing this. On the other hand, this is a really nice piece of work, so I'll raise my rating to a 5 anyway.

19 Apr 2006 Yuan Liguo

Thanks,I downloaded it. It is helpful for me to learn PSO.

29 May 2006 Rafael Rodriguez  
09 Jun 2006 dana lak

some democanbe added

09 Jun 2006 dan lak  
09 Jun 2006 dan lak

good

18 Jun 2006 Omar Vicencio  
03 Jul 2006 safiye turgay  
04 Aug 2006 Ran Ren  
05 Aug 2006 weidong wu  
13 Aug 2006 sankar karan

thanks

13 Sep 2006 ish kakkar

it is very good and some more friendly can be made...

19 Sep 2006 aa ss

66pll;

20 Sep 2006 jagdish bansal

very good

06 Oct 2006 sachin soni

it's an excellent toolbox for the researchers and university student. it is helping me alot in preparing my research paper and i hope that the other user's will also find it a boon to them.

18 Oct 2006 Ranjit singh chauhan

Excellent tool.

11 Nov 2006 Dingyu Xue

Nice code.
Is it possible to provide the non-vectorized version as well? thanks

19 Nov 2006 ali alizade

hello.
please send for me

28 Nov 2006 lan FA

thank you ,I need it for my project of ant model

17 Dec 2006 potter harryhfy

i am a student of computer and technologe department.

24 Jan 2007 naser ganji

i am a Ph.D. student in tarbiate modares university in tehran- iran.
i need it for some section of mine course projects.thanks

31 Jan 2007 Sirichai S

I'm graduate student of Thammasat University, Thailand.
I need to support my study.
Thank a lot

10 Feb 2007 babak zarei  
13 Feb 2007 ehsan nasr  
04 Mar 2007 robert rino  
30 Mar 2007 trace water

thank you the dear author!great work!

17 Apr 2007 Muhammad Shakil

Does not work with matlab 2006a

11 May 2007 zhaojia Wang

Thanks a lot:)

24 May 2007 li zhen

Where can I find a matlab code to solve TSP by PSO?Is anyone konw?If you konw,please mail me,thx a lot.

27 May 2007 Huynh Chau Duy

Documents and paper about Particle Swarm Optimization

29 May 2007 wu di  
01 Jul 2007 mm rezaei  
06 Jul 2007 Pragati Tiwary

very vague description of how to use the toolbox. I am not able to run a simple optimization problem. Please try to come up with some illustrative and explanatory User manual.

13 Jul 2007 m saberan

please add a perfect help to this file,because it is very hard to use it without help.i can not use trainpso for my problem.
thanks for your attention

04 Aug 2007 saleh mohseni  
04 Aug 2007 saleh mohseni  
12 Aug 2007 John Q

Any idea how to use for training neural nets with custom non-differentiable cost functions?
Please help...

14 Aug 2007 lin si

Great job!

10 Sep 2007 Mohammad Zakermoshfegh  
22 Sep 2007 toumi lyazid

very happy

18 Oct 2007 morteza eslamian

this program is very good

11 Nov 2007 elham asadi

Where can I find a matlab code of discrete PSO or to solve TSP by PSO?Is anyone konw?If you konw,please mail me. Thanks a lot.

20 Jan 2008 Dhilip Kumaar

Its very good to use this zip file. It helps me inlot to use PSO toolbox in MATLAB

20 Jan 2008 abdelwahhab Boudjellal

i am etidient algerienne mgister can you help me by Matlab traitement image please
i d'nt space english good

06 Feb 2008 Dhilip Kumaar

This tool is very nice to use. I have done certain works using this tool for Vehicle Routing Problem.

13 Feb 2008 nadda chawalarat  
10 Apr 2008 Maurice Clerc

It would be interesting to implement the new version (Standard PSO 2007, available on the Particle Swarm Central http://www.particleswarm.info).

17 Apr 2008 sanny sihombing

is there anyone know a research paper that explore PSO for Neural Network training, using this toolbox? please e-mail me about this, i really need it for studying. thanks!

22 Apr 2008 Ahmed Saleh

This is good to apply pso in optimization problem

23 Apr 2008 sahbi boubaker

good work

28 Apr 2008 sahbi boubaker

there's someone who have worked with pso to optimize hybrid systems please mail me if...

29 Apr 2008 mat yusof  
12 Jun 2008 Lin Wang  
09 Jul 2008 Masoud Shariati  
09 Jul 2008 Masoud Shariati-Rad  
31 Jul 2008 asd adsf

very good!I hope the new version can add local pso !

21 Sep 2008 thangjam singh

inspiring

26 Sep 2008 necla OZKAYA  
28 Sep 2008 Gui Xiaolin

ilike it very much!

05 Oct 2008 Kanwardeep Singh

A Good Work

25 Jan 2009 Homri

I want to use Trainpso but i have a probleme .
matlab error message "Unrecognized code".
Please can you help me

25 Jan 2009 Homri  
16 Feb 2009 skouliki katelouzos  
16 Feb 2009 skouliki katelouzos

this doesn't work with version 5.1 of neural network

14 Mar 2009 Tricia Rambharose

I am a research student at the University of the West Indies.

A collegue of mine used trainpso and newff to train a neural network. He used Matlab version 5 and it worked well. I am using Matlab version 7.6.0 and neither trainpso nor newff works.

With this toolbox 'DemoPSOBehavior' and pso_Trelea_vectorized('f6',2) works with my Matlab version, but 'demoPSOnet' does not work. I get this root error :

??? Error using ==> trainpso at 124
Unrecognized code.

Is there any other way to train a Neural Network by PSO using this toolbox?

05 Apr 2009 jjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjj

Hi friend,
I am a PhD Research Scholar in Indian Institute of Technology, Roorkee, India.
After working for 4 hours continuously, i am able to run train the Neural network program using this PSO toolbox.
I am vary thankful to you. Great job.
I can help, if anybody is in need of my help.

06 Apr 2009 Ali Sabbagh

Dear jalla
would you please help me how it work?
i spend too much time to understand but i was not successfull
thank you

09 Apr 2009 Shree Guha

I found this helpful. I had to modify the function to fit my problem description. I have a lot more to work on it. But i like it so far! Thanks again.

28 Apr 2009 Homri

Hello,
Please who can help me for the choice of parameters trainpso
thank you

09 Sep 2009 vishal mehra

hello
can anyone help me?
when i run the command at command window for testing the fn f6 i got the error as below.

out = pso_Trelea_vectorized('f6',2)
??? Undefined function or method 'normmat' for input arguments of type 'double'.

Error in ==> pso_Trelea_vectorized at 252
  pos(1:ps,1:D) = normmat(rand([ps,D]),VR',1);

can anyone tell me now what i have to do?

13 Nov 2009 saeed gol Golian

hi everyone
I encountered with the same error as vishal mehra

?? Undefined function or method 'normmat' for input arguments of type 'double'.

Error in ==> pso_Trelea_vectorized at 252
  pos(1:ps,1:D) = normmat(rand([ps,D]),VR',1);

can anyone give me a hand?

13 Nov 2009 Eric

Saeed and Vishal,
You need to manually add the subdirectories to your path, e.g. /hiddenutils and /testfunctions for the demo.

Anyway, I'm still learning how to use the PSO tool - so far so good! I'll come back with a rating once I've explored it further.

14 Dec 2009 tom

Hi, everyone,
   I am interested in PSO with both linear and nonlinear constraints for high-dimention problem, but I found this package can not handle it.
   Is there any other PSO toolbox to handle the problems with nonlinear and linear constraints? Please let me know: dr.xinlivu@gmail.com. I am waiting for your reply.

   Thanks,
Tommy

11 Jan 2010 Mohammed Ahmed Saeed

i prepare for my Master in optimal relay coordination and if you please i need your help to provide me with a swarm code to determine the optimal relay settings ( i can not do the fitness function for each particle )
Thanks

03 Mar 2010 Zacharias Voulgaris

I am also interested in discrete PSO for TSP. If anyone has something in Matlab, please contact me. Thanks.

06 Apr 2010 Tusi Bai

How to use it to multi-objective optimization problems?

begtostudy@gmail.com

29 Apr 2010 Brian Birge

Hey everyone, sorry for taking so long to update this, it will be updated shortly and contain discrete capability as well as multi-objective optimization built in and more flexible constraints (linear or nonlinear). If you wish to do multi-objective opt "lite" right now you can, just write your cost function so it has a weighted sum of your objectives as the output, a standard way to do it. More complex methods will be added with the update.

23 May 2010 syed musthafa

dear all,
i need pso coding for OPIMAL LOCATION OF FACTS DEVICES..i also need ur valuable suggestions to do this project..kindly send me the codings/suggestions...

25 Jun 2010 Shawkat hamdan

hi Brian
i want to ask you if you have program in which we can make tuning the parameters of the pso like w, c1, c2 to make the pso more effective as results
thank you very much to your help and cooperation

this is my e-mail:shawkat@bau.edu.lb

my best regards

shawkat

12 Jul 2010 Erdal Bizkevelci  
02 Sep 2010 Eric  
26 Sep 2010 sugith sewdass

I am currently working on a research project.
I am trying to train a neural network using PSO.
 When using the PSO toolbox with Matlab version
7.6.

demoPSOnet' does not work. I get the following error :
??? Error using ==> trainpso at 124
Unrecognized code.
If I can find a simple way to train the Neural Network using the PSO toolbox it will be of great help to me.

Please can anyone assist me in anyway.

Regards
Sugith

26 Sep 2010 Tricia Rambharose

Good day everyone,

For those of you who emailed me asking for assistance in using PSO for NN training, and also for the general public, I found another PSO toolbox to be very helpful to me. The toolbox I now use is found at

http://www.mathworks.com/matlabcentral/fileexchange/28291-particle-swarm-optimization-research-toolbox

I have added functionality for this PSO toolbox to be used as a training algorithm for a NN. This version is currently being tested and will then be made available.

08 Oct 2010 junjie

Thank you very much, with these, I can use pso more quickly.

29 Nov 2010 Tricia Rambharose

Good day users,

A PSO toolbox which can be used for NN trainig, and works with the latests versions of MATLAB, is now available on MathWorks.

The PSO toolbox is found at:
http://www.mathworks.com/matlabcentral/fileexchange/28291-particle-swarm-optimization-research-toolbox

The NN add-in for this PSO toolbox is found at: http://www.mathworks.com/matlabcentral/fileexchange/29565-neural-network-add-in-for-psort

Regards,
Tricia

Regards,
Tricia

22 Apr 2011 moh moh

good day for all users

08 May 2011 Aditya Gourav

amazing!!!

12 Jun 2011 reham hassen

thanks

28 Jun 2011 ondrej

Hi
been trying to run demoPSOnet
getting the following error:

??? Error using ==> trainpso at 124
Unrecognized code.

Error in ==> network.subsasgn>setTrainFcn at 2025
   net.trainParam = feval(trainFcn,'defaultParam');

Error in ==> network.subsasgn>network_subsasgn at 462
    if isempty(err), [net,err]=setTrainFcn(net,trainFcn); end

Error in ==> network.subsasgn at 11
net = network_subsasgn(net,subscripts,v,netname);

Error in ==> newff>new_5p0 at 301
net.trainfcn = btf;

Error in ==> newff>create_network at 128
  net = new_5p0(varargin{:});

Error in ==> newff at 102
  out1 = create_network(varargin{:});

Error in ==> demoPSOnet at 34
net = newff([min(P,[],2),max(P,[],2)],... % input parameter ranges

19 Aug 2011 Raffaele  
24 Jan 2012 nilam nini

good...does anybody here work on Multiobjective PSO using matlab..where can i get the source code

Please login to add a comment or rating.
Updates
08 Mar 2006

Significantly updated PSO function itself as well as the plotting routines. Fixed DemoPSOBehavior, updated README, dropped non-vectorized code. This completely replaces previous version.

20 Mar 2006

Added neural net trainer plugin, some bug fixes, updated graphical routines, the neural net trainer part requires Matlab's Neural Net Toolbox, but everything else is standalone.

Contact us at files@mathworks.com