Index: trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5561)
+++ trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5566)
@@ -126,66 +126,57 @@
       UniformSubScopesProcessor evaluationProcessor = new UniformSubScopesProcessor();
       NeighborUpdater neighborUpdater = new NeighborUpdater();
-      ISwarmUpdater swarmUpdater = new RealVectorSwarmUpdater();
+      Placeholder swarmUpdater = new Placeholder();
       IntCounter currentIterationCounter = new IntCounter();
       Comparator currentIterationComparator = new Comparator();
       ConditionalBranch conditionalBranch = new ConditionalBranch();
       Placeholder velocityBoundsUpdaterPlaceholder = new Placeholder();
-      Placeholder omegaUpdaterPlaceholder = new Placeholder();
+      Placeholder inertiaUpdaterPlaceholder = new Placeholder();
       #endregion
 
       #region Create operator graph
-      //OperatorGraph.InitialOperator = analyzerPlaceholder;
+      OperatorGraph.InitialOperator = analyzerPlaceholder;
 
-      //analyzerPlaceholder.Name = "(Analyzer)";
-      //analyzerPlaceholder.OperatorParameter.ActualName = "Analyzer";
-      //analyzerPlaceholder.Successor = uniformSubScopeProcessor;
+      analyzerPlaceholder.Name = "(Analyzer)";
+      analyzerPlaceholder.OperatorParameter.ActualName = AnalyzerParameter.Name; 
+      analyzerPlaceholder.Successor = uniformSubScopeProcessor;
 
-      //uniformSubScopeProcessor.Operator = particleUpdaterPlaceholder;
-      //uniformSubScopeProcessor.Successor = evaluationProcessor;
+      uniformSubScopeProcessor.Operator = particleUpdaterPlaceholder;
+      uniformSubScopeProcessor.Successor = evaluationProcessor;
 
-      //particleUpdaterPlaceholder.Name = "(ParticleUpdater)";
-      //particleUpdaterPlaceholder.OperatorParameter.ActualName = "ParticleUpdater";
+      particleUpdaterPlaceholder.Name = "(ParticleUpdater)";
+      particleUpdaterPlaceholder.OperatorParameter.ActualName = ParticleUpdaterParameter.Name; 
 
-      //evaluationProcessor.Parallel = new BoolValue(true);
-      //evaluationProcessor.Operator = evaluatorPlaceholder;
-      //evaluationProcessor.Successor = topologyUpdaterPlaceholder;
+      evaluationProcessor.Parallel = new BoolValue(true);
+      evaluationProcessor.Operator = evaluatorPlaceholder;
+      evaluationProcessor.Successor = topologyUpdaterPlaceholder;
 
-      //evaluatorPlaceholder.Name = "(Evaluator)";
-      //evaluatorPlaceholder.OperatorParameter.ActualName = "Evaluator";
+      evaluatorPlaceholder.Name = "(Evaluator)";
+      evaluatorPlaceholder.OperatorParameter.ActualName = EvaluatorParameter.Name; 
 
-      //topologyUpdaterPlaceholder.Name = "(TopologyUpdater)";
-      //topologyUpdaterPlaceholder.OperatorParameter.ActualName = "TopologyUpdater";
-      //topologyUpdaterPlaceholder.Successor = neighborUpdater;
+      topologyUpdaterPlaceholder.Name = "(TopologyUpdater)";
+      topologyUpdaterPlaceholder.OperatorParameter.ActualName = TopologyUpdaterParameter.Name; 
+      topologyUpdaterPlaceholder.Successor = swarmUpdater;
 
-      //neighborUpdater.Successor = uniformSubscopesProcessor2;
+      swarmUpdater.Name = "Swarm Updater";
+      swarmUpdater.OperatorParameter.ActualName = "SwarmUpdater"; 
+      swarmUpdater.Successor = currentIterationCounter;
 
-      //uniformSubscopesProcessor2.Operator = swarmUpdater;
-      //uniformSubscopesProcessor2.Successor = analyzerPlaceholder;
+      currentIterationCounter.Name = "CurrentIteration++";
+      currentIterationCounter.ValueParameter.ActualName = "CurrentIteration";
+      currentIterationCounter.Successor = inertiaUpdaterPlaceholder;
 
-      //analyzerPlaceholder.Name = "(Analyzer)";
-      //analyzerPlaceholder.OperatorParameter.ActualName = "Analyzer";
-      //analyzerPlaceholder.Successor = currentIterationCounter;
+      inertiaUpdaterPlaceholder.Name = "(Inertia Updater)";
+      inertiaUpdaterPlaceholder.OperatorParameter.ActualName = InertiaUpdaterParameter.ActualName; 
+      inertiaUpdaterPlaceholder.Successor = currentIterationComparator;
 
-      //currentIterationCounter.Name = "CurrentIteration++";
-      //currentIterationCounter.ValueParameter.ActualName = "CurrentIteration";
-      //currentIterationCounter.Successor = omegaUpdaterPlaceholder;
+      currentIterationComparator.LeftSideParameter.ActualName = "CurrentIteration";
+      currentIterationComparator.Comparison = new Comparison(ComparisonType.Less);
+      currentIterationComparator.RightSideParameter.ActualName = "MaxIterations";
+      currentIterationComparator.ResultParameter.ActualName = "ContinueIteration";
+      currentIterationComparator.Successor = conditionalBranch;
 
-      //omegaUpdaterPlaceholder.Name = "(Inertia Updater)";
-      //omegaUpdaterPlaceholder.OperatorParameter.ActualName = "InertiaUpdater";
-      //omegaUpdaterPlaceholder.Successor = velocityBoundsUpdaterPlaceholder;
-
-      //velocityBoundsUpdaterPlaceholder.Name = "(Velocity Bounds Updater)";
-      //velocityBoundsUpdaterPlaceholder.OperatorParameter.ActualName = "VelocityBoundsUpdater";
-      //velocityBoundsUpdaterPlaceholder.Successor = currentIterationComparator;
-
-      //currentIterationComparator.LeftSideParameter.ActualName = "CurrentIteration";
-      //currentIterationComparator.Comparison = new Comparison(ComparisonType.Less);
-      //currentIterationComparator.RightSideParameter.ActualName = "MaxIterations";
-      //currentIterationComparator.ResultParameter.ActualName = "ContinueIteration";
-      //currentIterationComparator.Successor = conditionalBranch;
-
-      //conditionalBranch.Name = "ContinueIteration?";
-      //conditionalBranch.ConditionParameter.ActualName = "ContinueIteration";
-      //conditionalBranch.TrueBranch = uniformSubScopeProcessor;
+      conditionalBranch.Name = "ContinueIteration?";
+      conditionalBranch.ConditionParameter.ActualName = "ContinueIteration";
+      conditionalBranch.TrueBranch = uniformSubScopeProcessor;
       #endregion
     }
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 5561)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 5566)
@@ -43,5 +43,5 @@
     }
     public ILookupParameter<RealVector> PersonalBestParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["PersonalBestParameter"]; }
+      get { return (ILookupParameter<RealVector>)Parameters["PersonalBest"]; }
     }
     public ILookupParameter<RealVector> NeighborsBestParameter {
Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 5561)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 5566)
@@ -132,7 +132,7 @@
     public override IOperation Apply() {
       InitializeBestPoint();
+      UpdateSwarm();
       UpdateNeighbors();
       UpdateVelocityBounds();
-      UpdateSwarm();
       return base.Apply();
     }
@@ -140,5 +140,5 @@
     private void InitializeBestPoint() {
       if (BestQuality == null)
-        BestQualityParameter.ActualValue = new DoubleValue(); 
+        BestQualityParameter.ActualValue = new DoubleValue();
       BestQuality.Value = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value);
       int bestIndex = Quality.FindIndex(v => v.Value == BestQuality.Value);
@@ -167,26 +167,28 @@
     private void UpdateSwarm() {
       if (PersonalBestQuality.Length == 0) {
-        PersonalBestQualityParameter.ActualValue = new ItemArray<DoubleValue>(RealVector.Length);
+        ItemArray<DoubleValue> personalBestQualities = new ItemArray<DoubleValue>(RealVector.Length);
         for (int i = 0; i < RealVector.Length; i++) {
           if (Maximization) {
-            PersonalBestQuality[i] = new DoubleValue();
+            personalBestQualities[i] = new DoubleValue(double.MinValue);
           } else {
-            PersonalBestQuality[i] = new DoubleValue(double.MaxValue); 
+            personalBestQualities[i] = new DoubleValue(double.MaxValue);
           }
         }
+        PersonalBestQualityParameter.ActualValue = personalBestQualities;
       }
       if (NeighborsBestQuality.Length == 0) {
-        NeighborsBestQualityParameter.ActualValue = new ItemArray<DoubleValue>(RealVector.Length);
-        for (int i = 0; i < RealVector.Length; i++) {
-          if (Maximization) {
-            NeighborsBestQuality[i] = new DoubleValue();
-          } else {
-            NeighborsBestQuality[i] = new DoubleValue(double.MaxValue);
+        if (NeighborsParameter != null && Neighbors.Length > 0) {
+          ItemArray<DoubleValue> neighborsBestQualities = new ItemArray<DoubleValue>(RealVector.Length);
+          for (int i = 0; i < RealVector.Length; i++) {
+            if (Maximization) {
+              neighborsBestQualities[i] = new DoubleValue(double.MinValue);
+            } else {
+              neighborsBestQualities[i] = new DoubleValue(double.MaxValue);
+            }
           }
-        }
-      }
-      if (NeighborsBest.Length == 0) {
-        NeighborsBestParameter.ActualValue = new ItemArray<RealVector>(RealVector.Length);
-      }
+          NeighborsBestQualityParameter.ActualValue = neighborsBestQualities;
+        }
+      }
+      ItemArray<RealVector> neighborsBest = new ItemArray<RealVector>(RealVector.Length);
       for (int i = 0; i < RealVector.Length; i++) {
         if (Maximization && Quality[i].Value > PersonalBestQuality[i].Value ||
@@ -197,7 +199,10 @@
              !Maximization && PersonalBestQuality[i].Value < NeighborsBestQuality[i].Value) {
             NeighborsBestQuality[i].Value = PersonalBestQuality[i].Value;
-            NeighborsBest[i] = PersonalBest[i];
+            neighborsBest[i] = PersonalBest[i];
           }
         }
+      }
+      if (NeighborsParameter != null && Neighbors.Length > 0) {
+        NeighborsBestParameter.ActualValue = neighborsBest;
       }
     }
