Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/18/20 11:35:45 (5 years ago)
Author:
chaider
Message:

#3073 Added classes/views to define constraints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r17579 r17607  
    9494      problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>()));
    9595      problemData.Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, "", new IntervalCollection()));
     96      problemData.Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, "", new ProblemDataConstraint(problemData)));
    9697      emptyProblemData = problemData;
    9798    }
     
    107108      get => VariableRangesParameter.Value;
    108109    }
     110
     111    public IFixedValueParameter<ProblemDataConstraint> IntervalConstraintsParameter =>
     112      (IFixedValueParameter<ProblemDataConstraint>) Parameters[IntervalConstraintsParameterName];
     113
     114    public ProblemDataConstraint IntervalConstraints => IntervalConstraintsParameter.Value;
    109115
    110116
     
    140146        Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
    141147      }
     148
     149      if (!Parameters.ContainsKey(IntervalConstraintsParameterName)) {
     150        Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, new ProblemDataConstraint(this)));
     151      }
    142152      RegisterParameterEvents();
    143153    }
     
    169179      var intervalCollection = CalculateDatasetIntervals(this.Dataset);
    170180      Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
     181      Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, new ProblemDataConstraint(this)));
    171182      RegisterParameterEvents();
    172183    }
Note: See TracChangeset for help on using the changeset viewer.