Type error in evaluator subexpression generation
michel2323 opened this issue · comments
Michel Schanen commented
This statement fails
MathOptSymbolicAD.jl/src/nonlinear_oracle.jl
Line 541 in b5ad0e0
if
sub
is for example:
sub = MathOptInterface.Nonlinear.Expression(MathOptInterface.Nonlinear.Node[MathOptInterface.Nonlinear.Node(MathOptInterface.Nonlinear.NODE_VALUE, 1, -1)], [0.0])
subexpr[i]
is of type Expr
wheres _to_expr
returns a Float64
for that sub
.
I can try to get an MWE if needed. But first, is this subexpression sub
a valid expression? Should I look at where this is coming from?
Oscar Dowson commented
It probably happens if you have @NLexpression(model, 1.0)
, where :(1.0)
isn't actually an expression. Let me take a look.