Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5642)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5643)
@@ -112,5 +112,4 @@
     <Compile Include="VonNeumannTopologyInitializer.cs" />
     <Compile Include="RingTopologyInitializer.cs" />
-    <Compile Include="NeighborUpdater.cs" />
     <Compile Include="TopologyInitializer.cs" />
     <Compile Include="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs" />
@@ -160,12 +159,4 @@
       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
       <Name>HeuristicLab.Data-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj">
-      <Project>{DDFB14DD-2A85-493C-A52D-E69729BBAEB0}</Project>
-      <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
-      <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
-      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 5642)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 5643)
@@ -33,5 +33,4 @@
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
-  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
Index: unk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/NeighborUpdater.cs	(revision 5642)
+++ 	(revision )
@@ -1,109 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
-  [Item("Neighbor Updater", "Determines the best quality and point among the defined list of neigbors for every particle and its individual neighborhood.")]
-  [StorableClass]
-  public sealed class NeighborUpdater : SingleSuccessorOperator {
-    public override bool CanChangeName {
-      get { return false; }
-    }
-
-    #region Parameters
-    public IScopeTreeLookupParameter<RealVector> PointsParameter {
-      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["Point"]; }
-    }
-    public IScopeTreeLookupParameter<IntArray> NeighborsParameter {
-      get { return (IScopeTreeLookupParameter<IntArray>)Parameters["Neighbors"]; }
-    }
-    public IScopeTreeLookupParameter<RealVector> BestNeighborPointParameter {
-      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["BestNeighborPoint"]; }
-    }
-    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
-      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-    public ILookupParameter<BoolValue> MaximizationParameter {
-      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
-    }
-    #endregion
-
-    #region Parameter Values
-    private ItemArray<RealVector> Points {
-      get { return PointsParameter.ActualValue; }
-    }
-    private ItemArray<IntArray> Neighbors {
-      get { return NeighborsParameter.ActualValue; }
-    }
-    private ItemArray<RealVector> BestNeighborPoints {
-      get { return BestNeighborPointParameter.ActualValue; }
-      set { BestNeighborPointParameter.ActualValue = value; }
-    }
-    private ItemArray<DoubleValue> Qualities {
-      get { return QualityParameter.ActualValue; }
-    }
-    private bool Maximization {
-      get { return MaximizationParameter.ActualValue.Value; }
-    }
-    #endregion
-
-    #region Construction & Cloning
-    [StorableConstructor]
-    private NeighborUpdater(bool deserializing) : base(deserializing) { }
-    private NeighborUpdater(NeighborUpdater original, Cloner cloner) : base(original, cloner) { }
-    public NeighborUpdater() {
-      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("RealVector", "The position of the particle."));
-      Parameters.Add(new ScopeTreeLookupParameter<IntArray>("Neighbors", "The list of neighbors for each particle."));
-      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("BestNeighborPoint", "The position of the best neighboring particle."));
-      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The list of qualities of all particles."));
-      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem."));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new NeighborUpdater(this, cloner);
-    }
-    #endregion
-
-    public override IOperation Apply() {
-      if (Neighbors != null & Neighbors.Length > 0) {
-        if (BestNeighborPoints == null || BestNeighborPoints.Length != Neighbors.Length)
-          BestNeighborPoints = new ItemArray<RealVector>(Neighbors.Length);
-        for (int n = 0; n < Neighbors.Length; n++) {
-          var pairs = Qualities.Zip(Points, (q, p) => new { Quality = q, Point = p })
-            .Where((p, i) => i == n || Neighbors[n].Contains(i));
-          BestNeighborPoints[n] = Maximization ?
-          pairs.OrderByDescending(p => p.Quality.Value).First().Point :
-          pairs.OrderBy(p => p.Quality.Value).First().Point;
-        }
-        BestNeighborPointParameter.ActualValue = BestNeighborPoints;
-      }
-      return base.Apply();
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5642)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5643)
@@ -167,4 +167,5 @@
       VariableCreator variableCreator = new VariableCreator();
       solutionsCreator = new SolutionsCreator();
+      SubScopesCounter subScopesCounter = new SubScopesCounter();
       Placeholder topologyInitializerPlaceholder = new Placeholder();
       Placeholder analyzerPlaceholder = new Placeholder();
@@ -178,9 +179,14 @@
 
       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("CurrentIteration", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentVelocityBounds", new DoubleValue(0)));
       variableCreator.Successor = solutionsCreator;
 
       solutionsCreator.NumberOfSolutionsParameter.ActualName = "SwarmSize";
       ParameterizeSolutionsCreator();
-      solutionsCreator.Successor = topologyInitializerPlaceholder;
+      solutionsCreator.Successor = subScopesCounter;
+
+      subScopesCounter.Name = "Initialize EvaluatedSolutions";
+      subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions";
+      subScopesCounter.Successor = topologyInitializerPlaceholder;
 
       topologyInitializerPlaceholder.Name = "(TopologyInitializer)";
@@ -200,8 +206,6 @@
       mainLoop.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName;
       mainLoop.ResultsParameter.ActualName = "Results";
-      // mainLoop.EvaluatedMovesParameter.ActualName = "EvaluatedMoves";
 
       InitializeAnalyzers();
-      ////InitVelocityBoundsUpdater();
       InitializeParticleCreator();
       InitializeSwarmUpdater();
@@ -227,14 +231,13 @@
       if (Problem != null && ParticleCreator != null && ParticleUpdater != null) {
         base.Prepare();
-        if (InertiaUpdater != null && InertiaUpdater.StartValueParameter.Value != null) {
-          this.InertiaParameter.ActualValue = new DoubleValue(InertiaUpdaterParameter.Value.StartValueParameter.Value.Value);
-        }
-        //if (VelocityBoundsUpdater != null && VelocityBoundsUpdater.StartValueParameter.Value != null && VelocityBoundsParameter.Value != null) {
-        //  DoubleMatrix matrix = VelocityBoundsParameter.Value;
-        //  for (int i = 0; i < matrix.Rows; i++) {
-        //    matrix[i, 0] = -VelocityBoundsUpdater.StartValueParameter.Value.Value;
-        //    matrix[i, 1] = VelocityBoundsUpdater.StartValueParameter.Value.Value;
-        //  }
-        //}
+        VariableCreator creator = (VariableCreator)((RandomCreator)OperatorGraph.InitialOperator).Successor;
+        ValueParameter<DoubleValue> currentInertia = null; 
+        if (creator.CollectedValues.ContainsKey("CurrentInertia")) {
+          currentInertia = (ValueParameter<DoubleValue>) creator.CollectedValues["CurrentInertia"]; 
+        } else {
+          currentInertia = new ValueParameter<DoubleValue>("CurrentInertia");
+          creator.CollectedValues.Add(currentInertia); 
+        }
+        currentInertia.ActualValue = InertiaParameter.ActualValue; 
       }
     }
@@ -307,16 +310,4 @@
     }
 
-    //private void InitVelocityBoundsUpdater() {
-    //  foreach (IDiscreteDoubleMatrixModifier matrixOp in ApplicationManager.Manager.GetInstances<IDiscreteDoubleMatrixModifier>()) {
-    //    VelocityBoundsUpdaterParameter.ValidValues.Add(matrixOp);
-    //    matrixOp.ValueParameter.ActualName = VelocityBoundsParameter.Name;
-    //    matrixOp.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
-    //    matrixOp.StartIndexParameter.Value = new IntValue(0);
-    //    matrixOp.IndexParameter.ActualName = "CurrentIteration";
-    //    matrixOp.EndValueParameter.Value = new DoubleValue(0);
-    //  }
-    //  VelocityBoundsUpdaterParameter.ValueChanged += new EventHandler(VelocityBoundsUpdaterParameter_ValueChanged);
-    //}
-
     private void InitInertiaUpdater() {
       foreach (IDiscreteDoubleValueModifier updater in InertiaUpdaterParameter.ValidValues) {
@@ -324,5 +315,5 @@
         updater.StartIndexParameter.Value = new IntValue(0);
         updater.IndexParameter.ActualName = "CurrentIteration";
-        updater.ValueParameter.ActualName = InertiaParameter.Name;
+        updater.ValueParameter.ActualName = "CurrentInertia"; 
         updater.StartValueParameter.Value = new DoubleValue(1);
         updater.EndValueParameter.Value = new DoubleValue(0);
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5642)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 5643)
@@ -71,4 +71,7 @@
       get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     }
+    public LookupParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
     public IValueLookupParameter<IOperator> EvaluatorParameter {
       get { return (IValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
@@ -112,4 +115,5 @@
 
       Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The variable collection where results should be stored."));
+      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
 
       Parameters.Add(new ValueLookupParameter<ISwarmUpdater>("SwarmUpdater", "The encoding-specific swarm updater."));
@@ -126,5 +130,4 @@
       UniformSubScopesProcessor uniformSubscopesProcessor2 = new UniformSubScopesProcessor();
       UniformSubScopesProcessor evaluationProcessor = new UniformSubScopesProcessor();
-      NeighborUpdater neighborUpdater = new NeighborUpdater();
       Placeholder swarmUpdater = new Placeholder();
       IntCounter currentIterationCounter = new IntCounter();
@@ -133,4 +136,5 @@
       Placeholder velocityBoundsUpdaterPlaceholder = new Placeholder();
       Placeholder inertiaUpdaterPlaceholder = new Placeholder();
+      SubScopesCounter subScopesCounter = new SubScopesCounter();
       #endregion
 
@@ -138,6 +142,6 @@
       OperatorGraph.InitialOperator = resultsCollector;
       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Iterations", null, "CurrentIteration"));
-      //resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Current Inertia", null, "Inertia"));
-      //resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Inertia", null, "CurrentInertia"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions"));
       resultsCollector.ResultsParameter.ActualName = "Results";
       resultsCollector.Successor = swarmUpdaterPlaceholer1;
@@ -159,8 +163,12 @@
       evaluationProcessor.Parallel = new BoolValue(true);
       evaluationProcessor.Operator = evaluatorPlaceholder;
-      evaluationProcessor.Successor = topologyUpdaterPlaceholder;
+      evaluationProcessor.Successor = subScopesCounter;
 
       evaluatorPlaceholder.Name = "(Evaluator)";
       evaluatorPlaceholder.OperatorParameter.ActualName = EvaluatorParameter.Name;
+
+      subScopesCounter.Name = "Increment EvaluatedSolutions";
+      subScopesCounter.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      subScopesCounter.Successor = topologyUpdaterPlaceholder; 
 
       topologyUpdaterPlaceholder.Name = "(TopologyUpdater)";
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 5642)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs	(revision 5643)
@@ -50,6 +50,6 @@
       get { return (ILookupParameter<RealVector>)Parameters["NeighborBest"]; }
     }
-    public LookupParameter<RealVector> BestPointParameter {
-      get { return (LookupParameter<RealVector>)Parameters["BestPoint"]; }
+    public LookupParameter<RealVector> BestRealVectorParameter {
+      get { return (LookupParameter<RealVector>)Parameters["BestRealVector"]; }
     }
     public ILookupParameter<RealVector> RealVectorParameter {
@@ -85,5 +85,5 @@
     }
     protected RealVector BestPoint {
-      get { return BestPointParameter.ActualValue; }
+      get { return BestRealVectorParameter.ActualValue; }
     }
     protected RealVector RealVector {
@@ -121,5 +121,5 @@
       Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity."));
       Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution."));
-      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Global best position."));
+      Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best position."));
       Parameters.Add(new LookupParameter<RealVector>("NeighborBest", "Best neighboring solution."));
       Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem."));
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 5642)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs	(revision 5643)
@@ -63,6 +63,6 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["BestQuality"]; }
     }
-    public ILookupParameter<RealVector> BestPointParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["BestPoint"]; }
+    public ILookupParameter<RealVector> BestRealVectorParameter {
+      get { return (ILookupParameter<RealVector>)Parameters["BestRealVector"]; }
     }
     public IScopeTreeLookupParameter<IntArray> NeighborsParameter {
@@ -82,7 +82,7 @@
       set { BestQualityParameter.ActualValue = value; }
     }
-    private RealVector BestPoint {
-      get { return BestPointParameter.ActualValue; }
-      set { BestPointParameter.ActualValue = value; }
+    private RealVector BestRealVector {
+      get { return BestRealVectorParameter.ActualValue; }
+      set { BestRealVectorParameter.ActualValue = value; }
     }
     private ItemArray<DoubleValue> Quality {
@@ -131,5 +131,5 @@
       : base() {
       Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Overall best quality."));
-      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Global best particle position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best particle position"));
       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "Particle's quality"));
       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("PersonalBestQuality", "Particle's personal best quality"));
@@ -161,5 +161,5 @@
         BestQuality = new DoubleValue();
       BestQuality.Value = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value);
-      BestPoint = (RealVector)RealVector[Quality.FindIndex(v => v.Value == BestQuality.Value)].Clone();
+      BestRealVector = (RealVector)RealVector[Quality.FindIndex(v => v.Value == BestQuality.Value)].Clone();
     }
 
