Index: branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/ExtendedConstraint.cs
===================================================================
--- branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/ExtendedConstraint.cs	(revision 18181)
+++ branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/ExtendedConstraint.cs	(revision 18181)
@@ -0,0 +1,49 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HEAL.Attic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [StorableType("4E416693-1051-4987-A972-F869C4ACE3D4")]
+  public class ExtendedConstraint : ParameterizedNamedItem {
+    #region Constants
+    private const string ExpressionParameterName = "Expression";
+    private const string ShapeConstraintsParameterName = "Shape Constraints";
+    #endregion
+
+    public IFixedValueParameter<StringValue> ExpressionParameter => 
+      (IFixedValueParameter<StringValue>)Parameters[ExpressionParameterName];
+
+    public IFixedValueParameter<ShapeConstraints> ShapeConstraintsParameter =>
+      (IFixedValueParameter<ShapeConstraints>)Parameters[ShapeConstraintsParameterName];
+
+    public string Expression => ExpressionParameter.Value.Value;
+    public ISymbolicExpressionTree Tree => Parser.Parse(Expression);
+    public ShapeConstraints ShapeConstraints => ShapeConstraintsParameter.Value;
+
+    private InfixExpressionParser Parser => new InfixExpressionParser();
+
+    #region Constructors & Cloning
+    public ExtendedConstraint() {
+      Parameters.Add(new FixedValueParameter<StringValue>(ExpressionParameterName, new StringValue("")));
+      Parameters.Add(new FixedValueParameter<ShapeConstraints>(ShapeConstraintsParameterName, new ShapeConstraints()));
+    }
+
+    protected ExtendedConstraint(ExtendedConstraint original, Cloner cloner) : base(original, cloner) {
+    }
+
+    [StorableConstructor]
+    protected ExtendedConstraint(StorableConstructorFlag _) : base(_) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) =>
+      new ExtendedConstraint(this, cloner);
+    #endregion
+  }
+}
Index: branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 18180)
+++ branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 18181)
@@ -119,4 +119,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="ExtendedConstraint.cs" />
     <Compile Include="Interfaces\IMultiObjectiveConstraintsEvaluator.cs" />
     <Compile Include="MultiObjective\NMSEMultiObjectiveConstraintsEvaluator.cs" />
Index: branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs
===================================================================
--- branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs	(revision 18180)
+++ branches/3138_Shape_Constraints_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs	(revision 18181)
@@ -41,4 +41,5 @@
     private const string BoundsEstimatorParameterName = "BoundsEstimator";
     private const string PenaltyFactorParameterName = "PenaltyFactor";
+    private const string ExtendedConstraintsParameterName = "ExtendedConstraints";
 
 
@@ -57,4 +58,8 @@
       (IFixedValueParameter<DoubleValue>)Parameters[PenaltyFactorParameterName];
 
+    public IFixedValueParameter<IItemList<ExtendedConstraint>> ExtendedConstraintsParameter =>
+      (IFixedValueParameter<IItemList<ExtendedConstraint>>)Parameters[ExtendedConstraintsParameterName];
+
+
     public bool OptimizeParameters {
       get => OptimizerParametersParameter.Value.Value;
@@ -81,4 +86,9 @@
       set => PenaltyFactorParameter.Value.Value = value;
     }
+
+    public IEnumerable<ExtendedConstraint> ExtendedConstraints {
+      get => ExtendedConstraintsParameter.Value;
+    }
+      
 
 
@@ -106,4 +116,5 @@
       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)));
+      Parameters.Add(new FixedValueParameter<ItemList<ExtendedConstraint>>(ExtendedConstraintsParameterName, "", new ItemList<ExtendedConstraint>()));
     }
 
@@ -164,5 +175,5 @@
 
       var quality = Calculate(interpreter, tree, estimationLimits.Lower, estimationLimits.Upper, problemData, rows,
-        BoundsEstimator, UseSoftConstraints, PenalityFactor);
+        BoundsEstimator, UseSoftConstraints, PenalityFactor, ExtendedConstraints);
       QualityParameter.ActualValue = new DoubleValue(quality);
 
@@ -176,5 +187,6 @@
       IRegressionProblemData problemData, IEnumerable<int> rows,
       IBoundsEstimator estimator,
-      bool useSoftConstraints = false, double penaltyFactor = 1.0) {
+      bool useSoftConstraints = false, double penaltyFactor = 1.0,
+      IEnumerable<ExtendedConstraint> extendedConstraints = null) {
 
       var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(tree, problemData.Dataset, rows);
@@ -225,5 +237,5 @@
       var nmse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree,
         EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper,
-        problemData, rows, BoundsEstimator, UseSoftConstraints, PenalityFactor);
+        problemData, rows, BoundsEstimator, UseSoftConstraints, PenalityFactor, ExtendedConstraints);
 
       SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
