Skip to content

Commit a636915

Browse files
committed
format
1 parent a1e212c commit a636915

File tree

4 files changed

+345
-125
lines changed

4 files changed

+345
-125
lines changed

src/moi_wrapper.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ function diff_optimizer(
5858
with_bridge_type = Float64,
5959
with_cache::Bool = true,
6060
)
61-
optimizer =
62-
MOI.instantiate(optimizer_constructor; with_bridge_type = with_bridge_type)
61+
optimizer = MOI.instantiate(
62+
optimizer_constructor;
63+
with_bridge_type = with_bridge_type,
64+
)
6365
# When we do `MOI.copy_to(diff, optimizer)` we need to efficiently `MOI.get`
6466
# the model information from `optimizer`. However, 1) `optimizer` may not
6567
# implement some getters or it may be inefficient and 2) the getters may be
@@ -74,9 +76,9 @@ function diff_optimizer(
7476
optimizer
7577
end
7678
if with_parametric_opt_interface
77-
return POI.Optimizer(Optimizer(caching_opt, method = method))
79+
return POI.Optimizer(Optimizer(caching_opt; method = method))
7880
else
79-
return Optimizer(caching_opt, method = method)
81+
return Optimizer(caching_opt; method = method)
8082
end
8183
end
8284

@@ -93,7 +95,10 @@ mutable struct Optimizer{OT<:MOI.ModelLike} <: MOI.AbstractOptimizer
9395
# sensitivity input cache using MOI like sparse format
9496
input_cache::InputCache
9597

96-
function Optimizer(optimizer::OT; method = DIFF_AUTOMATIC) where {OT<:MOI.ModelLike}
98+
function Optimizer(
99+
optimizer::OT;
100+
method = DIFF_AUTOMATIC,
101+
) where {OT<:MOI.ModelLike}
97102
output =
98103
new{OT}(optimizer, Any[], nothing, nothing, nothing, InputCache())
99104
if method == DIFF_CONIC

0 commit comments

Comments
 (0)