Index: /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs	(revision 4825)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Drawing;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -87,12 +88,19 @@
 
     private void Initialize(IAlgorithm algorithm) {
-      IAlgorithm clone = (IAlgorithm)algorithm.Clone();
       parameters = new Dictionary<string, IItem>();
       results = new Dictionary<string, IItem>();
-      clone.CollectParameterValues(parameters);
-      clone.CollectResultValues(results);
-      if (clone.StoreAlgorithmInEachRun) {
+
+      if (algorithm.StoreAlgorithmInEachRun) {
+        IAlgorithm clone = (IAlgorithm)algorithm.Clone();
+        clone.CollectParameterValues(parameters);
+        clone.CollectResultValues(results);
         clone.Prepare(true);
         this.algorithm = clone;
+      } else {
+        algorithm.CollectParameterValues(parameters);
+        algorithm.CollectResultValues(results);
+        Cloner cloner = new Cloner();
+        parameters = parameters.Select(x => new KeyValuePair<string, IItem>(x.Key, (IItem)x.Value.Clone(cloner))).ToDictionary(x => x.Key, x => x.Value);
+        results = results.Select(x => new KeyValuePair<string, IItem>(x.Key, (IItem)x.Value.Clone(cloner))).ToDictionary(x => x.Key, x => x.Value);
       }
     }
Index: /trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs	(revision 4825)
@@ -78,4 +78,26 @@
     }
 
+    [Storable(DefaultValue = true)]
+    private bool reactOnValueToStringChangedAndValueItemImageChanged;
+    /// <summary>
+    ///   True if this parameter should react on the ToStringChanged and ItemImageChanged events of its value, otherwise false.
+    /// </summary>
+    /// <remarks>
+    ///   In some rare cases when the value of the parameter is not deeply cloned, this property has to be set to false
+    ///   to avoid a memory leak (cf. ticket #1268). In all other cases this property should always be true.
+    /// </remarks>
+    public bool ReactOnValueToStringChangedAndValueItemImageChanged {
+      get { return reactOnValueToStringChangedAndValueItemImageChanged; }
+      set {
+        if (value != reactOnValueToStringChangedAndValueItemImageChanged) {
+          reactOnValueToStringChangedAndValueItemImageChanged = value;
+          if (reactOnValueToStringChangedAndValueItemImageChanged)
+            RegisterValueEvents();
+          else
+            DeregisterValueEvents();
+        }
+      }
+    }
+
     #region Constructors
     [StorableConstructor]
@@ -85,4 +107,5 @@
       value = cloner.Clone(original.value);
       getsCollected = original.getsCollected;
+      reactOnValueToStringChangedAndValueItemImageChanged = original.reactOnValueToStringChangedAndValueItemImageChanged;
       RegisterValueEvents();
     }
@@ -90,12 +113,15 @@
       : base("Anonymous", typeof(T)) {
       this.getsCollected = true;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
     }
     public OptionalValueParameter(string name)
       : base(name, typeof(T)) {
       this.getsCollected = true;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
     }
     public OptionalValueParameter(string name, bool getsCollected)
       : base(name, typeof(T)) {
       this.getsCollected = getsCollected;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
     }
     public OptionalValueParameter(string name, T value)
@@ -103,4 +129,5 @@
       this.value = value;
       this.getsCollected = true;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
       RegisterValueEvents();
     }
@@ -109,4 +136,5 @@
       this.value = value;
       this.getsCollected = getsCollected;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
       RegisterValueEvents();
     }
@@ -114,8 +142,10 @@
       : base(name, description, typeof(T)) {
       this.getsCollected = true;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
     }
     public OptionalValueParameter(string name, string description, bool getsCollected)
       : base(name, description, typeof(T)) {
       this.getsCollected = getsCollected;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
     }
     public OptionalValueParameter(string name, string description, T value)
@@ -123,4 +153,5 @@
       this.value = value;
       this.getsCollected = true;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
       RegisterValueEvents();
     }
@@ -129,4 +160,5 @@
       this.value = value;
       this.getsCollected = getsCollected;
+      this.reactOnValueToStringChangedAndValueItemImageChanged = true;
       RegisterValueEvents();
     }
@@ -143,5 +175,8 @@
 
     public override string ToString() {
-      return Name + ": " + (Value != null ? Value.ToString() : "null");
+      if (reactOnValueToStringChangedAndValueItemImageChanged)
+        return Name + ": " + (Value != null ? Value.ToString() : "null");
+      else
+        return Name;
     }
 
@@ -167,5 +202,5 @@
 
     private void RegisterValueEvents() {
-      if (value != null) {
+      if ((value != null) && reactOnValueToStringChangedAndValueItemImageChanged) {
         value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
         value.ToStringChanged += new EventHandler(Value_ToStringChanged);
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/DistanceMatrix.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/DistanceMatrix.cs	(revision 4825)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/DistanceMatrix.cs	(revision 4825)
@@ -0,0 +1,55 @@
+#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 System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.TravelingSalesman {
+  /// <summary>
+  /// Represents a distance matrix of a Traveling Salesman Problem.
+  /// </summary>
+  [Item("DistanceMatrix", "Represents a distance matrix of a Traveling Salesman Problem.")]
+  [StorableClass]
+  public sealed class DistanceMatrix : DoubleMatrix {
+    [StorableConstructor]
+    private DistanceMatrix(bool deserializing) : base(deserializing) { }
+    private DistanceMatrix(DistanceMatrix original, Cloner cloner) {
+      throw new NotSupportedException("Distance matrices cannot be cloned.");
+    }
+    public DistanceMatrix() : base() { }
+    public DistanceMatrix(int rows, int columns) : base(rows, columns) { }
+    public DistanceMatrix(int rows, int columns, IEnumerable<string> columnNames) : base(rows, columns, columnNames) { }
+    public DistanceMatrix(int rows, int columns, IEnumerable<string> columnNames, IEnumerable<string> rowNames) : base(rows, columns, columnNames, rowNames) { }
+    public DistanceMatrix(double[,] elements) : base(elements) { }
+    public DistanceMatrix(double[,] elements, IEnumerable<string> columnNames) : base(elements, columnNames) { }
+    public DistanceMatrix(double[,] elements, IEnumerable<string> columnNames, IEnumerable<string> rowNames) : base(elements, columnNames, rowNames) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      // distance matrices are not cloned for performance reasons
+      cloner.RegisterClonedObject(this, this);
+      return this;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs	(revision 4825)
@@ -40,6 +40,6 @@
       get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     }
-    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
-      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    public ILookupParameter<DistanceMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DistanceMatrix>)Parameters["DistanceMatrix"]; }
     }
     public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
@@ -54,6 +54,19 @@
       Parameters.Add(new LookupParameter<Permutation>("Permutation", "The TSP solution given in path representation which should be evaluated."));
       Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
-      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
       Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      LookupParameter<DoubleMatrix> oldDistanceMatrixParameter = Parameters["DistanceMatrix"] as LookupParameter<DoubleMatrix>;
+      if (oldDistanceMatrixParameter != null) {
+        Parameters.Remove(oldDistanceMatrixParameter);
+        Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+        DistanceMatrixParameter.ActualName = oldDistanceMatrixParameter.ActualName;
+      }
+      #endregion
     }
 
@@ -61,15 +74,15 @@
       if (UseDistanceMatrixParameter.ActualValue.Value) {
         Permutation p = PermutationParameter.ActualValue;
-        DoubleMatrix dm = DistanceMatrixParameter.ActualValue;
+        DistanceMatrix dm = DistanceMatrixParameter.ActualValue;
 
         if (dm == null) {  // calculate distance matrix
           DoubleMatrix c = CoordinatesParameter.ActualValue;
 
-          dm = new DoubleMatrix(c.Rows, c.Rows);
+          dm = new DistanceMatrix(c.Rows, c.Rows);
           for (int i = 0; i < dm.Rows; i++) {
             for (int j = 0; j < dm.Columns; j++)
               dm[i, j] = CalculateDistance(c[i, 0], c[i, 1], c[j, 0], c[j, 1]);
           }
-          DistanceMatrixParameter.ActualValue = (DoubleMatrix)dm.AsReadOnly();
+          DistanceMatrixParameter.ActualValue = (DistanceMatrix)dm.AsReadOnly();
         }
 
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 4825)
@@ -109,4 +109,5 @@
     <Compile Include="Analyzers\TSPPopulationDiversityAnalyzer.cs" />
     <Compile Include="Analyzers\TSPAlleleFrequencyAnalyzer.cs" />
+    <Compile Include="DistanceMatrix.cs" />
     <Compile Include="Evaluators\TSPEuclideanPathEvaluator.cs" />
     <Compile Include="Evaluators\TSPGeoPathEvaluator.cs" />
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs	(revision 4825)
@@ -29,5 +29,5 @@
   public interface ITSPCoordinatesPathEvaluator : ITSPPathEvaluator {
     ILookupParameter<DoubleMatrix> CoordinatesParameter { get; }
-    ILookupParameter<DoubleMatrix> DistanceMatrixParameter { get; }
+    ILookupParameter<DistanceMatrix> DistanceMatrixParameter { get; }
     ILookupParameter<BoolValue> UseDistanceMatrixParameter { get; }
   }
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs	(revision 4825)
@@ -27,5 +27,5 @@
   public interface ITSPPathMoveEvaluator : ITSPMoveEvaluator, IPermutationMoveOperator {
     ILookupParameter<DoubleMatrix> CoordinatesParameter { get; }
-    ILookupParameter<DoubleMatrix> DistanceMatrixParameter { get; }
+    ILookupParameter<DistanceMatrix> DistanceMatrixParameter { get; }
     ILookupParameter<BoolValue> UseDistanceMatrixParameter { get; }
   }
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs	(revision 4825)
@@ -40,6 +40,6 @@
       get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     }
-    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
-      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    public ILookupParameter<DistanceMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DistanceMatrix>)Parameters["DistanceMatrix"]; }
     }
     public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
@@ -54,6 +54,19 @@
       Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
       Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The city's coordinates."));
-      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
       Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated (if it does not exist already) and used for evaluation, otherwise false."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      LookupParameter<DoubleMatrix> oldDistanceMatrixParameter = Parameters["DistanceMatrix"] as LookupParameter<DoubleMatrix>;
+      if (oldDistanceMatrixParameter != null) {
+        Parameters.Remove(oldDistanceMatrixParameter);
+        Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+        DistanceMatrixParameter.ActualName = oldDistanceMatrixParameter.ActualName;
+      }
+      #endregion
     }
 
@@ -63,5 +76,5 @@
       double relativeQualityDifference = 0;
       if (UseDistanceMatrixParameter.ActualValue.Value) {
-        DoubleMatrix distanceMatrix = DistanceMatrixParameter.ActualValue;
+        DistanceMatrix distanceMatrix = DistanceMatrixParameter.ActualValue;
         if (distanceMatrix == null) {
           distanceMatrix = CalculateDistanceMatrix(coordinates);
@@ -77,14 +90,14 @@
 
     protected abstract double CalculateDistance(double x1, double y1, double x2, double y2);
-    protected abstract double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix);
+    protected abstract double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix);
     protected abstract double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates);
 
-    private DoubleMatrix CalculateDistanceMatrix(DoubleMatrix c) {
-      DoubleMatrix distanceMatrix = new DoubleMatrix(c.Rows, c.Rows);
+    private DistanceMatrix CalculateDistanceMatrix(DoubleMatrix c) {
+      DistanceMatrix distanceMatrix = new DistanceMatrix(c.Rows, c.Rows);
       for (int i = 0; i < distanceMatrix.Rows; i++) {
         for (int j = 0; j < distanceMatrix.Columns; j++)
           distanceMatrix[i, j] = CalculateDistance(c[i, 0], c[i, 1], c[j, 0], c[j, 1]);
       }
-      return distanceMatrix;
+      return (DistanceMatrix)distanceMatrix.AsReadOnly();
     }
   }
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs	(revision 4825)
@@ -82,5 +82,5 @@
     }
 
-    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
+    protected override double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix) {
       TranslocationMove move = TranslocationMoveParameter.ActualValue;
       int edge1source = permutation.GetCircular(move.Index1 - 1);
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs	(revision 4825)
@@ -67,5 +67,5 @@
     }
 
-    protected override double EvaluateByDistanceMatrix(Permutation permutation, DoubleMatrix distanceMatrix) {
+    protected override double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix) {
       InversionMove move = InversionMoveParameter.ActualValue;
       int edge1source = permutation.GetCircular(move.Index1 - 1);
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs	(revision 4824)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs	(revision 4825)
@@ -55,6 +55,6 @@
       get { return (ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     }
-    public OptionalValueParameter<DoubleMatrix> DistanceMatrixParameter {
-      get { return (OptionalValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    public OptionalValueParameter<DistanceMatrix> DistanceMatrixParameter {
+      get { return (OptionalValueParameter<DistanceMatrix>)Parameters["DistanceMatrix"]; }
     }
     public ValueParameter<BoolValue> UseDistanceMatrixParameter {
@@ -89,5 +89,5 @@
       set { CoordinatesParameter.Value = value; }
     }
-    public DoubleMatrix DistanceMatrix {
+    public DistanceMatrix DistanceMatrix {
       get { return DistanceMatrixParameter.Value; }
       set { DistanceMatrixParameter.Value = value; }
@@ -144,5 +144,4 @@
       : base(original, cloner) {
       this.operators = original.operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
-      this.DistanceMatrixParameter.Value = original.DistanceMatrixParameter.Value;
       AttachEventHandlers();
     }
@@ -157,5 +156,5 @@
       Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the Traveling Salesman Problem is a minimization problem.", new BoolValue(false)));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
-      Parameters.Add(new OptionalValueParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new OptionalValueParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
       Parameters.Add(new ValueParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false.", new BoolValue(true)));
       Parameters.Add(new ValueParameter<IPermutationCreator>("SolutionCreator", "The operator which should be used to create new TSP solutions.", creator));
@@ -163,4 +162,6 @@
       Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance."));
       Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution of this TSP instance."));
+
+      DistanceMatrixParameter.ReactOnValueToStringChangedAndValueItemImageChanged = false;
 
       Coordinates = new DoubleMatrix(new double[,] {
@@ -258,4 +259,21 @@
       // BackwardsCompatibility3.3
       #region Backwards compatible code (remove with 3.4)
+      OptionalValueParameter<DoubleMatrix> oldDistanceMatrixParameter = Parameters["DistanceMatrix"] as OptionalValueParameter<DoubleMatrix>;
+      if (oldDistanceMatrixParameter != null) {
+        Parameters.Remove(oldDistanceMatrixParameter);
+        Parameters.Add(new OptionalValueParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+        DistanceMatrixParameter.GetsCollected = oldDistanceMatrixParameter.GetsCollected;
+        DistanceMatrixParameter.ReactOnValueToStringChangedAndValueItemImageChanged = false;
+        if (oldDistanceMatrixParameter.Value != null) {
+          DoubleMatrix oldDM = oldDistanceMatrixParameter.Value;
+          DistanceMatrix newDM = new DistanceMatrix(oldDM.Rows, oldDM.Columns, oldDM.ColumnNames, oldDM.RowNames);
+          newDM.SortableView = oldDM.SortableView;
+          for (int i = 0; i < newDM.Rows; i++)
+            for (int j = 0; j < newDM.Columns; j++)
+              newDM[i, j] = oldDM[i, j];
+          DistanceMatrixParameter.Value = (DistanceMatrix)newDM.AsReadOnly();
+        }
+      }
+
       if (operators == null) InitializeOperators();
       #endregion
