Changeset 17906 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 03/16/21 15:26:50 (4 years ago)
- 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 194 194 return Expression.Divide(e1, e2); 195 195 } 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 } 196 202 // all these cases share the same code: get method info by name, emit call expression 197 203 case OpCodes.Exp: … … 205 211 case OpCodes.SquareRoot: 206 212 case OpCodes.CubeRoot: 207 case OpCodes.Absolute: 208 case OpCodes.AnalyticQuotient: { 213 case OpCodes.Absolute: { 209 214 var arg = expr(node.GetSubtree(0)); 210 215 var fun = typeof(Interval).GetMethod(methodName[opCode], new[] { arg.Type }); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/IntervalUtil.cs
r17902 r17906 39 39 var varRanges = variableRanges.GetReadonlyDictionary(); 40 40 41 if ( constraint.Variable != null&& !varRanges.ContainsKey(constraint.Variable)) {41 if (!string.IsNullOrEmpty(constraint.Variable) && !varRanges.ContainsKey(constraint.Variable)) { 42 42 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.", 44 44 nameof(constraint)); 45 45 }
Note: See TracChangeset
for help on using the changeset viewer.