42 | | === Parameter Adjustment === |
43 | | |
44 | | Like many other metheuristics, the PSO algorithm frequently faces the problems of being trapped in local optima. Balancing the global exploration and local exploitation abilities of PSO is therefore very important. Important PSO parameters that should be tweaked for every problem (or even instance): |
45 | | |
46 | | '''Inertia Weight''' |
47 | | The inertia weight parameter was introduced in 1998 by Shi and Eberhart. The idea was to use a maximum velocity and set the velocity bounds to the dynamic range of the solution space. One can further improve results by adjusting the inertia weight dynamically during the optimization run (via fuzzy optimization, by linear decreasing or increasing or randomizing the parameter). |
| 42 | === Parameter Tuning === |
| 43 | Like many other metheuristics, the PSO algorithm frequently faces the problem of being trapped in local optima. Balancing the global exploration and local exploitation abilities of PSO is therefore very important. Tweaking the following PSO parameters for your problem (or even instance) can yield better results: |
58 | | It is possible to let the algorithm adjust some parameters dynamically during runtime. |
59 | | * Inertia Weight: Configure the `InertiaUpdater` to adjust the inertia weight. You can select any operator that implements `IDiscreteDoubleValueModifier`. The standard Simulated Annealing annealing operators (exponential, square root, linear, quadratic increase/decrease) can be used. |
60 | | * Velocity Vector: In the `SwarmUpdater` the velocity vector can be likewise adjusted. Please note that do so far only use one `IDiscreteDoubleValueModifier` for all vector dimensions, therefore the value (but not the sign) of all dimensions will be equal. |
| 54 | Also, a recent paper by [#References (Pedersen 2010)] provides a most helpful table of PSO parameter settings that have been tuned via meta/optimization for different optimization scenarios. We recommend them as a first starting point when optimizing new problems. Some of the settings (like using a negative inertia weight) may seem quirky, but we also got some very good results with those settings. |
| 55 | |
| 56 | === Dynamic Parameters === |
| 57 | As mentioned in the previous section it has been found to be benefitial to adjust parameters dynamically during runtime. Currently you can enable dynamic parameter modification for the following two parameters. |
| 58 | |
| 59 | * '''Inertia Weight:''' Configure the `InertiaUpdater` to adjust the inertia weight. You can select any operator that implements `IDiscreteDoubleValueModifier`. The standard Simulated Annealing annealing operators (exponential, square root, linear, quadratic increase/decrease) can be used as shown in the screenshot below. You only have to select an appropriate annealing operator and set a desired `StartValue` and `EndValue`. Please note that some additional parameters of the operator are hidden, among them the `StartIndex`, `Index` and `EndIndex`. Those are set by default to cover the whole algorithm execution time from iteration 0 to `MaxIterations`. |
| 60 | [[Image(PSO_InertiaUpdater.png, height=400, margin-right=30, margin-left=30)]] |
| 61 | |
| 62 | '''Tip:''' You can show hidden parameters by clicking on the `Show hidden parameters` button. |
| 63 | |
| 64 | |
| 65 | * '''Velocity Bounds:''' In the `SwarmUpdater` the velocity bounds vector can be likewise adjusted. You can either adjust it statically by altering the `VelocityBounds` parameter. Or you can select an `IDiscreteDoubleValueModifier` that will set all vector dimensions equally (symmetric around zero). In addition, you have to set the `VelocityBoundsStartValue` and `VelocityBoundsEndValue`. Note that `VelocityBoundsStartIndex`, `VelocityBoundsIndex` and `VelocityBoundsEndIndex` are once again hidden (but can be un-hidden and changed manually, if you wish). The parameters are propagated to the `IDiscreteDoubleValueModifier` so there is no need to paramiterize it as well. |
| 66 | [[Image(PSO_SwarmUpdater.png, height=400, margin-right=30, margin-left=30)]] |
| 67 | |