File Exchange

## Swarm Optimization

version 1.0.0.0 (1.67 KB) by
Swarm Optimization for Global Optimization

Updated 08 Nov 2006

Hard constrained global optimization using SWARM.
The algorithm were applied to a set of global optimization problems of varying degree of difficulty and he has presented with a good robusteness.

Some functions or problems that were analyzed:
Branin, Goldprice, Quartic, Griewank2,Hartman3,Schubert3, Shekel5,
Shekel7, Schubert5, Hartman6.

### Cite As

Giovani Tonel (2021). Swarm Optimization (https://www.mathworks.com/matlabcentral/fileexchange/12820-swarm-optimization), MATLAB Central File Exchange. Retrieved .

Jian Guo

The code cannot be runned.

Giovani Tonel

Ok Mr. John D'Errico,

shortly I will add some examples, but firstly I have to translate them of the Portuguese language for the English language.

Giovani

John D'Errico

This is an excellent example of a code that may have some value, but fails mainly because of poor help.

For example, the parameter R is the axis of the hyperellipse. What hyperellipse? The author does not choose to tell us.

The parameters c1 and c2 are designated as local and global search parameters (defaults are 1 for both.) How are they used? NO information is provided.

This code allows for plots. I wonder if they only work in 2-dimensions? No hints in the help.

Can we even gain some ideas of how they might be used from internal comments? Sorry, but no. There are essentially no internal comments that explain what the author has done.

Is there a convergence check? Or does this just run for the specified number of iterations? No hints.

A point of programming style - why force the user to provide an argument that specifies which parameters have bounds? If a parameter has no bounds, then use -inf and inf for its respective bounds. This way you use a format that is consistent with the optimization toolbox, and you make the user work less.

The defaults for the lower and upper bounds are defined in a way that makes no sense. A far better description is needed. Best is to not provide defaults for the bounds at all. Its a bad idea to surprise a user with bounds they do not expect.

The objective function should have much more explanation. For example, must it be vectorized?

I'd have liked to see an example of use. The author claims this has been applied to a variety of test cases. So why not provide an example in the help? Even better, supply HTML (using publish) that shows this code in action.

There is no error checking done for validity of arguments. For example, are the supplied lower bounds strictly less than the upper bounds? Are they all the same size as the parameter vector? These are things that make for good (user friendly) code.

A probable bug will result for unbounded problems, expecially if plots are generated.

I think the author can do better here. Please try again.

Concern Matlab User

No code commenting
Poor swarm implementation

##### MATLAB Release Compatibility
Created with R11.1
Compatible with any release
##### Platform Compatibility
Windows macOS Linux