Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17553


Ignore:
Timestamp:
05/25/20 08:45:05 (4 years ago)
Author:
chaider
Message:

#2971 Added check if ModelBounds can be calculated

File:
1 edited

Legend:

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

    r17538 r17553  
    9999
    100100    public IntervalCollection ModelBoundsCollection {
    101       get { return (IntervalCollection)this[ModelBoundsResultName].Value; }
    102       private set { this[ModelBoundsResultName].Value = value; }
     101      get => (IntervalCollection)this[ModelBoundsResultName].Value;
     102      private set {
     103        if (ContainsKey(ModelBoundsResultName))
     104          this[ModelBoundsResultName].Value = value;
     105      }
    103106    }
    104107
     
    154157
    155158      if (!ContainsKey(ModelBoundsResultName)) {
    156         Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
    157         CalculateResults();
     159        if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree)) {
     160          Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
     161          CalculateResults();
     162        }
    158163      }
    159164    }
Note: See TracChangeset for help on using the changeset viewer.