From 09ab8d914e1a928cb7e4bbebc998bad7dd78354a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 18 Apr 2023 01:53:36 +0200 Subject: [PATCH] [BREAKING] Remove keyword arguments to Optimizer (#44) --- Project.toml | 2 +- src/MOI_wrapper.jl | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Project.toml b/Project.toml index 1013ef6..f5096bf 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index 997e334..0061b62 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -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