maximum number of Var and/or Constraints

755 views
Skip to first unread message

vz101

unread,
Jan 22, 2016, 11:36:11 AM1/22/16
to Pyomo Forum
I've searched the documentation and forum but have not found any discussion of an actual or practical limit to the size of an optimization problem. Anyone know and/or have experienced limits? Based on some of the solvers Pyomo links with, I do not expect a limit but wanted to hear others' info and/or experience.

Thanks! Viki

vz101

unread,
Feb 9, 2016, 6:25:02 PM2/9/16
to Pyomo Forum
Since there are no other posts addressing this and received an answer off line from John, I wanted to share with others:

There is no hard limit on the size of a problem that you can handle (apart from running out of memory).  The time to process the model and emit it to the solver generally grows smoothly with the size of the model.  The thing that you have to be cognizant of is that there are always multiple ways to express constraints and variables, and while they should all result in the same final optimization problem, they can take very different paths through the code to get there.  So, in this case I would second Gabe’s comment about restructuring your model to leverage sets and sums over sets – instead of using machine-generated expanded expressions.  The other thing to keep an eye on is if any of your constraints are triggering expression “cloning”.

 

The largest model I have ever personally generated had a little over 13 million variables and 21 million constraints.  It took Pyomo about 45 minutes to generate the model and then another 70 minutes to perform various automated model transformations (primary connector expansion and GDP relaxations).  My notes had another ~30 minutes in other activities like writing out the LP file.  Note that this was all done almost 3 years ago with Coopr 3.3 – so things should be different (better) now.

Reply all
Reply to author
Forward
0 new messages