Decision Optimization

Decision Optimization

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

 View Only
  • 1.  oplrun gives a worst solution than IDE

    Posted Wed April 13, 2011 11:14 AM

    Originally posted by: FrancescoMalatto


    Hello everybody,
    i'm a student and i'm using a IBM ILOG CPLEX Optimization Studio for solve a scheduling problem with the constraint programming.
    I executed the model both from the command line with oplrun and from IDE.
    I observed that the value of the objective function found is worst when i solve the problem with the command line than with the IDE.
    Does anyone known why?

    thanks
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: oplrun gives a worst solution than IDE

    Posted Thu April 14, 2011 03:34 AM

    Originally posted by: SystemAdmin


    Hello.

    Do you use time limit for example? Time limit doesn't have to stop the search always at the same time and as a result you can get different result each run.

    It is hard to say without your model what may be the reason of the difference. Could you compare the logs? Could you give us your model and data?

    Best regards, Petr
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: oplrun gives a worst solution than IDE

    Posted Thu April 14, 2011 05:55 AM

    Originally posted by: FrancescoMalatto


    First of all thanks for your answer.

    Yes, i use a time limit. why doesn't the time limit have to stop the search always at the same time?

    however here there are the log of the two execution:

    execution with the command line


    ! Minimization problem - 62 variables, 2 constraints
    ! Preprocessing : 1 extractable eliminated
    ! NoOverlapInferenceLevel = Extended
    ! TimeLimit = 300
    ! Initial process time : 0.02s (0.00s extraction + 0.02s propagation)
    ! . Log search space : 355.8 (before), 355.8 (after)
    ! . Memory usage : 443.6 Kb (before), 491.6 Kb (after)
    ! . Variables fixed : 1
    !


    ! Solution status : Terminated by limit, solution found
    ! Number of branches : 2,163,090
    ! Number of fails : 746,599
    ! Total memory usage : 1.3 Mb (0.7 Mb CP Optimizer + 0.6 Mb Concert)
    ! Time spent in solve : 300.00s (300.00s engine + 0.00s extraction)
    ! Search speed (br. / s) : 7,210.3
    !

    OBJECTIVE: 639

    execution with the IDE

    !
    ! Minimization problem - 62 variables, 2 constraints
    ! Preprocessing : 1 extractable eliminated
    ! NoOverlapInferenceLevel = Extended
    ! TimeLimit = 300
    ! Initial process time : 0.00s (0.00s extraction + 0.00s propagation)
    ! . Log search space : 355.8 (before), 355.8 (after)
    ! . Memory usage : 443.6 Kb (before), 491.6 Kb (after)
    ! . Variables fixed : 1
    !
    !
    ! Solution status : Terminated by limit, solution found
    ! Number of branches : 2,082,847
    ! Number of fails : 736,681
    ! Total memory usage : 1.3 Mb (0.7 Mb CP Optimizer + 0.6 Mb Concert)
    ! Time spent in solve : 300.00s (300.00s engine + 0.00s extraction)
    ! Search speed (br. / s) : 6,942.8
    !

    OBJECTIVE: 507

    i also attache a zip file with the model, the data and the two full log....

    i hope that you will find the problem.

    thanks
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: oplrun gives a worst solution than IDE

    Posted Mon April 18, 2011 10:30 AM

    Originally posted by: SystemAdmin


    Hello.

    Thank you for the example. We are investigating the issue and it will probably take some time. Indeed, result in OPL IDE in oplrun should be the same.

    Search in CPO Optimizer break ties by random numbers. Although the search is deterministic (meaning, if you solve the same model several times then you should get the same result), a slight change in the model can result in a different search (ties are broken in a different way) and that could lead to possibly quite different result. In your case, there seems to be some difference in a way oplrun and OPL IDE transform OPL model: both seem to do the right thing, but in a little bit different way what leads to a different search and the result you see.

    A general advice is to verify stability of the model on different data sets. It is possible that the model behaves well for some data set, but badly for another. Then it may be necessary to change the model. If you don't have more data sets, then it is possible to try the model with different random seeds (see IloCP::RandomSeed parameter).

    Regarding the time limit parameter. Time limit stops the search after certain elapsed time, but the time measurement is made by underlying operating system. And it is not deterministic. In other words, sometimes CP Optimizer is notified little bit earlier about the fact that the time limit is reached and sometimes it is notified little bit later. We are talking about miliseconds, but even this may be enough to find a new solution. However it is not the problem in your case.

    Best regards, Petr
    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: oplrun gives a worst solution than IDE

    Posted Mon April 18, 2011 05:11 PM

    Originally posted by: FrancescoMalatto


    Thank you for your answer.
    I will try to do more testing with different data sets and i study the stability of my model. Furthermore i will try to change the value of the random seed.
    If you will find a solution to the problem, please post it here.

    thanks again.
    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: oplrun gives a worst solution than IDE

    Posted Wed April 27, 2011 06:20 AM

    Originally posted by: FrancescoMalatto


    Hello

    I made several tests with different data sets and my model seems to be stable.
    I also observed, using different data sets, that the value of the objective function is not always worst with oplrun, but in some case i obtained a better value than with the IDE.
    Why does this happen?

    Do you have find some solution of my problem?

    Yours respectfully
    Francesco
    #CPOptimizer
    #DecisionOptimization