Decision Optimization

Decision Optimization

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


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

IloCplex Memory Problem with Large MILP

  • 1.  IloCplex Memory Problem with Large MILP

    Posted 08/03/13 11:58 AM

    Originally posted by: Ketov


    Hello dear community,

    I am solving large-scale MILPs and using CPLEX C++ API. The original problem scale is too large, so I am dividing the problem and solving smaller sub problems. Therefore, I have currently one single IloEnv. For every sub problem I am initialising one IloCplex instance. But the necessary memory magnitude of the (empty) IloCplex instances is growing with the amount of decision variables and constraints in the concerning IloEnv. Unfortunately, for my target problem every single IloCplex instance is using far too much memory which is not applicable, since I have approximately 400 sub problems.

    How can I change my program architecture in order to solve that problem? I thought about dealing with one IloEnv instance by problem, but I read that this should be avoided.

    Given the case I have to work with several IloEnv. How can I copy constraints or decision variable easily from one IloEnv to another? This is an important question for me since the constraints and variables will come (in any case, I cannot change this) from one single IloEnv.

    The approach works with smaller problems.

    Current approach:

    IloEnv * env = new IloEnv;

    /*

    //Initialising all IloConstraints, of all Subproblems, with env .... (several millions, it is a MILP)

    */

    for (int iCountSubProblem = 0 ; iCountSubProblem< iAmountSubProblems; iCountSubProblem++)

    { //Here the memory usage is far too high, over 100GB...     

         IloCplex cplex_temp(env);

         vector_cplex.push_back(cplex_temp);   

    }

     

    //Construct target funktions with env

    //add IloConstraints and IloExpr (as tagret function) to curtain IloCplex instances

    //solve subproblems ....

     

    Thank you very much!

    Have a nice week,

    Ketov


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: IloCplex Memory Problem with Large MILP

    Posted 08/22/13 12:53 AM

    What version of CPLEX do you use?

    The size of an IloCplex instance does not depend on the variables/constraints that are created in the corresponding IloEnv. It only depends on the model that is extracted to the IloCplex instance. So memory consumption of empty IloCplex instances should be constant and should not increase. Are you sure that the memory requirement for empty IloCplex instance increase over time?

    Using multiple instances of IloEnv will not reduce memory requirement. They will only make it easier to release memory allocated for a subproblem.

    Do you need all your subproblems at the same time? If not you could create them only if needed and discard them immediately after solving them.


    #CPLEXOptimizers
    #DecisionOptimization