Skip to content

Commit 4cdbd8b

Browse files
committed
Bugfix for convex evaluator when input is addition
1 parent 9957a4d commit 4cdbd8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transform/utilities.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ function convex_evaluator(term::Num)
483483
end
484484

485485
# Scan through the equation and pick out and organize all variables needed as inputs
486-
ordered_vars = pull_vars(cv_eqn)
486+
ordered_vars = pull_vars(Num(cv_eqn))
487487

488488
# Create the evaluation function. This works by calling Symbolics.build_function,
489489
# which creates a function as an Expr that evaluates build_function's first
@@ -517,7 +517,7 @@ function convex_evaluator(equation::Equation)
517517
step_2 = shrink_eqs(step_1)
518518
cv_eqn += step_2[3].rhs
519519
end
520-
ordered_vars = pull_vars(cv_eqn)
520+
ordered_vars = pull_vars(Num(cv_eqn))
521521
@eval new_func = $(build_function(cv_eqn, ordered_vars..., expression=Val{true}))
522522

523523
else

0 commit comments

Comments
 (0)