Index: trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleCreator.cs	(revision 5560)
+++ trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleCreator.cs	(revision 5592)
@@ -20,81 +20,80 @@
 #endregion
 
-using System; 
-using HeuristicLab.Operators;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
   [Item("RealVectorParticleCreator", "Creates a particle with position, zero velocity vector and personal best.")]
   [StorableClass]
-  public class RealVectorParticleCreator : SingleSuccessorOperator, IRealVectorParticleCreator {
-    #region IRealVectorParticleCreator Members
+  public class RealVectorParticleCreator : AlgorithmOperator, IRealVectorParticleCreator {
+
+    #region Parameters
     public ILookupParameter<IntValue> ProblemSizeParameter {
-     get { return (ILookupParameter<IntValue>)Parameters["ProblemSize"]; }
+      get { return (ILookupParameter<IntValue>)Parameters["ProblemSize"]; }
     }
-
+    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
     public ILookupParameter<RealVector> RealVectorParameter {
       get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
     }
-
     public ILookupParameter<RealVector> PersonalBestParameter {
       get { return (ILookupParameter<RealVector>)Parameters["PersonalBest"]; }
     }
-
-    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
-      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
-    }
-
     public ILookupParameter<RealVector> VelocityParameter {
       get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; }
     }
-
     #endregion
 
-    public RealVectorParticleCreator() : base() {
+    #region Parameter Values
+    protected int ProblemSize {
+      get { return ProblemSizeParameter.ActualValue.Value; }
+    }
+    protected RealVector Velocity {
+      set { VelocityParameter.ActualValue = value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+    [StorableConstructor]
+    protected RealVectorParticleCreator(bool deserializing) : base(deserializing) { }
+    protected RealVectorParticleCreator(RealVectorParticleCreator original, Cloner cloner) : base(original, cloner) { }
+    public RealVectorParticleCreator()
+      : base() {
       Parameters.Add(new LookupParameter<IntValue>("ProblemSize", "The dimension of the problem."));
       Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
       Parameters.Add(new LookupParameter<RealVector>("RealVector", "Particle's current solution"));
       Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution."));
-      Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity."));   
-    }
+      Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity."));
 
-    public override IOperation Apply() {
-      VelocityParameter.ActualValue = new RealVector(ProblemSizeParameter.ActualValue.Value);
-      UniformRandomRealVectorCreator realVectorCreater = new UniformRandomRealVectorCreator(); 
+      UniformRandomRealVectorCreator realVectorCreater = new UniformRandomRealVectorCreator();
       Assigner personalBestPositionAssigner = new Assigner();
 
-      this.Name = "Particle Creator";
+      OperatorGraph.InitialOperator = realVectorCreater;
 
-      //realVectorCreater.Name = "(SolutionCreator)";
-      realVectorCreater.RealVectorParameter.ActualName = "RealVector";
+      realVectorCreater.RealVectorParameter.ActualName = RealVectorParameter.Name;
       realVectorCreater.LengthParameter.ActualName = ProblemSizeParameter.Name;
-      realVectorCreater.BoundsParameter.ActualName = BoundsParameter.Name; 
+      realVectorCreater.BoundsParameter.ActualName = BoundsParameter.Name;
       realVectorCreater.Successor = personalBestPositionAssigner;
 
-      personalBestPositionAssigner.LeftSideParameter.ActualName = "PersonalBest";
-      personalBestPositionAssigner.RightSideParameter.ActualName = "RealVector";
-      personalBestPositionAssigner.Successor = null; 
-
-      OperationCollection next = new OperationCollection();
-      next.Add(ExecutionContext.CreateChildOperation(realVectorCreater));
-      next.Add(base.Apply());
-      return next;
+      personalBestPositionAssigner.LeftSideParameter.ActualName = PersonalBestParameter.Name;
+      personalBestPositionAssigner.RightSideParameter.ActualName = RealVectorParameter.Name;
+      personalBestPositionAssigner.Successor = null;
     }
-
     public override IDeepCloneable Clone(Cloner cloner) {
       return new RealVectorParticleCreator(this, cloner);
     }
+    #endregion
 
-    protected RealVectorParticleCreator(RealVectorParticleCreator original, Cloner cloner)
-      : base(original, cloner) {
+    public override IOperation Apply() {
+      Velocity = new RealVector(ProblemSize);
+      return base.Apply();
     }
 
-    [StorableConstructor]
-    protected RealVectorParticleCreator(bool deserializing) : base(deserializing) { }
+
   }
 }
