Skip to content

Commit

Permalink
[BREAKING] Remove keyword arguments to Optimizer (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Apr 17, 2023
1 parent 712bb05 commit 09ab8d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SDPA"
uuid = "b9a10b5b-afa4-512f-a053-bb3d8080febc"
repo = "https://github.com/jump-dev/SDPA.jl.git"
version = "0.4.1"
version = "0.5.0"

[deps]
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"
Expand Down
14 changes: 1 addition & 13 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,10 @@ mutable struct Optimizer <: MOI.AbstractOptimizer
solve_time::Float64
silent::Bool
options::Dict{Symbol, Any}
function Optimizer(; kwargs...)
function Optimizer()
optimizer = new(
zero(Cdouble), 1, Int[], Tuple{Int, Int, Int}[], Cdouble[],
nothing, false, NaN, false, Dict{Symbol, Any}())
if !isempty(kwargs)
@warn("""Passing optimizer attributes as keyword arguments to
SDPA.Optimizer is deprecated. Use
MOI.set(model, MOI.RawOptimizerAttribute("key"), value)
or
JuMP.set_optimizer_attribute(model, "key", value)
instead.
""")
end
for (key, value) in kwargs
MOI.set(optimizer, MOI.RawOptimizerAttribute(key), value)
end
return optimizer
end
end
Expand Down

0 comments on commit 09ab8d9

Please sign in to comment.