Callbacks - Accessing Gurobi specific functionality

Hi everyone.

Working on my master thesis project, I have run into some problems using JuMP and Gurobi. I need to use Gurobi specific callback functionality, but as far as I can tell, this requires me to construct my model in direct mode (using direct_model()). However, I cannot find a way to do this, while also reusing my Gurobi environment. Is there a way to use Gurobi callback functionality, without using direct_model, or reuse the gurobi environment with direct_model?

Kind regards,
Nicolai

Use:

using JuMP, Gurobi
env = Gurobi.Env()
model = direct_model(Gurobi.Optimizer(env))

I’ll update the documentation.

1 Like

I could have sworned I had tried just that, but it works just fine. Thanks a bunch.

1 Like