diff --git a/lib/OptimizationMOI/src/OptimizationMOI.jl b/lib/OptimizationMOI/src/OptimizationMOI.jl index 1f3d3a66d..cb2cce88d 100644 --- a/lib/OptimizationMOI/src/OptimizationMOI.jl +++ b/lib/OptimizationMOI/src/OptimizationMOI.jl @@ -8,7 +8,7 @@ using SparseArrays import ModelingToolkit using ModelingToolkit: parameters, states, varmap_to_vars, mergedefaults const MTK = ModelingToolkit -import Symbolics +using Symbolics const MOI = MathOptInterface diff --git a/lib/OptimizationMOI/src/moi.jl b/lib/OptimizationMOI/src/moi.jl index f6414ac54..63cc9e62c 100644 --- a/lib/OptimizationMOI/src/moi.jl +++ b/lib/OptimizationMOI/src/moi.jl @@ -18,7 +18,7 @@ function MOIOptimizationCache(prob::OptimizationProblem, opt; kwargs...) if isnothing(f.sys) if f.adtype isa Optimization.AutoModelingToolkit num_cons = prob.ucons === nothing ? 0 : length(prob.ucons) - f = Optimization.instatiate_function(prob.f, reinit_cache, prob.f.adtype, num_cons) + f = Optimization.instantiate_function(prob.f, reinit_cache, prob.f.adtype, num_cons) else throw(ArgumentError("Expected an `OptimizationProblem` that was setup via an `OptimizationSystem`, or AutoModelingToolkit ad choice")) end