Skip to content

Commit

Permalink
using Symbolics
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Dec 17, 2023
1 parent 8ab2e6f commit 9f568c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/OptimizationMOI/src/OptimizationMOI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/OptimizationMOI/src/moi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 21 in lib/OptimizationMOI/src/moi.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationMOI/src/moi.jl#L16-L21

Added lines #L16 - L21 were not covered by tests
else
throw(ArgumentError("Expected an `OptimizationProblem` that was setup via an `OptimizationSystem`, or AutoModelingToolkit ad choice"))

Check warning on line 23 in lib/OptimizationMOI/src/moi.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationMOI/src/moi.jl#L23

Added line #L23 was not covered by tests
end
Expand Down

0 comments on commit 9f568c2

Please sign in to comment.