Skip to content

Commit 3f80add

Browse files
symbolify
1 parent 9197028 commit 3f80add

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/OptimizationMOI/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version = "0.1.6"
66
[deps]
77
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
88
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
9-
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
109
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
10+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1111

1212
[compat]
1313
MathOptInterface = "1"

src/function/mtk.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ function instantiate_function(f, x, adtype::AutoModelingToolkit, p, num_cons = 0
3333
cons_j = (J, θ) -> f.cons_j(J, θ, p)
3434

3535
cons_h = (res, θ) -> f.cons_h(res, θ, p)
36-
3736
return OptimizationFunction{true}(f.f, adtype; grad = grad, hess = hess, hv = hv,
3837
cons = cons, cons_j = cons_j, cons_h = cons_h,
3938
hess_prototype = f.hess_prototype,
4039
cons_jac_prototype = f.cons_jac_prototype,
4140
cons_hess_prototype = f.cons_hess_prototype,
42-
expr = f.expr, cons_expr = f.cons_expr)
41+
expr = symbolify(f.expr),
42+
cons_expr = symbolify.(f.cons_expr))
4343
end

0 commit comments

Comments
 (0)