Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathOptInterface.BarrierIterations #135

Open
nsajko opened this issue Apr 1, 2023 · 0 comments
Open

MathOptInterface.BarrierIterations #135

nsajko opened this issue Apr 1, 2023 · 0 comments

Comments

@nsajko
Copy link
Contributor

nsajko commented Apr 1, 2023

The README suggests setting the iteration limit like so:

MOI.set(moi_model, MOI.RawOptimizerAttribute("IPM_IterationsLimit"), 200)

I think, however, that perhaps this is supposed to have the same effect:

MOI.set(moi_model, MOI.BarrierIterations(), 200)

The latter call fails like so:

julia> using Tulip, MathOptInterface

julia> const MOI = MathOptInterface
MathOptInterface

julia> lp = Tulip.Optimizer{BigFloat}()
Tulip.Optimizer{BigFloat}

julia> MOI.set(lp, MOI.BarrierIterations(), 100)
ERROR: MathOptInterface.SetAttributeNotAllowed{MathOptInterface.BarrierIterations}: Setting attribute MathOptInterface.BarrierIterations() cannot be performed. You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
Stacktrace:
 [1] throw_set_error_fallback(model::Tulip.Optimizer{BigFloat}, attr::MathOptInterface.BarrierIterations, value::Int64; error_if_supported::MathOptInterface.SetAttributeNotAllowed{MathOptInterface.BarrierIterations})
   @ MathOptInterface ~/.julia/packages/MathOptInterface/wx5Ea/src/attributes.jl:584
 [2] throw_set_error_fallback(model::Tulip.Optimizer{BigFloat}, attr::MathOptInterface.BarrierIterations, value::Int64)
   @ MathOptInterface ~/.julia/packages/MathOptInterface/wx5Ea/src/attributes.jl:577
 [3] set(model::Tulip.Optimizer{BigFloat}, attr::MathOptInterface.BarrierIterations, args::Int64)
   @ MathOptInterface ~/.julia/packages/MathOptInterface/wx5Ea/src/attributes.jl:550
 [4] top-level scope
   @ REPL[4]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant