Index: branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs
===================================================================
--- branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs	(revision 17897)
+++ branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs	(revision 17898)
@@ -22,4 +22,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -87,5 +88,5 @@
     public override IOperation InstrumentedApply() {
       var rows = GenerateRowsToEvaluate();
-      var solution = SymbolicExpressionTreeParameter.ActualValue;
+      var tree = SymbolicExpressionTreeParameter.ActualValue;
       var problemData = ProblemDataParameter.ActualValue;
       var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
@@ -94,5 +95,5 @@
 
       if (UseConstantOptimization) {
-        SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, solution, problemData, rows,
+        SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, tree, problemData, rows,
           false,
           ConstantOptimizationIterations,
@@ -103,36 +104,32 @@
         if (applyLinearScaling) {
           //Check for interval arithmetic grammar
-          //remove scaling nodes for linear scaling evaluation
+          if (!(tree.Root.Grammar is IntervalArithmeticGrammar))
+            throw new ArgumentException($"{ItemName} can only be used with IntervalArithmeticGrammar.");
+
           var rootNode = new ProgramRootSymbol().CreateTreeNode();
           var startNode = new StartSymbol().CreateTreeNode();
-          SymbolicExpressionTree newTree = null;
-          foreach (var node in solution.IterateNodesPrefix())
-            if (node.Symbol.Name == "Scaling") {
-              for (var i = 0; i < node.SubtreeCount; ++i) startNode.AddSubtree(node.GetSubtree(i));
-              rootNode.AddSubtree(startNode);
-              newTree = new SymbolicExpressionTree(rootNode);
-              break;
-            }
+          var offset = tree.Root.GetSubtree(0) //Start
+                                .GetSubtree(0); //Offset
+          var scaling = offset.GetSubtree(0);
+          var t = (ISymbolicExpressionTreeNode)scaling.GetSubtree(0).Clone();
+          rootNode.AddSubtree(startNode);
+          startNode.AddSubtree(t);
+          var newTree = new SymbolicExpressionTree(rootNode);
 
           //calculate alpha and beta for scaling
           var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(newTree, problemData.Dataset, rows);
+
           var targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
           OnlineLinearScalingParameterCalculator.Calculate(estimatedValues, targetValues, out var alpha, out var beta,
             out var errorState);
           //Set alpha and beta to the scaling nodes from ia grammar
-          foreach (var node in solution.IterateNodesPrefix())
-            if (node.Symbol.Name == "Offset") {
-              node.RemoveSubtree(1);
-              var alphaNode = new ConstantTreeNode(new Constant()) { Value = alpha };
-              node.AddSubtree(alphaNode);
-            } else if (node.Symbol.Name == "Scaling") {
-              node.RemoveSubtree(1);
-              var betaNode = new ConstantTreeNode(new Constant()) { Value = beta };
-              node.AddSubtree(betaNode);
-            }
+          var offsetParameter = offset.GetSubtree(1) as ConstantTreeNode;
+          offsetParameter.Value = alpha;
+          var scalingParameter = scaling.GetSubtree(1) as ConstantTreeNode;
+          scalingParameter.Value = beta;
         }
       }
 
-      var qualities = Calculate(interpreter, solution, estimationLimits.Lower, estimationLimits.Upper, problemData,
+      var qualities = Calculate(interpreter, tree, estimationLimits.Lower, estimationLimits.Upper, problemData,
         rows, BoundsEstimator);
       QualitiesParameter.ActualValue = new DoubleArray(qualities);
Index: branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintEvaluator.cs
===================================================================
--- branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintEvaluator.cs	(revision 17897)
+++ branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintEvaluator.cs	(revision 17898)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 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;
 using System.Collections.Generic;
 using System.Linq;
@@ -11,25 +32,21 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [Item("Constraints Evaluator", "Calculates NMSE of a symbolic regression solution with respect to constraints.")]
+  [Item("NMSE Evaluator (with shape-constraints)", "Calculates NMSE of a symbolic regression solution and checks constraints the fitness is a combination of NMSE and constraint violations.")]
   [StorableType("27473973-DD8D-4375-997D-942E2280AE8E")]
   public class SymbolicRegressionSingleObjectiveConstraintEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
     #region Parameter/Properties
 
-    private const string UseConstantOptimizationParameterName = "Use Constant Optimization";
-
-    private const string ConstantOptimizationIterationsParameterName = "Constant Optimization Iterations";
-
-    private const string UseSoftConstraintsParameterName = "Use Soft Constraints Evaluation";
-
-    private const string BoundsEstimatorParameterName = "Bounds estimator";
-
-    private const string MaximumPenaltyFactorParamterName = "Maximum Penalty Factor";
-
-
-    public IFixedValueParameter<BoolValue> UseConstantOptimizationParameter =>
-      (IFixedValueParameter<BoolValue>)Parameters[UseConstantOptimizationParameterName];
+    private const string OptimizeParametersParameterName = "OptimizeParameters";
+    private const string ParameterOptimizationIterationsParameterName = "ParameterOptimizationIterations";
+    private const string UseSoftConstraintsParameterName = "UseSoftConstraintsEvaluation";
+    private const string BoundsEstimatorParameterName = "BoundsEstimator";
+    private const string PenaltyFactorParameterName = "PenaltyFactor";
+
+
+    public IFixedValueParameter<BoolValue> OptimizerParametersParameter =>
+      (IFixedValueParameter<BoolValue>)Parameters[OptimizeParametersParameterName];
 
     public IFixedValueParameter<IntValue> ConstantOptimizationIterationsParameter =>
-      (IFixedValueParameter<IntValue>)Parameters[ConstantOptimizationIterationsParameterName];
+      (IFixedValueParameter<IntValue>)Parameters[ParameterOptimizationIterationsParameterName];
 
     public IFixedValueParameter<BoolValue> UseSoftConstraintsParameter =>
@@ -38,10 +55,10 @@
     public IValueParameter<IBoundsEstimator> BoundsEstimatorParameter =>
       (IValueParameter<IBoundsEstimator>)Parameters[BoundsEstimatorParameterName];
-    public IFixedValueParameter<DoubleValue> MaximumPenaltyFactorParamter =>
-      (IFixedValueParameter<DoubleValue>)Parameters[MaximumPenaltyFactorParamterName];
-
-    public bool UseConstantOptimization {
-      get => UseConstantOptimizationParameter.Value.Value;
-      set => UseConstantOptimizationParameter.Value.Value = value;
+    public IFixedValueParameter<DoubleValue> PenaltyFactorParameter =>
+      (IFixedValueParameter<DoubleValue>)Parameters[PenaltyFactorParameterName];
+
+    public bool OptimizeParameters {
+      get => OptimizerParametersParameter.Value.Value;
+      set => OptimizerParametersParameter.Value.Value = value;
     }
 
@@ -56,9 +73,4 @@
     }
 
-    public double PenaltyMultiplier {
-      get => 1.0;//PenaltyMultiplierParameter.Value.Value;
-      //set => PenaltyMultiplierParameter.Value.Value = value;
-    }
-
     public IBoundsEstimator BoundsEstimator {
       get => BoundsEstimatorParameter.Value;
@@ -66,12 +78,11 @@
     }
 
-    public double MaximumPenaltyFactor {
-      get => MaximumPenaltyFactorParamter.Value.Value;
-      set => MaximumPenaltyFactorParamter.Value.Value = value;
-    }
-
-
-    //Use false for maximization, because we try to minimize the NMSE
-    public override bool Maximization => false;
+    public double PenalityFactor {
+      get => PenaltyFactorParameter.Value.Value;
+      set => PenaltyFactorParameter.Value.Value = value;
+    }
+
+
+    public override bool Maximization => false; // NMSE is minimized
 
     #endregion
@@ -86,40 +97,40 @@
 
     public SymbolicRegressionSingleObjectiveConstraintEvaluator() {
-      Parameters.Add(new FixedValueParameter<BoolValue>(UseConstantOptimizationParameterName,
-        "Define whether constant optimization is active or not.", new BoolValue(false)));
-      Parameters.Add(new FixedValueParameter<IntValue>(ConstantOptimizationIterationsParameterName,
-        "Define how many constant optimization steps should be performed.", new IntValue(10)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(OptimizeParametersParameterName,
+        "Define whether optimization of numeric parameters is active or not (default: false).", new BoolValue(false)));
+      Parameters.Add(new FixedValueParameter<IntValue>(ParameterOptimizationIterationsParameterName,
+        "Define how many parameter optimization steps should be performed (default: 10).", new IntValue(10)));
       Parameters.Add(new FixedValueParameter<BoolValue>(UseSoftConstraintsParameterName,
-        "Define whether the constraints are penalized by soft or hard constraints.", new BoolValue(false)));
+        "Define whether the constraints are penalized by soft or hard constraints (default: false).", new BoolValue(false)));
       Parameters.Add(new ValueParameter<IBoundsEstimator>(BoundsEstimatorParameterName,
-        "Select the Boundsestimator.", new IntervalArithBoundsEstimator()));
-      Parameters.Add(new FixedValueParameter<DoubleValue>(MaximumPenaltyFactorParamterName,
-        "Specify how hard constraints violations should be punished", new DoubleValue(1.5)));
+        "The estimator which is used to estimate output ranges of models (default: interval arithmetic).", new IntervalArithBoundsEstimator()));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(PenaltyFactorParameterName,
+        "Punishment factor for constraint violations for soft constraint handling (fitness = NMSE + penaltyFactor * avg(violations)) (default: 1.0)", new DoubleValue(1.0)));
     }
 
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
-      if (!Parameters.ContainsKey(UseConstantOptimizationParameterName)) {
-        Parameters.Add(new FixedValueParameter<BoolValue>(UseConstantOptimizationParameterName,
-          "Define whether constant optimization is active or not.", new BoolValue(false)));
-      }
-
-      if (!Parameters.ContainsKey(ConstantOptimizationIterationsParameterName)) {
-        Parameters.Add(new FixedValueParameter<IntValue>(ConstantOptimizationIterationsParameterName,
-          "Define how many constant optimization steps should be performed.", new IntValue(10)));
+      if (!Parameters.ContainsKey(OptimizeParametersParameterName)) {
+        Parameters.Add(new FixedValueParameter<BoolValue>(OptimizeParametersParameterName,
+          "Define whether optimization of numeric parameters is active or not (default: false).", new BoolValue(false)));
+      }
+
+      if (!Parameters.ContainsKey(ParameterOptimizationIterationsParameterName)) {
+        Parameters.Add(new FixedValueParameter<IntValue>(ParameterOptimizationIterationsParameterName,
+          "Define how many parameter optimization steps should be performed (default: 10).", new IntValue(10)));
       }
 
       if (!Parameters.ContainsKey(UseSoftConstraintsParameterName)) {
         Parameters.Add(new FixedValueParameter<BoolValue>(UseSoftConstraintsParameterName,
-          "Define whether the constraints are penalized by soft or hard constraints.", new BoolValue(false)));
+          "Define whether the constraints are penalized by soft or hard constraints (default: false).", new BoolValue(false)));
       }
 
       if (!Parameters.ContainsKey(BoundsEstimatorParameterName))
         Parameters.Add(new ValueParameter<IBoundsEstimator>(BoundsEstimatorParameterName,
-          "Select the Boundsestimator.", new IntervalArithBoundsEstimator()));
-
-      if (!Parameters.ContainsKey(MaximumPenaltyFactorParamterName)) {
-        Parameters.Add(new FixedValueParameter<DoubleValue>(MaximumPenaltyFactorParamterName,
-          "Specify how hard constraints violations should be punished", new DoubleValue(1.5)));
+          "The estimator which is used to estimate output ranges of models (default: interval arithmetic).", new IntervalArithBoundsEstimator()));
+
+      if (!Parameters.ContainsKey(PenaltyFactorParameterName)) {
+        Parameters.Add(new FixedValueParameter<DoubleValue>(PenaltyFactorParameterName,
+          "Punishment factor for constraint violations for soft constraint handling (fitness = NMSE + penaltyFactor * avg(violations)) (default: 1.0)", new DoubleValue(1.0)));
       }
     }
@@ -133,5 +144,5 @@
     public override IOperation InstrumentedApply() {
       var rows = GenerateRowsToEvaluate();
-      var solution = SymbolicExpressionTreeParameter.ActualValue;
+      var tree = SymbolicExpressionTreeParameter.ActualValue;
       var problemData = ProblemDataParameter.ActualValue;
       var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
@@ -139,6 +150,6 @@
       var applyLinearScaling = ApplyLinearScalingParameter.ActualValue.Value;
 
-      if (UseConstantOptimization) {
-        SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, solution, problemData, rows,
+      if (OptimizeParameters) {
+        SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, tree, problemData, rows,
           false, ConstantOptimizationIterations, true,
           estimationLimits.Lower, estimationLimits.Upper);
@@ -146,37 +157,36 @@
         if (applyLinearScaling) {
           //Check for interval arithmetic grammar
-          //remove scaling nodes for linear scaling evaluation
+          if (!(tree.Root.Grammar is IntervalArithmeticGrammar))
+            throw new ArgumentException($"{ItemName} can only be used with IntervalArithmeticGrammar.");
+
           var rootNode = new ProgramRootSymbol().CreateTreeNode();
           var startNode = new StartSymbol().CreateTreeNode();
-          SymbolicExpressionTree newTree = null;
-          foreach (var node in solution.IterateNodesPrefix())
-            if (node.Symbol.Name == "Scaling") {
-              for (var i = 0; i < node.SubtreeCount; ++i) startNode.AddSubtree(node.GetSubtree(i));
-              rootNode.AddSubtree(startNode);
-              newTree = new SymbolicExpressionTree(rootNode);
-              break;
-            }
+          var offset = tree.Root.GetSubtree(0) //Start
+                                .GetSubtree(0); //Offset
+          var scaling = offset.GetSubtree(0);
+          var t = (ISymbolicExpressionTreeNode)scaling.GetSubtree(0).Clone();
+          rootNode.AddSubtree(startNode);
+          startNode.AddSubtree(t);
+          var newTree = new SymbolicExpressionTree(rootNode);
 
           //calculate alpha and beta for scaling
           var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(newTree, problemData.Dataset, rows);
+
           var targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
           OnlineLinearScalingParameterCalculator.Calculate(estimatedValues, targetValues, out var alpha, out var beta,
             out var errorState);
-          //Set alpha and beta to the scaling nodes from ia grammar
-          foreach (var node in solution.IterateNodesPrefix())
-            if (node.Symbol.Name == "Offset") {
-              node.RemoveSubtree(1);
-              var alphaNode = new ConstantTreeNode(new Constant()) { Value = alpha };
-              node.AddSubtree(alphaNode);
-            } else if (node.Symbol.Name == "Scaling") {
-              node.RemoveSubtree(1);
-              var betaNode = new ConstantTreeNode(new Constant()) { Value = beta };
-              node.AddSubtree(betaNode);
-            }
-        }
-      }
-
-      var quality = Calculate(interpreter, solution, estimationLimits.Lower, estimationLimits.Upper, problemData, rows,
-        PenaltyMultiplier, BoundsEstimator, UseSoftConstraints, MaximumPenaltyFactor);
+
+          if (errorState == OnlineCalculatorError.None) {
+            //Set alpha and beta to the scaling nodes from ia grammar
+            var offsetParameter = offset.GetSubtree(1) as ConstantTreeNode;
+            offsetParameter.Value = alpha;
+            var scalingParameter = scaling.GetSubtree(1) as ConstantTreeNode;
+            scalingParameter.Value = beta;
+          }
+        } // else: alpha and beta are evolved
+      }
+
+      var quality = Calculate(interpreter, tree, estimationLimits.Lower, estimationLimits.Upper, problemData, rows,
+        BoundsEstimator, UseSoftConstraints, PenalityFactor);
       QualityParameter.ActualValue = new DoubleValue(quality);
 
@@ -186,11 +196,11 @@
     public static double Calculate(
       ISymbolicDataAnalysisExpressionTreeInterpreter interpreter,
-      ISymbolicExpressionTree solution, double lowerEstimationLimit,
-      double upperEstimationLimit,
+      ISymbolicExpressionTree tree,
+      double lowerEstimationLimit, double upperEstimationLimit,
       IRegressionProblemData problemData, IEnumerable<int> rows,
-      double penaltyMultiplier, IBoundsEstimator estimator,
-      bool useSoftConstraints, double maximumPenaltyFactor) {
-
-      var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
+      IBoundsEstimator estimator,
+      bool useSoftConstraints = false, double penaltyFactor = 1.0) {
+
+      var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(tree, problemData.Dataset, rows);
       var targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       var constraints = problemData.ShapeConstraints.EnabledConstraints;
@@ -205,35 +215,21 @@
       }
 
-      var constraintResults = IntervalUtil.GetConstraintViolations(constraints, estimator, intervalCollection, solution);
-
-      if (constraintResults.Any(x => double.IsNaN(x) || double.IsInfinity(x))) {
+      var constraintViolations = IntervalUtil.GetConstraintViolations(constraints, estimator, intervalCollection, tree);
+
+      if (constraintViolations.Any(x => double.IsNaN(x) || double.IsInfinity(x))) {
         return 1.0;
       }
 
-
       if (useSoftConstraints) {
-        if (maximumPenaltyFactor < 0.0)
-          throw new ArgumentException("The parameter has to be greater or equal 0.0!", nameof(maximumPenaltyFactor));
-
-        var zip = constraints.Zip(constraintResults, (c, e) => new { Constraint = c, Error = e });
-        double sum = 0.0;
-
-        foreach (var x in zip) {
-          if (x.Constraint.Weight <= 0)
-            throw new ArgumentException("Constraint weights <= 0 are not allowed!");
-
-          double e = x.Error / x.Constraint.Weight;
-
-          e = double.IsNaN(e) ? 0.0 : e;
-          e = e > 1.0 ? 1.0 : e;
-
-          sum += Math.Sqrt(e) * maximumPenaltyFactor;
-        }
-
-        double avgError = sum / zip.Count();
-        nmse = nmse * avgError + nmse;
-        nmse = Math.Min(1.0, nmse);
-      } else if (constraintResults.Any(x => x != 0.0)) {
-        nmse = 1.0;
+        if (penaltyFactor < 0.0)
+          throw new ArgumentException("The parameter has to be greater or equal 0.0!", nameof(penaltyFactor));
+
+        var weightedViolationSum = constraints
+          .Zip(constraintViolations, (c, v) => c.Weight * v)
+          .Average();
+
+        return Math.Min(nmse, 1.0) + penaltyFactor * weightedViolationSum;
+      } else if (constraintViolations.Any(x => x > 0.0)) {
+        return 1.0;
       }
 
@@ -250,5 +246,5 @@
       var nmse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree,
         EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper,
-        problemData, rows, PenaltyMultiplier, BoundsEstimator, UseSoftConstraints, MaximumPenaltyFactor);
+        problemData, rows, BoundsEstimator, UseSoftConstraints, PenalityFactor);
 
       SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
Index: branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs
===================================================================
--- branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs	(revision 17897)
+++ branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionConstraintAnalyzer.cs	(revision 17898)
@@ -1,3 +1,24 @@
-﻿using System.Linq;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 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.Linq;
 using HEAL.Attic;
 using HeuristicLab.Analysis;
@@ -10,8 +31,9 @@
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
   [StorableType("4318C6BD-E0A1-45FE-AC30-96E7F73B51FB")]
+  [Item("Symbolic regression constraint analyser", "Analyzes the number of shape-constraint violations of symbolic regression models.")]
   public class SymbolicRegressionConstraintAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicExpressionTreeAnalyzer {
     private const string ProblemDataParameterName = "ProblemData";
-    private const string ConstraintViolationParameterName = "ConstraintViolations";
-    private const string ConstraintUnsatisfiedSolutionsParameterName = "Constraint Unsatisfied Solutions";
+    private const string ConstraintViolationsParameterName = "ConstraintViolations";
+    private const string InfeasibleSolutionsParameterName = "InfeasibleSolutions";
 
     #region parameter properties
@@ -20,16 +42,19 @@
       (ILookupParameter<IRegressionProblemData>) Parameters[ProblemDataParameterName];
 
-    public IResultParameter<DataTable> ConstraintViolationParameter =>
-      (IResultParameter<DataTable>) Parameters[ConstraintViolationParameterName];
+    public IResultParameter<DataTable> ConstraintViolationsParameter =>
+      (IResultParameter<DataTable>) Parameters[ConstraintViolationsParameterName];
 
-    public IResultParameter<DataTable> ConstraintUnsatisfiedSolutionsParameter =>
-      (IResultParameter<DataTable>)Parameters[ConstraintUnsatisfiedSolutionsParameterName];
+    public IResultParameter<DataTable> InfeasibleSolutionsParameter =>
+      (IResultParameter<DataTable>)Parameters[InfeasibleSolutionsParameterName];
 
     #endregion
 
+    #region properties
+    public IRegressionProblemData RegressionProblemData => RegressionProblemDataParameter.ActualValue;
+    public DataTable ConstraintViolations => ConstraintViolationsParameter.ActualValue;
+    public DataTable InfeasibleSolutions => InfeasibleSolutionsParameter.ActualValue;
+    #endregion
+
     public override bool EnabledByDefault => false;
-    public static int Iterations { get; set; } = 0;
-
-    public IBoundsEstimator BoundsEstimator { get; set; } = new IntervalArithBoundsEstimator();
 
     [StorableConstructor]
@@ -46,33 +71,23 @@
       Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName,
         "The problem data of the symbolic data analysis problem."));
-      Parameters.Add(new ResultParameter<DataTable>(ConstraintViolationParameterName,
-        "Shows the number of constraint violations!"));
-      Parameters.Add(new ResultParameter<DataTable>(ConstraintUnsatisfiedSolutionsParameterName,
-        "Shows the number of solutions with unsatisfied constraints."));
+      Parameters.Add(new ResultParameter<DataTable>(ConstraintViolationsParameterName,
+        "The number of constraint violations."));
+      Parameters.Add(new ResultParameter<DataTable>(InfeasibleSolutionsParameterName,
+        "The number of infeasible solutions."));
 
 
-      ConstraintViolationParameter.DefaultValue = new DataTable(ConstraintViolationParameterName) {
+      ConstraintViolationsParameter.DefaultValue = new DataTable(ConstraintViolationsParameterName) {
         VisualProperties = {
           XAxisTitle = "Generations",
-          YAxisTitle = "Constraint Violations"
+          YAxisTitle = "Constraint violations"
         }
       };
 
-      ConstraintUnsatisfiedSolutionsParameter.DefaultValue = new DataTable(ConstraintUnsatisfiedSolutionsParameterName) {
+      InfeasibleSolutionsParameter.DefaultValue = new DataTable(InfeasibleSolutionsParameterName) {
         VisualProperties = {
           XAxisTitle = "Generations",
-          YAxisTitle = "Constraint Unsatisfied Solutions"
+          YAxisTitle = "Infeasible solutions"
         }
       };
-    }
-
-    public override void InitializeState() {
-      Iterations = 0;
-      base.InitializeState();
-    }
-
-    public override void ClearState() {
-      Iterations = 0;
-      base.ClearState();
     }
 
@@ -80,12 +95,12 @@
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
-      if (Parameters.ContainsKey(ConstraintUnsatisfiedSolutionsParameterName)) return;
-      Parameters.Add(new ResultParameter<DataTable>(ConstraintUnsatisfiedSolutionsParameterName,
-        "Shows the number of solutions with unsatisfied constraints."));
+      if (Parameters.ContainsKey(InfeasibleSolutionsParameterName)) return;
+      Parameters.Add(new ResultParameter<DataTable>(InfeasibleSolutionsParameterName,
+        "The number of infeasible solutions."));
 
-      ConstraintUnsatisfiedSolutionsParameter.DefaultValue = new DataTable(ConstraintUnsatisfiedSolutionsParameterName) {
+      InfeasibleSolutionsParameter.DefaultValue = new DataTable(InfeasibleSolutionsParameterName) {
         VisualProperties = {
           XAxisTitle = "Generations",
-          YAxisTitle = "Constraint Unsatisfied Solutions"
+          YAxisTitle = "Infeasible solutions"
         }
       };
@@ -93,38 +108,32 @@
 
     public override IOperation Apply() {
-      Iterations++;
+      var problemData = RegressionProblemData;
+      var trees = SymbolicExpressionTree.ToArray();
 
-      var problemData = RegressionProblemDataParameter.ActualValue;
-      var trees = SymbolicExpressionTreeParameter.ActualValue;
+      var results = ResultCollection;
+      var constraints = problemData.ShapeConstraints.EnabledConstraints;
+      var variableRanges = problemData.VariableRanges;
+      var constraintViolationsTable = ConstraintViolations;
+      var estimator = new IntervalArithBoundsEstimator();
 
-      var results = ResultCollectionParameter.ActualValue;
-      var constraints = problemData.ShapeConstraints.EnabledConstraints;
-      var variableRanges = problemData.VariableRanges.GetReadonlyDictionary();
-      var intervalCollection = problemData.VariableRanges;
-      var newDataTable = ConstraintViolationParameter.ActualValue;
-      var solutions = SymbolicExpressionTree.ToArray();
-
-      if (newDataTable.Rows.Count == 0)
+      if (constraintViolationsTable.Rows.Any())
         foreach (var constraint in constraints)
-          newDataTable.Rows.Add(new DataRow(constraint.ToString()));
+          constraintViolationsTable.Rows.Add(new DataRow(constraint.ToString()));
 
       foreach (var constraint in constraints) {
-        var violations = trees.Count(tree => IntervalUtil.GetConstraintViolation(constraint, BoundsEstimator, intervalCollection, tree) > 0.0);
-
-        newDataTable.Rows[constraint.ToString()].Values.Add(violations);
+        var numViolations = trees.Count(tree => IntervalUtil.GetConstraintViolation(constraint, estimator, variableRanges, tree) > 0.0);
+        constraintViolationsTable.Rows[constraint.ToString()].Values.Add(numViolations);
       }
 
-      var constraintUnsatisfiedSolutionsDataTable = ConstraintUnsatisfiedSolutionsParameter.ActualValue;
+      var constraintUnsatisfiedSolutionsDataTable = InfeasibleSolutions;
       if (constraintUnsatisfiedSolutionsDataTable.Rows.Count == 0)
-        constraintUnsatisfiedSolutionsDataTable.Rows.Add(new DataRow(ConstraintUnsatisfiedSolutionsParameterName));
+        constraintUnsatisfiedSolutionsDataTable.Rows.Add(new DataRow(InfeasibleSolutionsParameterName));
 
-      constraintUnsatisfiedSolutionsDataTable.Rows[ConstraintUnsatisfiedSolutionsParameterName]
+      constraintUnsatisfiedSolutionsDataTable.Rows[InfeasibleSolutionsParameterName]
         .Values
-        .Add(solutions.Count(s => IntervalUtil.GetConstraintViolations(constraints, BoundsEstimator, intervalCollection, s).Any(x => x != 0.0)));
+        .Add(trees.Count(t => IntervalUtil.GetConstraintViolations(constraints, estimator, variableRanges, t).Any(x => x > 0.0)));
 
       return base.Apply();
     }
-
-    
   }
 }
Index: branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSplittingAnalyzer.cs
===================================================================
--- branches/3076_IA_evaluators_analyzers_reintegration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSplittingAnalyzer.cs	(revision 17897)
+++ 	(revision )
@@ -1,197 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using HEAL.Attic;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
-    [StorableType("7CAE2D30-EDEC-44B6-B772-A2E63E64288F")]
-    public class SymbolicRegressionSplittingAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicExpressionTreeAnalyzer {
-      private const string ProblemDataParameterName = "ProblemData";
-      private const string BetterWithSplittingParameterName = "Tighter bounds after splitting";
-      private const string NoSplitAcceptedParameterName = "Accepted without splitting";
-      private const string NoSplitDiscardedParameterName = "Dicarded without splitting";
-      private const string SplitAcceptedParameterName = "Accepted with splitting";
-      private const string SplitDiscardedParameterName = "Discarded with splitting";
-
-
-      #region parameter properties
-
-      public ILookupParameter<IRegressionProblemData> RegressionProblemDataParameter =>
-        (ILookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName];
-
-      public IResultParameter<IntValue> BetterWithSplittingParameter =>
-        (IResultParameter<IntValue>) Parameters[BetterWithSplittingParameterName];
-
-      public IResultParameter<IntValue> NoSplitAcceptedParameter =>
-        (IResultParameter<IntValue>) Parameters[NoSplitAcceptedParameterName];
-
-      public IResultParameter<IntValue> NoSplitDiscardedParameter =>
-        (IResultParameter<IntValue>)Parameters[NoSplitDiscardedParameterName];
-
-      public IResultParameter<IntValue> SplitAcceptedParameter =>
-        (IResultParameter<IntValue>)Parameters[SplitAcceptedParameterName];
-
-        public IResultParameter<IntValue> SplitDiscardedParameter =>
-          (IResultParameter<IntValue>)Parameters[SplitDiscardedParameterName];
-
-
-
-      #endregion
-      public override bool EnabledByDefault => false;
-      public static int Iterations { get; set; } = 0;
-
-      public static int BetterWithSplitting { get; set; } = 0;
-
-      public static int AccpetedWithoutSplitting { get; set; } = 0;
-      public static int DiscardedWithoutSplitting { get; set; } = 0;
-      public static int AccptedWithSplitting { get; set; } = 0;
-      public static int DiscardedWithSplitting { get; set; } = 0;
-
-      [StorableConstructor]
-      protected SymbolicRegressionSplittingAnalyzer(StorableConstructorFlag _) : base(_) { }
-
-      private SymbolicRegressionSplittingAnalyzer(SymbolicRegressionSplittingAnalyzer original, Cloner cloner) : base(original, cloner) { }
-
-      public SymbolicRegressionSplittingAnalyzer() {
-        Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName,
-          "The problem data of the symbolic data analysis problem."));
-
-        if (!Parameters.ContainsKey(BetterWithSplittingParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(BetterWithSplittingParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        BetterWithSplittingParameter.DefaultValue = new IntValue(BetterWithSplitting);
-
-        if (!Parameters.ContainsKey(NoSplitAcceptedParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(NoSplitAcceptedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        NoSplitAcceptedParameter.DefaultValue = new IntValue(BetterWithSplitting);
-
-        if (!Parameters.ContainsKey(NoSplitDiscardedParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(NoSplitDiscardedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        BetterWithSplittingParameter.DefaultValue = new IntValue(BetterWithSplitting);
-
-        if (!Parameters.ContainsKey(SplitAcceptedParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(SplitAcceptedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        BetterWithSplittingParameter.DefaultValue = new IntValue(BetterWithSplitting);
-
-        if (!Parameters.ContainsKey(SplitDiscardedParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(SplitDiscardedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        BetterWithSplittingParameter.DefaultValue = new IntValue(BetterWithSplitting);
-        }
-
-
-
-      [StorableHook(HookType.AfterDeserialization)]
-      private void AfterDeserialization() {
-        if (!Parameters.ContainsKey(BetterWithSplittingParameterName)) {
-          Parameters.Add(new ResultParameter<IntValue>(BetterWithSplittingParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-
-        BetterWithSplittingParameter.DefaultValue = new IntValue(BetterWithSplitting);
-
-        if (!Parameters.ContainsKey(NoSplitAcceptedParameterName))
-        {
-          Parameters.Add(new ResultParameter<IntValue>(NoSplitAcceptedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        NoSplitAcceptedParameter.DefaultValue = new IntValue(AccpetedWithoutSplitting);
-
-        if (!Parameters.ContainsKey(NoSplitDiscardedParameterName))
-        {
-          Parameters.Add(new ResultParameter<IntValue>(NoSplitDiscardedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        NoSplitDiscardedParameter.DefaultValue = new IntValue(DiscardedWithoutSplitting);
-
-        if (!Parameters.ContainsKey(SplitAcceptedParameterName))
-        {
-          Parameters.Add(new ResultParameter<IntValue>(SplitAcceptedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        SplitAcceptedParameter.DefaultValue = new IntValue(AccptedWithSplitting);
-
-        if (!Parameters.ContainsKey(SplitDiscardedParameterName))
-        {
-          Parameters.Add(new ResultParameter<IntValue>(SplitDiscardedParameterName, "Shows the number constraints which gets accepted after splitting"));
-        }
-        SplitDiscardedParameter.DefaultValue = new IntValue(DiscardedWithSplitting);
-        }
-
-      public override IDeepCloneable Clone(Cloner cloner) {
-        return new SymbolicRegressionSplittingAnalyzer(this, cloner);
-      }
-
-      public override void InitializeState() {
-        Iterations = 0;
-        BetterWithSplitting = 0;
-        AccptedWithSplitting = 0;
-        AccpetedWithoutSplitting = 0;
-        DiscardedWithSplitting = 0;
-        DiscardedWithoutSplitting = 0;
-        base.InitializeState();
-      }
-
-      public override void ClearState() {
-        Iterations = 0;
-        BetterWithSplitting = 0;
-        AccptedWithSplitting = 0;
-        AccpetedWithoutSplitting = 0;
-        DiscardedWithSplitting = 0;
-        DiscardedWithoutSplitting = 0;
-        base.ClearState();
-      }
-
-      public override IOperation Apply() {
-        var problemData = RegressionProblemDataParameter.ActualValue;
-        var trees = SymbolicExpressionTreeParameter.ActualValue;
-        var constraints = problemData.ShapeConstraints.EnabledConstraints;
-        var intervalCollection = problemData.VariableRanges;
-        var estimator = new IntervalArithBoundsEstimator();
-        var splittingEstimator = new IntervalArithBoundsEstimator {UseIntervalSplitting = true, SplittingIterations = 12};
-
-        foreach (var solution in trees) {
-          var noSplitting = IntervalUtil.IntervalConstraintsViolation(constraints, estimator, intervalCollection, solution);
-          var splitting = IntervalUtil.IntervalConstraintsViolation(constraints, splittingEstimator, intervalCollection, solution);
-
-          if (noSplitting.Any(x => x != 0)) DiscardedWithoutSplitting++;
-          if (noSplitting.All(x => x == 0)) AccpetedWithoutSplitting++;
-
-          if (splitting.Any(x => x != 0))
-            DiscardedWithSplitting++;
-          else {
-            AccptedWithSplitting++;
-          }
-
-          for (var i = 0; i < noSplitting.Count(); ++i) {
-            if (splitting.ToArray()[i] < noSplitting.ToArray()[i]) {
-              BetterWithSplitting++;
-            }
-            /*if (splitting.ToArray()[i] < noSplitting.ToArray()[i]) {
-              BetterWithSplitting++;
-            } else if (splitting.ToArray()[i] > noSplitting.ToArray()[i] && !splitting.ToArray()[i].IsAlmost(noSplitting.ToArray()[i])) {
-              WorseWithSplitting++;
-              noSplitting = IntervalUtil.IntervalConstraintsViolation(constraints, estimator, intervalCollection, solution);
-              splitting = IntervalUtil.IntervalConstraintsViolation(constraints, splittingEstimator, intervalCollection, solution);
-            }*/
-          }
-        }
-
-        BetterWithSplittingParameter.ActualValue.Value = BetterWithSplitting;
-        NoSplitAcceptedParameter.ActualValue.Value = AccpetedWithoutSplitting;
-        NoSplitDiscardedParameter.ActualValue.Value = DiscardedWithoutSplitting;
-        SplitAcceptedParameter.ActualValue.Value = AccptedWithSplitting;
-        SplitDiscardedParameter.ActualValue.Value = DiscardedWithSplitting;
-        return base.Apply();
-      }
-    }
-}
