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
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.