@@ -178,9 +178,13 @@ MOI.instantiate(optimizer_factory; with_cache_type = Float64)
178178## Example
179179
180180```julia
181- import MultiObjectiveAlgorithms as MOA
182- import HiGHS
183- optimizer = () -> MOA.Optimizer(HiGHS.Optimizer)
181+ julia> using JuMP
182+
183+ julia> import MultiObjectiveAlgorithms as MOA
184+
185+ julia> import HiGHS
186+
187+ julia> model = Model(() -> MOA.Optimizer(HiGHS.Optimizer))
184188```
185189"""
186190mutable struct Optimizer <: MOI.AbstractOptimizer
@@ -202,6 +206,7 @@ mutable struct Optimizer <: MOI.AbstractOptimizer
202206 function Optimizer (optimizer_factory)
203207 inner = MOI. instantiate (optimizer_factory; with_cache_type = Float64)
204208 if MOI. supports (inner, MOI. Silent ())
209+ # Make the default for `SilentInner` true.
205210 MOI. set (inner, MOI. Silent (), true )
206211 end
207212 return new (
@@ -261,6 +266,33 @@ function MOI.set(model::Optimizer, ::MOI.Silent, value::Bool)
261266 return
262267end
263268
269+ # ## SilentInner
270+
271+ """
272+ SilentInner() <: MOI.AbstractOptimizerAttribute
273+
274+ An optimizer attribute that controls whether the inner optimizer's `MOI.Silent`
275+ attribute.
276+
277+ By default, this attribute is set to `true`. Set it to `false` to enable logging
278+ of the inner solver. In most cases, this will result in a large amount of output
279+ that is hard to interpret, but it may be helpful when debugging failed solves.
280+ """
281+ struct SilentInner <: MOI.AbstractOptimizerAttribute end
282+
283+ function MOI. supports (model:: Optimizer , :: SilentInner )
284+ return MOI. supports (model. inner, MOI. Silent ())
285+ end
286+
287+ function MOI. get (model:: Optimizer , :: SilentInner )
288+ return MOI. get (model. inner, MOI. Silent ())
289+ end
290+
291+ function MOI. set (model:: Optimizer , :: SilentInner , value:: Bool )
292+ MOI. set (model. inner, MOI. Silent (), value)
293+ return
294+ end
295+
264296# ## TimeLimitSec
265297
266298function MOI. supports (model:: Optimizer , attr:: MOI.TimeLimitSec )
0 commit comments