Index: /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs
===================================================================
--- /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs	(revision 17706)
+++ /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs	(revision 17707)
@@ -41,5 +41,5 @@
         }
 
-        public int NumberOfObjectives
+        public int Objectives
         {
             get
@@ -259,5 +259,6 @@
         {
             // Set population size
-            int numberOfGeneratedReferencePoints = ReferencePoint.GetNumberOfGeneratedReferencePoints(NumberOfObjectives);
+            int numberOfGeneratedReferencePoints = ReferencePoint.GetNumberOfGeneratedReferencePoints(Objectives);
+            if (numberOfGeneratedReferencePoints == -1) throw new NotSupportedException("The number of objectives is not supported.");
             PopulationSize.Value = ReferencePoint.GetPopulationSizeForReferencePoints(numberOfGeneratedReferencePoints);
 
@@ -294,5 +295,5 @@
 
             solutions = GetInitialPopulation();
-            referencePoints = ReferencePoint.GenerateReferencePoints(random, NumberOfObjectives);
+            referencePoints = ReferencePoint.GenerateReferencePoints(random, Objectives);
             ResultsGeneratedReferencePoints = Utility.ConvertToDoubleMatrix(referencePoints);
         }
@@ -382,11 +383,4 @@
             ResultsHypervolume = new DoubleValue(Hypervolume.Calculate(front, problem.ReferencePoint.CloneAsArray(), problem.Maximization));
             ResultsDifferenceToBestKnownHypervolume = new DoubleValue(ResultsBestKnownHypervolume.Value - ResultsHypervolume.Value);
-
-            Problem.Analyze(
-                solutions.Select(s => (Individual)new SingleEncodingIndividual(Problem.Encoding, new Scope { Variables = { new Variable(Problem.Encoding.Name, s.Chromosome) } })).ToArray(),
-                solutions.Select(s => s.Fitness).ToArray(),
-                Results,
-                random
-                );
         }
 
Index: /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/ReferencePoint.cs
===================================================================
--- /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/ReferencePoint.cs	(revision 17706)
+++ /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/ReferencePoint.cs	(revision 17707)
@@ -17,5 +17,5 @@
 
         public double[] Values { get; }
-        public int NumberOfDimensions => Values.Length;
+        public int Objectives => Values.Length;
         public int NumberOfAssociatedSolutions { get; set; } = 0;
 
@@ -24,8 +24,8 @@
         #region Constructors
 
-        public ReferencePoint(IRandom random, int numberOfDimensions)
+        public ReferencePoint(IRandom random, int obj)
         {
             this.random = random;
-            Values = new double[numberOfDimensions];
+            Values = new double[obj];
         }
 
@@ -33,5 +33,5 @@
         {
             random = cloner.Clone(other.random);
-            Values = new double[other.NumberOfDimensions];
+            Values = new double[other.Objectives];
             other.Values.CopyTo(Values, 0);
         }
@@ -50,4 +50,28 @@
 
         #region Static methods
+
+        public static Tuple<int, int> GetDivisions(int obj)
+        {
+            switch (obj)
+            {
+                case 3:
+                    return Tuple.Create(12, 0);
+
+                case 5:
+                    return Tuple.Create(6, 0);
+
+                case 8:
+                    return Tuple.Create(3, 2);
+
+                case 10:
+                    return Tuple.Create(3, 2);
+
+                case 15:
+                    return Tuple.Create(2, 1);
+
+                default:
+                    return null;
+            }
+        }
 
         /// <summary>
@@ -55,48 +79,18 @@
         /// cref="GenerateReferencePoints(IRandom, int)" />.
         /// </summary>
-        /// <param name="nDim"></param>
+        /// <param name="obj"></param>
         /// <returns></returns>
-        public static int GetNumberOfGeneratedReferencePoints(int nDim)
-        {
-            int outerDiv;
-            int innerDiv;
-            switch (nDim)
-            {
-                case 3:
-                    outerDiv = 12;
-                    innerDiv = 0;
-                    break;
-
-                case 5:
-                    outerDiv = 6;
-                    innerDiv = 0;
-                    break;
-
-                case 8:
-                    outerDiv = 3;
-                    innerDiv = 2;
-                    break;
-
-                case 10:
-                    outerDiv = 3;
-                    innerDiv = 2;
-                    break;
-
-                case 15:
-                    outerDiv = 2;
-                    innerDiv = 1;
-                    break;
-
-                default:
-                    return -1;
-            }
-
-            return GetNumberOfGeneratedReferencePoints(nDim, outerDiv, innerDiv);
-        }
-
-        public static int GetNumberOfGeneratedReferencePoints(int nDim, int outerDiv, int innerDiv = 0)
-        {
-            int outerPoints = Utility.NCR(nDim + outerDiv - 1, outerDiv);
-            int innerPoints = innerDiv == 0 ? 0 : Utility.NCR(nDim + innerDiv - 1, innerDiv);
+        public static int GetNumberOfGeneratedReferencePoints(int obj)
+        {
+            Tuple<int, int> division = GetDivisions(obj);
+            if (division == null) return -1;
+
+            return GetNumberOfGeneratedReferencePoints(obj, division.Item1, division.Item2);
+        }
+
+        public static int GetNumberOfGeneratedReferencePoints(int obj, int outerDiv, int innerDiv = 0)
+        {
+            int outerPoints = Utility.NCR(obj + outerDiv - 1, outerDiv);
+            int innerPoints = innerDiv == 0 ? 0 : Utility.NCR(obj + innerDiv - 1, innerDiv);
             return outerPoints + innerPoints;
         }
@@ -109,6 +103,6 @@
         /// <summary>
         /// Generate reference points that are evenly distributed over a hyperplane with dimensions
-        /// <paramref name="nDim" /> - 1 with the sum of the values in all dimensions being equal to
-        /// 1 for each reference point. <paramref name="nDim" /> may only be one of {3, 5, 8, 10, 15}
+        /// <paramref name="obj" /> - 1 with the sum of the values in all dimensions being equal to
+        /// 1 for each reference point. <paramref name="obj" /> may only be one of {3, 5, 8, 10, 15}
         /// -&gt; The number of inner divisions and outer divisions are determined based on the
         /// values provided in the NSGA-III paper, chapter V: Results. If different dimensions are
@@ -118,36 +112,12 @@
         /// The <see cref="IRandom" /> to give as a parameter to the ReferencePoint constructors.
         /// </param>
-        /// <param name="nDim">The dimensionality of the Reference Points</param>
+        /// <param name="obj">The dimensionality of the Reference Points</param>
         /// <returns></returns>
-        public static List<ReferencePoint> GenerateReferencePoints(IRandom random, int nDim)
-        {
-            List<ReferencePoint> referencePoints;
-            switch (nDim)
-            {
-                case 3:
-                    referencePoints = GenerateReferencePoints(random, nDim, 12, 0);
-                    break;
-
-                case 5:
-                    referencePoints = GenerateReferencePoints(random, nDim, 6, 0);
-                    break;
-
-                case 8:
-                    referencePoints = GenerateReferencePoints(random, nDim, 3, 2);
-                    break;
-
-                case 10:
-                    referencePoints = GenerateReferencePoints(random, nDim, 3, 2);
-                    break;
-
-                case 15:
-                    referencePoints = GenerateReferencePoints(random, nDim, 2, 1);
-                    break;
-
-                default:
-                    throw new NotSupportedException("Only the reference points for 3, 5, 8, 10 or 15 dimensions can be created.");
-            }
-
-            return referencePoints;
+        public static List<ReferencePoint> GenerateReferencePoints(IRandom random, int obj)
+        {
+            Tuple<int, int> divisions = GetDivisions(obj);
+
+            if (divisions == null) return null;
+            return GenerateReferencePoints(random, obj, divisions.Item1, divisions.Item2);
         }
 
@@ -159,8 +129,8 @@
         /// <summary>
         /// Generate reference points that are evenly distributed over a hyperplane with dimensions
-        /// <paramref name="nDim" /> - 1 with the sum of the values in all dimensions being equal to
+        /// <paramref name="obj" /> - 1 with the sum of the values in all dimensions being equal to
         /// 1 for each reference point.
         /// </summary>
-        /// <param name="nDim">The number of dimensions for the reference points.</param>
+        /// <param name="obj">The number of dimensions for the reference points.</param>
         /// <param name="outerDiv">The number of divisions for the outer reference points</param>
         /// <returns>The generated reference points (Check Fig. 4 in NSGA-III paper).</returns>
@@ -170,19 +140,19 @@
         /// not have inner reference points
         /// </returns>
-        public static List<ReferencePoint> GenerateReferencePoints(IRandom random, int nDim, int outerDiv, int innerDiv = 0)
-        {
-            if (nDim <= 0) throw new ArgumentException("nDim must be greater than 0");
+        public static List<ReferencePoint> GenerateReferencePoints(IRandom random, int obj, int outerDiv, int innerDiv = 0)
+        {
+            if (obj <= 0) throw new ArgumentException("obj must be greater than 0");
             if (outerDiv <= 1) throw new ArgumentException("outerDiv must be greater than 1");
 
             List<ReferencePoint> referencePoints = new List<ReferencePoint>();
-            ReferencePoint refPoint = new ReferencePoint(random, nDim);
-            GenerateRecursive(referencePoints, refPoint, nDim, outerDiv, outerDiv, 0);
+            ReferencePoint refPoint = new ReferencePoint(random, obj);
+            GenerateRecursive(referencePoints, refPoint, obj, outerDiv, outerDiv, 0);
 
             if (innerDiv > 0)
             {
                 List<ReferencePoint> insideReferencePoints = new List<ReferencePoint>();
-                GenerateRecursive(insideReferencePoints, refPoint, nDim, innerDiv, innerDiv, 0);
-
-                double center = 1.0 / nDim;
+                GenerateRecursive(insideReferencePoints, refPoint, obj, innerDiv, innerDiv, 0);
+
+                double center = 1.0 / obj;
 
                 for (int i = 0; i < insideReferencePoints.Count; i++)
Index: /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/Utility.cs
===================================================================
--- /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/Utility.cs	(revision 17706)
+++ /branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/Utility.cs	(revision 17707)
@@ -32,18 +32,38 @@
         {
             if (n < r) throw new InvalidOperationException($"Constraint was not met: n >= r (n = {n}, r = {r})");
-            if (r < 1) throw new InvalidOperationException($"Constraint was not met: r >= 1 (r = {r})");
+            if (r < 0) throw new InvalidOperationException($"Constraint was not met: r >= 0 (r = {r})");
             if (n == r) return 1;
-            return (int)(Factorial(n) / (Factorial(r) * Factorial(n - r)));
-        }
-
-        public static long Factorial(int n)
+
+            r = Math.Max(r, n - r);
+
+            long range1 = RangeMultiplication(r + 1, n - r);
+            return (int)(range1 / Factorial(n - r));
+        }
+
+        private static long RangeMultiplication(int start, int count)
+        {
+            long s = 1;
+            return LeftFold((long a, int b) => checked(a * b), new List<int>(Enumerable.Range(start, count)), s);
+        }
+
+        private static T2 LeftFold<T1, T2>(Func<T2, T1, T2> func, List<T1> elements, T2 start)
+        {
+            var item = start;
+            foreach (var element in elements)
+                item = func(item, element);
+
+            return item;
+        }
+
+        public static long Factorial(long n)
         {
             if (n < 0 || n > 30) throw new InvalidOperationException($"Constraint for n was not met: 0 <= n <= 30 (n = {n})");
             long product = 1;
-            for (int i = 2; i <= n; i++)
+            for (long i = 2; i <= n; i++)
                 product *= i;
 
             return product;
         }
+
         public static double[][] ToJaggedArray(this DoubleMatrix m)
         {
@@ -94,10 +114,10 @@
         {
             if (referencePoints == null || !referencePoints.Any()) throw new ArgumentException($"{nameof(referencePoints)} is null or empty");
-            int nDim = referencePoints.First().NumberOfDimensions;
+            int obj = referencePoints.First().Objectives;
             int pointCount = referencePoints.Count;
-            double[,] array = new double[nDim, pointCount];
+            double[,] array = new double[obj, pointCount];
 
             for (int p = 0; p < pointCount; p++)
-                for (int d = 0; d < nDim; d++)
+                for (int d = 0; d < obj; d++)
                     array[d, p] = referencePoints[p].Values[d];
 
