Particle Swarm Optimization CEE 6410 David Rosenberg
Learning Objectives Perform steps on a bead board Use web app to Identify effects of parameters on results Solve a more complicated problem with Matlab Compare to genetic algorithms CEE 6410
Algorithm Overview Each particle: Searches for the global optimum Moves with velocity (direction) Remembers local (particle) optimum Updates velocity as a weighted, random combo of Current velocity Direction to local optimum Direction to swarm optimum (to date) CEE 6410
Particle Motion Visualized Current particle position Current velocity Local particle optimum Swarm optimum New particle position New velocity CEE 6410
Key Steps CEE 6410
Example 1. Use the bead board to solve Max Z = f(x,y) = 1000 – [(x-1)2 + (y-1)2] s.t. -10 ≤ x ≤ 10 -10 ≤ y ≤ 10 Start with 2 particles Compute velocities and positions with http://tinyurl.com/hdrchzj Track particle positions on board with beads CEE 6410
Example 2. How do swarm parameters effect results? Symbol Description n Swarm size (# of particles) w Weight on current direction (velocity) c1 Weight on direction to local particle optimum c2 Weight on direction to swarm optimum Vmax Maximum allowable velocity Experiment with the web app at http://www.macs.hw.ac.uk/~dwcorne/mypages/apps/pso.html CEE 6410
Example 3. Solve a more complicated problem in Matlab Min Z = f(x,y) = x * exp(-(x2 + y2)) s.t. -5 ≤ x ≤ 5 -10 ≤ y ≤ 5 See Matlab code CEE 6410
Compare Heuristic Algorithms Characteristic Genetic Algorithms Particle Swarm Explore strategies (to search new areas) Exploit strategies (to retain best solutions) Number of parameters Optimum guaranteed CEE 6410
Conclusions Particle swarm optimization use swarm communication to solve complex problems Can embed simulation models Smaller number of parameters than genetic algorithms Lots of public-domain and commercial software available Many water resources applications CEE 6410