How can I make Gurobi stop when it's taking too long to optimize?

427 views
Skip to first unread message

heinon...@gmail.com

unread,
Jan 16, 2016, 12:19:53 PM1/16/16
to Gurobi Optimization
I have a script that works well, but on a small number of simulations it takes too long, and I press CTRL-C to stop it.

However, I can't always be doing that manually. Is there a way for me to tell Gurobi to give up optimizing and just accept the current solution if it's taken more than a certain amount of time?

I'm using Gurobi in MATLAB.

Sonja Mars

unread,
Jan 18, 2016, 2:46:38 AM1/18/16
to gur...@googlegroups.com
Hi,

You might want to take a look at the parameter TimeLimit (http://www.gurobi.com/documentation/6.5/refman/timelimit.html#parameter:TimeLimit) from the Gurobi parameters (http://www.gurobi.com/documentation/6.5/refman/parameters.html).

How to set parameters in MATLAB can be found here http://www.gurobi.com/documentation/6.5/refman/matlab_gurobi.html#matlabfunction:gurobi in the section "Parameters".

Best regards,
Sonja

-----------------------------------------------------------------
Dr. Sonja Mars
Gurobi Optimization

Reply all
Reply to author
Forward
0 new messages