Limitations on the number of variables

1,993 views
Skip to first unread message

Martin Serpell

unread,
Sep 20, 2010, 11:02:45 AM9/20/10
to gur...@googlegroups.com

Hi,

 

I have written a LP with approximately 170,000 variables using the C++ interface and I’m using an academic license. The program crashes when addVars() tries to allocate heap memory. The same program runs fine when there are only 20,000 variables.

 

Is there a limitation on the number of variables I can have in an LP and if there is what is it?

 

Kind regards,

Martin

 

Greg Glockner

unread,
Sep 20, 2010, 11:29:43 AM9/20/10
to gur...@googlegroups.com
Gurobi has no limit on the number of variables, constraints or nonzeros except when using a free trial license (which is different from a free academic license). There are several possibilities:

1) Not enough memory on your computer. You can test by running your program on a computer with a 64-bit operating system, such as the largest instance of Gurobi Cloud.

2) A leak in your program. For example, if you are solving many models in a series, you may want to free one model before solving the next one. Please see the "Memory Management" section in: http://www.gurobi.com/doc/30/refman/node93.html

3) A model that is not built using sparse matrices. Gurobi routinely solves sparse models with 170,000 variables, but a dense model with 170,000 variables and thousands of constraints could be extremely difficult to solve.

I realize some of these cases may not apply to you, but perhaps they can help others in similar situations who may read this discussion.

Reply all
Reply to author
Forward
0 new messages