nature-inspired optimization algorithms || matlab programs

17
B Matlab Programs The following codes intend to demonstrate how each algorithm works, so they are relatively simple and we do not intend to optimize them. They are not for general- purpose optimization, because there are much better programs out there, both free and commercial, for that task. These codes should work using Matlab. 1 For Octave, 2 slight modifications may be needed. B.1 Simulated Annealing 1 Matlab, www.mathworks.com. 2 J. W. Eaton, GNU Octave Manual. Network Theory Ltd., 2002, www.gnu.org/software/octave. Nature-Inspired Optimization Algorithms. http://dx.doi.org/10.1016/B978-0-12-416743-8.00022-1 © 2014 Elsevier Inc. All rights reserved.

Post on 25-Dec-2016

227 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Nature-Inspired Optimization Algorithms || Matlab Programs

B Matlab Programs

The following codes intend to demonstrate how each algorithm works, so they arerelatively simple and we do not intend to optimize them. They are not for general-purpose optimization, because there are much better programs out there, both free andcommercial, for that task. These codes should work using Matlab.1 For Octave,2 slightmodifications may be needed.

B.1 Simulated Annealing

1Matlab, www.mathworks.com.2J. W. Eaton, GNU Octave Manual. Network Theory Ltd., 2002, www.gnu.org/software/octave.

Nature-Inspired Optimization Algorithms. http://dx.doi.org/10.1016/B978-0-12-416743-8.00022-1© 2014 Elsevier Inc. All rights reserved.

Page 2: Nature-Inspired Optimization Algorithms || Matlab Programs

248 Nature-Inspired Optimization Algorithms

B.2 Particle Swarm Optimization

Page 3: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 249

Page 4: Nature-Inspired Optimization Algorithms || Matlab Programs

250 Nature-Inspired Optimization Algorithms

B.3 Differential Evolution

Page 5: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 251

Page 6: Nature-Inspired Optimization Algorithms || Matlab Programs

252 Nature-Inspired Optimization Algorithms

B.4 Firefly Algorithm

Page 7: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 253

Page 8: Nature-Inspired Optimization Algorithms || Matlab Programs

254 Nature-Inspired Optimization Algorithms

Page 9: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 255

Page 10: Nature-Inspired Optimization Algorithms || Matlab Programs

256 Nature-Inspired Optimization Algorithms

B.5 Cuckoo Search

Page 11: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 257

Page 12: Nature-Inspired Optimization Algorithms || Matlab Programs

258 Nature-Inspired Optimization Algorithms

Page 13: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 259

B.6 Bat Algorithm

Page 14: Nature-Inspired Optimization Algorithms || Matlab Programs

260 Nature-Inspired Optimization Algorithms

Page 15: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 261

B.7 Flower Pollination Algorithm

Page 16: Nature-Inspired Optimization Algorithms || Matlab Programs

262 Nature-Inspired Optimization Algorithms

Page 17: Nature-Inspired Optimization Algorithms || Matlab Programs

Matlab Programs 263