Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs	(revision 3123)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs	(revision 3124)
@@ -66,31 +66,40 @@
     }
 
-    public sealed override IOperation Apply() {
-      BinaryVector v = BinaryVectorParameter.ActualValue;
-      int capacity = KnapsackCapacityParameter.ActualValue.Value;
-      double penalty = PenaltyParameter.ActualValue.Value;
-
-      if (WeightsParameter.ActualValue.Length != ValuesParameter.ActualValue.Length)
+    public static DoubleValue Apply(BinaryVector v, IntValue capacity, DoubleValue penalty, IntArray weights, IntArray values) {
+      if (weights.Length != values.Length)
         throw new InvalidOperationException("The weights and values parameters of the Knapsack problem have different sizes"); 
+      
+      double quality = 0;
 
       int weight = 0;
       int value = 0;
-      double quality = 0;
 
       for (int i = 0; i < v.Length; i++) {
         if (v[i]) {
-          weight += WeightsParameter.ActualValue[i];
-          value += ValuesParameter.ActualValue[i];
+          weight += weights[i];
+          value += values[i];
         }
       }
 
-      if (weight > capacity) {
+      if (weight > capacity.Value) {
         quality =
-          value - penalty * (weight - capacity);
+          value - penalty.Value * (weight - capacity.Value);
       } else {
         quality = value;
       }
 
-      QualityParameter.ActualValue = new DoubleValue(quality);
+      return new DoubleValue(quality);
+    }
+
+    public sealed override IOperation Apply() {
+      BinaryVector v = BinaryVectorParameter.ActualValue;
+
+      DoubleValue quality = Apply(BinaryVectorParameter.ActualValue,
+        KnapsackCapacityParameter.ActualValue, 
+        PenaltyParameter.ActualValue, 
+        WeightsParameter.ActualValue, 
+        ValuesParameter.ActualValue);
+
+      QualityParameter.ActualValue = quality;
 
       return base.Apply();
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3123)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3124)
@@ -85,5 +85,8 @@
     <Compile Include="Interfaces\IKnapsackEvaluator.cs" />
     <Compile Include="Interfaces\IKnapsackSolutionsVisualizer.cs" />
+    <Compile Include="Interfaces\IKnapsackMoveEvaluator.cs" />
     <Compile Include="Knapsack.cs" />
+    <Compile Include="MoveEvaluators\KnapsackMoveEvaluator.cs" />
+    <Compile Include="MoveEvaluators\KnapsackOneBitflipMoveEvaluator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs	(revision 3124)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs	(revision 3124)
@@ -0,0 +1,34 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+
+namespace HeuristicLab.Problems.Knapsack {
+  public interface IKnapsackMoveEvaluator : ISingleObjectiveMoveEvaluator, IMoveOperator {
+    ILookupParameter<IntValue> KnapsackCapacityParameter { get; }
+    ILookupParameter<DoubleValue> PenaltyParameter { get; }
+    ILookupParameter<IntArray> WeightsParameter { get; }
+    ILookupParameter<IntArray> ValuesParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Knapsack.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Knapsack.cs	(revision 3123)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Knapsack.cs	(revision 3124)
@@ -235,4 +235,10 @@
       OnVisualizerChanged();
     }
+    void OneBitflipMoveParameter_ActualNameChanged(object sender, EventArgs e) {
+      string name = ((ILookupParameter<OneBitflipMove>)sender).ActualName;
+      foreach (IOneBitflipMoveOperator op in Operators.OfType<IOneBitflipMoveOperator>()) {
+        op.OneBitflipMoveParameter.ActualName = name;
+      }
+    }
     #endregion
 
@@ -274,4 +280,13 @@
         ParameterizeOperators();
       }
+
+      InitializeMoveGenerators();
+    }
+    private void InitializeMoveGenerators() {
+      foreach (IOneBitflipMoveOperator op in Operators.OfType<IOneBitflipMoveOperator>()) {
+        if (op is IMoveGenerator) {
+          op.OneBitflipMoveParameter.ActualNameChanged += new EventHandler(OneBitflipMoveParameter_ActualNameChanged);
+        }
+      }
     }
     private void ParameterizeOperators() {
@@ -283,4 +298,13 @@
         op.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
       }
+      foreach (IBinaryVectorMoveOperator op in Operators.OfType<IBinaryVectorMoveOperator>()) {
+        op.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
+      }
+      foreach (IKnapsackMoveEvaluator op in Operators.OfType<IKnapsackMoveEvaluator>()) {
+        op.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
+        op.PenaltyParameter.ActualName = PenaltyParameter.Name;
+        op.WeightsParameter.ActualName = WeightsParameter.Name;
+        op.ValuesParameter.ActualName = ValuesParameter.Name;
+      }
     }
     #endregion
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs	(revision 3124)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs	(revision 3124)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+
+namespace HeuristicLab.Problems.Knapsack {
+  /// <summary>
+  /// A base class for operators which evaluate Knapsack moves.
+  /// </summary>
+  [Item("KnapsackMoveEvaluator", "A base class for operators which evaluate Knapsack moves.")]
+  [StorableClass]
+  public abstract class KnapsackMoveEvaluator : SingleSuccessorOperator, IKnapsackMoveEvaluator, IMoveOperator, IBinaryVectorMoveOperator {
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter<BinaryVector> BinaryVectorParameter {
+      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
+    }
+    public ILookupParameter<IntValue> KnapsackCapacityParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["KnapsackCapacity"]; }
+    }
+    public ILookupParameter<DoubleValue> PenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Penalty"]; }
+    }
+    public ILookupParameter<IntArray> WeightsParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Weights"]; }
+    }
+    public ILookupParameter<IntArray> ValuesParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Values"]; }
+    }
+
+    protected KnapsackMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a Knapsack solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a Knapsack solution."));
+      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The solution as BinaryVector."));
+      Parameters.Add(new LookupParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack."));
+      Parameters.Add(new LookupParameter<IntArray>("Weights", "The weights of the items."));
+      Parameters.Add(new LookupParameter<IntArray>("Values", "The values of the items."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Penalty", "The penalty value for each unit of overweight."));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs	(revision 3124)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs	(revision 3124)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+
+namespace HeuristicLab.Problems.Knapsack {
+  /// <summary>
+  /// An operator to evaluate one bitflip moves.
+  /// </summary>
+  [Item("KnapsackOneBitflipMoveEvaluator", "Base class for evaluating one bitflip moves.")]
+  [StorableClass]
+  public class KnapsackOneBitflipMoveEvaluator : KnapsackMoveEvaluator, IOneBitflipMoveOperator {
+    public ILookupParameter<OneBitflipMove> OneBitflipMoveParameter {
+      get { return (ILookupParameter<OneBitflipMove>)Parameters["OneBitflipMove"]; }
+    }
+
+    public KnapsackOneBitflipMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<OneBitflipMove>("OneBitflipMove", "The move to evaluate."));
+    }
+
+    public override IOperation Apply() {
+      BinaryVector binaryVector = BinaryVectorParameter.ActualValue;
+      OneBitflipMove move = OneBitflipMoveParameter.ActualValue;
+
+      BinaryVector newSolution = new BinaryVector(binaryVector);
+      newSolution[move.Index] = !newSolution[move.Index];
+
+      DoubleValue quality = KnapsackEvaluator.Apply(BinaryVectorParameter.ActualValue,
+        KnapsackCapacityParameter.ActualValue,
+        PenaltyParameter.ActualValue,
+        WeightsParameter.ActualValue,
+        ValuesParameter.ActualValue);
+
+      double moveQuality = quality.Value;
+      
+      if (MoveQualityParameter.ActualValue == null) MoveQualityParameter.ActualValue = new DoubleValue(moveQuality);
+      else MoveQualityParameter.ActualValue.Value = moveQuality;
+      return base.Apply();
+    }
+  }
+}
