Performance difference using GRB.CONTINUOUS versus GRB.INTEGER for an integer-constrained variable

1,751 views
Skip to first unread message

Will

unread,
Mar 30, 2017, 3:40:07 PM3/30/17
to Gurobi Optimization
Hello,

I have a mini-max variable that is being minimized in my objective function; this variable is set to be greater then or equal to a set of other variables that are all integers. Thus, my objective variable will also presumably be an integer.

Because of this logic, I created this mini-max variable as a GRB.INTEGER. I am curious though -- are there performance benefits to creating this variable with type GRB.CONTINUOUS? I know that continuous variables are typically "easier" to solve to optimal, but in this case I also *know* that the variable in question will always be an integer (because it is being minimized, but constrained to be larger then the sum of other variables that are all integers). It's also quite possible that there is no performance difference either way...

Any guidance is appreciated.

Thanks,
Will

Minh Vu Duc

unread,
Mar 31, 2017, 12:36:07 AM3/31/17
to Gurobi Optimization

I think unless there are many continuous variables, one variable does not help much.

Vào 14:40:07 UTC-5 Thứ Năm, ngày 30 tháng 3 năm 2017, Will đã viết:

Ashley Thornton

unread,
Mar 31, 2017, 12:36:44 AM3/31/17
to Gurobi Optimization
I've had this internal discussion with myself as well. I went with labelling it as continuous as then hopefully the solver won't implement any extra MIP cuts to find feasible solutions and the continuous variable will just take an integer value due to the constraints.

I haven't tested this though. 

Tobias Achterberg

unread,
Mar 31, 2017, 5:36:19 AM3/31/17
to gur...@googlegroups.com
There should not be any performance difference (except random noise), because if
you declare the variable to be continuous, then Gurobi will find out that it is
implied integer. On the other hand, if you declare it integer Gurobi should be
able to find out (but I am not 100% sure about this) that the variable is
implied continuous.

So, because the implied integer detection is probably slightly better than the
implied continuous detection, I would go with declaring the variable continuous.
But I doubt that it will matter much. If you see any performance difference, you
should verify the results by running the same test with different values of the
random "Seed" parameter. If you find a consistent difference in performance,
then I would be very interested in the model (so that we can fix this).

Regards,

Tobias
Reply all
Reply to author
Forward
0 new messages