Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Out of memory error when adding constraints to IloCplex model

  • 1.  Out of memory error when adding constraints to IloCplex model

    Posted 03/25/13 07:12 AM

    Originally posted by: SystemAdmin


    I hope it is okay to ask this question here. I could not find anything on google or the cplex documentation about how many variables and how many constraints a cplex model can have. I use cplex with c++ concert technology.
    I have an LP with a small number of variables, but I have a large number of constraints (although they only contain a very small number of entries). In the model I tried I wanted to add around 24,000,000 constraints I already get an error "Error: CPLEX Error 1001: Out of memory" when I try to add all the constraints to the model by model.add(constSet).

    Is there any way to get around this (can I increase some kind of memory)? Is there an upper bound on the number of constraints an LP can have? I think the LP should be easy to solve, but I cannot even store it.
    Or is the only possibility to formulate a new model with fewer constraints?

    Thanks in advance.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Out of memory error when adding constraints to IloCplex model

    Posted 03/25/13 06:05 PM

    Originally posted by: SystemAdmin


    Adding memory depends in part on the operating system and whether you have a 32- or 64-bit processor.

    Since this is an LP, you might consider solving its dual instead (which will have 24 million variables but relatively few constraints), and then use column generation on it. Initially use a fairly modest subset of columns and solve. Grab the dual values of the dual problem (which correspond to the original variables), use them to price new columns, add in some that have favorable reduced costs (and drop out some that are zero in the most recent solution), solve again. Repeat until eventually you get a solution where none of the unused columns have favorable reduced costs. Grab the dual values of that final LP, which are the optimal values of the variables in the original problem.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization