Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/21 15:26:50 (4 years ago)
Author:
gkronber
Message:

#3073 bugfixing

Location:
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs

    r17902 r17906  
    194194            return Expression.Divide(e1, e2);
    195195          }
     196        case OpCodes.AnalyticQuotient: {
     197            var a = expr(node.GetSubtree(0));
     198            var b = expr(node.GetSubtree(1));
     199            var fun = typeof(Interval).GetMethod(methodName[opCode], new[] { a.Type, b.Type });
     200            return Expression.Call(fun, a, b);
     201          }
    196202        // all these cases share the same code: get method info by name, emit call expression
    197203        case OpCodes.Exp:
     
    205211        case OpCodes.SquareRoot:
    206212        case OpCodes.CubeRoot:
    207         case OpCodes.Absolute:
    208         case OpCodes.AnalyticQuotient: {
     213        case OpCodes.Absolute: {
    209214            var arg = expr(node.GetSubtree(0));
    210215            var fun = typeof(Interval).GetMethod(methodName[opCode], new[] { arg.Type });
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/IntervalUtil.cs

    r17902 r17906  
    3939      var varRanges = variableRanges.GetReadonlyDictionary();
    4040
    41       if (constraint.Variable != null && !varRanges.ContainsKey(constraint.Variable)) {
     41      if (!string.IsNullOrEmpty(constraint.Variable) && !varRanges.ContainsKey(constraint.Variable)) {
    4242        throw new ArgumentException(
    43           $"The given variable {constraint.Variable} in the constraint does not exist in the model.",
     43          $"No variable range found for variable {constraint.Variable} used in the constraints.",
    4444          nameof(constraint));
    4545      }
Note: See TracChangeset for help on using the changeset viewer.