diff --git a/src/Initialization/init_Symbolics.jl b/src/Initialization/init_Symbolics.jl index 7daf003e7b..bfd23ea741 100644 --- a/src/Initialization/init_Symbolics.jl +++ b/src/Initialization/init_Symbolics.jl @@ -1,5 +1,4 @@ -using .Symbolics: gradient, - simplify, +using .Symbolics: simplify, Num, # variable like, e.g. x[1] Term, # term like, eg. x[1] + x[2] == 1 Symbolic, diff --git a/src/Sets/HPolyhedron/HPolyhedron.jl b/src/Sets/HPolyhedron/HPolyhedron.jl index f716637a0e..2f9e565e92 100644 --- a/src/Sets/HPolyhedron/HPolyhedron.jl +++ b/src/Sets/HPolyhedron/HPolyhedron.jl @@ -111,7 +111,7 @@ function load_symbolics_hpolyhedron() end end - coeffs = [N(α.val) for α in gradient(sexpr, vars_list)] + coeffs = [N(α.val) for α in Symbolics.gradient(sexpr, vars_list)] β = -N(Symbolics.substitute(sexpr, zeroed_vars)) push!(clist, HalfSpace(coeffs, β)) diff --git a/src/Sets/HalfSpace.jl b/src/Sets/HalfSpace.jl index b0d6b6c614..404dec5559 100644 --- a/src/Sets/HalfSpace.jl +++ b/src/Sets/HalfSpace.jl @@ -627,7 +627,7 @@ function load_symbolics_halfspace() end # compute the linear coefficients by taking first-order derivatives - coeffs = [N(α.val) for α in gradient(sexpr, collect(vars))] + coeffs = [N(α.val) for α in Symbolics.gradient(sexpr, collect(vars))] # get the constant term by expression substitution zeroed_vars = Dict(v => zero(N) for v in vars) diff --git a/src/Sets/Hyperplane.jl b/src/Sets/Hyperplane.jl index cd1b713e02..e87285d782 100644 --- a/src/Sets/Hyperplane.jl +++ b/src/Sets/Hyperplane.jl @@ -596,7 +596,7 @@ function load_symbolics_hyperplane() end # compute the linear coefficients by taking first order derivatives - coeffs = [N(α.val) for α in gradient(sexpr, collect(vars))] + coeffs = [N(α.val) for α in Symbolics.gradient(sexpr, collect(vars))] # get the constant term by expression substitution zeroed_vars = Dict(v => zero(N) for v in vars)