Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16780


Ignore:
Timestamp:
04/15/19 08:53:12 (6 years ago)
Author:
chaider
Message:

#2971

  • Added Target prefix for parsed onstraints in IntervalConstraintParser
  • Added isChecked validation for constraints in ConstraintAnalyzer
Location:
branches/2971_named_intervals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs

    r16773 r16780  
    8787    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicExpressionTree model,
    8888      IRegressionProblemData problemData) {
    89       var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints;
     89      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints.Where(x => x.IsChecked);
    9090      var constraintViolations = new Dictionary<IntervalConstraint, bool>();
    9191      var variableRanges = ((RegressionProblemData)problemData).VariableRanges.VariableIntervals;
     
    147147      var constraintViolations = new Dictionary<string, int>();
    148148
    149       var constraints = problemData.IntervalConstraintsParameter.Value.Constraints;
     149      var constraints = problemData.IntervalConstraintsParameter.Value.Constraints.Where(x => x.IsChecked);
    150150
    151151      if (dataTable.Rows.Count == 0) {
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraintsParser.cs

    r16778 r16780  
    7070              var lowerBound = ParseIntervalBounds(match.Groups[4].Value);
    7171              var upperBound = ParseIntervalBounds(match.Groups[6].Value);
    72               var constraint = new IntervalConstraint(match.Groups[0].Value);
    73               constraint.Expression = "Target " + match.Groups[0].Value;
     72              var constraint = new IntervalConstraint("Target:" + match.Groups[0].Value);
     73              constraint.Expression = "Target:" + match.Groups[0].Value;
    7474              constraint.Definition = "Target " + match.Groups[1].Value.Trim();
    7575              constraint.Variable = match.Groups[1].Value.Trim();
Note: See TracChangeset for help on using the changeset viewer.