Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Jan 10, 2024
1 parent 5f1300f commit 00666bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/OptimizationMOI/src/OptimizationMOI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,14 @@ function SciMLBase.__init(prob::OptimizationProblem,
mtkize = false,
kwargs...)
cache = if MOI.supports(_create_new_optimizer(opt), MOI.NLPBlock())
MOIOptimizationNLPCache(prob, opt; maxiters, maxtime, abstol, reltol, mtkize, kwargs...)
MOIOptimizationNLPCache(prob,

Check warning on line 279 in lib/OptimizationMOI/src/OptimizationMOI.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationMOI/src/OptimizationMOI.jl#L279

Added line #L279 was not covered by tests
opt;
maxiters,
maxtime,
abstol,
reltol,
mtkize,
kwargs...)
else
MOIOptimizationCache(prob, opt; maxiters, maxtime, abstol, reltol, kwargs...)
end
Expand Down
3 changes: 2 additions & 1 deletion lib/OptimizationMOI/src/nlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ function MOIOptimizationNLPCache(prob::OptimizationProblem,
obj_expr = sysprob.f.expr
cons_expr = sysprob.f.cons_expr
else
sys = f.sys isa SymbolicIndexingInterface.SymbolCache{Nothing, Nothing, Nothing} ? nothing : f.sys
sys = f.sys isa SymbolicIndexingInterface.SymbolCache{Nothing, Nothing, Nothing} ?

Check warning on line 165 in lib/OptimizationMOI/src/nlp.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationMOI/src/nlp.jl#L165

Added line #L165 was not covered by tests
nothing : f.sys
obj_expr = f.expr
cons_expr = f.cons_expr
end
Expand Down

0 comments on commit 00666bb

Please sign in to comment.