Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml	(revision 15182)
@@ -30,45 +30,44 @@
              MouseWheel="Container3DView_OnMouseWheel" 
              MouseEnter="Container3DView_OnMouseEnter"
-             KeyDown="Container3DView_OnKeyDown"
              Focusable="true"
              >
     <Grid>
-        <Viewport3D Name="viewport3D1" >
-            <Viewport3D.Camera>
-                <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1"> <!-- camera position for design time-->
-                </PerspectiveCamera>
-            </Viewport3D.Camera>
-            <ModelVisual3D>
-                <ModelVisual3D.Content>
-                    <DirectionalLight x:Name="dirLightMain" Direction="0,-1,-1"/>
-                </ModelVisual3D.Content>
-            </ModelVisual3D>
-            <ModelVisual3D>
-            </ModelVisual3D>
-            <ModelVisual3D x:Name="MyModel">
-                <ModelVisual3D.Content>
-                    <Model3DGroup>
-                    </Model3DGroup>
-                </ModelVisual3D.Content>
-                <ModelVisual3D.Transform>
-                    <Transform3DGroup>
-                        <ScaleTransform3D x:Name="scale" ScaleX="1" ScaleY="1" ScaleZ="1"/>
-                        <TranslateTransform3D OffsetX="-0.5" OffsetY="-0.5" OffsetZ="-0.5" />
-                        <RotateTransform3D>
-                            <RotateTransform3D.Rotation>
-                                <AxisAngleRotation3D x:Name="rotateX" Axis="0 1 0"/>
-                            </RotateTransform3D.Rotation>
-                        </RotateTransform3D>
-                        <RotateTransform3D>
-                            <RotateTransform3D.Rotation>
-                                <AxisAngleRotation3D x:Name="rotateY" Axis="1 0 0"/>
-                            </RotateTransform3D.Rotation>
-                        </RotateTransform3D>
-                        <TranslateTransform3D OffsetX="0.5" OffsetY="0.5" OffsetZ="0.5" />
-                        <ScaleTransform3D x:Name="scaleZoom" CenterX="0.5" CenterY="0.5" CenterZ="0.5" ScaleX="1" ScaleY="1" ScaleZ="1"/>
-                    </Transform3DGroup>
-                </ModelVisual3D.Transform>
-            </ModelVisual3D>
-        </Viewport3D>
+        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
+            <Viewport3D Name="viewport3D1" >
+                <Viewport3D.Camera>
+                    <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1"> <!-- camera position for design time-->
+                    </PerspectiveCamera>
+                </Viewport3D.Camera>
+                <ModelVisual3D>
+                    <ModelVisual3D.Content>
+                        <DirectionalLight x:Name="dirLightMain" Direction="0,-1,-1"/>
+                    </ModelVisual3D.Content>
+                </ModelVisual3D>
+                <ModelVisual3D>
+                </ModelVisual3D>
+                <ModelVisual3D x:Name="MyModel">
+                    <ModelVisual3D.Content>
+                        <Model3DGroup>
+                        </Model3DGroup>
+                    </ModelVisual3D.Content>
+                    <ModelVisual3D.Transform>
+                        <Transform3DGroup>
+                            <ScaleTransform3D x:Name="scale" ScaleX="1" ScaleY="1" ScaleZ="1"/>
+                            <RotateTransform3D x:Name="rotateX">
+                                <RotateTransform3D.Rotation>
+                                    <AxisAngleRotation3D Axis="0 1 0"/>
+                                </RotateTransform3D.Rotation>
+                            </RotateTransform3D>
+                            <RotateTransform3D x:Name="rotateY">
+                                <RotateTransform3D.Rotation>
+                                    <AxisAngleRotation3D Axis="1 0 0"/>
+                                </RotateTransform3D.Rotation>
+                            </RotateTransform3D>
+                            <ScaleTransform3D x:Name="scaleZoom" ScaleX="1" ScaleY="1" ScaleZ="1"/>
+                        </Transform3DGroup>
+                    </ModelVisual3D.Transform>
+                </ModelVisual3D>
+            </Viewport3D>
+        </Border>
     </Grid>
 </UserControl>
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15182)
@@ -46,5 +46,5 @@
       Color.FromRgb(0x63, 0xC2, 0x16),
     };
-    
+
     private static readonly Color hiddenColor = Color.FromArgb(0x1A, 0xAA, 0xAA, 0xAA);
     private static readonly Color containerColor = Color.FromArgb(0x7F, 0xAA, 0xAA, 0xAA);
@@ -52,5 +52,4 @@
     private Point startPos;
     private bool mouseDown = false;
-    private bool ctrlDown = false;
     private double startAngleX;
     private double startAngleY;
@@ -103,16 +102,43 @@
       var hiddenMaterial = new DiffuseMaterial(new SolidColorBrush(hiddenColor));
 
-      foreach (var item in packing.Items) {
-        var position = packing.Positions[item.Key];
-
-        var w = position.Rotated ? item.Value.Depth : item.Value.Width;
-        var h = item.Value.Height;
-        var d = position.Rotated ? item.Value.Width : item.Value.Depth;
-
-        var model = new GeometryModel3D { Geometry = new MeshGeometry3D() };
-        DiffuseMaterial material;
-        if (selectedItemKey >= 0 && selectedItemKey != item.Key)
-          material = hiddenMaterial;
-        else {
+      if (selectedItemKey >= 0) {
+        var selectedItem = packing.Items.Single(x => selectedItemKey == x.Key);
+        var selectedPos = packing.Positions[selectedItem.Key];
+
+        var colorIdx = selectedItem.Value.Material;
+        while (colorIdx < 0) colorIdx += colors.Length;
+        colorIdx = colorIdx % colors.Length;
+        var color = colors[colorIdx];
+        var material = new DiffuseMaterial { Brush = new SolidColorBrush(color) };
+        materials[selectedItem.Value.Material] = material;
+
+        var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
+        AddSolidCube((MeshGeometry3D)selectedModel.Geometry, selectedPos.X, selectedPos.Y, selectedPos.Z,
+          selectedPos.Rotated ? selectedItem.Value.Depth : selectedItem.Value.Width,
+          selectedItem.Value.Height,
+          selectedPos.Rotated ? selectedItem.Value.Width : selectedItem.Value.Depth);
+        modelGroup.Children.Add(selectedModel);
+
+        foreach (var item in packing.Items.Where(x => selectedItemKey != x.Key)) {
+          var position = packing.Positions[item.Key];
+
+          var w = position.Rotated ? item.Value.Depth : item.Value.Width;
+          var h = item.Value.Height;
+          var d = position.Rotated ? item.Value.Width : item.Value.Depth;
+
+          var model = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = hiddenMaterial };
+          AddWireframeCube((MeshGeometry3D)model.Geometry, position.X, position.Y, position.Z, w, h, d, 1);
+          modelGroup.Children.Add(model);
+        }
+      } else {
+        foreach (var item in packing.Items) {
+          var position = packing.Positions[item.Key];
+
+          var w = position.Rotated ? item.Value.Depth : item.Value.Width;
+          var h = item.Value.Height;
+          var d = position.Rotated ? item.Value.Width : item.Value.Depth;
+
+          var model = new GeometryModel3D { Geometry = new MeshGeometry3D() };
+          DiffuseMaterial material;
           if (!materials.TryGetValue(item.Value.Material, out material)) {
             var colorIdx = item.Value.Material;
@@ -123,9 +149,8 @@
             materials[item.Value.Material] = material;
           }
+          var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
+          AddSolidCube((MeshGeometry3D)selectedModel.Geometry, position.X, position.Y, position.Z, w, h, d);
+          modelGroup.Children.Add(selectedModel);
         }
-        model.Material = material;
-        modelGroup.Children.Add(model);
-
-        AddSolidCube((MeshGeometry3D)model.Geometry, position.X, position.Y, position.Z, w, h, d);
       }
 
@@ -140,7 +165,16 @@
       scale.ScaleZ = 1.0 / ratio;
 
-      scale.CenterX = .5;
-      scale.CenterY = .5;
-      scale.CenterZ = 0;
+      scaleZoom.CenterX = rotateX.CenterX = rotateY.CenterX = container.Width / (2.0 * ratio);
+      scaleZoom.CenterY = rotateX.CenterY = rotateY.CenterY = container.Height / (2.0 * ratio);
+      scaleZoom.CenterZ = rotateX.CenterZ = rotateY.CenterZ = container.Depth / (2.0 * ratio);
+
+      camMain.Position = new Point3D(
+        scaleZoom.CenterX,
+        3,
+        3);
+      camMain.LookDirection = new Vector3D(
+        0,
+        scaleZoom.CenterY - camMain.Position.Y,
+        scaleZoom.CenterZ - camMain.Position.Z);
     }
 
@@ -149,5 +183,5 @@
       ((Model3DGroup)MyModel.Content).Children.Clear();
       materials.Clear();
-      
+
       mouseDown = false;
       startAngleX = 0;
@@ -158,12 +192,12 @@
       if (!mouseDown) return;
       var pos = e.GetPosition((IInputElement)this);
-      
-      rotateX.Angle = startAngleX + (pos.X - startPos.X) / 4;
-      rotateY.Angle = startAngleY + (pos.Y - startPos.Y) / 4;
+
+      ((AxisAngleRotation3D)rotateX.Rotation).Angle = startAngleX + (pos.X - startPos.X) / 4;
+      ((AxisAngleRotation3D)rotateY.Rotation).Angle = startAngleY + (pos.Y - startPos.Y) / 4;
     }
 
     private void Container3DView_MouseDown(object sender, MouseButtonEventArgs e) {
-      startAngleX = rotateX.Angle;
-      startAngleY = rotateY.Angle;
+      startAngleX = ((AxisAngleRotation3D)rotateX.Rotation).Angle;
+      startAngleY = ((AxisAngleRotation3D)rotateY.Rotation).Angle;
       this.startPos = e.GetPosition((IInputElement)this);
       this.mouseDown = true;
@@ -189,9 +223,4 @@
       Focus(); // for mouse wheel events
     }
-
-    private void Container3DView_OnKeyDown(object sender, KeyEventArgs e) {
-      ctrlDown = e.Key.HasFlag(Key.LeftCtrl) || e.Key.HasFlag(Key.RightCtrl);
-    }
-
 
     #region helper for cubes
@@ -302,39 +331,116 @@
       mesh.Positions.Add(new Point3D(x + thickness, y + height, z + depth));
 
-      AddPlane(mesh, 0, 4, 6, 2);
-      AddPlane(mesh, 0, 3, 5, 4);
-
-      AddPlane(mesh, 4, 8, 10, 6);
-      AddPlane(mesh, 4, 7, 9, 8);
-
-      AddPlane(mesh, 8, 12, 14, 10);
-      AddPlane(mesh, 8, 11, 13, 12);
-
-      AddPlane(mesh, 0, 2, 14, 12);
-      AddPlane(mesh, 0, 12, 15, 1);
-
-      AddPlane(mesh, 0, 1, 17, 16);
-      AddPlane(mesh, 0, 16, 19, 3);
-
-      AddPlane(mesh, 4, 20, 23, 7);
-      AddPlane(mesh, 4, 5, 21, 20);
-
-      AddPlane(mesh, 8, 24, 27, 11);
-      AddPlane(mesh, 8, 9, 25, 24);
-
-      AddPlane(mesh, 12, 28, 31, 15);
-      AddPlane(mesh, 12, 13, 29, 28);
-
-      AddPlane(mesh, 16, 18, 22, 20);
-      AddPlane(mesh, 16, 20, 21, 19);
-
-      AddPlane(mesh, 20, 22, 26, 24);
-      AddPlane(mesh, 20, 24, 25, 23);
-
-      AddPlane(mesh, 24, 28, 29, 27);
-      AddPlane(mesh, 24, 26, 30, 28);
-
-      AddPlane(mesh, 28, 30, 18, 16);
-      AddPlane(mesh, 28, 16, 17, 31);
+      // Point 0, non-edge
+      mesh.Positions.Add(new Point3D(x + thickness, y, z + thickness));
+      mesh.Positions.Add(new Point3D(x, y + thickness, z + thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + thickness, z));
+
+      // Point 1, non-edge
+      mesh.Positions.Add(new Point3D(x + width, y + thickness, z + thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y, z + thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + thickness, z));
+
+      // Point 2, non-edge
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + height, z + thickness));
+      mesh.Positions.Add(new Point3D(x + width, y + height - thickness, z + thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + height - thickness, z));
+
+      // Point 3, non-edge
+      mesh.Positions.Add(new Point3D(x, y + height - thickness, z + thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + height, z + thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + height - thickness, z));
+
+      // Point 4, non-edge
+      mesh.Positions.Add(new Point3D(x + thickness, y, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x, y + thickness, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + thickness, z + depth));
+
+      // Point 5, non-edge
+      mesh.Positions.Add(new Point3D(x + width, y + thickness, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + thickness, z + depth));
+
+      // Point 6, non-edge
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + height, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + width, y + height - thickness, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + width - thickness, y + height - thickness, z + depth));
+
+      // Point 7, non-edge
+      mesh.Positions.Add(new Point3D(x, y + height - thickness, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + height, z + depth - thickness));
+      mesh.Positions.Add(new Point3D(x + thickness, y + height - thickness, z + depth));
+
+      // Draw the 24 corner plates
+      AddPlane(mesh, 0, 1, 32, 2);
+      AddPlane(mesh, 0, 2, 33, 3);
+      AddPlane(mesh, 0, 3, 34, 1);
+
+      AddPlane(mesh, 4, 6, 36, 7);
+      AddPlane(mesh, 4, 5, 35, 6);
+      AddPlane(mesh, 4, 7, 37, 5);
+
+      AddPlane(mesh, 8, 10, 39, 11);
+      AddPlane(mesh, 8, 9, 38, 10);
+      AddPlane(mesh, 8, 11, 40, 9);
+
+      AddPlane(mesh, 12, 13, 41, 14);
+      AddPlane(mesh, 12, 14, 42, 15);
+      AddPlane(mesh, 12, 15, 43, 13);
+
+      AddPlane(mesh, 16, 18, 44, 17);
+      AddPlane(mesh, 16, 19, 45, 18);
+      AddPlane(mesh, 16, 17, 46, 19);
+
+      AddPlane(mesh, 20, 23, 48, 22);
+      AddPlane(mesh, 20, 22, 47, 21);
+      AddPlane(mesh, 20, 21, 49, 23);
+
+      AddPlane(mesh, 24, 27, 51, 26);
+      AddPlane(mesh, 24, 26, 50, 25);
+      AddPlane(mesh, 24, 25, 52, 27);
+
+      AddPlane(mesh, 28, 31, 54, 30);
+      AddPlane(mesh, 28, 30, 53, 29);
+      AddPlane(mesh, 28, 29, 55, 31);
+
+      // Draw the connecting plates
+      // on the bottom
+      AddPlane(mesh, 1, 7, 36, 32);
+      AddPlane(mesh, 1, 34, 37, 7);
+
+      AddPlane(mesh, 5, 11, 39, 35);
+      AddPlane(mesh, 5, 37, 40, 11);
+
+      AddPlane(mesh, 9, 15, 42, 38);
+      AddPlane(mesh, 9, 40, 43, 15);
+
+      AddPlane(mesh, 13, 3, 33, 41);
+      AddPlane(mesh, 13, 43, 34, 3);
+
+      // between bottom and top
+      AddPlane(mesh, 2, 32, 44, 18);
+      AddPlane(mesh, 2, 18, 45, 33);
+
+      AddPlane(mesh, 6, 22, 48, 36);
+      AddPlane(mesh, 6, 35, 47, 22);
+
+      AddPlane(mesh, 10, 26, 51, 39);
+      AddPlane(mesh, 10, 38, 50, 26);
+
+      AddPlane(mesh, 14, 30, 54, 42);
+      AddPlane(mesh, 14, 41, 53, 30);
+
+      // on the top
+      AddPlane(mesh, 17, 44, 48, 23);
+      AddPlane(mesh, 17, 23, 49, 46);
+
+      AddPlane(mesh, 21, 47, 51, 27);
+      AddPlane(mesh, 21, 27, 52, 49);
+
+      AddPlane(mesh, 25, 50, 54, 31);
+      AddPlane(mesh, 25, 31, 55, 52);
+
+      AddPlane(mesh, 29, 19, 46, 55);
+      AddPlane(mesh, 29, 53, 45, 19);
     }
 
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15182)
@@ -83,5 +83,8 @@
         rotated ? item.Height : item.Width,
         rotated ? item.Width : item.Height,
-        item.TargetBin);
+        item.TargetBin) {
+        Material = item.Material,
+        Weight = item.Weight
+      };
 
       int epIndex = 0;
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/IntegerVectorProblem.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/IntegerVectorProblem.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/IntegerVectorProblem.cs	(revision 15182)
@@ -24,8 +24,10 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -52,4 +54,5 @@
       Encoding = new IntegerVectorEncoding(EncodedSolutionName, Items.Count, min: 0, max: LowerBound + 1); // NOTE: assumes that all items can be packed into LowerBound+1 bins
       AddOperators();
+      Parameterize();
       RegisterEventHandlers();
     }
@@ -63,23 +66,26 @@
     }
 
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      Parameterize();
+    }
 
     private void AddOperators() {
-
       // move operators are not yet supported (TODO)
       Operators.RemoveAll(x => x is SingleObjectiveMoveGenerator);
       Operators.RemoveAll(x => x is SingleObjectiveMoveMaker);
       Operators.RemoveAll(x => x is SingleObjectiveMoveEvaluator);
+      Operators.Add(new HammingSimilarityCalculator());
+      Operators.Add(new EuclideanSimilarityCalculator());
+      Operators.Add(new QualitySimilarityCalculator());
+      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
 
-      Encoding.ConfigureOperators(Operators.OfType<IOperator>()); // gkronber: not strictly necessary (only when customer ops are added)
+      Encoding.ConfigureOperators(Operators.OfType<IOperator>());
     }
 
     private void RegisterEventHandlers() {
       // update encoding length when number of items is changed
-      ItemsParameter.ValueChanged += (sender, args) => Encoding.Length = Items.Count;
-      LowerBoundParameter.Value.ValueChanged += (sender, args) => {
-        for (int i = 0; i < Encoding.Bounds.Rows; i++) {
-          Encoding.Bounds[i, 1] = LowerBound + 1;
-        }
-      };
+      ItemsParameter.ValueChanged += (sender, args) => Parameterize();
+      LowerBoundParameter.Value.ValueChanged += (sender, args) => Parameterize();
     }
 
@@ -96,4 +102,15 @@
       return result;
     }
+
+    private void Parameterize() {
+      Encoding.Length = Items.Count;
+      for (int i = 0; i < Encoding.Bounds.Rows; i++) {
+        Encoding.Bounds[i, 1] = LowerBound + 1;
+      }
+      foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.IntegerVectorParameter.ActualName;
+        similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName;
+      }
+    }
     #endregion
   }
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/PermutationProblem.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/PermutationProblem.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/PermutationProblem.cs	(revision 15182)
@@ -23,9 +23,10 @@
 
 using System.Linq;
-using System.Windows.Forms;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -51,4 +52,5 @@
       Encoding = new PermutationEncoding(EncodedSolutionName, Items.Count, PermutationTypes.Absolute);
       AddOperators();
+      Parameterize();
       RegisterEventHandlers();
     }
@@ -62,4 +64,8 @@
     }
 
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      Parameterize();
+    }
 
     private void AddOperators() {
@@ -70,4 +76,7 @@
       Operators.RemoveAll(x => x is SingleObjectiveMoveMaker);
       Operators.RemoveAll(x => x is SingleObjectiveMoveEvaluator);
+      Operators.Add(new HammingSimilarityCalculator());
+      Operators.Add(new QualitySimilarityCalculator());
+      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
 
       Encoding.ConfigureOperators(Operators.OfType<IOperator>());
@@ -83,5 +92,13 @@
     private void RegisterEventHandlers() {
       // update encoding length when number of items is changed
-      ItemsParameter.ValueChanged += (sender, args) => Encoding.Length = Items.Count;
+      ItemsParameter.ValueChanged += (sender, args) => Parameterize();
+    }
+
+    private void Parameterize() {
+      Encoding.Length = Items.Count;
+      foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.PermutationParameter.ActualName;
+        similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName;
+      }
     }
   }
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/IntegerVectorProblem.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/IntegerVectorProblem.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/IntegerVectorProblem.cs	(revision 15182)
@@ -24,8 +24,10 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -51,4 +53,5 @@
       Encoding = new IntegerVectorEncoding(EncodedSolutionName, Items.Count, min: 0, max: LowerBound + 1); // NOTE: assumes that all items can be packed into LowerBound+1 bins
       AddOperators();
+      Parameterize();
       RegisterEventHandlers();
     }
@@ -62,11 +65,18 @@
     }
 
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      Parameterize();
+    }
 
     private void AddOperators() {
-
       // move operators are not yet supported (TODO)
       Operators.RemoveAll(x => x is SingleObjectiveMoveGenerator);
       Operators.RemoveAll(x => x is SingleObjectiveMoveMaker);
       Operators.RemoveAll(x => x is SingleObjectiveMoveEvaluator);
+      Operators.Add(new HammingSimilarityCalculator());
+      Operators.Add(new EuclideanSimilarityCalculator());
+      Operators.Add(new QualitySimilarityCalculator());
+      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
 
       Encoding.ConfigureOperators(Operators.OfType<IOperator>()); // gkronber: not strictly necessary (only when customer ops are added)
@@ -75,14 +85,9 @@
     private void RegisterEventHandlers() {
       // update encoding length when number of items is changed
-      ItemsParameter.ValueChanged += (sender, args) => Encoding.Length = Items.Count;
-      LowerBoundParameter.Value.ValueChanged += (sender, args) => {
-        for (int i = 0; i < Encoding.Bounds.Rows; i++) {
-          Encoding.Bounds[i, 1] = LowerBound + 1;
-        }
-      };
+      ItemsParameter.ValueChanged += (sender, args) => Parameterize();
+      LowerBoundParameter.Value.ValueChanged += (sender, args) => Parameterize();
     }
 
     #region helpers
-
     public static List<List<int>> GenerateSequenceMatrix(IntegerVector intVec) {
       List<List<int>> result = new List<List<int>>();
@@ -95,4 +100,15 @@
       return result;
     }
+
+    private void Parameterize() {
+      Encoding.Length = Items.Count;
+      for (int i = 0; i < Encoding.Bounds.Rows; i++) {
+        Encoding.Bounds[i, 1] = LowerBound + 1;
+      }
+      foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.IntegerVectorParameter.ActualName;
+        similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName;
+      }
+    }
     #endregion
   }
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/PermutationProblem.cs
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/PermutationProblem.cs	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/PermutationProblem.cs	(revision 15182)
@@ -23,8 +23,10 @@
 
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -49,4 +51,5 @@
       Encoding = new PermutationEncoding(EncodedSolutionName, Items.Count, PermutationTypes.Absolute);
       AddOperators();
+      Parameterize();
       RegisterEventHandlers();
     }
@@ -60,4 +63,8 @@
     }
 
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      Parameterize();
+    }
 
     private void AddOperators() {
@@ -68,4 +75,7 @@
       Operators.RemoveAll(x => x is SingleObjectiveMoveMaker);
       Operators.RemoveAll(x => x is SingleObjectiveMoveEvaluator);
+      Operators.Add(new HammingSimilarityCalculator());
+      Operators.Add(new QualitySimilarityCalculator());
+      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
 
       Encoding.ConfigureOperators(Operators.OfType<IOperator>());
@@ -82,5 +92,13 @@
     private void RegisterEventHandlers() {
       // update encoding length when number of items is changed
-      ItemsParameter.ValueChanged += (sender, args) => Encoding.Length = Items.Count;
+      ItemsParameter.ValueChanged += (sender, args) => Parameterize();
+    }
+
+    private void Parameterize() {
+      Encoding.Length = Items.Count;
+      foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.PermutationParameter.ActualName;
+        similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName;
+      }
     }
   }
Index: /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs.frame
===================================================================
--- /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs.frame	(revision 15181)
+++ /branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs.frame	(revision 15182)
@@ -28,4 +28,5 @@
   [Plugin("HeuristicLab.Problems.BinPacking", "3.3.14.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.BinPacking-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
@@ -36,4 +37,5 @@
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
