Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/HeuristicLab.Algorithms.MOEAD-3.4.csproj
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/HeuristicLab.Algorithms.MOEAD-3.4.csproj	(revision 16583)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/HeuristicLab.Algorithms.MOEAD-3.4.csproj	(revision 16630)
@@ -1,4 +1,4 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -11,5 +11,5 @@
     <RootNamespace>HeuristicLab.Algorithms.MOEAD</RootNamespace>
     <AssemblyName>HeuristicLab.Algorithms.MOEAD-3.4</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <SignAssembly>true</SignAssembly>
@@ -98,4 +98,10 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
+    </Reference>
+    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\HEAL.Attic.1.0.0-pre03\lib\net461\HEAL.Attic.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Analysis-3.3">
       <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
@@ -139,4 +145,14 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.TestFunctions.MultiObjective-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="HeuristicLab.Random-3.3">
       <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath>
@@ -148,8 +164,13 @@
     </Reference>
     <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Drawing.Common, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\System.Drawing.Common.4.6.0-preview.19073.11\lib\net461\System.Drawing.Common.dll</HintPath>
+    </Reference>
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
     <None Include="HeuristicLab.snk" />
+    <None Include="packages.config" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="MOEADAlgorithm.cs" />
Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs	(revision 16583)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs	(revision 16630)
@@ -1,6 +1,27 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2019 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 HEAL.Attic;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Random;
 using System.Linq;
@@ -9,6 +30,6 @@
 namespace HeuristicLab.Algorithms.MOEAD {
   [Item("Multi-objective Evolutionary Algorithm based on Decomposition (MOEA/D)", "MOEA/D implementation adapted from jMetal.")]
-  [StorableClass]
   [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 125)]
+  [StorableType("FE39AD23-B3BF-4368-BB79-FE5BF4C36272")]
   public class MOEADAlgorithm : MOEADAlgorithmBase {
     public MOEADAlgorithm() { }
@@ -21,5 +42,5 @@
 
     [StorableConstructor]
-    protected MOEADAlgorithm(bool deserializing) : base(deserializing) { }
+    protected MOEADAlgorithm(StorableConstructorFlag deserializing) : base(deserializing) { }
 
     protected override void Run(CancellationToken cancellationToken) {
@@ -98,4 +119,7 @@
 
         UpdateParetoFronts();
+
+        Results.AddOrUpdateResult("IdealPoint", new DoubleArray(IdealPoint));
+        Results.AddOrUpdateResult("NadirPoint", new DoubleArray(NadirPoint));
         Results.AddOrUpdateResult("Evaluated Solutions", new IntValue(evaluatedSolutions));
 
Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs	(revision 16583)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithmBase.cs	(revision 16630)
@@ -1,3 +1,25 @@
-﻿using HeuristicLab.Analysis;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2019 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 HEAL.Attic;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -6,15 +28,14 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Random;
 using System;
 using System.Collections.Generic;
 using System.Linq;
-
 using CancellationToken = System.Threading.CancellationToken;
 
 namespace HeuristicLab.Algorithms.MOEAD {
   [Item("MOEADAlgorithmBase", "Base class for all MOEA/D algorithm variants.")]
-  [StorableClass]
+  [StorableType("E00BAC79-C6F9-42B6-8468-DEEC7FFCE804")]
   public abstract class MOEADAlgorithmBase : BasicAlgorithm {
     #region data members
@@ -62,4 +83,7 @@
     [Storable]
     protected ExecutionState previousExecutionState;
+
+    [Storable]
+    protected ExecutionState executionState;
     #endregion
 
@@ -81,4 +105,5 @@
     private const string MaximumNumberOfReplacedSolutionsParameterName = "MaximumNumberOfReplacedSolutions";
     private const string FunctionTypeParameterName = "FunctionType";
+    private const string NormalizeObjectivesParameterName = "NormalizeObjectives";
 
     public IValueParameter<MultiAnalyzer> AnalyzerParameter {
@@ -91,4 +116,7 @@
     public IFixedValueParameter<IntValue> NeighbourSizeParameter {
       get { return (IFixedValueParameter<IntValue>)Parameters[NeighbourSizeParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> NormalizeObjectivesParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[NormalizeObjectivesParameterName]; }
     }
     public IFixedValueParameter<IntValue> MaximumNumberOfReplacedSolutionsParameter {
@@ -141,4 +169,8 @@
       get { return SetSeedRandomlyParameter.Value.Value; }
       set { SetSeedRandomlyParameter.Value.Value = value; }
+    }
+    public bool NormalizeObjectives {
+      get { return NormalizeObjectivesParameter.Value.Value; }
+      set { NormalizeObjectivesParameter.Value.Value = value; }
     }
     public IntValue PopulationSize {
@@ -204,4 +236,5 @@
       Parameters.Add(new FixedValueParameter<IntValue>(MaximumNumberOfReplacedSolutionsParameterName, new IntValue(2)));
       Parameters.Add(new FixedValueParameter<DoubleValue>(NeighbourhoodSelectionProbabilityParameterName, new DoubleValue(0.1)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(NormalizeObjectivesParameterName, new BoolValue(true)));
 
       var functionTypeParameter = new ConstrainedValueParameter<StringValue>(FunctionTypeParameterName);
@@ -258,6 +291,14 @@
     }
 
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(NormalizeObjectivesParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(NormalizeObjectivesParameterName, new BoolValue(true)));
+      }
+    }
+
     [StorableConstructor]
-    protected MOEADAlgorithmBase(bool deserializing) : base(deserializing) { }
+    protected MOEADAlgorithmBase(StorableConstructorFlag _) : base(_) { }
     #endregion
 
@@ -292,19 +333,5 @@
     }
 
-    public override void Prepare() {
-      base.Prepare();
-    }
-
     protected void InitializeAlgorithm(CancellationToken cancellationToken) {
-      globalScope = new Scope("Global Scope");
-      executionContext = new ExecutionContext(null, this, globalScope);
-
-      // set the execution context for parameters to allow lookup
-      foreach (var parameter in Problem.Parameters.OfType<IValueParameter>()) {
-        // we need all of these in order for the wiring of the operators to work
-        globalScope.Variables.Add(new Variable(parameter.Name, parameter.Value));
-      }
-      globalScope.Variables.Add(new Variable("Results", Results)); // make results available as a parameter for analyzers etc.
-
       var rand = RandomParameter.Value;
       if (SetSeedRandomly) Seed = RandomSeedGenerator.GetSeed();
@@ -320,7 +347,9 @@
       InitializeNeighbourHood(lambda, populationSize, NeighbourSize);
 
+      //IdealPoint = Enumerable.Repeat(double.MaxValue, dimensions).ToArray();
       IdealPoint = new double[dimensions];
       IdealPoint.UpdateIdeal(population);
 
+      //NadirPoint = Enumerable.Repeat(double.MinValue, dimensions).ToArray();
       NadirPoint = new double[dimensions];
       NadirPoint.UpdateNadir(population);
@@ -353,38 +382,4 @@
       globalScope.Variables.Add(new Variable("Results", Results)); // make results available as a parameter for analyzers etc.
 
-      var rand = RandomParameter.Value;
-      if (SetSeedRandomly) Seed = RandomSeedGenerator.GetSeed();
-      rand.Reset(Seed);
-
-      bool[] maximization = ((BoolArray)Problem.MaximizationParameter.ActualValue).CloneAsArray();
-      var dimensions = maximization.Length;
-
-      var populationSize = PopulationSize.Value;
-
-      InitializePopulation(executionContext, cancellationToken, rand, maximization);
-      InitializeUniformWeights(rand, populationSize, dimensions);
-      InitializeNeighbourHood(lambda, populationSize, NeighbourSize);
-
-      IdealPoint = new double[dimensions];
-      IdealPoint.UpdateIdeal(population);
-
-      NadirPoint = new double[dimensions];
-      NadirPoint.UpdateNadir(population);
-
-      var functionTypeString = FunctionTypeParameter.Value.Value;
-      switch (functionTypeString) {
-        case "Chebyshev":
-          functionType = FunctionType.TCHE;
-          break;
-        case "PBI":
-          functionType = FunctionType.PBI;
-          break;
-        case "Weighted Sum":
-          functionType = FunctionType.AGG;
-          break;
-      }
-
-      evaluatedSolutions = populationSize;
-
       base.Initialize(cancellationToken);
     }
@@ -396,5 +391,5 @@
     }
 
-    // implements random number generation from https://en.wikipedia.org/wiki/Dirichlet_distribution#Random_number_generation
+    // implements random number generation from https://en.wikipedia.org/wiki/Dirichlet_distribution#Random_number_generation
     private double[] GenerateSample(IRandom random, int dim) {
       var sum = 0d;
@@ -503,10 +498,11 @@
 
             for (int n = 0; n < dim; n++) {
-              double diff = Math.Abs(qualities[n] - IdealPoint[n]);
-
-              var l = lambda[n].IsAlmost(0) ? 0.0001 : lambda[n];
-              //var feval = l * diff;
-              // introduce objective scaling
-              var feval = l * (qualities[n] - IdealPoint[n]) / (NadirPoint[n] - IdealPoint[n]);
+              var diff = qualities[n] - IdealPoint[n];
+              if (NormalizeObjectives) {
+                diff /= NadirPoint[n] - IdealPoint[n];
+              }
+              var l = lambda[n].IsAlmost(0) ? 1e-4 : lambda[n];
+              var feval = l * Math.Abs(diff);
+
               if (feval > maxFun) {
                 maxFun = feval;
@@ -666,9 +662,10 @@
 
     protected override void OnExecutionStateChanged() {
-      previousExecutionState = ExecutionState;
+      previousExecutionState = executionState;
+      executionState = ExecutionState;
       base.OnExecutionStateChanged();
     }
 
-    protected override void OnStopped() {
+    public void ClearState() {
       if (solutions != null) {
         solutions.Clear();
@@ -683,5 +680,13 @@
         jointPopulation.Clear();
       }
-      executionContext.Scope.SubScopes.Clear();
+      lambda = null;
+      neighbourhood = null;
+      if (executionContext != null && executionContext.Scope != null) {
+        executionContext.Scope.SubScopes.Clear();
+      }
+    }
+
+    protected override void OnStopped() {
+      ClearState();
       base.OnStopped();
     }
Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADSolution.cs
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADSolution.cs	(revision 16583)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADSolution.cs	(revision 16630)
@@ -1,7 +1,29 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2019 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 HEAL.Attic;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.MOEAD {
+  [StorableType("DFE1AC99-9AEF-4A35-884B-C82E2B3D84F7")]
   public interface IMOEADSolution : IItem {
     IItem Individual { get; set; }
@@ -12,5 +34,5 @@
 
   [Item("MOEADSolution", "Represents a solution inside the MOEA/D population")]
-  [StorableClass]
+  [StorableType("8D7DE459-E6D5-4B74-9135-00E27CF451D3")]
   public class MOEADSolution : Item, IMOEADSolution {
     [Storable]
@@ -55,9 +77,9 @@
 
     [StorableConstructor]
-    protected MOEADSolution(bool deserializing) : base(deserializing) { }
+    protected MOEADSolution(StorableConstructorFlag deserializing) : base(deserializing) { }
   }
 
   [Item("MOEADSolution", "Represents a solution inside the MOEA/D population")]
-  [StorableClass]
+  [StorableType("24B4B79B-5828-4E6B-BE35-452DEA1FF538")]
   public class MOEADSolution<T> : MOEADSolution where T : class, IItem {
     public new T Individual {
@@ -75,5 +97,5 @@
 
     [StorableConstructor]
-    protected MOEADSolution(bool deserializing) : base(deserializing) { }
+    protected MOEADSolution(StorableConstructorFlag deserializing) : base(deserializing) { }
   }
 }
Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADUtil.cs
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADUtil.cs	(revision 16583)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADUtil.cs	(revision 16630)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2019 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.Common;
 using HeuristicLab.Core;
 using System;
Index: branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/packages.config
===================================================================
--- branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/packages.config	(revision 16630)
+++ branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/packages.config	(revision 16630)
@@ -0,0 +1,6 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Google.Protobuf" version="3.6.1" targetFramework="net472" />
+  <package id="HEAL.Attic" version="1.0.0-pre03" targetFramework="net472" />
+  <package id="System.Drawing.Common" version="4.6.0-preview.19073.11" targetFramework="net472" />
+</packages>
