Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNestedTreeSizeEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNestedTreeSizeEvaluator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNestedTreeSizeEvaluator.cs	(revision 13300)
@@ -44,5 +44,5 @@
     public PearsonRSquaredNestedTreeSizeEvaluator() : base() { }
 
-    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
+    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } // maximize R² & minimize nested tree size
 
     public override IOperation InstrumentedApply() {
@@ -67,5 +67,5 @@
       if (decimalPlaces >= 0)
         r2 = Math.Round(r2, decimalPlaces);
-      return new double[2] { r2, solution.IterateNodesPostfix().Sum(n => n.GetLength()) };
+      return new double[2] { r2, solution.IterateNodesPostfix().Sum(n => n.GetLength()) }; // sum of the length of the whole sub-tree for each node 
     }
 
@@ -74,6 +74,7 @@
       EstimationLimitsParameter.ExecutionContext = context;
       ApplyLinearScalingParameter.ExecutionContext = context;
+      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
 
-      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
+      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces); 
 
       SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs	(revision 13300)
@@ -44,5 +44,5 @@
     public PearsonRSquaredNumberOfVariablesEvaluator() : base() { }
 
-    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
+    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } // maximize R² and minimize the number of variables
 
     public override IOperation InstrumentedApply() {
@@ -66,5 +66,5 @@
       if (decimalPlaces >= 0)
         r2 = Math.Round(r2, decimalPlaces);
-      return new double[2] { r2, solution.IterateNodesPostfix().OfType<VariableTreeNode>().Count() };
+      return new double[2] { r2, solution.IterateNodesPostfix().OfType<VariableTreeNode>().Count() }; // count the number of variables
     }
 
@@ -73,4 +73,5 @@
       EstimationLimitsParameter.ExecutionContext = context;
       ApplyLinearScalingParameter.ExecutionContext = context;
+      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
 
       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredTreeComplexityEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredTreeComplexityEvaluator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredTreeComplexityEvaluator.cs	(revision 13300)
@@ -43,5 +43,5 @@
     public PearsonRSquaredTreeComplexityEvaluator() : base() { }
 
-    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
+    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } // maximize R² and minimize model complexity 
 
     public override IOperation InstrumentedApply() {
@@ -72,4 +72,5 @@
       EstimationLimitsParameter.ExecutionContext = context;
       ApplyLinearScalingParameter.ExecutionContext = context;
+      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
 
       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 13300)
@@ -164,4 +164,5 @@
 
 
+    // TODO: swap positions of lowerEstimationLimit and upperEstimationLimit parameters
     public static double OptimizeConstants(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, IRegressionProblemData problemData,
       IEnumerable<int> rows, bool applyLinearScaling, int maxIterations, double upperEstimationLimit = double.MaxValue, double lowerEstimationLimit = double.MinValue, bool updateConstantsInTree = true) {
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplificationOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplificationOperator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplificationOperator.cs	(revision 13300)
@@ -28,5 +28,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [Item("SymbolicExpressionTreeSimplificationOperator", "Simplfies symbolic expression trees encoding a mathematical formula.")]
+  [Item("SymbolicExpressionTreeSimplificationOperator", "Simplifies symbolic expression trees encoding a mathematical formula.")]
   [StorableClass]
   public class SymbolicDataAnalysisExpressionTreeSimplificationOperator : SingleSuccessorOperator, ISymbolicExpressionTreeOperator {
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs	(revision 13288)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs	(revision 13300)
@@ -42,11 +42,5 @@
             return 2;
           }
-        case OpCodes.Add: {
-            double complexity = 0;
-            for (int i = 0; i < node.SubtreeCount; i++) {
-              complexity += CalculateComplexity(node.GetSubtree(i));
-            }
-            return complexity;
-          }
+        case OpCodes.Add: 
         case OpCodes.Sub: {
             double complexity = 0;
@@ -56,12 +50,5 @@
             return complexity;
           }
-        case OpCodes.Mul: {
-            double complexity = 1;
-            for (int i = 0; i < node.SubtreeCount; i++) {
-              var nodeComplexity = CalculateComplexity(node.GetSubtree(i));
-              complexity *= nodeComplexity + 1;
-            }
-            return complexity;
-          }
+        case OpCodes.Mul: 
         case OpCodes.Div: {
             double complexity = 1;
@@ -72,20 +59,8 @@
             return complexity;
           }
-        case OpCodes.Sin: {
-            double complexity = CalculateComplexity(node.GetSubtree(0));
-            return Math.Pow(2.0, complexity);
-          }
-        case OpCodes.Cos: {
-            double complexity = CalculateComplexity(node.GetSubtree(0));
-            return Math.Pow(2.0, complexity);
-          }
-        case OpCodes.Tan: {
-            double complexity = CalculateComplexity(node.GetSubtree(0));
-            return Math.Pow(2.0, complexity);
-          }
-        case OpCodes.Exp: {
-            double complexity = CalculateComplexity(node.GetSubtree(0));
-            return Math.Pow(2.0, complexity);
-          }
+        case OpCodes.Sin:
+        case OpCodes.Cos: 
+        case OpCodes.Tan:
+        case OpCodes.Exp: 
         case OpCodes.Log: {
             double complexity = CalculateComplexity(node.GetSubtree(0));
@@ -100,29 +75,17 @@
             return complexity * complexity * complexity;
           }
-        case OpCodes.Power: {
+        case OpCodes.Power:          
+        case OpCodes.Root: {
             double complexity = CalculateComplexity(node.GetSubtree(0));
-            var exponentNode = node.GetSubtree(1) as ConstantTreeNode;
-            if (exponentNode != null) {
-              double exponent = exponentNode.Value;
-              if (exponent < 0) exponent = Math.Abs(exponent);
-              if (exponent < 1) exponent = 1 / exponent;
-              return Math.Pow(complexity, Math.Round(exponent));
+            var exponent = node.GetSubtree(1) as ConstantTreeNode;
+            if (exponent != null) {
+              double expVal = exponent.Value;
+              if (expVal < 0) expVal = Math.Abs(expVal);
+              if (expVal < 1) expVal = 1 / expVal;
+              return Math.Pow(complexity, Math.Round(expVal));
             }
 
-            double exponentComplexity = CalculateComplexity(node.GetSubtree(1));
-            return Math.Pow(complexity, 2 * exponentComplexity);
-          }
-        case OpCodes.Root: {
-            double complexity = CalculateComplexity(node.GetSubtree(0));
-            var rootNode = node.GetSubtree(1) as ConstantTreeNode;
-            if (rootNode != null) {
-              double root = rootNode.Value;
-              if (root < 0) root = Math.Abs(root);
-              if (root < 1) root = 1 / root;
-              return Math.Pow(complexity, Math.Round(root));
-            }
-
-            double rootComplexity = CalculateComplexity(node.GetSubtree(1));
-            return Math.Pow(complexity, 2 * rootComplexity);
+            double expComplexity = CalculateComplexity(node.GetSubtree(1));
+            return Math.Pow(complexity, 2 * expComplexity);
           }
 
