Index: /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/ConstrainedNLSInternal.cs
===================================================================
--- /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/ConstrainedNLSInternal.cs	(revision 18162)
+++ /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/ConstrainedNLSInternal.cs	(revision 18163)
@@ -43,4 +43,9 @@
 
     public NLOpt.nlopt_result OptResult { get; private set; }
+
+    public int NumObjectiveFunctionEvaluations { get; private set; }
+    public int NumObjectiveGradientEvaluations { get; private set; }
+    public int NumConstraintEvaluations { get; private set; }
+    public int NumConstraintGradientEvaluations { get; private set; }
 
     private bool disposed = false;
@@ -249,5 +254,5 @@
       double minf = double.MaxValue; /* minimum objective value upon return */
       OptResult = NLOpt.nlopt_optimize(nlopt, x, ref minf);
-
+       
       if (OptResult < 0 && OptResult != NLOpt.nlopt_result.NLOPT_FORCED_STOP) {
         // throw new InvalidOperationException($"NLOpt failed {res} {NLOpt.nlopt_get_errmsg(nlopt)}");
@@ -294,6 +299,8 @@
       UpdateThetaValues(curX);
       var sse = 0.0;
+      NumObjectiveFunctionEvaluations++;
 
       if (grad != null) {
+        NumObjectiveGradientEvaluations++;
         autoDiffEval.Evaluate(preparedTree, problemData.Dataset, trainingRows,
           preparedTreeParameterNodes, fi_eval, jac_eval);
@@ -414,4 +421,5 @@
     double CalculateConstraint(uint dim, double[] curX, double[] grad, IntPtr data) {
       UpdateThetaValues(curX);
+      NumConstraintEvaluations++;
       var intervalEvaluator = new IntervalEvaluator();
       var refIntervalEvaluator = new IntervalInterpreter();
@@ -420,4 +428,5 @@
 
       if (grad != null) Array.Clear(grad, 0, grad.Length);
+      if (grad != null) NumConstraintGradientEvaluations++;
 
       var interval = intervalEvaluator.Evaluate(constraintData.Tree, dataIntervals, constraintData.ParameterNodes,
Index: /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/NLOptEvaluator.cs
===================================================================
--- /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/NLOptEvaluator.cs	(revision 18162)
+++ /branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Extensions/NLOptEvaluator.cs	(revision 18163)
@@ -210,5 +210,7 @@
            constantOptimizationRows, ApplyLinearScalingParameter.ActualValue.Value, Solver, 
            out double qDiff, out double[] constraintsBefore, out double[] constraintsAfter,
-           ConstantOptimizationIterations.Value, updateVariableWeights: UpdateVariableWeights, lowerEstimationLimit: EstimationLimitsParameter.ActualValue.Lower, upperEstimationLimit: EstimationLimitsParameter.ActualValue.Upper, updateConstantsInTree: UpdateConstantsInTree, counter: counter);
+           ConstantOptimizationIterations.Value, updateVariableWeights: UpdateVariableWeights, 
+           lowerEstimationLimit: EstimationLimitsParameter.ActualValue.Lower, upperEstimationLimit: EstimationLimitsParameter.ActualValue.Upper,
+           updateConstantsInTree: UpdateConstantsInTree, counter: counter);
 
         AchievedQualityImprovementParameter.ActualValue = new DoubleValue(qDiff);
@@ -272,5 +274,4 @@
       if (!updateConstantsInTree) throw new NotSupportedException("not updating tree parameters is not supported");
       if (!applyLinearScaling) throw new NotSupportedException("application without linear scaling is not supported");
-
 
       using (var state = new ConstrainedNLSInternal(solver, tree, maxIterations, problemData, 0, 0, 0)) {
@@ -282,4 +283,10 @@
         if (constraintsAfter.Any(cv => cv > 1e-8)) qOpt = qBefore;
         qDiff = qOpt - qBefore;
+
+        if(counter != null) {
+          counter.FunctionEvaluations += state.NumObjectiveFunctionEvaluations;
+          counter.GradientEvaluations += state.NumObjectiveGradientEvaluations;
+        }
+
         return qOpt;
       }
Index: /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalEvaluatorTest.cs
===================================================================
--- /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalEvaluatorTest.cs	(revision 18162)
+++ /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalEvaluatorTest.cs	(revision 18163)
@@ -188,5 +188,5 @@
     [TestCategory("Problems.DataAnalysis")]
     [TestProperty("Time", "short")]
-    public void IntervalEvaluatorSqrAndDiff() {
+    public void IntervalEvaluatorSqrAndDiv() {
       Dictionary<string, Interval> dataIntervals = new Dictionary<string, Interval>() {
         {"R", new Interval(0.2, 0.5) },
Index: /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalInterpreterTest.cs
===================================================================
--- /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalInterpreterTest.cs	(revision 18162)
+++ /branches/2994-AutoDiffForIntervals/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/IntervalInterpreterTest.cs	(revision 18163)
@@ -154,4 +154,15 @@
     }
 
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void IntervalInterpreterAQ() {
+      var variableRanges = new Dictionary<string, Interval>();
+      variableRanges.Add("c1", new Interval(1, 1));
+      variableRanges.Add("c2", new Interval(2, 2));
+
+      EvaluateTest("aq(c1, c2)", new Interval(1.0 / Math.Sqrt(5), 1.0 / Math.Sqrt(5)), variableRanges); // aq(a, b) = a / sqrt(1+b²)
+    }
+
 
     [TestMethod]
