Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: unable to cast object of type ConstantTreeNode to NumberTreeNode in DerivativeCalculator #3165

Open
gkronber opened this issue Jun 28, 2022 · 0 comments
Assignees

Comments

@gkronber
Copy link
Member

To reproduce:

Create NLR and enter a model structure with a power (e.g. x ^ 2).

Run algorithm

Exception:
HeuristicLab version: 3.3.16.8797 InvalidCastException: Unable to cast object of type 'HeuristicLab.Problems.DataAnalysis.Symbolic.ConstantTreeNode' to type 'HeuristicLab.Problems.DataAnalysis.Symbolic.NumberTreeNode'. at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 159 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 68 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 139 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 98 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 119 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 68 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 85 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTreeNode branch, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 68 at HeuristicLab.Problems.DataAnalysis.Symbolic.DerivativeCalculator.Derive(ISymbolicExpressionTree tree, String variableName) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Converters\DerivativeCalculator.cs:line 37 at HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.SymbolicRegressionSolution.CalculateModelIntervals(ISymbolicRegressionSolution solution) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\SymbolicRegressionSolution.cs:line 208 at HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.SymbolicRegressionSolution.CalculateResults() in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\SymbolicRegressionSolution.cs:line 193 at HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.SymbolicRegressionSolution..ctor(ISymbolicRegressionModel model, IRegressionProblemData problemData) in D:\reps\HeuristicLab\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\SymbolicRegressionSolution.cs:line 143 at HeuristicLab.Algorithms.DataAnalysis.NonlinearRegression.CreateRegressionSolution(IRegressionProblemData problemData, String modelStructure, Int32 maxIterations, Boolean applyLinearScaling, IRandom rand) in D:\reps\HeuristicLab\HeuristicLab.Algorithms.DataAnalysis\3.4\NonlinearRegression\NonlinearRegression.cs:line 289 at HeuristicLab.Algorithms.DataAnalysis.NonlinearRegression.Run(CancellationToken cancellationToken) in D:\reps\HeuristicLab\HeuristicLab.Algorithms.DataAnalysis\3.4\NonlinearRegression\NonlinearRegression.cs:line 197 at HeuristicLab.Optimization.BasicAlgorithm.Run(Object state) in D:\reps\HeuristicLab\HeuristicLab.Optimization\3.3\Algorithms\BasicAlgorithm.cs:line 130 at HeuristicLab.Optimization.BasicAlgorithm.Start(CancellationToken cancellationToken) in D:\reps\HeuristicLab\HeuristicLab.Optimization\3.3\Algorithms\BasicAlgorithm.cs:line 77

@gkronber gkronber self-assigned this Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant