set Gurobi parameters in MixedIntegerLinearProgram?

71 views
Skip to first unread message

Daniel Friedan

unread,
Feb 20, 2013, 9:26:37 AM2/20/13
to sage-s...@googlegroups.com
The Gurobi and CPLEX backends for MixedIntegerLinearProgram() are extremely convenient. 

Is there any prospect of solver_parameter() being implemented in the Gurobi backend?

At present, when I use MixedIntegerLinearProgram()  with solver="Gurobi" and try to set a Gurobi parameter using p.solver_parameter(), I get a "not implemented" error.

I'm most interested in changing the tolerance for equality constraints for an MIP.  I'd also like to change the 'threads' parameter (to be polite to colleagues with whom I share an 8 core machine).

I'd switch to solver="CPLEX", for which -- according to the documentation -- the backend does implement

solver_parameter(), except that CPLEX is taking forever to solve MIPs that Gurobi solves quickly.  It could be a difference i the default parameter settings.

thanks,
Daniel


Raniere Silva

unread,
Feb 20, 2013, 11:51:18 AM2/20/13
to sage-s...@googlegroups.com
Hi Daniel,

> The Gurobi and CPLEX backends for MixedIntegerLinearProgram() are extremely
> convenient.
>
> Is there any prospect of solver_parameter() being implemented in the Gurobi
> backend?

No.

Nathann work in the parameters for GLPK
(http://trac.sagemath.org/sage_trac/ticket/12736) and AFAIK didn't it for any
other solver.

Raniere

Nathann Cohen

unread,
Feb 20, 2013, 12:31:13 PM2/20/13
to sage-s...@googlegroups.com
Helloooooooooooooooooooo !!!

The Gurobi and CPLEX backends for MixedIntegerLinearProgram() are extremely convenient. 

Glad to learn it :-)
 
Is there any prospect of solver_parameter() being implemented in the Gurobi backend?

None from me ! I use CPLEX at the moment but I never mess with the solver parameters in the first place. I think I implemented #10785 for a friend who needed it :-)
 
At present, when I use MixedIntegerLinearProgram()  with solver="Gurobi" and try to set a Gurobi parameter using p.solver_parameter(), I get a "not implemented" error.

Yepyepyep ! The solver_parameter method forwards everything it is given to thebackend, and there is no solver_parameter in the Gurobi backend.

I'm most interested in changing the tolerance for equality constraints for an MIP.  I'd also like to change the 'threads' parameter (to be polite to colleagues with whom I share an 8 core machine).

Ahahahah. You could also use "nice" when you start Sage ! This way Gurobi will not eat all the ressources :-)

I'd switch to solver="CPLEX", for which -- according to the documentation -- the backend does implement
solver_parameter(), except that CPLEX is taking forever to solve MIPs that Gurobi solves quickly.  It could be a difference i the default parameter settings.

Well... Would you be willing to write this patch yourself ? I can help a bit and I will most probably be the one to review your patch before it gets included into Sage, but I do not even have Gurobi installed on my machine right now... Their license procedure is a nightmare :-)

Nathann
Reply all
Reply to author
Forward
0 new messages