Index: /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5310)
+++ /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5311)
@@ -110,6 +110,6 @@
   <ItemGroup>
     <Compile Include="BestPointInitializer.cs" />
-    <Compile Include="WeightedValueModifierSelector.cs" />
-    <Compile Include="ValueModifierSelector.cs" />
+    <Compile Include="IDiscreteDoubleMatrixModifier.cs" />
+    <Compile Include="VelocityBoundsModifier.cs" />
     <Compile Include="RandomTopologyInitializer.cs" />
     <Compile Include="VonNeumannTopologyInitializer.cs" />
Index: /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs	(revision 5311)
+++ /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs	(revision 5311)
@@ -0,0 +1,21 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public interface IDiscreteDoubleMatrixModifier : IItem {
+    ILookupParameter<DoubleMatrix> ValueParameter { get; }
+    IValueLookupParameter<DoubleValue> ScaleParameter { get; }
+    ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter { get; }
+    IValueLookupParameter<DoubleValue> StartValueParameter { get; }
+    IValueLookupParameter<DoubleValue> EndValueParameter { get; }
+    ILookupParameter<IntValue> IndexParameter { get; }
+    IValueLookupParameter<IntValue> StartIndexParameter { get; }
+    IValueLookupParameter<IntValue> EndIndexParameter { get; }
+  }
+}
Index: /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5310)
+++ /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5311)
@@ -54,9 +54,9 @@
       set { AnalyzerParameter.Value = value; }
     }
-    public ValueModifierSelector OmegaUpdater {
+    public IDiscreteDoubleValueModifier OmegaUpdater {
       get { return OmegaUpdaterParameter.Value; }
       set { OmegaUpdaterParameter.Value = value; }
     }
-    public WeightedValueModifierSelector VelocityBoundsUpdater {
+    public IDiscreteDoubleMatrixModifier VelocityBoundsUpdater {
       get { return VelocityBoundsUpdaterParameter.Value; }
       set { VelocityBoundsUpdaterParameter.Value = value; }
@@ -101,9 +101,9 @@
       get { return (ConstrainedValueParameter<ITopologyUpdater>)Parameters["TopologyUpdater"]; }
     }
-    public ValueParameter<WeightedValueModifierSelector> VelocityBoundsUpdaterParameter {
-      get { return (ValueParameter<WeightedValueModifierSelector>)Parameters["VelocityBoundsUpdater"]; }
-    }
-    public ValueParameter<ValueModifierSelector> OmegaUpdaterParameter {
-      get { return (ValueParameter<ValueModifierSelector>)Parameters["OmegaUpdater"]; }
+    public OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier> VelocityBoundsUpdaterParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier>)Parameters["VelocityBoundsUpdater"]; }
+    }
+    public OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier> OmegaUpdaterParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["OmegaUpdater"]; }
     }
     #endregion
@@ -112,7 +112,4 @@
     [Storable]
     private BestAverageWorstQualityAnalyzer qualityAnalyzer;
-
-    //[Storable]
-    //private IDiscreteDoubleValueModifier omegaModifier;
     #endregion
 
@@ -122,5 +119,4 @@
       : base(original, cloner) {
       qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
-      //omegaModifier = cloner.Clone(original.omegaModifier);
     }
 
@@ -144,6 +140,7 @@
       //Parameters.Add(new ValueParameter<MultiParameterUpdater>("ParameterUpdater", "Updates the algorithm parameters according to some strategy",
       //  new MultiParameterUpdater()));
-      Parameters.Add(new ValueParameter<ValueModifierSelector>("OmegaUpdater", "Updates the omega parameter", new ValueModifierSelector())); 
-      Parameters.Add(new ValueParameter<WeightedValueModifierSelector>("VelocityBoundsUpdater", "Adjusts the velocity bounds", new WeightedValueModifierSelector())); 
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("OmegaUpdater", "Updates the omega parameter"));
+      //Parameters.Add(new ValueParameter<MatrixValueModifierSelector>("VelocityBoundsUpdater", "Adjusts the velocity bounds", new MatrixValueModifierSelector())); 
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleMatrixModifier>("VelocityBoundsUpdater", "Adjusts the velocity bounds."));
       ParticleUpdaterParameter.ActualValue = ParticleUpdaterParameter.ValidValues.SingleOrDefault(v => v.GetType() == typeof(TotallyConnectedParticleUpdater));
       TopologyInitializerParameter.ActualValue = TopologyInitializerParameter.ValidValues.SingleOrDefault(v => v.GetType() == typeof(EmptyTopologyInitializer));
@@ -254,6 +251,8 @@
 
       InitializeAnalyzers();
-      InitializeUpdaters(); 
+      InitVelocityBoundsUpdater();
       UpdateAnalyzers();
+      UpdateOmegaUpdater();
+      InitOmegaUpdater();
     }
 
@@ -309,25 +308,46 @@
     }
 
-    private void InitializeUpdaters() {
-      OmegaUpdater.ValueParameter.ActualName = OmegaParameter.Name;
-      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) {
-        OmegaUpdater.ModifierParameter.ValidValues.Add(op);
-        op.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
-        op.StartIndexParameter.Value = new IntValue(0);
-        op.IndexParameter.ActualName = "CurrentIteration";
-        op.ValueParameter.ActualName = OmegaUpdater.ValueParameter.ActualName;
-        op.StartValueParameter.Value = new DoubleValue(OmegaParameter.Value.Value);
-        op.EndValueParameter.Value = new DoubleValue(-2);
-      }
-      VelocityBoundsUpdater.ValueParameter.ActualName = VelocityBoundsParameter.Name;
-      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) {
-        VelocityBoundsUpdater.ModifierParameter.ValidValues.Add(op);
-        op.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
-        op.StartIndexParameter.Value = new IntValue(0);
-        op.IndexParameter.ActualName = "CurrentIteration";
-        op.ValueParameter.ActualName = VelocityBoundsUpdater.ScaleParameter.Name;
-        op.StartValueParameter.Value = new DoubleValue(VelocityBoundsUpdater.ScaleParameter.Value.Value);
-        op.EndValueParameter.Value = new DoubleValue(0);
+    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);
+    }
+
+    void VelocityBoundsUpdaterParameter_ValueChanged(object sender, EventArgs e) {
+      if (VelocityBoundsParameter.Value != null) {
+        foreach (IDiscreteDoubleMatrixModifier matrixOp in VelocityBoundsUpdaterParameter.Value.ScalingOperatorParameter.ValidValues) {
+            matrixOp.ValueParameter.ActualName = VelocityBoundsUpdater.ScaleParameter.Name;
+            matrixOp.StartValueParameter.Value = new DoubleValue(VelocityBoundsUpdater.ScaleParameter.ActualValue.Value);
         }
+      }
+    }
+
+    private void InitOmegaUpdater() {
+      foreach (IDiscreteDoubleValueModifier updater in OmegaUpdaterParameter.ValidValues) {
+        updater.EndIndexParameter.ActualName = MaxIterationsParameter.Name;
+        updater.StartIndexParameter.Value = new IntValue(0);
+        updater.IndexParameter.ActualName = "CurrentIteration";
+        updater.ValueParameter.ActualName = OmegaParameter.Name;
+        updater.StartValueParameter.Value = new DoubleValue(1);
+        updater.EndValueParameter.Value = new DoubleValue(0);
+      }
+    }
+
+    private void UpdateOmegaUpdater() {
+      IDiscreteDoubleValueModifier oldOmegaUpdater = OmegaUpdater;
+      OmegaUpdaterParameter.ValidValues.Clear();
+      foreach (IDiscreteDoubleValueModifier updater in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name)) {
+        OmegaUpdaterParameter.ValidValues.Add(updater);
+      }
+      if (oldOmegaUpdater != null) {
+        IDiscreteDoubleValueModifier updater = OmegaUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldOmegaUpdater.GetType());
+        if (updater != null) OmegaUpdaterParameter.Value = updater;
+      }
     }
 
Index: anches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ValueModifierSelector.cs
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ValueModifierSelector.cs	(revision 5310)
+++ 	(revision )
@@ -1,47 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Common;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
-  public class ValueModifierSelector : SingleSuccessorOperator {
-    public ILookupParameter<Item> ValueParameter {
-      get { return (ILookupParameter<Item>)Parameters["Value"]; }
-    }
-
-    public ConstrainedValueParameter<IOperator> ModifierParameter {
-      get { return (ConstrainedValueParameter<IOperator>)Parameters["Modifier"]; }
-    }
-
-    public ValueModifierSelector() : base() {
-      Parameters.Add(new LookupParameter<Item>("Value", "The double value to modify."));
-      Parameters.Add(new ConstrainedValueParameter<IOperator>("Modifier", "Modifies the value", new ItemSet<IOperator>()));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ValueModifierSelector(this, cloner);
-    }
-
-    protected ValueModifierSelector(ValueModifierSelector original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    [StorableConstructor]
-    protected ValueModifierSelector(bool deserializing) : base(deserializing) { }
-
-    public override IOperation Apply() {
-      OperationCollection next = new OperationCollection();
-      next.Add(ExecutionContext.CreateOperation(this.ModifierParameter.Value));
-      next.Add(base.Apply());
-      return next;
-    }
-  }
-}
Index: /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs	(revision 5311)
+++ /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs	(revision 5311)
@@ -0,0 +1,146 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class VelocityBoundsModifier : SingleSuccessorOperator, IDiscreteDoubleMatrixModifier {
+    public ILookupParameter<DoubleMatrix> ValueParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Matrix"]; }
+    }
+
+    public IValueLookupParameter<DoubleValue> ScaleParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["Scale"]; }
+    }
+
+    public ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter {
+      get { return (ConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ScalingOperator"]; }
+    }
+
+    public IValueLookupParameter<DoubleValue> StartValueParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["StartValue"]; }
+    }
+
+    public IValueLookupParameter<DoubleValue> EndValueParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["EndValue"]; }
+    }
+
+    public ILookupParameter<IntValue> IndexParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Index"]; }
+    }
+
+    public IValueLookupParameter<IntValue> StartIndexParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["StartIndex"]; }
+    }
+
+    public IValueLookupParameter<IntValue> EndIndexParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["EndIndex"]; }
+    }
+
+    public VelocityBoundsModifier() : base() {
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Matrix", "The double matrix to modify."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("Scale", "Scale parameter."));
+      Parameters.Add(new ConstrainedValueParameter<IDiscreteDoubleValueModifier>("ScalingOperator", "Modifies the value"));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("StartValue", "The start value of 'Value'.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("EndValue", "The end value of 'Value'."));
+      Parameters.Add(new LookupParameter<IntValue>("Index", "The current index."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("StartIndex", "The start index at which to start modifying 'Value'."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("EndIndex", "The end index by which 'Value' should have reached 'EndValue'."));
+      Initialize();
+    }
+
+    private void Initialize() {
+      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) {
+        ScalingOperatorParameter.ValidValues.Add(op);
+        op.ValueParameter.ActualName = ScaleParameter.ActualName;
+      }
+      ScaleParameter.ActualNameChanged += new EventHandler(ScaleParameter_ActualNameChanged);
+      StartValueParameter.ActualNameChanged += new EventHandler(StartValueParameter_ActualNameChanged);
+      EndValueParameter.ActualNameChanged += new EventHandler(EndValueParameter_ActualNameChanged);
+      IndexParameter.ActualNameChanged += new EventHandler(IndexParameter_ActualNameChanged);
+      EndIndexParameter.ActualNameChanged += new EventHandler(EndIndexParameter_ActualNameChanged);
+      StartIndexParameter.ActualNameChanged += new EventHandler(StartIndexParameter_ActualNameChanged);
+    }
+
+    #region Events
+    private void ScaleParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.ValueParameter.ActualName = ScaleParameter.ActualName;
+      }
+    }
+
+    private void StartValueParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.StartValueParameter.ActualName = StartValueParameter.ActualName;
+      }
+    }
+
+    private void EndValueParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.EndValueParameter.ActualName = EndValueParameter.ActualName;
+      }
+    }
+
+    private void IndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.IndexParameter.ActualName = IndexParameter.ActualName;
+      }
+    }
+
+    private void StartIndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.StartIndexParameter.ActualName = StartIndexParameter.ActualName;
+      }
+    }
+
+    private void EndIndexParameter_ActualNameChanged(object sender, EventArgs e) {
+      foreach (IDiscreteDoubleValueModifier modifier in ScalingOperatorParameter.ValidValues) {
+        modifier.EndIndexParameter.ActualName = EndIndexParameter.ActualName;
+      }
+    }
+    #endregion
+
+
+    #region Cloning
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VelocityBoundsModifier(this, cloner);
+    }
+
+    protected VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner)
+      : base(original, cloner) {
+        Initialize();
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected VelocityBoundsModifier(bool deserializing) : base(deserializing) { }
+
+    public override IOperation Apply() {
+      OperationCollection next = new OperationCollection();
+      DoubleMatrix matrix = ValueParameter.ActualValue;
+      if (this.ScaleParameter.ActualValue == null && this.StartValueParameter.ActualValue != null) {
+        this.ScaleParameter.ActualValue = new DoubleValue(StartValueParameter.ActualValue.Value);
+      }
+      for (int i = 0; i < matrix.Rows; i++) {
+        for (int j = 0; j < matrix.Columns; j++) {
+          if (matrix[i, j] >= 0) {
+            matrix[i, j] = ScaleParameter.ActualValue.Value;
+          } else {
+            matrix[i, j] = (-1) * ScaleParameter.ActualValue.Value;
+          }
+        }
+      }
+      next.Add(ExecutionContext.CreateChildOperation(this.ScalingOperatorParameter.Value));
+      next.Add(base.Apply());
+      return next;
+    }
+  }
+}
Index: anches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/WeightedValueModifierSelector.cs
===================================================================
--- /branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/WeightedValueModifierSelector.cs	(revision 5310)
+++ 	(revision )
@@ -1,58 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Common;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
-  public class WeightedValueModifierSelector : SingleSuccessorOperator {
-    public IValueParameter<DoubleValue> ScaleParameter {
-      get { return (IValueParameter<DoubleValue>)Parameters["Scale"]; }
-    }
-
-    public ILookupParameter<DoubleMatrix> ValueParameter {
-      get { return (ILookupParameter<DoubleMatrix>)Parameters["Matrix"]; }
-    }
-
-    public ConstrainedValueParameter<IOperator> ModifierParameter {
-      get { return (ConstrainedValueParameter<IOperator>)Parameters["Modifier"]; }
-    }
-
-    public WeightedValueModifierSelector() : base() {
-      Parameters.Add(new LookupParameter<DoubleMatrix>("Matrix", "The double matrix to scale."));
-      Parameters.Add(new ValueParameter<DoubleValue>("Scale", "The double value to modify.", new DoubleValue(1)));
-      Parameters.Add(new ConstrainedValueParameter<IOperator>("Modifier", "Modifies the value", new ItemSet<IOperator>()));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new WeightedValueModifierSelector(this, cloner);
-    }
-
-    protected WeightedValueModifierSelector(WeightedValueModifierSelector original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    [StorableConstructor]
-    protected WeightedValueModifierSelector(bool deserializing) : base(deserializing) { }
-
-    public override IOperation Apply() {
-      OperationCollection next = new OperationCollection();
-      DoubleMatrix matrix = ValueParameter.ActualValue;
-      for (int i = 0; i < matrix.Rows; i++) {
-        for (int j = 0; j < matrix.Columns; j++) {
-          ValueParameter.ActualValue[i, j] *= ScaleParameter.Value.Value;
-        }
-      }
-      next.Add(ExecutionContext.CreateChildOperation(this.ModifierParameter.Value));
-      next.Add(base.Apply());
-      return next;
-    }
-  }
-}
