Index: trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 15096)
@@ -177,10 +177,10 @@
       Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
       Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
-      Parameters.Add(new ValueParameter<IntValue>("SwarmSize", "Size of the particle swarm.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("SwarmSize", "Size of the particle swarm.", new IntValue(20)));
       Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "Maximal number of iterations.", new IntValue(1000)));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
-      Parameters.Add(new ValueParameter<DoubleValue>("Inertia", "Inertia weight on a particle's movement (omega).", new DoubleValue(0.9)));
-      Parameters.Add(new ValueParameter<DoubleValue>("PersonalBestAttraction", "Weight for particle's pull towards its personal best soution (phi_p).", new DoubleValue(0.05)));
-      Parameters.Add(new ValueParameter<DoubleValue>("NeighborBestAttraction", "Weight for pull towards the neighborhood best solution or global best solution in case of a totally connected topology (phi_g).", new DoubleValue(0.5)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Inertia", "Inertia weight on a particle's movement (omega).", new DoubleValue(0.8)));
+      Parameters.Add(new ValueParameter<DoubleValue>("PersonalBestAttraction", "Weight for particle's pull towards its personal best soution (phi_p).", new DoubleValue(1)));
+      Parameters.Add(new ValueParameter<DoubleValue>("NeighborBestAttraction", "Weight for pull towards the neighborhood best solution or global best solution in case of a totally connected topology (phi_g).", new DoubleValue(1)));
       Parameters.Add(new ConstrainedValueParameter<IParticleCreator>("ParticleCreator", "Operator that creates a new particle."));
       Parameters.Add(new ConstrainedValueParameter<IParticleUpdater>("ParticleUpdater", "Operator that updates a particle."));
@@ -189,5 +189,4 @@
       Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("InertiaUpdater", "Updates the omega parameter."));
       Parameters.Add(new ConstrainedValueParameter<ISwarmUpdater>("SwarmUpdater", "Encoding-specific parameter which is provided by the problem. May provide additional encoding-specific parameters, such as velocity bounds for real valued problems"));
-      ParticleUpdaterParameter.Hidden = true;
 
       RandomCreator randomCreator = new RandomCreator();
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj	(revision 15096)
@@ -116,4 +116,6 @@
     <Compile Include="Creators\NormalDistributedRealVectorCreator.cs" />
     <Compile Include="Interfaces\IRealVectorMultiNeighborhoodShakingOperator.cs" />
+    <Compile Include="ParticleOperators\SPSO2011ParticleUpdater.cs" />
+    <Compile Include="ParticleOperators\SPSO2007ParticleUpdater.cs" />
     <Compile Include="ParticleOperators\RealVectorParticleCreator.cs" />
     <Compile Include="Crossovers\BlendAlphaBetaCrossover.cs" />
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorNeighborhoodParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorNeighborhoodParticleUpdater.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorNeighborhoodParticleUpdater.cs	(revision 15096)
@@ -20,12 +20,16 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
   [Item("Neighborhood Particle Updater", "Updates the particle's position using (among other things) the best neighbor's position. Point = Point + Velocity*Inertia + (PersonalBestPoint-Point)*Phi_P*r_p + (BestNeighborPoint-Point)*Phi_G*r_g.")]
   [StorableClass]
-  public sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater {
+  [NonDiscoverableType]
+  [Obsolete("Replaced by SPSO2007ParticleUpdater")]
+  internal sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater {
 
     #region Construction & Cloning
@@ -39,4 +43,56 @@
     #endregion
 
+    private void UpdateVelocity() {
+      var velocity = VelocityParameter.ActualValue;
+      var position = RealVectorParameter.ActualValue;
+      var inertia = CurrentInertiaParameter.ActualValue.Value;
+      var personalBest = PersonalBestParameter.ActualValue;
+      var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value;
+      var neighborBest = NeighborBestParameter.ActualValue;
+      var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value;
+
+      var random = RandomParameter.ActualValue;
+
+      for (int i = 0; i < velocity.Length; i++) {
+        double r_p = random.NextDouble();
+        double r_g = random.NextDouble();
+        velocity[i] =
+          velocity[i] * inertia +
+          (personalBest[i] - position[i]) * personalBestAttraction * r_p +
+          (neighborBest[i] - position[i]) * neighborBestAttraction * r_g;
+      }
+
+      var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value;
+      var speed = Math.Sqrt(velocity.DotProduct(velocity));
+      if (speed > maxVelocity) {
+        for (var i = 0; i < velocity.Length; i++) {
+          velocity[i] *= maxVelocity / speed;
+        }
+      }
+    }
+
+    private void UpdatePosition() {
+      var velocity = VelocityParameter.ActualValue;
+      var position = RealVectorParameter.ActualValue;
+
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] += velocity[i];
+      }
+
+      var bounds = BoundsParameter.ActualValue;
+      for (int i = 0; i < position.Length; i++) {
+        double min = bounds[i % bounds.Rows, 0];
+        double max = bounds[i % bounds.Rows, 1];
+        if (position[i] < min) {
+          position[i] = min;
+          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
+        }
+        if (position[i] > max) {
+          position[i] = max;
+          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
+        }
+      }
+    }
+
     public override IOperation Apply() {
       UpdateVelocity();
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 15096)
@@ -19,10 +19,10 @@
  */
 #endregion
-
-using System;
+ 
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -60,7 +60,9 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["CurrentMaxVelocity"]; }
     }
-    public ILookupParameter<DoubleValue> InertiaParameter {
+    public ILookupParameter<DoubleValue> CurrentInertiaParameter {
       get { return (ILookupParameter<DoubleValue>)Parameters["CurrentInertia"]; }
     }
+    ILookupParameter<DoubleValue> IParticleUpdater.InertiaParameter { get { return CurrentInertiaParameter; } }
+
     public ILookupParameter<DoubleValue> PersonalBestAttractionParameter {
       get { return (ILookupParameter<DoubleValue>)Parameters["PersonalBestAttraction"]; }
@@ -89,56 +91,4 @@
     }
     #endregion
-
-    protected void UpdateVelocity() {
-      var velocity = VelocityParameter.ActualValue;
-      var position = RealVectorParameter.ActualValue;
-      var inertia = InertiaParameter.ActualValue.Value;
-      var personalBest = PersonalBestParameter.ActualValue;
-      var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value;
-      var neighborBest = NeighborBestParameter.ActualValue;
-      var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value;
-
-      var random = RandomParameter.ActualValue;
-
-      for (int i = 0; i < velocity.Length; i++) {
-        double r_p = random.NextDouble();
-        double r_g = random.NextDouble();
-        velocity[i] =
-          velocity[i] * inertia +
-          (personalBest[i] - position[i]) * personalBestAttraction * r_p +
-          (neighborBest[i] - position[i]) * neighborBestAttraction * r_g;
-      }
-
-      var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value;
-      var speed = Math.Sqrt(velocity.DotProduct(velocity));
-      if (speed > maxVelocity) {
-        for (var i = 0; i < velocity.Length; i++) {
-          velocity[i] *= maxVelocity / speed;
-        }
-      }
-    }
-
-    protected void UpdatePosition() {
-      var velocity = VelocityParameter.ActualValue;
-      var position = RealVectorParameter.ActualValue;
-
-      for (int i = 0; i < velocity.Length; i++) {
-        position[i] += velocity[i];
-      }
-
-      var bounds = BoundsParameter.ActualValue;
-      for (int i = 0; i < position.Length; i++) {
-        double min = bounds[i % bounds.Rows, 0];
-        double max = bounds[i % bounds.Rows, 1];
-        if (position[i] < min) {
-          position[i] = min;
-          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
-        }
-        if (position[i] > max) {
-          position[i] = max;
-          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
-        }
-      }
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 15096)
@@ -126,5 +126,5 @@
       Parameters.Add(new ScopeTreeLookupParameter<IntArray>("Neighbors", "The list of neighbors for each particle."));
       Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
-      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaxVelocity", "Speed limit for each particle.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaxVelocity", "Speed limit for each particle.", new DoubleValue(1000000)));
       Parameters.Add(new LookupParameter<DoubleValue>("CurrentMaxVelocity", "Current value of the speed limit."));
       Parameters.Add(new LookupParameter<ResultCollection>("Results", "Results"));
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs	(revision 15096)
@@ -23,5 +23,4 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
@@ -31,5 +30,5 @@
   [StorableClass]
   [NonDiscoverableType]
-  [Obsolete("Same as the RealVectorNeighborhoodParticleUpdate")]
+  [Obsolete("Replaced by SPSO2007ParticleUpdater")]
   internal sealed class RealVectorTotallyConnectedParticleUpdater : RealVectorParticleUpdater {
 
@@ -44,4 +43,56 @@
     #endregion
 
+    private void UpdateVelocity() {
+      var velocity = VelocityParameter.ActualValue;
+      var position = RealVectorParameter.ActualValue;
+      var inertia = CurrentInertiaParameter.ActualValue.Value;
+      var personalBest = PersonalBestParameter.ActualValue;
+      var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value;
+      var neighborBest = NeighborBestParameter.ActualValue;
+      var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value;
+
+      var random = RandomParameter.ActualValue;
+
+      for (int i = 0; i < velocity.Length; i++) {
+        double r_p = random.NextDouble();
+        double r_g = random.NextDouble();
+        velocity[i] =
+          velocity[i] * inertia +
+          (personalBest[i] - position[i]) * personalBestAttraction * r_p +
+          (neighborBest[i] - position[i]) * neighborBestAttraction * r_g;
+      }
+
+      var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value;
+      var speed = Math.Sqrt(velocity.DotProduct(velocity));
+      if (speed > maxVelocity) {
+        for (var i = 0; i < velocity.Length; i++) {
+          velocity[i] *= maxVelocity / speed;
+        }
+      }
+    }
+
+    private void UpdatePosition() {
+      var velocity = VelocityParameter.ActualValue;
+      var position = RealVectorParameter.ActualValue;
+
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] += velocity[i];
+      }
+
+      var bounds = BoundsParameter.ActualValue;
+      for (int i = 0; i < position.Length; i++) {
+        double min = bounds[i % bounds.Rows, 0];
+        double max = bounds[i % bounds.Rows, 1];
+        if (position[i] < min) {
+          position[i] = min;
+          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
+        }
+        if (position[i] > max) {
+          position[i] = max;
+          velocity[i] = -0.5 * velocity[i]; // SPSO 2011
+        }
+      }
+    }
+
     public override IOperation Apply() {
       UpdateVelocity();
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2007ParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2007ParticleUpdater.cs	(revision 15096)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2007ParticleUpdater.cs	(revision 15096)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding {
+  [Item("SPSO 2007 Particle Updater", "Updates the particle's position according to the formulae described in SPSO 2007.")]
+  [StorableClass]
+  public sealed class SPSO2007ParticleUpdater : RealVectorParticleUpdater {
+
+    #region Construction & Cloning
+    [StorableConstructor]
+    private SPSO2007ParticleUpdater(bool deserializing) : base(deserializing) { }
+    private SPSO2007ParticleUpdater(SPSO2007ParticleUpdater original, Cloner cloner) : base(original, cloner) { }
+    public SPSO2007ParticleUpdater() : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SPSO2007ParticleUpdater(this, cloner);
+    }
+    #endregion
+    
+    public static void UpdateVelocity(IRandom random, RealVector velocity, double maxVelocity, RealVector position, double inertia, RealVector personalBest, double personalBestAttraction, RealVector neighborBest, double neighborBestAttraction) {
+      for (int i = 0; i < velocity.Length; i++) {
+        double r_p = random.NextDouble() * 1.193;
+        double r_g = random.NextDouble() * 1.193;
+        velocity[i] =
+          velocity[i] * inertia +
+          (personalBest[i] - position[i]) * personalBestAttraction * r_p +
+          (neighborBest[i] - position[i]) * neighborBestAttraction * r_g;
+      }
+
+      var speed = Math.Sqrt(velocity.DotProduct(velocity));
+      if (speed > maxVelocity) {
+        for (var i = 0; i < velocity.Length; i++) {
+          velocity[i] *= maxVelocity / speed;
+        }
+      }
+    }
+
+    public static void UpdatePosition(DoubleMatrix bounds, RealVector velocity, RealVector position) {
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] += velocity[i];
+      }
+
+      for (int i = 0; i < position.Length; i++) {
+        double min = bounds[i % bounds.Rows, 0];
+        double max = bounds[i % bounds.Rows, 1];
+        if (position[i] < min) {
+          position[i] = min;
+          velocity[i] = 0;
+        }
+        if (position[i] > max) {
+          position[i] = max;
+          velocity[i] = 0;
+        }
+      }
+    }
+
+    public override IOperation Apply() {
+      var random = RandomParameter.ActualValue;
+      var velocity = VelocityParameter.ActualValue;
+      var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value;
+      var position = RealVectorParameter.ActualValue;
+      var bounds = BoundsParameter.ActualValue;
+
+      var inertia = CurrentInertiaParameter.ActualValue.Value;
+      var personalBest = PersonalBestParameter.ActualValue;
+      var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value;
+      var neighborBest = NeighborBestParameter.ActualValue;
+      var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value;
+      
+      UpdateVelocity(random, velocity, maxVelocity, position, inertia, personalBest, personalBestAttraction, neighborBest, neighborBestAttraction);
+      UpdatePosition(bounds, velocity, position);
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2011ParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2011ParticleUpdater.cs	(revision 15096)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/SPSO2011ParticleUpdater.cs	(revision 15096)
@@ -0,0 +1,110 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding {
+  [Item("SPSO 2011 Particle Updater", "Updates the particle's position according to the formulae described in SPSO 2011.")]
+  [StorableClass]
+  public sealed class SPSO2011ParticleUpdater : RealVectorParticleUpdater {
+
+    #region Construction & Cloning
+    [StorableConstructor]
+    private SPSO2011ParticleUpdater(bool deserializing) : base(deserializing) { }
+    private SPSO2011ParticleUpdater(SPSO2011ParticleUpdater original, Cloner cloner) : base(original, cloner) { }
+    public SPSO2011ParticleUpdater() : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SPSO2011ParticleUpdater(this, cloner);
+    }
+    #endregion
+    
+    public static void UpdateVelocity(IRandom random, RealVector velocity, double maxVelocity, RealVector position, double inertia, RealVector personalBest, double personalBestAttraction, RealVector neighborBest, double neighborBestAttraction) {
+      var gravity = new double[velocity.Length];
+      var direct = new RealVector(velocity.Length);
+      var radius = 0.0;
+
+      for (int i = 0; i < velocity.Length; i++) {
+        var g_id = 1.193 * ((personalBest[i] + neighborBest[i] - 2 * position[i]) / 3.0);
+        gravity[i] = g_id + position[i];
+        direct[i] = (random.NextDouble() - 0.5) * 2;
+        radius += g_id * g_id;
+      }
+
+      radius = random.NextDouble() * Math.Sqrt(radius);
+
+      var unitscale = Math.Sqrt(direct.DotProduct(direct));
+      if (unitscale > 0) {
+        for (var i = 0; i < velocity.Length; i++) {
+          velocity[i] = velocity[i] * inertia + gravity[i] + direct[i] * radius / unitscale - position[i];
+        }
+      }
+
+      var speed = Math.Sqrt(velocity.DotProduct(velocity));
+      if (speed > maxVelocity) {
+        for (var i = 0; i < velocity.Length; i++) {
+          velocity[i] *= maxVelocity / speed;
+        }
+      }
+    }
+
+    public static void UpdatePosition(DoubleMatrix bounds, RealVector velocity, RealVector position) {
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] += velocity[i];
+      }
+
+      for (int i = 0; i < position.Length; i++) {
+        double min = bounds[i % bounds.Rows, 0];
+        double max = bounds[i % bounds.Rows, 1];
+        if (position[i] < min) {
+          position[i] = min;
+          velocity[i] = -0.5 * velocity[i];
+        }
+        if (position[i] > max) {
+          position[i] = max;
+          velocity[i] = -0.5 * velocity[i];
+        }
+      }
+    }
+
+    public override IOperation Apply() {
+      var random = RandomParameter.ActualValue;
+      var velocity = VelocityParameter.ActualValue;
+      var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value;
+      var position = RealVectorParameter.ActualValue;
+      var bounds = BoundsParameter.ActualValue;
+
+      var inertia = CurrentInertiaParameter.ActualValue.Value;
+      var personalBest = PersonalBestParameter.ActualValue;
+      var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value;
+      var neighborBest = NeighborBestParameter.ActualValue;
+      var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value;
+      
+      UpdateVelocity(random, velocity, maxVelocity, position, inertia, personalBest, personalBestAttraction, neighborBest, neighborBestAttraction);
+      UpdatePosition(bounds, velocity, position);
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs	(revision 15096)
@@ -78,4 +78,16 @@
     }
 
+    public void Add(RealVector other) {
+      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
+      for (var i = 0; i < Length; i++)
+        this[i] += other[i];
+    }
+
+    public void Subtract(RealVector other) {
+      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
+      for (var i = 0; i < Length; i++)
+        this[i] -= other[i];
+    }
+
     public double DotProduct(RealVector other) {
       if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs	(revision 15095)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs	(revision 15096)
@@ -52,13 +52,13 @@
       SamplesUtils.RunAlgorithm(pso);
       if (Environment.Is64BitProcess) {
-        Assert.AreEqual(118.43833503632464, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
-        Assert.AreEqual(118.43935663125784, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
-        Assert.AreEqual(118.44721627137812, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
-        Assert.AreEqual(1000, SamplesUtils.GetIntResult(pso, "Iterations"));
+        Assert.AreEqual(2.8334909529803554E-08, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
+        Assert.AreEqual(128.08680460446624, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
+        Assert.AreEqual(713.67728101375587, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
+        Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations"));
       } else {
-        Assert.AreEqual(118.4383350363247, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
-        Assert.AreEqual(118.43935663125787, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
-        Assert.AreEqual(118.44721627137824, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
-        Assert.AreEqual(1000, SamplesUtils.GetIntResult(pso, "Iterations"));
+        Assert.AreEqual(2.8334909529803554E-08, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
+        Assert.AreEqual(128.08680460446624, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
+        Assert.AreEqual(713.67728101375587, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
+        Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations"));
       }
     }
@@ -80,32 +80,18 @@
       pso.Description = "A particle swarm optimization algorithm which solves the 2-dimensional Schwefel test function (based on the description in Pedersen, M.E.H. (2010). PhD thesis. University of Southampton)";
       pso.Problem = problem;
-      pso.Inertia.Value = 10;
-      pso.MaxIterations.Value = 1000;
-      pso.NeighborBestAttraction.Value = 0.5;
-      pso.PersonalBestAttraction.Value = -0.01;
-      pso.SwarmSize.Value = 50;
+      pso.Inertia.Value = 1.1;
+      pso.MaxIterations.Value = 200;
+      pso.NeighborBestAttraction.Value = 1;
+      pso.PersonalBestAttraction.Value = 1;
+      pso.SwarmSize.Value = 40;
 
       var inertiaUpdater = pso.InertiaUpdaterParameter.ValidValues
         .OfType<ExponentialDiscreteDoubleValueModifier>()
         .Single();
-      inertiaUpdater.StartValueParameter.Value = new DoubleValue(10);
-      inertiaUpdater.EndValueParameter.Value = new DoubleValue(0.8);
+      inertiaUpdater.EndValueParameter.Value = new DoubleValue(0.721);
       pso.InertiaUpdater = inertiaUpdater;
-
-      pso.ParticleCreator = pso.ParticleCreatorParameter.ValidValues
-        .OfType<RealVectorParticleCreator>()
-        .Single();
-      var swarmUpdater = pso.SwarmUpdaterParameter.ValidValues
-        .OfType<RealVectorSwarmUpdater>()
-        .Single();
-      swarmUpdater.MaxVelocityParameter.Value = new DoubleValue(20.0);
-      swarmUpdater.FinalMaxVelocityParameter.Value = new DoubleValue(1.0);
-      swarmUpdater.MaxVelocityScalingOperatorParameter.Value = swarmUpdater.MaxVelocityScalingOperatorParameter.ValidValues
-        .OfType<ExponentialDiscreteDoubleValueModifier>()
-        .Single();
-
+      
       pso.TopologyInitializer = null;
       pso.TopologyUpdater = null;
-      pso.SwarmUpdater = swarmUpdater;
       pso.Seed.Value = 0;
       pso.SetSeedRandomly.Value = true;
