Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 7970)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 15504)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,5 +23,4 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -37,161 +36,29 @@
       get { return assignment; }
       set {
-        bool changed = (assignment != value);
+        if (assignment == value) return;
         assignment = value;
-        if (changed) OnPropertyChanged("Assignment");
+        OnPropertyChanged(nameof(Assignment));
       }
     }
 
     [Storable]
-    private DoubleValue quality;
-    public DoubleValue Quality {
-      get { return quality; }
+    private Evaluation evaluation;
+    public Evaluation Evaluation {
+      get { return evaluation; }
       set {
-        bool changed = (quality != value);
-        quality = value;
-        if (changed) OnPropertyChanged("Quality");
+        if (evaluation == value) return;
+        evaluation = value;
+        OnPropertyChanged(nameof(Evaluation));
       }
     }
 
     [Storable]
-    private DoubleValue flowDistanceQuality;
-    public DoubleValue FlowDistanceQuality {
-      get { return flowDistanceQuality; }
+    private GQAPInstance problemInstance;
+    public GQAPInstance ProblemInstance {
+      get { return problemInstance; }
       set {
-        bool changed = (flowDistanceQuality != value);
-        flowDistanceQuality = value;
-        if (changed) OnPropertyChanged("FlowDistanceQuality");
-      }
-    }
-
-    [Storable]
-    private DoubleValue installationQuality;
-    public DoubleValue InstallationQuality {
-      get { return installationQuality; }
-      set {
-        bool changed = (installationQuality != value);
-        installationQuality = value;
-        if (changed) OnPropertyChanged("InstallationQuality");
-      }
-    }
-
-    [Storable]
-    private DoubleValue overbookedCapacity;
-    public DoubleValue OverbookedCapacity {
-      get { return overbookedCapacity; }
-      set {
-        bool changed = (overbookedCapacity != value);
-        overbookedCapacity = value;
-        if (changed) OnPropertyChanged("OverbookedCapacity");
-      }
-    }
-
-    [Storable]
-    private StringArray equipmentNames;
-    public StringArray EquipmentNames {
-      get { return equipmentNames; }
-      set {
-        bool changed = (equipmentNames != value);
-        equipmentNames = value;
-        if (changed) OnPropertyChanged("EquipmentNames");
-      }
-    }
-
-    [Storable]
-    private StringArray locationNames;
-    public StringArray LocationNames {
-      get { return locationNames; }
-      set {
-        bool changed = (locationNames != value);
-        locationNames = value;
-        if (changed) OnPropertyChanged("LocationNames");
-      }
-    }
-
-    [Storable]
-    private DoubleMatrix distances;
-    public DoubleMatrix Distances {
-      get { return distances; }
-      set {
-        bool changed = (distances != value);
-        distances = value;
-        if (changed) OnPropertyChanged("Distances");
-      }
-    }
-
-    [Storable]
-    private DoubleMatrix weights;
-    public DoubleMatrix Weights {
-      get { return weights; }
-      set {
-        bool changed = (weights != value);
-        weights = value;
-        if (changed) OnPropertyChanged("Weights");
-      }
-    }
-
-    [Storable]
-    private DoubleMatrix installationCosts;
-    public DoubleMatrix InstallationCosts {
-      get { return installationCosts; }
-      set {
-        bool changed = (installationCosts != value);
-        installationCosts = value;
-        if (changed) OnPropertyChanged("InstallationCosts");
-      }
-    }
-
-    [Storable]
-    private DoubleArray demands;
-    public DoubleArray Demands {
-      get { return demands; }
-      set {
-        bool changed = (demands != value);
-        demands = value;
-        if (changed) OnPropertyChanged("Demands");
-      }
-    }
-
-    [Storable]
-    private DoubleArray capacities;
-    public DoubleArray Capacities {
-      get { return capacities; }
-      set {
-        bool changed = (capacities != value);
-        capacities = value;
-        if (changed) OnPropertyChanged("Capacities");
-      }
-    }
-
-    [Storable]
-    private DoubleValue transportationCosts;
-    public DoubleValue TransportationCosts {
-      get { return transportationCosts; }
-      set {
-        bool changed = (transportationCosts != value);
-        transportationCosts = value;
-        if (changed) OnPropertyChanged("TransportationCosts");
-      }
-    }
-
-    [Storable]
-    private DoubleValue expectedRandomQuality;
-    public DoubleValue ExpectedRandomQuality {
-      get { return expectedRandomQuality; }
-      set {
-        bool changed = (expectedRandomQuality != value);
-        expectedRandomQuality = value;
-        if (changed) OnPropertyChanged("ExpectedRandomQuality");
-      }
-    }
-
-    [Storable]
-    private IGQAPEvaluator evaluator;
-    public IGQAPEvaluator Evaluator {
-      get { return evaluator; }
-      set {
-        bool changed = (evaluator != value);
-        evaluator = value;
-        if (changed) OnPropertyChanged("Evaluator");
+        if (problemInstance == value) return;
+        problemInstance = value;
+        OnPropertyChanged(nameof(ProblemInstance));
       }
     }
@@ -202,36 +69,14 @@
       : base(original, cloner) {
       assignment = cloner.Clone(original.assignment);
-      quality = cloner.Clone(original.quality);
-      flowDistanceQuality = cloner.Clone(original.flowDistanceQuality);
-      installationQuality = cloner.Clone(original.installationQuality);
-      overbookedCapacity = cloner.Clone(original.overbookedCapacity);
-      equipmentNames = cloner.Clone(original.equipmentNames);
-      locationNames = cloner.Clone(original.locationNames);
-      distances = cloner.Clone(original.distances);
-      weights = cloner.Clone(original.weights);
-      installationCosts = cloner.Clone(original.installationCosts);
-      demands = cloner.Clone(original.demands);
-      capacities = cloner.Clone(original.capacities);
-      transportationCosts = cloner.Clone(original.transportationCosts);
-      expectedRandomQuality = cloner.Clone(original.expectedRandomQuality);
-      evaluator = cloner.Clone(original.evaluator);
+      evaluation = cloner.Clone(original.evaluation);
+      problemInstance = cloner.Clone(original.problemInstance);
     }
-    public GQAPAssignment(IntegerVector assignment, DoubleValue quality, DoubleValue flowDistanceQuality, DoubleValue installationQuality, DoubleValue overbookedCapacity, StringArray equipmentNames, StringArray locationNames, DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, DoubleValue transportationCosts, DoubleValue expectedRandomQuality, IGQAPEvaluator evaluator)
+    public GQAPAssignment(IntegerVector assignment, GQAPInstance problemInstance)
+      : this(assignment, problemInstance, problemInstance.Evaluate(assignment)) { }
+    public GQAPAssignment(IntegerVector assignment, GQAPInstance problemInstance, Evaluation evaluation)
       : base() {
       this.assignment = assignment;
-      this.quality = quality;
-      this.flowDistanceQuality = flowDistanceQuality;
-      this.installationQuality = installationQuality;
-      this.overbookedCapacity = overbookedCapacity;
-      this.equipmentNames = equipmentNames;
-      this.locationNames = locationNames;
-      this.distances = distances;
-      this.weights = weights;
-      this.installationCosts = installationCosts;
-      this.demands = demands;
-      this.capacities = capacities;
-      this.transportationCosts = transportationCosts;
-      this.expectedRandomQuality = expectedRandomQuality;
-      this.evaluator = evaluator;
+      this.evaluation = evaluation;
+      this.problemInstance = problemInstance;
     }
 
