Index: /branches/3057_DynamicALPS/Build.cmd
===================================================================
--- /branches/3057_DynamicALPS/Build.cmd	(revision 17438)
+++ /branches/3057_DynamicALPS/Build.cmd	(revision 17438)
@@ -0,0 +1,2 @@
+@ECHO OFF
+powershell.exe .\Build.ps1
Index: /branches/3057_DynamicALPS/Build.ps1
===================================================================
--- /branches/3057_DynamicALPS/Build.ps1	(revision 17438)
+++ /branches/3057_DynamicALPS/Build.ps1	(revision 17438)
@@ -0,0 +1,130 @@
+﻿# find ms build
+$programFilesX86Dir = ($Env:ProgramFiles, ${Env:ProgramFiles(x86)})[[bool]${Env:ProgramFiles(x86)}]
+$locations = @(
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Enterprise", "MSBuild", "15.0", "Bin", "amd64")
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Enterprise", "MSBuild", "15.0", "Bin")
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Community", "MSBuild", "15.0", "Bin", "amd64")
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Community", "MSBuild", "15.0", "Bin")
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "BuildTools", "MSBuild", "15.0", "Bin", "amd64"),
+  [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "BuildTools", "MSBuild", "15.0", "Bin")
+)
+
+$msBuildPath = $undefined
+Foreach ($loc in $locations) {
+  $loc = [System.IO.Path]::Combine($loc, "MSBuild.exe")
+  If ([System.IO.File]::Exists($loc)) {
+    $msBuildPath = $loc
+    Break;
+  }
+}
+
+Try {
+  If ($msBuildPath -eq $undefined) {
+    "Could not locate MSBuild, ABORTING ..."
+    Return
+  }
+
+  $curPath = $MyInvocation.MyCommand.Path
+  $curDir = Split-Path $curPath
+
+  $slnFiles = Get-ChildItem $curDir -Filter *.sln
+
+  If ($slnFiles.Count -le 0) {
+    "No solutions found, ABORTING ..."
+    Return
+  }
+
+  $slnIndices = @()
+
+  If ($slnFiles.Count -eq 1) {
+    "Selecting the only solution found: `"{0}`"" -f $slnFiles[0].Name
+    $slnIndices += 0
+  } Else {
+    "Found the following solutions:"
+
+    ""
+
+    $slnFiles | % { $i = 0 } { ("  {0}. `"{1}`"" -f ($i + 1), $_.Name); $i++ }
+
+    ""
+
+    $success = $false
+
+    # query solution to build
+    $slnIndex = -1
+    Do {
+        $input = Read-Host "Which solution(s) to build? (e.g.: 1 2 3) { 1..$($slnFiles.Count) }"
+        $inputParts = $input -Split " "
+
+        Foreach ($part in $inputParts) {
+          If ($part -eq "") { Continue }
+
+          $success = [int]::TryParse($part, [ref]$slnIndex) -and ($slnIndex -gt 0) -and ($slnIndex -le $slnFiles.Count)
+
+          If ($success) {
+            $slnIndices += $slnIndex - 1
+          } Else {
+            $slnIndices = @()
+            Break
+          }
+        }
+    } While (-Not $success)
+
+    $slnIndices = $slnIndices | Select-Object -Unique
+  }
+
+
+  # query configuration to build
+  $config = "Release"
+  $input = Read-Host "Which configuration to build? [$($config)]"
+  $config = ($config, $input)[[bool]$input]
+
+  # query platform to build
+  $platform = "Any CPU"
+  $input = Read-Host "Which platform to build? [$($platform)]"
+  $platform = ($platform, $input)[[bool]$input]
+
+  # query clean desire
+  $clean = $false
+  Do {
+      $input = Read-Host "Would you like to clean before building? [y/N]"
+      $input = ([string]("n", $input)[[bool]$input]).ToLowerInvariant()
+      $success = $input -eq "n" -or ($clean = $input -eq "y")
+  } While (-Not $success)
+
+  ""
+
+  If ($clean) {
+    Foreach ($slnIndex in $slnIndices) {
+      $solution = $slnFiles[$slnIndex]
+      "Cleaning `"$($solution.Name)`" ..."
+      $args = @(
+        $solution.FullName,
+        "/t:Clean",
+        "/p:Configuration=`"$config`",Platform=`"$platform`"",
+        "/m", "/nologo", "/verbosity:q", "/clp:ErrorsOnly"
+      )
+      & $msBuildPath $args
+      "===== CLEAN FINISHED ====="
+    }
+  }
+
+  Foreach ($slnIndex in $slnIndices) {
+    $solution = $slnFiles[$slnIndex]
+    "Building `"$($solution.Name)`" ($config|$platform) ..."
+    $args = @(
+      $solution.FullName,
+      "/t:Build",
+      "/p:Configuration=`"$config`",Platform=`"$platform`"",
+      "/m", "/nologo", "/verbosity:q", "/clp:ErrorsOnly"
+    )
+    & $msBuildPath $args
+    "===== BUILD FINISHED ====="
+  }
+} Finally {
+  ""
+
+  Write-Host -NoNewline "Press any key to continue ... "
+
+  [void][System.Console]::ReadKey($true)
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS-3.4.sln
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS-3.4.sln	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS-3.4.sln	(revision 17438)
@@ -0,0 +1,37 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29519.181
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DynamicALPS-3.4", "HeuristicLab.Algorithms.DynamicALPS\3.4\HeuristicLab.Algorithms.DynamicALPS-3.4.csproj", "{15452B9F-A436-4139-8EE7-DA72FB8D3664}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|x64.ActiveCfg = Debug|x64
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|x64.Build.0 = Debug|x64
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|x86.ActiveCfg = Debug|x86
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Debug|x86.Build.0 = Debug|x86
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|Any CPU.Build.0 = Release|Any CPU
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|x64.ActiveCfg = Release|x64
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|x64.Build.0 = Release|x64
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|x86.ActiveCfg = Release|x86
+		{15452B9F-A436-4139-8EE7-DA72FB8D3664}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {869173B1-B417-4ED0-9A2F-8F42578EA993}
+	EndGlobalSection
+EndGlobal
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSASolution.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSASolution.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSASolution.cs	(revision 17438)
@@ -0,0 +1,152 @@
+﻿#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;
+
+namespace HeuristicLab.Algorithms.DynamicALPS
+{
+  [StorableType("F405DFE4-CCC9-4CAF-9EFC-1AF45DC81FE6")]
+
+  public interface IDynamicALPSSolution : IItem {
+    IItem Individual { get; set; }
+    double[] Qualities { get; set; }
+    double[] Constraints { get; set; }
+    // KF, SMS-EMOA
+    double[] HypervolumeContribution { get; set; }
+    int[] NondominanceRanking { get; set; }
+
+    // KF, DynamicALPS, could also be used for any self-adpative EA
+    double IndividualPc { get; set; }   // individual crossover rate
+    double IndividualPm { get; set; }   // individual mutation rate
+    int Age { get; set; }               // age info for ALPS
+
+    int Dimensions { get; }
+  }
+
+
+
+  [Item("DynamicALPSSolution", "Represents a solution inside the DynamicALPS population")]
+  [StorableType("457A8E67-2B70-4767-896B-47056BD89732")]
+  public class DynamicALPSSolution : Item, IDynamicALPSSolution
+  {
+    [Storable]
+    public IItem Individual { get; set; }
+
+    [Storable]
+    public double[] Qualities { get; set; }
+
+    [Storable]
+    public double[] Constraints { get; set; }
+
+    //kf, sms-emoa
+    [Storable]
+    public double[] HypervolumeContribution { get; set; }
+
+    [Storable]
+    public int[] NondominanceRanking { get; set; }
+
+    [Storable]
+    public double IndividualPc { get; set; }
+
+    [Storable]
+    public double IndividualPm { get; set; }
+
+    [Storable]
+    public int Age { get; set; }
+
+    public DynamicALPSSolution(int nObjectives, int nConstraints)
+    {
+      Qualities = new double[nObjectives];
+      Constraints = new double[nConstraints];
+      HypervolumeContribution = new double[1];
+      NondominanceRanking = new int[1];
+      IndividualPc = 0;
+      IndividualPm = 0;
+      Age = 0;
+    }
+
+    public DynamicALPSSolution(IItem individual, int nObjectives, int nConstraints) : this(nObjectives, nConstraints)
+    {
+      Individual = individual;
+    }
+
+    public DynamicALPSSolution(IItem individual, double[] qualities, double[] constraints, double[] hypervolumecontribution, int[] nondominanceranking)
+    {
+      Individual = individual;
+      Qualities = qualities;
+      Constraints = constraints;
+      HypervolumeContribution = hypervolumecontribution;
+      NondominanceRanking = nondominanceranking;
+    }
+
+    public DynamicALPSSolution(double[] qualities)
+    {
+      Qualities = (double[])qualities.Clone();
+    }
+
+    public int Dimensions => Qualities == null ? 0 : Qualities.Length;
+
+    public override IDeepCloneable Clone(Cloner cloner)
+    {
+      return new DynamicALPSSolution(this, cloner);
+    }
+
+    protected DynamicALPSSolution(DynamicALPSSolution original, Cloner cloner) : base(original, cloner)
+    {
+      Qualities = (double[])original.Qualities.Clone();
+      Constraints = (double[])original.Qualities.Clone();
+      HypervolumeContribution = (double[])original.HypervolumeContribution.Clone();       // kf, sms-emoa
+      NondominanceRanking = (int[])original.NondominanceRanking.Clone();                  // kf, sms-emoa
+      Individual = (IItem)original.Individual.Clone(cloner);
+    }
+
+    [StorableConstructor]
+    protected DynamicALPSSolution(StorableConstructorFlag deserializing) : base(deserializing) { }
+  }
+
+  [Item("DynamicALPSSolution", "Represents a solution inside the DynamicALPS population")]
+
+
+
+  [StorableType("1EFC2459-C52E-4F95-9E14-23E69DCB23E0")]
+  public class DynamicALPSSolution<T> : DynamicALPSSolution where T : class, IItem
+  {
+    public new T Individual
+    {
+      get { return (T)base.Individual; }
+      set { base.Individual = value; }
+    }
+
+    public DynamicALPSSolution(T individual, int nObjectives, int nConstraints) : base(individual, nObjectives, nConstraints) { }
+
+    protected DynamicALPSSolution(DynamicALPSSolution<T> original, Cloner cloner) : base(original, cloner) { }
+
+    public override IDeepCloneable Clone(Cloner cloner)
+    {
+      return new DynamicALPSSolution<T>(this, cloner);
+    }
+
+    [StorableConstructor]
+    protected DynamicALPSSolution(StorableConstructorFlag deserializing) : base(deserializing) { }
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithm.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithm.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithm.cs	(revision 17438)
@@ -0,0 +1,249 @@
+﻿#region License Information
+/* HeuristicLab
+ * Author: Kaifeng Yang
+ * 
+ * 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/>.
+ */
+
+// SMS-EMOA
+/*
+Implemenetation of a real-coded SMS_EMOA algorithm.
+This implementation follows the description of: 'M. Emmerich, N. Beume, and B. Naujoks. 
+An EMO Algorithm Using the Hypervolume Measure as Selection Criterion.EMO 2005.'
+*/
+#endregion
+
+using HEAL.Attic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Random;
+using System.Linq;
+using System;
+using CancellationToken = System.Threading.CancellationToken;
+using HeuristicLab.Analysis;
+using HeuristicLab.Problems.TestFunctions.MultiObjective;
+using HeuristicLab.Optimization;
+using System.Collections.Generic;
+
+
+/*  This algorithm is SMS-EMOA implementation on HL. The main structure and interfaces with HL are copied from MOEA/D on HL, which was written by Dr. Bogdan Burlacu. The S-metric selection operator was adapted from Kaifeng's MATLAB toolbox in SMS-EMOA. The computational complexity of HVC is AT LEAST $O (n^2 \log n)$ in 2-D and 3-D cases. HVC should definitely be reduced to $\Theta (n \times \log n)$. 
+ *  
+ *  This algorithm assumes: 
+ *    1. minimization problems. For maximization problems, it is better to add "-" symbol.
+ *  
+ *  This algorithm works on:
+ *    1. continuous, discrete, mixed-integer MOO problems. For different types of problems, the operators should be adjusted accordingly. 
+ *    2. both multi-objective and many-objective problems. For many-objective problems, the bottleneck is the computational complexity of HV. 
+ * 
+ * This algorithm is the basic implementation of SMS-EMOA, proposed by Michael Emmerich et. al. Some potential improvements can be: 
+ *    1. Dynamic reference point strategy
+ *    2. Normalized fitness value strategy ---- desirability function. See, Yali, Longmei, Kaifeng, Michael Emmerich CEC paper. 
+ *    3. HVC calculation should definitely be improved, at least in the 2D and 3D cases.
+ *    4. multiple point strategy when $\lambda>1$ 
+ *    5. multiple reference points strategy, in ICNC 2016, Zhiwei Yang et. al. 
+ *    6. HVC approximation by R2 for MANY OBJECTIVE cases, by Ishibushi 2019, IEEE TEC  
+ *    7. Maybe: See maps 
+ * 
+ * Global parameters:
+ *    1. population  
+ *    
+ * Many thanks for Bogdan Burlacu and Johannes Karder, especially Bogdan for his explanation, help, and supports. 
+ */
+
+namespace HeuristicLab.Algorithms.DynamicALPS {
+  // Format: 
+  // The indexed name of the algorithm/item, Description of the algorithm/item in HL  
+  [Item("DynamicALPS-MainLoop", "DynamicALPS-MainLoop implementation adapted from SMS-EMOA in HL.")]
+
+  // Call "HeuristicLab.Core"
+  // Define the category of this class. 
+  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 125)]
+
+  // Call "HEAL.Attic"
+  // Define GUID for this Class
+  [StorableType("A7F33D16-3495-43E8-943C-8A919123F541")]
+
+  public class DynamicALPSAlgorithm : DynamicALPSAlgorithmBase {
+    public DynamicALPSAlgorithm() { }
+
+    protected DynamicALPSAlgorithm(DynamicALPSAlgorithm original, Cloner cloner) : base(original, cloner) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DynamicALPSAlgorithm(this, cloner);
+    }
+
+    [StorableConstructor]
+    protected DynamicALPSAlgorithm(StorableConstructorFlag deserializing) : base(deserializing) { }
+
+    protected override void Run(CancellationToken cancellationToken) {
+      if (previousExecutionState != ExecutionState.Paused) { // Call "base" class, DynamicALPSAlgorithmBase
+        InitializeAlgorithm(cancellationToken);
+      }
+
+
+      var populationSize = PopulationSize.Value;
+      bool[] maximization = ((BoolArray)Problem.MaximizationParameter.ActualValue).CloneAsArray();
+
+      var crossover = Crossover;
+      var crossoverProbability = CrossoverProbability.Value;
+      var mutator = Mutator;
+      var mutationProbability = MutationProbability.Value;
+      var evaluator = Problem.Evaluator;
+      var analyzer = Analyzer;
+      var rand = RandomParameter.Value;
+
+
+      var maximumEvaluatedSolutions = MaximumEvaluatedSolutions.Value;
+
+
+      int lambda = 1;            // the size of offspring 
+
+
+      int nLayerALPS = ALPSLayers.Value;
+      int counterLayerALPS = 0;
+
+      // IMPROVE: ........
+      int[] ageGapArray = new int[] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
+      int[] numberDiscard = new int[10];
+
+
+
+      activeLayer = new bool[nLayerALPS];
+      int[][] ageMatrix = new int[nLayerALPS][];      // layer * population size
+
+
+
+      // cancellation token for the inner operations which should not be immediately cancelled
+      var innerToken = new CancellationToken();
+
+
+      // run some analyzer on each layer (for now calculate scatter plots )
+      List<Tuple<int, ScatterPlotAnalyzer>> layerAnalyzers;
+
+
+      // 12022020
+      layerPopulation = new IDynamicALPSSolution[nLayerALPS][];
+      layerOffspringPopulation = new IDynamicALPSSolution[nLayerALPS][];
+      layerJointPopulation = new IDynamicALPSSolution[nLayerALPS][];
+      layerDiscardPopulation = new IDynamicALPSSolution[nLayerALPS][];
+
+
+      layerPopulation[counterLayerALPS] = new IDynamicALPSSolution[populationSize];
+      // BUG: The size of offspring should vary in different layers!!!!
+      layerOffspringPopulation[counterLayerALPS] = new IDynamicALPSSolution[lambda];
+      layerDiscardPopulation[counterLayerALPS] = new IDynamicALPSSolution[populationSize];
+      population.CopyTo(layerPopulation[counterLayerALPS], 0);
+
+      activeLayer[counterLayerALPS] = true;
+      for (int i = 0; i < nLayerALPS; i++) {
+        if (i == 0) {
+          activeLayer[i] = true;
+        }
+        else { activeLayer[i] = false; }
+        numberDiscard[i] = 0;
+      }
+
+      // Mainloop 
+      while (evaluatedSolutions < maximumEvaluatedSolutions && !cancellationToken.IsCancellationRequested) {
+        for (int i = 0; i < nLayerALPS; i++) {            // loop for every layer
+          int discardedIndividualIndex = 0;
+          if (activeLayer[i] == true) {                   // check the layer is active or not. 
+            evaluatedSolutions = SMSEMOA(populationSize, lambda, i);
+            if (evaluatedSolutions >= maximumEvaluatedSolutions) { break; }           // check evaluation budget
+            ageMatrix[i] = layerJointPopulation[i].Select(x => x.Age).ToArray();      // get age info of the current layer joint population 
+            if (ageMatrix[i].Max() > ageGapArray[i]) {    // mature: moving 
+              discardedIndividualIndex = ageMatrix[i].ToList().IndexOf(ageMatrix[i].Max());   // BUG when two individual has the same maximal age???? NOT POSSBILE IN SMS-EMOA 
+              layerDiscardPopulation[i][numberDiscard[i]] = layerJointPopulation[i][discardedIndividualIndex];                    // move the individual to the next layer 
+              layerJointPopulation[i].Where((x, idx) => idx != discardedIndividualIndex).ToArray().CopyTo(layerPopulation[i], 0); // discard the indivudal in the current layer  
+              numberDiscard[i] += 1;
+              if (activeLayer[i + 1] == false) {   // next layer is not active  // bug, if i == number of layer,  out of range .
+                if (numberDiscard[i] == populationSize) {
+                  InitializeLayer(i + 1, populationSize, lambda);  // initilizae the layerPopulation for the next layer && ACTIVE FLAGE
+                  layerDiscardPopulation[i].CopyTo(layerPopulation[i + 1], 0);
+                  numberDiscard[i] = 0;
+                }
+                else {
+                  // number of matured individuals < population size in the next layer
+                }
+              }
+              else {  // next layer is active
+                layerPopulation[i+1].CopyTo(layerJointPopulation[i + 1], 0);
+                layerJointPopulation[i].Where((x, idx) => idx == discardedIndividualIndex).ToArray().CopyTo(layerJointPopulation[i + 1], populationSize);
+                SmetricSelection(lambda, i + 1); // AGE and HVC 
+                numberDiscard[i] = 0;
+              }
+            }
+            layerPopulation[i].CopyTo(population, 0);  // BUG: should copy all the active layers to population.
+          }
+          else {
+            // Some thing wrong? lol nothing wrong here ^_^
+          }
+        }
+
+
+
+        // run analyzer
+        var analyze = executionContext.CreateChildOperation(analyzer, globalScope);
+        ExecuteOperation(executionContext, innerToken, analyze);
+        // update Pareto-front approximation sets
+        UpdateParetoFronts();
+        // Show some results in the GUI.
+        Results.AddOrUpdateResult("IdealPoint", new DoubleArray(IdealPoint));
+        Results.AddOrUpdateResult("NadirPoint", new DoubleArray(NadirPoint));
+        Results.AddOrUpdateResult("Evaluated Solutions", new IntValue(evaluatedSolutions));
+
+        var allLayerResults = new ResultCollection();
+        Results.AddOrUpdateResult("LayerResults", allLayerResults);
+        
+        // run layer analyzers
+        for (int i = 0; i < activeLayer.Length; ++i) {
+          if (!activeLayer[i]) continue;
+          var scope = new Scope($"Layer {i}");
+          var layer = layerPopulation[i];
+          var layerResults = new ResultCollection();
+          allLayerResults.Add(new Result(scope.Name, layerResults));
+
+          var problem = (MultiObjectiveTestFunctionProblem)Problem;
+          //scope.Variables.Add(new Variable("Individuals", new ItemArray<IScope>(layer.Select(x => (IScope)x.Individual))));
+          //scope.Variables.Add(new Variable("Qualities", new ItemArray<DoubleArray>(layer.Select(x => new DoubleArray(x.Qualities)))));
+          scope.SubScopes.AddRange(layer.Select(x => (IScope)x.Individual));
+          scope.Variables.Add(new Variable("Results", layerResults));
+          scope.Variables.Add(new Variable("TestFunction", problem.TestFunction));
+          var scatterPlotAnalyzer = new ScatterPlotAnalyzer();
+          scatterPlotAnalyzer.IndividualsParameter.ActualName = "RealVector";
+          var scattetPlotAnalyzerContext = executionContext.CreateChildOperation(scatterPlotAnalyzer, scope);
+          ExecuteOperation(executionContext, CancellationToken.None, scattetPlotAnalyzerContext);
+          scope.SubScopes.Clear();
+          scope.Variables.Clear();
+        }
+
+        // Update globalScope
+        globalScope.SubScopes.Replace(population.Select(x => (IScope)x.Individual));
+
+
+        //// intilize the population for the next layer
+        //counterLayerALPS += 1;
+        //layerPopulation[counterLayerALPS] = new IDynamicALPSSolution[populationSize];
+        //layerPopulation[counterLayerALPS-1].CopyTo(layerPopulation[counterLayerALPS], 0); // DETELTE DUBGU 
+        //// BUG lambda should be different~~~~!!!!
+        //layerOffspringPopulation[counterLayerALPS] = new IDynamicALPSSolution[lambda];
+      }
+    }
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithmBase.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithmBase.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSAlgorithmBase.cs	(revision 17438)
@@ -0,0 +1,875 @@
+﻿#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
+
+// 03/02/2020
+// TODO LIST:                                                                     
+// 1. Dynamic reference point strategy                                               
+// 2. Normalized fitness value strategy, desibility function.                         
+// 3. HVC calculation should be definitely improved, at least in the 2D case.
+// 4. multiple point strategy when $\lambda>1$ 
+
+using HEAL.Attic;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.ExpressionGenerator;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.TestFunctions.MultiObjective;
+using HeuristicLab.Random;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using CancellationToken = System.Threading.CancellationToken;
+
+namespace HeuristicLab.Algorithms.DynamicALPS {
+  [Item("DynamicALPSAlgorithmBase", "Base class for all DynamicALPS algorithm variants.")]
+  [StorableType("C0141748-DF5A-4CA0-A3DD-1DFB98236F7E")]
+  public abstract class DynamicALPSAlgorithmBase : BasicAlgorithm {
+    #region data members
+ 
+    [StorableType("75C9EA99-D699-4A1F-8AB2-AB86B7A2FD68")]
+    protected enum NeighborType { NEIGHBOR, POPULATION }
+
+
+    [StorableType("2A71E397-05CE-460F-B982-EE2F4B37C354")]
+    // TCHE = Chebyshev (Tchebyshev)
+    // PBI  = Penalty-based boundary intersection
+    // AGG  = Weighted sum
+    public enum FunctionType { TCHE, PBI, AGG }
+
+    [Storable]
+    protected double[] IdealPoint { get; set; }
+    [Storable]
+    protected double[] NadirPoint { get; set; } // potentially useful for objective normalization
+
+    [Storable]
+    protected double[][] lambda_moead;
+
+    [Storable]
+    protected int[][] neighbourhood;
+
+    [Storable]
+    protected IDynamicALPSSolution[] solutions;
+
+    [Storable]
+    protected FunctionType functionType;
+
+    [Storable]
+    protected IDynamicALPSSolution[] population;
+
+    [Storable]
+    protected IDynamicALPSSolution[][] layerPopulation;
+
+    [Storable]
+    protected bool[] activeLayer;
+
+    [Storable]
+    protected IDynamicALPSSolution[][] layerDiscardPopulation;
+
+    [Storable]
+    protected IDynamicALPSSolution[][] layerOffspringPopulation;
+
+    [Storable]
+    protected IDynamicALPSSolution[][] layerJointPopulation;
+
+    [Storable]
+    protected IDynamicALPSSolution[] offspringPopulation;
+
+    //[Storable]
+    //protected IDynamicALPSSolution[] jointPopulation;
+
+    [Storable]
+    protected int evaluatedSolutions;
+
+    [Storable]
+    protected ExecutionContext executionContext;
+
+    [Storable]
+    protected IScope globalScope;
+
+    [Storable]
+    protected ExecutionState previousExecutionState;
+
+    [Storable]
+    protected ExecutionState executionState;
+
+    private DoubleArray ReferencePoint {
+      get {
+        var problem = (MultiObjectiveTestFunctionProblem)Problem;
+        return problem.ReferencePoint;
+      }
+    }
+    #endregion
+
+    #region parameters
+    private const string SeedParameterName = "Seed";
+    private const string SetSeedRandomlyParameterName = "SetSeedRandomly";
+    private const string PopulationSizeParameterName = "PopulationSize";
+    private const string ResultPopulationSizeParameterName = "ResultPopulationSize";
+    private const string CrossoverProbabilityParameterName = "CrossoverProbability";
+    private const string CrossoverParameterName = "Crossover";
+    private const string MutationProbabilityParameterName = "MutationProbability";
+    private const string MutatorParameterName = "Mutator";
+    private const string MaximumEvaluatedSolutionsParameterName = "MaximumEvaluatedSolutions";
+    private const string RandomParameterName = "Random";
+    private const string AnalyzerParameterName = "Analyzer";
+    // MOEA-D parameters
+    //private const string NeighbourSizeParameterName = "NeighbourSize";
+    //private const string NeighbourhoodSelectionProbabilityParameterName = "NeighbourhoodSelectionProbability";
+    //private const string MaximumNumberOfReplacedSolutionsParameterName = "MaximumNumberOfReplacedSolutions";
+    //private const string FunctionTypeParameterName = "FunctionType";
+    // private const string NormalizeObjectivesParameterName = "NormalizeObjectives";
+
+    // SMS-EMOA parameters: 
+    private const string LambdaParameterName = "Lambda";   // The number of offspring size 
+    private const string ALPSLayersParameterName = "ALPSLayers";   // The number of offspring size 
+    private const string ALPSAgeGapParameterName = "ALPSAgeGap";   // The number of offspring size 
+
+
+
+    // "Parameters" are defined in "HeuristicLab.Parameters"
+    // Contains: generic parameters of every class/algorithm/instance, 
+    // It seems that "I***ValueParameter" is declared in "Heuristic.core", where "***ValueParameter" are defined in "HeuristicLab.Parameter"
+    // The function of "I***ValueParameter" is to bridge current scripts to "HeuristicLab.Parameter". 
+    public IValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters[AnalyzerParameterName]; }
+    }
+
+    //public IConstrainedValueParameter<StringValue> FunctionTypeParameter
+    //{
+    //  get { return (IConstrainedValueParameter<StringValue>)Parameters[FunctionTypeParameterName]; }
+    //}
+    //public IFixedValueParameter<IntValue> NeighbourSizeParameter
+    //{
+    //  get { return (IFixedValueParameter<IntValue>)Parameters[NeighbourSizeParameterName]; }
+    //}
+    //public IFixedValueParameter<BoolValue> NormalizeObjectivesParameter
+    //{
+    //  get { return (IFixedValueParameter<BoolValue>)Parameters[NormalizeObjectivesParameterName]; }
+    //}
+    //public IFixedValueParameter<IntValue> MaximumNumberOfReplacedSolutionsParameter
+    //{
+    //  get { return (IFixedValueParameter<IntValue>)Parameters[MaximumNumberOfReplacedSolutionsParameterName]; }
+    //}
+    //public IFixedValueParameter<DoubleValue> NeighbourhoodSelectionProbabilityParameter
+    //{
+    //  get { return (IFixedValueParameter<DoubleValue>)Parameters[NeighbourhoodSelectionProbabilityParameterName]; }
+    //}
+    public IFixedValueParameter<IntValue> SeedParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[SeedParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; }
+    }
+    private IValueParameter<IntValue> PopulationSizeParameter {
+      get { return (IValueParameter<IntValue>)Parameters[PopulationSizeParameterName]; }
+    }
+    // KF, SMS-EMOA
+    private IValueParameter<IntValue> LambdaParameter {
+      get { return (IValueParameter<IntValue>)Parameters[LambdaParameterName]; }
+    }
+    //// KF, DynamicALPS
+    private IValueParameter<IntValue> ALPSLayersParameter{
+      get { return (IValueParameter<IntValue>)Parameters[ALPSLayersParameterName]; }
+    }
+    private IValueParameter<IntValue> ALPSAgeGapParameter {
+      get { return (IValueParameter<IntValue>)Parameters[ALPSAgeGapParameterName]; }
+    }
+
+    private IValueParameter<IntValue> ResultPopulationSizeParameter {
+      get { return (IValueParameter<IntValue>)Parameters[ResultPopulationSizeParameterName]; }
+    }
+
+    public IValueParameter<PercentValue> CrossoverProbabilityParameter {
+      get { return (IValueParameter<PercentValue>)Parameters[CrossoverProbabilityParameterName]; }
+    }
+    public IConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (IConstrainedValueParameter<ICrossover>)Parameters[CrossoverParameterName]; }
+    }
+    public IValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (IValueParameter<PercentValue>)Parameters[MutationProbabilityParameterName]; }
+    }
+    public IConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (IConstrainedValueParameter<IManipulator>)Parameters[MutatorParameterName]; }
+    }
+    public IValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
+      get { return (IValueParameter<IntValue>)Parameters[MaximumEvaluatedSolutionsParameterName]; }
+    }
+    public IValueParameter<IRandom> RandomParameter {
+      get { return (IValueParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    #endregion
+
+    #region parameter properties
+    public new IMultiObjectiveHeuristicOptimizationProblem Problem {
+      get { return (IMultiObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    public int Seed {
+      get { return SeedParameter.Value.Value; }
+      set { SeedParameter.Value.Value = value; }
+    }
+    public bool SetSeedRandomly {
+      get { return SetSeedRandomlyParameter.Value.Value; }
+      set { SetSeedRandomlyParameter.Value.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public IntValue Lambda {
+      get { return LambdaParameter.Value; }
+      set { LambdaParameter.Value = value; }
+    }
+
+    public IntValue ResultPopulationSize {
+      get { return ResultPopulationSizeParameter.Value; }
+      set { ResultPopulationSizeParameter.Value = value; }
+    }
+
+    public IntValue ALPSLayers {
+      get { return ALPSLayersParameter.Value; }
+      set { ALPSLayersParameter.Value = value; }
+    }
+
+    public IntValue ALPSAgeGap {
+      get { return ALPSAgeGapParameter.Value; }
+      set { ALPSAgeGapParameter.Value = value; }
+    }
+
+    public PercentValue CrossoverProbability {
+      get { return CrossoverProbabilityParameter.Value; }
+      set { CrossoverProbabilityParameter.Value = value; }
+    }
+    public ICrossover Crossover {
+      get { return CrossoverParameter.Value; }
+      set { CrossoverParameter.Value = value; }
+    }
+    public PercentValue MutationProbability {
+      get { return MutationProbabilityParameter.Value; }
+      set { MutationProbabilityParameter.Value = value; }
+    }
+    public IManipulator Mutator {
+      get { return MutatorParameter.Value; }
+      set { MutatorParameter.Value = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public IntValue MaximumEvaluatedSolutions {
+      get { return MaximumEvaluatedSolutionsParameter.Value; }
+      set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    #endregion
+
+    #region constructors
+    public DynamicALPSAlgorithmBase() {
+      // Add or define or specify the parameters that may be use in SMS-EMOA.   
+      // ***("Name", "Description", "Value")
+      //  Name                            Type                Description
+      //  FixedValueParameter:            ANY                 Not changed???
+      //  ValueParameter:                                     Changable??? What is the difference between "ValueParameter" and "FixedVlaueParameter"?????
+
+
+      // types: 
+      //      IntValue
+      //      BoolValue
+      //      DoubleValue
+      //      PercentValue
+      //      ICrossover:       
+      //      IManipulator:     
+      //      IRandom:         
+      //      MultiAnalyzer:    
+      //      ---------
+      Parameters.Add(new FixedValueParameter<IntValue>(SeedParameterName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyParameterName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>(PopulationSizeParameterName, "The size of the population of solutions.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>(ResultPopulationSizeParameterName, "The size of the population of solutions.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<PercentValue>(CrossoverProbabilityParameterName, "The probability that the crossover operator is applied.", new PercentValue(0.9)));
+      Parameters.Add(new ConstrainedValueParameter<ICrossover>(CrossoverParameterName, "The operator used to cross solutions."));
+      Parameters.Add(new ValueParameter<PercentValue>(MutationProbabilityParameterName, "The probability that the mutation operator is applied on a solution.", new PercentValue(0.25)));
+      Parameters.Add(new ConstrainedValueParameter<IManipulator>(MutatorParameterName, "The operator used to mutate solutions."));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<IntValue>(MaximumEvaluatedSolutionsParameterName, "The maximum number of evaluated solutions (approximately).", new IntValue(100_000)));
+      Parameters.Add(new ValueParameter<IRandom>(RandomParameterName, new FastRandom()));
+
+      // SMS-EMOA, kf
+      Parameters.Add(new ValueParameter<IntValue>(LambdaParameterName, "The size of the offsprings. Now, it only works when lambda = 1", new IntValue(1)));
+      // DynamicALPS, KF
+      Parameters.Add(new ValueParameter<IntValue>(ALPSLayersParameterName, "Test, maximum = 1000, defualt is 1", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>(ALPSAgeGapParameterName, "Test, maximum = 1000, defualt is 20", new IntValue(20)));
+      
+
+    }
+
+    protected DynamicALPSAlgorithmBase(DynamicALPSAlgorithmBase original, Cloner cloner) : base(original, cloner) {
+      functionType = original.functionType;
+      evaluatedSolutions = original.evaluatedSolutions;
+      previousExecutionState = original.previousExecutionState;
+
+      if (original.IdealPoint != null) {
+        IdealPoint = (double[])original.IdealPoint.Clone();
+      }
+
+      if (original.NadirPoint != null) {
+        NadirPoint = (double[])original.NadirPoint.Clone();
+      }
+
+      if (original.lambda_moead != null) {
+        lambda_moead = (double[][])original.lambda_moead.Clone();
+      }
+
+      if (original.neighbourhood != null) {
+        neighbourhood = (int[][])original.neighbourhood.Clone();
+      }
+
+      if (original.solutions != null) {
+        solutions = original.solutions.Select(cloner.Clone).ToArray();
+      }
+
+      if (original.population != null) {
+        population = original.population.Select(cloner.Clone).ToArray();
+      }
+
+      if (original.offspringPopulation != null) {
+        offspringPopulation = original.offspringPopulation.Select(cloner.Clone).ToArray();
+      }
+
+      //if (original.jointPopulation != null) {
+      //  jointPopulation = original.jointPopulation.Select(x => cloner.Clone(x)).ToArray();
+      //}
+
+      if (original.executionContext != null) {
+        executionContext = cloner.Clone(original.executionContext);
+      }
+
+      if (original.globalScope != null) {
+        globalScope = cloner.Clone(original.globalScope);
+      }
+    }
+
+
+
+    [StorableConstructor]
+    protected DynamicALPSAlgorithmBase(StorableConstructorFlag deserializing) : base(deserializing) { }
+    #endregion
+
+    private void InitializePopulation(ExecutionContext executionContext, CancellationToken cancellationToken, IRandom random, bool[] maximization) {
+      // creator: how to create the initilized population. "UniformRandom" is used here. 
+      // TODO: LHS, latin hypercube sampling? Exisit??? 
+      var creator = Problem.SolutionCreator;
+      var evaluator = Problem.Evaluator;
+
+      // dimensions: objective space
+      var dimensions = maximization.Length;
+      var populationSize = PopulationSize.Value;
+      population = new IDynamicALPSSolution[populationSize];
+
+      var parentScope = executionContext.Scope;
+      // first, create all individuals
+      for (int i = 0; i < populationSize; ++i) {
+        var childScope = new Scope(i.ToString()) { Parent = parentScope };
+        ExecuteOperation(executionContext, cancellationToken, executionContext.CreateChildOperation(creator, childScope));
+        parentScope.SubScopes.Add(childScope);
+      }
+
+      for (int i = 0; i < populationSize; ++i) {
+        var childScope = parentScope.SubScopes[i];
+        ExecuteOperation(executionContext, cancellationToken, executionContext.CreateChildOperation(evaluator, childScope));
+
+        var qualities = (DoubleArray)childScope.Variables["Qualities"].Value;
+
+        // solution: a method, contains a decision vector and objecitve values     
+        //    solution.Qualities:     objective values, fitness values 
+        //    solution.Individual:    decision vector
+        var solution = new DynamicALPSSolution(childScope, dimensions, 0);
+        for (int j = 0; j < dimensions; ++j) {
+          // TODO: convert maximization problems into minimization problems. 
+          solution.Qualities[j] = maximization[j] ? 1 - qualities[j] : qualities[j];
+        }
+
+        // population is a collection of solution.  
+        population[i] = solution;
+
+        // KF, DyanmicALPS
+        population[i].HypervolumeContribution[0] = -0;
+        population[i].NondominanceRanking[0] = -0;
+        population[i].Age = 1;
+        population[i].IndividualPc = CrossoverProbability.Value;
+        population[i].IndividualPc = MutationProbability.Value;
+      }
+    }
+
+    protected void InitializeAlgorithm(CancellationToken cancellationToken) { // Type of random operator, "FastRandom" in this script. 
+      // RandomParameter <-- Parameters in "HeuristicLab.Core.ParameterizedNameItem", 
+      var rand = RandomParameter.Value;
+
+      // Initialize random seed
+      // If random seed exist, get it; otherwise, 
+      if (SetSeedRandomly) Seed = RandomSeedGenerator.GetSeed();
+
+      // Call 
+      rand.Reset(Seed);
+
+      bool[] maximization = ((BoolArray)Problem.MaximizationParameter.ActualValue).CloneAsArray();
+
+      // dimensions: the dimension in an objective space 
+      var dimensions = maximization.Length;
+
+
+      var populationSize = PopulationSize.Value;
+
+      InitializePopulation(executionContext, cancellationToken, rand, maximization);
+
+      IdealPoint = new double[dimensions];
+      IdealPoint.UpdateIdeal(population);
+
+      NadirPoint = Enumerable.Repeat(double.MinValue, dimensions).ToArray();
+      //NadirPoint = new double[dimensions];
+      NadirPoint.UpdateNadir(population);
+
+
+      evaluatedSolutions = populationSize;
+    }
+
+    protected override void Initialize(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.
+
+      base.Initialize(cancellationToken);
+    }
+
+    public override bool SupportsPause => true;
+
+
+
+
+    // Mate Selection. 
+    // Randomly select a specific number of individuals for later operators. 
+    // Inputs: 
+    //    1. random:                      Random number generate method
+    //    2. numberOfSolutionToSelect:    The number of selection    
+    // Outputs: 
+    //    1. listOfSolutions:             The selection individuals
+    protected List<int> MatingSelection(IRandom random, int numberOfSolutionsToSelect) {
+      int populationSize = PopulationSize.Value;
+
+      var listOfSolutions = new List<int>(numberOfSolutionsToSelect);
+
+      while (listOfSolutions.Count < numberOfSolutionsToSelect) {
+        var selectedSolution = random.Next(populationSize);
+
+        bool flag = true;
+        foreach (int individualId in listOfSolutions) {
+          if (individualId == selectedSolution) {
+            flag = false;
+            break;
+          }
+        }
+
+        if (flag) {
+          listOfSolutions.Add(selectedSolution);
+        }
+      }
+      return listOfSolutions;
+    }
+
+    protected void ApplyCrossover(int lambda) {
+    }
+
+    protected void ApplyMutation(int lambda) {
+    }
+
+
+    protected void ApplyEvaluation(int lambda) {
+    }
+
+    protected void ApplyMateSelection(int rho) {
+    }
+
+    protected void InitializeLayer(int indexLayer, int populationSize, int lambda) {
+      layerPopulation[indexLayer] = new IDynamicALPSSolution[populationSize];
+      layerJointPopulation[indexLayer] = new IDynamicALPSSolution[populationSize + lambda];
+      layerOffspringPopulation[indexLayer] = new IDynamicALPSSolution[lambda];
+      layerDiscardPopulation[indexLayer] = new IDynamicALPSSolution[populationSize];
+      activeLayer[indexLayer] = true;
+    }
+
+
+    // Select/Discard the individual(s) according to HVC 
+    protected void SmetricSelection(int lambda, int nLayerALPS) {
+      var wholePopulation = layerJointPopulation[nLayerALPS];
+      var qualities = wholePopulation.Select(x => x.Qualities).ToArray();
+
+      var maximization = Enumerable.Repeat(false, IdealPoint.Length).ToArray(); // Minimization or maximization ????
+      var pf2 = DominationCalculator<IDynamicALPSSolution>.CalculateAllParetoFronts(wholePopulation, qualities, maximization, out int[] ranking);
+
+      int numberOfLayer;             // number of layers in PF
+      int numberOfLastLayer;          // number of discarded points in PF (the number of points in the last layer)
+
+      pf2.RemoveAt(pf2.Count() - 1);
+      numberOfLayer = pf2.Count();
+      numberOfLastLayer = pf2[numberOfLayer - 1].Count();
+      double[] hvc = new double[numberOfLastLayer];
+      int discardIndex;
+      if (numberOfLastLayer > lambda) {
+        double tempHV;
+        double smetric;
+        var lastLayer = pf2.Last();
+
+        // TODO: This can be use for dynamic reference point strategy later. Kaifeng , 02/2020
+        // smetric = Hypervolume.Calculate(lastLayer.Select(x => x.Item2), Enumerable.Repeat(11d, NadirPoint.Length).ToArray(), maximization);
+        var reference = ReferencePoint.ToArray();
+        var nondominated = NonDominatedSelect.GetDominatingVectors(lastLayer.Select(x => x.Item2), reference, maximization, false);
+        smetric = nondominated.Any() ? Hypervolume.Calculate(nondominated, reference, maximization) : int.MinValue;
+
+        for (int ii = 0; ii < lastLayer.Count; ++ii) {
+          try { // TODO: This can be use for dynamic reference point strategy later. Kaifeng , 02/2020
+            // tempHV = Hypervolume.Calculate(indices.Where(idx => idx != ii).Select(idx => lastLayer[idx].Item2), Enumerable.Repeat(11d, NadirPoint.Length).ToArray(), maximization);
+            tempHV = Hypervolume.Calculate(Enumerable.Range(0, lastLayer.Count).Where(idx => idx != ii).Select(idx => lastLayer[idx].Item2), reference, maximization);
+          }
+          catch {
+            tempHV = int.MinValue;
+          }
+          hvc[ii] = smetric - tempHV;
+          tempHV = 0;
+        }
+        discardIndex = Array.IndexOf(hvc, hvc.Min());
+        pf2[numberOfLayer - 1].RemoveAt(discardIndex);
+      }
+      else {
+        // TODO: This should be updated when $lambda > 1$
+        pf2.RemoveAt(pf2.Count() - 1);
+        numberOfLayer = numberOfLayer - 1;
+      }
+      layerPopulation[nLayerALPS] = pf2.SelectMany(x => x.Select(y => y.Item1)).ToArray();
+    }
+
+    protected int SMSEMOA(int populationSize, int lambda, int counterLayerALPS) {
+      var innerToken = new CancellationToken();
+      bool[] maximization = ((BoolArray)Problem.MaximizationParameter.ActualValue).CloneAsArray();
+      var maximumEvaluatedSolutions = MaximumEvaluatedSolutions.Value;
+      var crossover = Crossover;
+      var crossoverProbability = CrossoverProbability.Value;
+      var mutator = Mutator;
+      var mutationProbability = MutationProbability.Value;
+      var evaluator = Problem.Evaluator;
+      var analyzer = Analyzer;
+      var rand = RandomParameter.Value;
+
+
+      int indexOffspring = 0;
+      var mates = MatingSelection(rand, 2); // select parents
+                                            //var s1 = (IScope)population[mates[0]].Individual.Clone();
+                                            //var s2 = (IScope)population[mates[1]].Individual.Clone();
+                                            //var ages = population.Select(x => x.Age).ToArray();
+
+      var s1 = (IScope)layerPopulation[counterLayerALPS][mates[0]].Individual.Clone();
+      var s2 = (IScope)layerPopulation[counterLayerALPS][mates[1]].Individual.Clone();
+      var ages = layerPopulation[counterLayerALPS].Select(x => x.Age).ToArray();
+
+      var s1_age = ages[mates[0]];
+      var s2_age = ages[mates[1]];
+      int offSpringAge = 0;
+      s1.Parent = s2.Parent = globalScope;
+      IScope childScope = null;
+
+      // crossover
+      if (rand.NextDouble() < crossoverProbability) {
+        childScope = new Scope($"{mates[0]}+{mates[1]}") { Parent = executionContext.Scope };
+        childScope.SubScopes.Add(s1);
+        childScope.SubScopes.Add(s2);
+        var opCrossover = executionContext.CreateChildOperation(crossover, childScope);
+        ExecuteOperation(executionContext, innerToken, opCrossover);
+        offSpringAge = Math.Max(s1_age, s2_age) + 1;
+        childScope.SubScopes.Clear(); // <<-- VERY IMPORTANT!
+      }
+      else { // MUTATION   POLISHI
+        if (childScope == null) {
+          offSpringAge = ages[mates[0]] + 1;
+        }
+        else {
+        }
+        childScope = childScope ?? s1;
+        var opMutation = executionContext.CreateChildOperation(mutator, childScope);
+        ExecuteOperation(executionContext, innerToken, opMutation);
+      }
+      if (childScope != null) { // Evaluate the childScope
+        var opEvaluation = executionContext.CreateChildOperation(evaluator, childScope);
+        ExecuteOperation(executionContext, innerToken, opEvaluation);
+        // childScope 
+        var qualities = (DoubleArray)childScope.Variables["Qualities"].Value;
+        var childSolution = new DynamicALPSSolution(childScope, maximization.Length, 0);
+        // set child qualities
+        for (int j = 0; j < maximization.Length; ++j) {
+          childSolution.Qualities[j] = maximization[j] ? 1 - qualities[j] : qualities[j];
+        }
+        IdealPoint.UpdateIdeal(childSolution.Qualities);
+        NadirPoint.UpdateNadir(childSolution.Qualities);
+        // TODO, KF -- For later usage when $lambda > 1$
+        childSolution.HypervolumeContribution = null;
+        childSolution.NondominanceRanking = null;
+        childSolution.Age = offSpringAge;
+        layerOffspringPopulation[counterLayerALPS][indexOffspring] = childSolution;
+        ++evaluatedSolutions;
+        indexOffspring += 1;
+      }
+      else {
+        // no crossover or mutation were applied, a child was not produced, do nothing
+      }
+
+
+      layerJointPopulation[counterLayerALPS] = new IDynamicALPSSolution[populationSize + lambda];
+      layerPopulation[counterLayerALPS].CopyTo(layerJointPopulation[counterLayerALPS], 0);
+      layerOffspringPopulation[counterLayerALPS].CopyTo(layerJointPopulation[counterLayerALPS], populationSize);
+
+      SmetricSelection(lambda, counterLayerALPS);   // SMS-EMOA 
+      return evaluatedSolutions;
+    }
+
+
+
+
+
+
+
+    // Update the Pareto-front approximation set and scatter the solutions in PF approximation set. 
+    protected void UpdateParetoFronts() {
+      //var qualities = population.Select(x => Enumerable.Range(0, NadirPoint.Length).Select(i => x.Qualities[i] / NadirPoint[i]).ToArray()).ToArray();
+      var qualities = population.Select(x => x.Qualities).ToArray();
+      var maximization = Enumerable.Repeat(false, IdealPoint.Length).ToArray();                             // DynamicALPS minimizes everything internally
+      var pf = DominationCalculator<IDynamicALPSSolution>.CalculateBestParetoFront(population, qualities, maximization);
+
+      var pf2 = DominationCalculator<IDynamicALPSSolution>.CalculateAllParetoFronts(population, qualities, maximization, out int[] ranking);
+      var n = (int)EnumerableExtensions.BinomialCoefficient(IdealPoint.Length, 2);
+
+
+      // Struture hypervolume 
+      // [0,0]:  Value of HV
+      // [0,1]:  PF size, $|PF|$
+      var hypervolumes = new DoubleMatrix(n == 1 ? 1 : n + 1, 2) { ColumnNames = new[] { "PF hypervolume", "PF size" } };
+
+
+      // HV calculation 
+      // pf.Select(x => x.Item2): the "Item2" in var "pd"
+      // Enumerable.Repeat(1d, NadirPoint.Length).ToArray():     reference point 
+      // maximization:   type of optimization problem:
+      //               True:  maximization problem 
+      //               False: minimization problem
+      var reference = ReferencePoint.ToArray();
+      var nondominated = NonDominatedSelect.GetDominatingVectors(pf.Select(x => x.Item2), reference, maximization, false);
+      hypervolumes[0, 0] = nondominated.Any() ? Hypervolume.Calculate(nondominated, reference, maximization) : int.MinValue;
+
+      //hypervolumes[0, 0] = Hypervolume.Calculate(pf.Select(x => x.Item2), reference, maximization);
+      hypervolumes[0, 1] = pf.Count;
+      Console.WriteLine("Current HV is", hypervolumes[0, 0]);
+
+      var elementNames = new List<string>() { "Pareto Front" };
+
+      ResultCollection results;
+      if (Results.ContainsKey("Hypervolume Analysis")) {
+        results = (ResultCollection)Results["Hypervolume Analysis"].Value;
+      }
+      else {
+        results = new ResultCollection();
+        Results.AddOrUpdateResult("Hypervolume Analysis", results);
+      }
+
+      ScatterPlot sp;
+      if (IdealPoint.Length == 2) {
+        var points = pf.Select(x => new Point2D<double>(x.Item2[0], x.Item2[1]));
+        var r = OnlinePearsonsRCalculator.Calculate(points.Select(x => x.X), points.Select(x => x.Y), out OnlineCalculatorError error);
+        if (error != OnlineCalculatorError.None) { r = double.NaN; }
+        var resultName = "Pareto Front Analysis ";
+        if (!results.ContainsKey(resultName)) {
+          sp = new ScatterPlot() {
+            VisualProperties = {
+              XAxisMinimumAuto = false, XAxisMinimumFixedValue = 0d, XAxisMaximumAuto = false, XAxisMaximumFixedValue = 1d,
+              YAxisMinimumAuto = false, YAxisMinimumFixedValue = 0d, YAxisMaximumAuto = false, YAxisMaximumFixedValue = 1d
+            }
+          };
+          sp.Rows.Add(new ScatterPlotDataRow(resultName, "", points) { VisualProperties = { PointSize = 8 } });
+          results.AddOrUpdateResult(resultName, sp);
+        }
+        else {
+          sp = (ScatterPlot)results[resultName].Value;
+          sp.Rows[resultName].Points.Replace(points);
+        }
+        sp.Name = $"Dimensions [0, 1], correlation: {r.ToString("N2")}";
+      }
+      else if (IdealPoint.Length > 2) {
+        var indices = Enumerable.Range(0, IdealPoint.Length).ToArray();
+        var visualProperties = new ScatterPlotDataRowVisualProperties { PointSize = 8, Color = Color.LightGray };
+        var combinations = indices.Combinations(2).ToArray();
+        var maximization2d = new[] { false, false };
+        var solutions2d = pf.Select(x => x.Item1).ToArray();
+        for (int i = 0; i < combinations.Length; ++i) {
+          var c = combinations[i].ToArray();
+
+          // calculate the hypervolume in the 2d coordinate space
+          var reference2d = new[] { 1d, 1d };
+          var qualities2d = pf.Select(x => new[] { x.Item2[c[0]], x.Item2[c[1]] }).ToArray();
+          var pf2d = DominationCalculator<IDynamicALPSSolution>.CalculateBestParetoFront(solutions2d, qualities2d, maximization2d);
+
+          hypervolumes[i + 1, 0] = pf2d.Count > 0 ? Hypervolume.Calculate(pf2d.Select(x => x.Item2), reference2d, maximization2d) : 0d;
+          hypervolumes[i + 1, 1] = pf2d.Count;
+
+          var resultName = $"Pareto Front Analysis [{c[0]}, {c[1]}]";
+          elementNames.Add(resultName);
+
+          var points = pf.Select(x => new Point2D<double>(x.Item2[c[0]], x.Item2[c[1]]));
+          var pf2dPoints = pf2d.Select(x => new Point2D<double>(x.Item2[0], x.Item2[1]));
+
+          if (!results.ContainsKey(resultName)) {
+            sp = new ScatterPlot() {
+              VisualProperties = {
+                XAxisMinimumAuto = false, XAxisMinimumFixedValue = 0d, XAxisMaximumAuto = false, XAxisMaximumFixedValue = 1d,
+                YAxisMinimumAuto = false, YAxisMinimumFixedValue = 0d, YAxisMaximumAuto = false, YAxisMaximumFixedValue = 1d
+              }
+            };
+            sp.Rows.Add(new ScatterPlotDataRow("Pareto Front", "", points) { VisualProperties = visualProperties });
+            sp.Rows.Add(new ScatterPlotDataRow($"Pareto Front [{c[0]}, {c[1]}]", "", pf2dPoints) { VisualProperties = { PointSize = 10, Color = Color.OrangeRed } });
+            results.AddOrUpdateResult(resultName, sp);
+          }
+          else {
+            sp = (ScatterPlot)results[resultName].Value;
+            sp.Rows["Pareto Front"].Points.Replace(points);
+            sp.Rows[$"Pareto Front [{c[0]}, {c[1]}]"].Points.Replace(pf2dPoints);
+          }
+          var r = OnlinePearsonsRCalculator.Calculate(points.Select(x => x.X), points.Select(x => x.Y), out OnlineCalculatorError error);
+          var r2 = r * r;
+          sp.Name = $"Pareto Front [{c[0]}, {c[1]}], correlation: {r2.ToString("N2")}";
+        }
+      }
+      hypervolumes.RowNames = elementNames;
+      results.AddOrUpdateResult("Hypervolumes", hypervolumes);
+    }
+
+    #region operator wiring and events
+    protected void ExecuteOperation(ExecutionContext executionContext, CancellationToken cancellationToken, IOperation operation) {
+      Stack<IOperation> executionStack = new Stack<IOperation>();
+      executionStack.Push(operation);
+      while (executionStack.Count > 0) {
+        cancellationToken.ThrowIfCancellationRequested();
+        IOperation next = executionStack.Pop();
+        if (next is OperationCollection) {
+          OperationCollection coll = (OperationCollection)next;
+          for (int i = coll.Count - 1; i >= 0; i--)
+            if (coll[i] != null) executionStack.Push(coll[i]);
+        }
+        else if (next is IAtomicOperation) {
+          IAtomicOperation op = (IAtomicOperation)next;
+          next = op.Operator.Execute((IExecutionContext)op, cancellationToken);
+          if (next != null) executionStack.Push(next);
+        }
+      }
+    }
+
+    protected virtual void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 1;
+          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+        }
+      }
+    }
+
+    private void UpdateCrossovers() {
+      ICrossover oldCrossover = CrossoverParameter.Value;
+      CrossoverParameter.ValidValues.Clear();
+      ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault();
+
+      foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name))
+        CrossoverParameter.ValidValues.Add(crossover);
+
+      if (oldCrossover != null) {
+        ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType());
+        if (crossover != null) CrossoverParameter.Value = crossover;
+        else oldCrossover = null;
+      }
+      if (oldCrossover == null && defaultCrossover != null)
+        CrossoverParameter.Value = defaultCrossover;
+    }
+
+    private void UpdateMutators() {
+      IManipulator oldMutator = MutatorParameter.Value;
+      MutatorParameter.ValidValues.Clear();
+      IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault();
+
+      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
+        MutatorParameter.ValidValues.Add(mutator);
+
+      if (oldMutator != null) {
+        IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType());
+        if (mutator != null) MutatorParameter.Value = mutator;
+        else oldMutator = null;
+      }
+
+      if (oldMutator == null && defaultMutator != null)
+        MutatorParameter.Value = defaultMutator;
+    }
+
+    protected override void OnProblemChanged() {
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      base.OnProblemChanged();
+    }
+
+    protected override void OnExecutionStateChanged() {
+      previousExecutionState = executionState;
+      executionState = ExecutionState;
+      base.OnExecutionStateChanged();
+    }
+
+    public void ClearState() {
+      solutions = null;
+      population = null;
+      offspringPopulation = null;
+      //jointPopulation = null;
+      lambda_moead = null;
+      neighbourhood = null;
+      if (executionContext != null && executionContext.Scope != null) {
+        executionContext.Scope.SubScopes.Clear();
+      }
+    }
+
+    protected override void OnStopped() {
+      ClearState();
+      base.OnStopped();
+    }
+    #endregion
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSUtil.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSUtil.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/DynamicALPSUtil.cs	(revision 17438)
@@ -0,0 +1,279 @@
+﻿#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;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Algorithms.DynamicALPS
+{
+  public static class DynamicALPSUtil
+  {
+    public static void QuickSort(double[] array, int[] idx, int from, int to)
+    {
+      if (from < to)
+      {
+        double temp = array[to];
+        int tempIdx = idx[to];
+        int i = from - 1;
+        for (int j = from; j < to; j++)
+        {
+          if (array[j] <= temp)
+          {
+            i++;
+            double tempValue = array[j];
+            array[j] = array[i];
+            array[i] = tempValue;
+            int tempIndex = idx[j];
+            idx[j] = idx[i];
+            idx[i] = tempIndex;
+          }
+        }
+        array[to] = array[i + 1];
+        array[i + 1] = temp;
+        idx[to] = idx[i + 1];
+        idx[i + 1] = tempIdx;
+        QuickSort(array, idx, from, i);
+        QuickSort(array, idx, i + 1, to);
+      }
+    }
+
+    public static void MinFastSort(double[] x, int[] idx, int n, int m)
+    {
+      for (int i = 0; i < m; i++)
+      {
+        for (int j = i + 1; j < n; j++)
+        {
+          if (x[i] > x[j])
+          {
+            double temp = x[i];
+            x[i] = x[j];
+            x[j] = temp;
+            int id = idx[i];
+            idx[i] = idx[j];
+            idx[j] = id;
+          }
+        }
+      }
+    }
+
+    public static IList<IDynamicALPSSolution> GetSubsetOfEvenlyDistributedSolutions(IRandom random, IList<IDynamicALPSSolution> solutionList, int newSolutionListSize)
+    {
+      if (solutionList == null || solutionList.Count == 0)
+      {
+        throw new ArgumentException("Solution list is null or empty.");
+      }
+
+      return solutionList[0].Dimensions == 2
+        ? TwoObjectivesCase(solutionList, newSolutionListSize)
+        : MoreThanTwoObjectivesCase(random, solutionList, newSolutionListSize);
+    }
+
+    private static IList<IDynamicALPSSolution> TwoObjectivesCase(IList<IDynamicALPSSolution> solutionList, int newSolutionListSize)
+    {
+      var resultSolutionList = new IDynamicALPSSolution[newSolutionListSize];
+
+      // compute weight vectors
+      double[][] lambda_moead = new double[newSolutionListSize][];
+      var values = SequenceGenerator.GenerateSteps(0m, 1m, 1m / newSolutionListSize).ToArray();
+      for (int i = 0; i < newSolutionListSize; ++i)
+      {
+        var weights = new double[newSolutionListSize];
+        weights[0] = (double)values[i];
+        weights[1] = 1 - weights[0];
+
+        lambda_moead[i] = weights;
+      }
+
+      var idealPoint = new double[2];
+      foreach (var solution in solutionList)
+      {
+        // update ideal point
+        idealPoint.UpdateIdeal(solution.Qualities);
+      }
+
+      // Select the best solution for each weight vector
+      for (int i = 0; i < newSolutionListSize; i++)
+      {
+        var currentBest = solutionList[0];
+        double value = ScalarizingFitnessFunction(currentBest, lambda_moead[i], idealPoint);
+        for (int j = 1; j < solutionList.Count; j++)
+        {
+          double aux = ScalarizingFitnessFunction(solutionList[j], lambda_moead[i], idealPoint); // we are looking for the best for the weight i
+          if (aux < value)
+          { // solution in position j is better!
+            value = aux;
+            currentBest = solutionList[j];
+          }
+        }
+        resultSolutionList[i] = (DynamicALPSSolution)currentBest.Clone();
+      }
+
+      return resultSolutionList;
+    }
+
+    private static IList<IDynamicALPSSolution> MoreThanTwoObjectivesCase(IRandom random, IList<IDynamicALPSSolution> solutionList, int newSolutionListSize)
+    {
+      var resultSolutionList = new List<IDynamicALPSSolution>();
+
+      int randomIndex = random.Next(0, solutionList.Count);
+
+      var candidate = new List<IDynamicALPSSolution>();
+      resultSolutionList.Add(solutionList[randomIndex]);
+
+      for (int i = 0; i < solutionList.Count; ++i)
+      {
+        if (i != randomIndex)
+        {
+          candidate.Add(solutionList[i]);
+        }
+      }
+
+      while (resultSolutionList.Count < newSolutionListSize)
+      {
+        int index = 0;
+        var selected = candidate[0]; // it should be a next! (n <= population size!)
+        double aux = CalculateBestDistance(selected, solutionList);
+        int i = 1;
+        while (i < candidate.Count)
+        {
+          var nextCandidate = candidate[i];
+          double distanceValue = CalculateBestDistance(nextCandidate, solutionList);
+          if (aux < distanceValue)
+          {
+            index = i;
+            aux = distanceValue;
+          }
+          i++;
+        }
+
+        // add the selected to res and remove from candidate list
+        var removedSolution = candidate[index];
+        candidate.RemoveAt(index);
+        resultSolutionList.Add((DynamicALPSSolution)removedSolution.Clone());
+      }
+
+      return resultSolutionList;
+    }
+
+    private static double ScalarizingFitnessFunction(IDynamicALPSSolution currentBest, double[] lambda_moead, double[] idealPoint)
+    {
+      double maxFun = -1.0e+30;
+
+      for (int n = 0; n < idealPoint.Length; n++)
+      {
+        double diff = Math.Abs(currentBest.Qualities[n] - idealPoint[n]);
+
+        double functionValue;
+        if (lambda_moead[n] == 0)
+        {
+          functionValue = 0.0001 * diff;
+        }
+        else
+        {
+          functionValue = diff * lambda_moead[n];
+        }
+        if (functionValue > maxFun)
+        {
+          maxFun = functionValue;
+        }
+      }
+
+      return maxFun;
+    }
+
+    public static void UpdateIdeal(this double[] idealPoint, double[] point)
+    {
+      for (int i = 0; i < point.Length; ++i)
+      {
+        if (double.IsInfinity(point[i]) || double.IsNaN(point[i]))
+        {
+          continue;
+        }
+
+        if (idealPoint[i] > point[i])
+        {
+          idealPoint[i] = point[i];
+        }
+      }
+    }
+
+    public static void UpdateNadir(this double[] nadirPoint, double[] point)
+    {
+      for (int i = 0; i < point.Length; ++i)
+      {
+        if (double.IsInfinity(point[i]) || double.IsNaN(point[i]))
+        {
+          continue;
+        }
+
+        if (nadirPoint[i] < point[i])
+        {
+          nadirPoint[i] = point[i];
+        }
+      }
+    }
+
+    public static void UpdateIdeal(this double[] idealPoint, IList<IDynamicALPSSolution> solutions)
+    {
+      foreach (var s in solutions)
+      {
+        idealPoint.UpdateIdeal(s.Qualities);
+      }
+    }
+
+    public static void UpdateNadir(this double[] nadirPoint, IList<IDynamicALPSSolution> solutions)
+    {
+      foreach (var s in solutions)
+      {
+        nadirPoint.UpdateNadir(s.Qualities);
+      }
+    }
+
+    private static double CalculateBestDistance(IDynamicALPSSolution solution, IList<IDynamicALPSSolution> solutionList)
+    {
+      var best = solutionList.Min(x => EuclideanDistance(solution.Qualities, x.Qualities));
+      if (double.IsNaN(best) || double.IsInfinity(best))
+      {
+        best = double.MaxValue;
+      }
+      return best;
+    }
+
+    public static double EuclideanDistance(double[] a, double[] b)
+    {
+      if (a.Length != b.Length)
+      {
+        throw new ArgumentException("Euclidean distance: the arrays have different lengths.");
+      }
+
+      var distance = 0d;
+      for (int i = 0; i < a.Length; ++i)
+      {
+        var d = a[i] - b[i];
+        distance += d * d;
+      }
+      return Math.Sqrt(distance);
+    }
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/HeuristicLab.Algorithms.DynamicALPS-3.4.csproj
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/HeuristicLab.Algorithms.DynamicALPS-3.4.csproj	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/HeuristicLab.Algorithms.DynamicALPS-3.4.csproj	(revision 17438)
@@ -0,0 +1,275 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{15452B9F-A436-4139-8EE7-DA72FB8D3664}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Algorithms.DynamicALPS</RootNamespace>
+    <AssemblyName>HeuristicLab.Algorithms.DynamicALPS-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.NSGA2-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Algorithms.NSGA2-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence.GUI-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Persistence.GUI-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <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.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.GeneticProgramming-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.GeneticProgramming-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TestFunctions-3.3">
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.Problems.TestFunctions-3.3.dll</HintPath>
+    </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>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.SequentialEngine-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\trunk\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="DynamicALPSAlgorithm.cs" />
+    <Compile Include="DynamicALPSAlgorithmBase.cs" />
+    <Compile Include="DynamicALPSASolution.cs" />
+    <Compile Include="DynamicALPSUtil.cs" />
+    <None Include="app.config" />
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs	(revision 17438)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.DynamicALPS
+{
+  [Plugin("HeuristicLab.Algorithms.DynamicALPS", "Provides the multi-objective evolutonary algorithm based on decomposition (DynamicALPS) as described by Zhang and Li: DynamicALPS: A Multiobjective Evolutionary Algorithm Based on Decomposition, IEEE Transactions on Evolutionary Computation, Volume 11, Issue 6, Dec. 2007, pp. 712-731", "3.4.25.16714")]
+  [PluginFile("HeuristicLab.Algorithms.DynamicALPS-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Attic", "1.0")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.TestFunctions.MultiObjective", "3.3")]
+  public class HeuristicLabAlgorithmsDynamicALPSPlugin : PluginBase
+  {
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs.frame
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs.frame	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Plugin.cs.frame	(revision 17438)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.SMSEMOA
+{
+  [Plugin("HeuristicLab.Algorithms.SMSEMOA", "Provides the multi-objective evolutonary algorithm based on decomposition (SMSEMOA) as described by Zhang and Li: SMSEMOA: A Multiobjective Evolutionary Algorithm Based on Decomposition, IEEE Transactions on Evolutionary Computation, Volume 11, Issue 6, Dec. 2007, pp. 712-731", "3.4.25.16714")]
+  [PluginFile("HeuristicLab.Algorithms.SMSEMOA-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Attic", "1.0")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.TestFunctions.MultiObjective", "3.3")]
+  public class HeuristicLabAlgorithmsSMSEMOAPlugin : PluginBase
+  {
+  }
+}
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs	(revision 17438)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Algorithms.SMSEMOA")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2018 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7d0fdb00-8511-45a2-ae51-c830b0c9b548")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.15.17425")]
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs.frame	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/Properties/AssemblyInfo.cs.frame	(revision 17438)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Algorithms.SMSEMOA")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2018 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7d0fdb00-8511-45a2-ae51-c830b0c9b548")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.15.$WCREV$")]
Index: /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/app.config
===================================================================
--- /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/app.config	(revision 17438)
+++ /branches/3057_DynamicALPS/HeuristicLab.Algorithms.DynamicALPS/3.4/app.config	(revision 17438)
@@ -0,0 +1,11 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>
Index: /branches/3057_DynamicALPS/PreBuildEvent.cmd
===================================================================
--- /branches/3057_DynamicALPS/PreBuildEvent.cmd	(revision 17438)
+++ /branches/3057_DynamicALPS/PreBuildEvent.cmd	(revision 17438)
@@ -0,0 +1,11 @@
+IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
+IF %ERRORLEVEL% NEQ 0 GOTO Error_Handling
+IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
+IF %ERRORLEVEL% NEQ 0 GOTO Error_Handling
+GOTO Done
+
+:Error_Handling
+ECHO There was an error while running subwcrev. Please verify that the *.cs.frame files have been correctly converted to *.cs files, otherwise HeuristicLab won't build. 
+exit 0
+
+:Done
