Decision Optimization

Decision Optimization

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


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

Memory and variables problem

  • 1.  Memory and variables problem

    Posted 04/26/16 07:56 PM

    Originally posted by: Rym


    I don't understand the behavior of CPLEX,I have set  300 (v) as data after a time  of solving ,I received the following message: 

     
    There may be further error information in the clone logs.
    MIP stars construted because of out-of-memory status

     

    At fisrt time, i said that is  due to  a problem of memory, beacause CPLEX can't find more memory to explore more nodes .


    after, I'm set 500 (v), the problem is solved in  a few time

     

    Normally ,when the number of variables increases, that willl make a problem of memory in CPLEX

    My .mod file  is attached

    your comments


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Memory and variables problem

    Posted 04/27/16 02:22 AM

    The size of a MIP is not a good indicator for the time/memory it requires to solve it. There are small models that take ages to solve and big models that solve within seconds. After all, solving MIPs is an NP hard problem.

    So it is not completely unexpected that 500(v) solves faster than 300(v). However, the attached model solves quickly here at the root with CPLEX 12.6.3. What version do you use? Could you post the engine logs of the two solves?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Memory and variables problem

    Posted 04/27/16 05:08 AM

    Originally posted by: Rym


    Hi

     

    I use Cplex version 12.5.1.

    This is the EnginLog files and data files.

     

     

    Thanks


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Memory and variables problem

    Posted 05/02/16 03:11 PM

    I reproduced the behavior here.

    CPLEX finds the optimal solution at the root node but then has a hard time proving optimality.

    What helped here was cranking up all cuts to their maximum (I did not bother to figure out which is the best subset of cuts to crank up), so you may want to try that. You may also want to play with CPX_PARAM_MIPEMPHASIS (2 or 3 look like meaningful choices).

    In order to troubleshoot the out-of-memory problem you may want to read this.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Memory and variables problem

    Posted 05/04/16 02:48 AM

    Originally posted by: Mintch Zulitch


    Hi,

    I analyzed your data and inferred that the variance amount is very low in your data-set. So you need to set the Relative MIP gap tolerance to the lowest possible amount, which I prefer setting it to .01.

     

    execute {
    cplex.epgap = .01;
    }
    

     

    Regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Memory and variables problem

    Posted 05/04/16 06:47 PM

    Originally posted by: Rym


    Hi

     

    I think that i have a problem of optimality

     

    So i modified the following parameters:

     

    cplex.param_epag=0.01;

    CPX_MIPEMPHASIS_OPTIMIMALITY(Value 2).

     

    Have you any suggestions to obtain a good optimalty without decrease the performance of the problem.

     

    Regards

     

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Memory and variables problem

    Posted 05/05/16 11:19 AM

    Originally posted by: Mintch Zulitch


    Have you tried Constraint Programming (CP)?


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Memory and variables problem

    Posted 05/05/16 11:23 AM

    Originally posted by: Rym


    Hi

     

    My problem is Bin Packing problem which is formulated as an  ILP Integer Linear Programming(NP-hard). Can you clear more what can i do with CP ?

     

    Thanks


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Memory and variables problem

    Posted 05/05/16 03:29 PM

    Originally posted by: Mintch Zulitch


    For example, you can use the pack constraint. The pack constraint maintains the load of a set of containers or bins, given a set of weighted items and an assignment of items to containers. This constraint takes four parameters; the fourth parameter represents the number of times where the first variable takes a nonzero value.

     

    A simple example:

     

    using CP;
    int m = 2;
    int n = 3;
    
    dvar int l[j in 1..m] in 0..10000;
    dvar int p[i in 1..n] in 1..m;
    dvar int nb;
    
    int w[1..n] = [i : 1 | i in 1..n];  
    
    subject to {
       
      pack(l, p, w, nb); 
      
    }
    
    assert nb==m-count(l,0);
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Memory and variables problem

    Posted 05/06/16 01:33 AM

    Note that if you are after proving optimality then you should not set the MIP gap parameters to large values like 0.01. Instead you should set it to 0!

    Also in your case you may be better off using the absolute gap tolerance parameter: your objective function will always take an integer value, so you can specify exactly how much "non-optimality" you are willing to accept.

    Did you try cranking up all the cuts parameters to their maximum?


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Memory and variables problem

    Posted 05/06/16 06:45 AM

    Originally posted by: Rym


    Hi

     

    Thanks  for your response but can you explain me more what i should set for the value of absolute gap tolerance parameter and  what are  the cuts parameters  ? And  what are the values that  they can take.

     

     

    Th


    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: Memory and variables problem

    Posted 05/06/16 04:46 PM

    Originally posted by: Rym


    My problem that i don't like touch the optimality of my solution.


    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: Memory and variables problem

    Posted 05/09/16 05:55 AM

    If you need an optimal solution then you should not change the absolute or relative gap parameters. Relaxing these parameters allows CPLEX to stop with non-optimal solutions.

    Please take a look at the list of parameters here. In this list you will find a number of parameters that control the aggressiveness of separation of cutting planes of a certain type. Setting all these parameters to their maximum value is what I meant by "cranking up" those parameters. Note that the list also contains parameters like "cut factor row-multiplier limit" or "number of cutting plane passes" that are not related to cutting planes of a certain types. These parameters you don't need to change.


    #CPLEXOptimizers
    #DecisionOptimization