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

Regression for compute_conflict!? #369

Closed
dourouc05 opened this issue Nov 9, 2020 · 2 comments
Closed

Regression for compute_conflict!? #369

dourouc05 opened this issue Nov 9, 2020 · 2 comments

Comments

@dourouc05
Copy link
Contributor

With the previous version of Gurobi.jl, I could run this kind of code:

using JuMP, Gurobi
m = Model(Gurobi.Optimizer)
@variable(m, x)
compute_conflict!(m)
MOI.compute_conflict!(backend(m))

With the latest rewrite, I'm getting errors like these:

julia> MOI.compute_conflict!(backend(m))
ERROR: MethodError: no method matching compute_conflict!(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
Closest candidates are:
  compute_conflict!(::Gurobi.Optimizer) at C:\Users\Thibaut\.julia\packages\Gurobi\ntZ45\src\MOI_wrapper.jl:3146
Stacktrace:
 [1] top-level scope at REPL[20]:1

I now have to use something like MOI.compute_conflict!(backend(m).optimizer.model).

@odow
Copy link
Member

odow commented Nov 9, 2020

You must have been using a direct_model:

using JuMP, Gurobi
m = direct_model(Gurobi.Optimizer())
@variable(m, x)
MOI.compute_conflict!(backend(m))

For the caching optimizer to work, we need to add some methods to MOI.

@dourouc05
Copy link
Contributor Author

Thanks for your quick reply! I'm marking this as solved, then, if it's an MOI issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants