Index: /branches/2864_PermutationProblems/HeuristicLab.Problems.PermutationProblems/3.3/LinearOrderingProblem.cs
===================================================================
--- /branches/2864_PermutationProblems/HeuristicLab.Problems.PermutationProblems/3.3/LinearOrderingProblem.cs	(revision 16013)
+++ /branches/2864_PermutationProblems/HeuristicLab.Problems.PermutationProblems/3.3/LinearOrderingProblem.cs	(revision 16014)
@@ -36,5 +36,4 @@
   [StorableClass]
   public sealed class LinearOrderingProblem : SingleObjectiveBasicProblem<PermutationEncoding>, IProblemInstanceConsumer<LOPData>, IProblemInstanceExporter<LOPData>, IStorableContent {
-    #region Fields
     private static readonly LOPData DefaultInstance = new LOPData() {
       Name = "Linaer Ordering Problem (LOP)",
@@ -48,15 +47,8 @@
             }
     };
-    public event EventHandler BestKnownSolutionChanged;
-    #endregion
 
-    #region Getter/Setter
     public OptionalValueParameter<Permutation> BestKnownSolutionParameter
     {
       get { return (OptionalValueParameter<Permutation>)Parameters["BestKnownSolution"]; }
-    }
-    public OptionalValueParameter<DoubleMatrix> MatrixParameter
-    {
-      get { return (OptionalValueParameter<DoubleMatrix>)Parameters["Matrix"]; }
     }
     public Permutation BestKnownSolution
@@ -66,6 +58,10 @@
       {
         BestKnownSolutionParameter.Value = value;
-        if (BestKnownSolutionChanged != null) { OnBestKnownSolutionChanged(); }
       }
+    }
+
+    public ValueParameter<DoubleMatrix> MatrixParameter
+    {
+      get { return (ValueParameter<DoubleMatrix>)Parameters["Matrix"]; }
     }
     public DoubleMatrix Matrix
@@ -76,7 +72,5 @@
 
     public override bool Maximization { get { return true; } }
-    #endregion
 
-    #region Ctor
     [StorableConstructor]
     private LinearOrderingProblem(bool deserializing) : base(deserializing) { }
@@ -84,5 +78,5 @@
     public LinearOrderingProblem() {
       Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution of this LOP instance."));
-      Parameters.Add(new OptionalValueParameter<DoubleMatrix>("Matrix", "The matrix which contains the corresponding LOP-values"));
+      Parameters.Add(new ValueParameter<DoubleMatrix>("Matrix", "The matrix which contains the corresponding LOP-values"));
 
       Load(DefaultInstance);
@@ -90,9 +84,6 @@
       EvaluatorParameter.Hidden = true;
 
-      Evaluator.QualityParameter.ActualName = "SuperDiagonale";
+      Evaluator.QualityParameter.ActualName = "Superdiagonal";
     }
-    #endregion
-
-    #region Methods
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -101,4 +92,7 @@
 
     public void Load(LOPData data) {
+      if (data.Matrix.GetLength(0) != data.Matrix.GetLength(1)) {
+        throw new ArgumentException("Matrix must be square");
+      }
       if (data.BestKnownQuality.HasValue) {
         BestKnownQuality = data.BestKnownQuality.Value;
@@ -114,6 +108,6 @@
         if (!permut.Contains(0)) { permut = permut.Select(v => v - 1).ToArray(); }
 
-        BestKnownSolution = new Permutation(PermutationTypes.Absolute, data.BestKnownPermutation);
-        BestKnownQuality = Evaluate(permut, Matrix);
+        BestKnownSolution = new Permutation(PermutationTypes.Absolute, permut);
+        BestKnownQuality = Evaluate(new Permutation(PermutationTypes.Absolute, permut), Matrix);
       }
     }
@@ -133,15 +127,7 @@
 
     public override double Evaluate(Individual individual, IRandom random) {
-      return Evaluate(individual.Permutation().ToArray(), Matrix);
+      return Evaluate(individual.Permutation(), Matrix);
     }
-
-    #endregion
-
-    #region Helper Methods
-    private void OnBestKnownSolutionChanged() {
-      BestKnownSolutionChanged?.Invoke(this, EventArgs.Empty);
-    }
-
-    private double Evaluate(int[] permutation, DoubleMatrix matrix) {
+    private double Evaluate(Permutation permutation, DoubleMatrix matrix) {
       double sum = 0;
       for (int i = 1; i < matrix.Columns; i++) {
@@ -153,5 +139,4 @@
       return sum;
     }
-    #endregion
   }
 }
