Index: branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3Selection.cs
===================================================================
--- branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3Selection.cs	(revision 17668)
+++ branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3Selection.cs	(revision 17692)
@@ -15,11 +15,12 @@
         /// have the same number of objectives, undefined behavior happens.
         /// </summary>
-        /// <param name="rt"></param>
+        /// <param name="rt">The previous generation and its mutated children.</param>
         /// <param name="referencePoints"></param>
         /// <param name="maximization"></param>
+        /// <param name="N">Number of solutions to select.</param>
+        /// <param name="random">The <see cref="IRandom" /> to use for randomness.</param>
         /// <returns></returns>
-        public static List<Solution> SelectSolutionsForNextGeneration(List<Solution> rt, List<ReferencePoint> referencePoints, bool[] maximization, IRandom random)
-        {
-            int N = rt.Count / 2; // number of solutions in a generation
+        public static List<Solution> SelectSolutionsForNextGeneration(List<Solution> rt, List<ReferencePoint> referencePoints, bool[] maximization, int N, IRandom random)
+        {
             int numberOfObjectives = rt.First().Fitness.Length;
             List<Solution> st = new List<Solution>();
@@ -64,4 +65,8 @@
             // Find the ideal point
             double[] idealPoint = new double[numberOfObjectives];
+
+            foreach (var solution in st)
+                solution.ConvertedFitness = new double[numberOfObjectives];
+
             for (int j = 0; j < numberOfObjectives; j++)
             {
@@ -69,7 +74,7 @@
                 idealPoint[j] = Utility.Min(s => s.Fitness[j], st);
 
-                // Translate objectives
+                // Translate objectives and save the modified fitness values in ConvertedFitness
                 foreach (var solution in st)
-                    solution.Fitness[j] -= idealPoint[j];
+                    solution.ConvertedFitness[j] = solution.Fitness[j] - idealPoint[j];
             }
 
@@ -83,5 +88,5 @@
                 weights[j] = 1;
 
-                extremePoints[j] = Utility.ArgMin(s => ASF(s.Fitness, weights), st);
+                extremePoints[j] = Utility.ArgMin(s => ASF(s.ConvertedFitness, weights), st);
             }
 
@@ -103,9 +108,9 @@
                     if (Math.Abs(intercepts[i] - idealPoint[i]) > EPSILON)
                     {
-                        solution.Fitness[i] = solution.Fitness[i] / (intercepts[i] - idealPoint[i]);
+                        solution.ConvertedFitness[i] = solution.ConvertedFitness[i] / (intercepts[i] - idealPoint[i]);
                     }
                     else
                     {
-                        solution.Fitness[i] = solution.Fitness[i] / EPSILON;
+                        solution.ConvertedFitness[i] = solution.ConvertedFitness[i] / EPSILON;
                     }
                 }
@@ -121,5 +126,5 @@
                     // find reference point for which the perpendicular distance to the current
                     // solution is the lowest
-                    var rpAndDist = Utility.MinArgMin(rp => GetPerpendicularDistance(rp.Values, solution.Fitness), referencePoints);
+                    var rpAndDist = Utility.MinArgMin(rp => GetPerpendicularDistance(rp.Values, solution.ConvertedFitness), referencePoints);
                     // associated reference point
                     var arp = rpAndDist.Item1;
@@ -235,6 +240,5 @@
                 for (int j = i + 1; !duplicate && j < extremePoints.Count; j++)
                 {
-                    // maybe todo: override Equals method of solution?
-                    duplicate = extremePoints[i].Equals(extremePoints[j]);
+                    duplicate = extremePoints[i] == extremePoints[j];
                 }
             }
@@ -242,4 +246,5 @@
             List<double> intercepts = new List<double>();
 
+            // todo: do handling of this case as in Tsung Che Chiang's implementation
             if (duplicate)
             { // cannot construct the unique hyperplane (this is a casual method to deal with the condition)
@@ -248,5 +253,5 @@
                     // extreme_points[f] stands for the individual with the largest value of
                     // objective f
-                    intercepts.Add(extremePoints[f].Fitness[f]);
+                    intercepts.Add(extremePoints[f].ConvertedFitness[f]);
                 }
             }
@@ -260,12 +265,6 @@
                 }
 
-                List<List<double>> a = new List<List<double>>();
-                foreach (Solution s in extremePoints)
-                {
-                    List<double> aux = new List<double>();
-                    for (int i = 0; i < numberOfObjectives; i++)
-                        aux.Add(s.Fitness[i]);
-                    a.Add(aux);
-                }
+                List<List<double>> a = extremePoints.Select(p => p.ConvertedFitness.ToList()).ToList();
+
                 List<double> x = GaussianElimination(a, b);
 
