Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Same run time, same model, different log info

    Posted 05/04/15 02:29 AM

    Originally posted by: gabb


    Hi,

    I have built an MIP model and coded the problem using Java concert technology. Because the size of the problem is really huge, I set the running time by the following sentence.

    cplex.setParam(DoubleParam.TiLim, CPLEX_TIME_LIMIT);

    and set CPLEX_TIME_LIMIT to 60 seconds.

    I ran the same model with same input data twice but got different solutions and log info. The "best integer", "best bound", and "gap" are different in two runs. Below is part of the log info.

    Run #1:

    Best Integer Best Bound ItCnt Gap
           
    3425.966 10.7527 2818 99.69%
    3425.966 453.815 2818 86.75%
    3425.966 Cuts: 8 2988 86.72%
    3425.966 Cuts: 26 3122 86.69%
    3425.966 Cuts: 24 3300 86.67%
    1954.119 456.6501 3300 76.63%
    1239.575 456.6501 3300 63.16%

    Run #2:

    Best Integer Best Bound ItCnt Gap
           
    3459.532 10.7527 3200 99.69%
    3459.532 453.815 3200 86.88%
    3459.532 Cuts: 24 3306 86.85%
    3459.532 Cuts: 27 3499 86.17%
    3459.532 Cuts: 24 3661 86.15%
    487.6869 479.0781 3661 1.77%
    487.6869 479.0781 3663 1.77%

    Why are they different? Is it possible to get identical solutions at different runs when solving a large-scale problem to a near-optimal solution (terminate before the solver finding the real optimal solution)?

    Thank you very much!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Same run time, same model, different log info

    Posted 05/04/15 04:02 PM

    There are at least two sources of variability (maybe more). The first is that CPLEX defaults to parallel threading. If you run the same job twice but the load on the system (from everything other than CPLEX) changes -- as it most definitely will -- your log may change a bit.This is very likely also true when you force CPLEX to run single-threaded, but my feeling is that multiple threads increase variability.

    The second, and likely greater, source of variability is that CPLEX internally makes some decisions "randomly" (using a pseudorandom number generator). You can account for this by setting the seed for the random number generator. The Java name for the (integer) seed parameter is IloCplex.Param.RandomSeed.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Same run time, same model, different log info

    Posted 05/04/15 09:42 PM

    Originally posted by: gabb


    Thank you very much for your reply!

    I will run some tests on single thread and fix the seed parameter to see if things work out.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Same run time, same model, different log info

    Posted 05/05/15 01:44 AM

    Another source for non-deterministic behavior is that time limit. Try to run with a deterministic time limit or with another deterministic limit such as node count or gap.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Same run time, same model, different log info

    Posted 05/05/15 01:48 AM

    Originally posted by: gabb


    Thank you!


    #CPLEXOptimizers
    #DecisionOptimization