diff --git a/src/moi_wrapper.jl b/src/moi_wrapper.jl index 56cd2096..1617834d 100644 --- a/src/moi_wrapper.jl +++ b/src/moi_wrapper.jl @@ -1045,3 +1045,7 @@ end function MOI.get(model::Optimizer, ::NonLinearKKTJacobianFactorization) return model.input_cache.factorization end + +function MOI.set(model::Optimizer, attr::MOI.AbstractOptimizerAttribute, value) + return MOI.set(model.optimizer, attr, value) +end diff --git a/test/jump_wrapper.jl b/test/jump_wrapper.jl index 6588ab0c..b7d50c7c 100644 --- a/test/jump_wrapper.jl +++ b/test/jump_wrapper.jl @@ -56,6 +56,11 @@ function test_jump_api() @testset "$(MODEL) with: $(SOLVER), $(ineq ? "ineqs" : "eqs"), $(_min ? "Min" : "Max"), $(flip ? "geq" : "leq") bridge:$with_bridge_type" begin model = MODEL(SOLVER; with_bridge_type) set_silent(model) + if SOLVER === Ipopt.Optimizer + # avoiding MOI.TimeLimitSec to cover the RawOptimizerAttribute path + # only tests that MOI doesn't throw an unsupported error (#335) + set_optimizer_attribute(model, "max_wall_time", 600.0) + end p_val = 4.0 pc_val = 2.0