Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Bench Marking a model

    Posted 08/25/15 10:06 AM

    Originally posted by: Rajasekhar_Kadambur


    Hi,

     

    I am trying to bench mark a model by playing around the settings parameters.

     

    I trying to solve the CP model for various number of workmen.

    the model is as follows:

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    range cores = 1..10;
    int NoWorker[cores] = [32,24,20,16,12, 8,6,4,2,1];

     main {
     
       thisOplModel.generate();
       var data1 = thisOplModel.dataElements;

       var opl2 = new IloOplRunConfiguration("Learning_BenchMarking.mod","Learning_BenchMarking.dat");
       var source2 = new IloOplModelSource("Learning_BenchMarking.mod");
       var data1 = new IloOplDataSource("Learning_BenchMarking.dat");
       
       opl2.cp.param.timemode = "ElapsedTime";
       opl2.cp.param.timelimit = 150;
       opl2.cp.param.SearchType = "MultiPoint";

              writeln("Cores    Objective")

        for(var i in thisOplModel.cores){
           opl2.cp.param.workers = thisOplModel.NoWorker[i];
          if (opl2.cp.solve()){
              writeln(thisOplModel.NoWorker[i],"    ",opl2.cp.getObjValue());  
          }
          
        }
    }  

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    //output is like this

    Cores    Objective
    32    null
    24    null
    20    null
    16    null
    12    null
    8    null
    6    null
    4    null
    2    null
    1    null

     

    How to resolve this issue.

    i am fixing the

    solve time to 600 seconds

    search method to MultiPoint

    TimeMode is ElapsedTime

     

    Any suggestion are welcome. thanks in advance.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Bench Marking a model

    Posted 08/25/15 11:52 AM

    Originally posted by: rdumeur


    Dear Rajasekhar_Ka...

     

    In order to help you, I'll have a few questions:

    - could you please precise the version of CPO you are using?

    - have you tried the default search on your model, and if so, does it produce a solution?

    - could you please post the .cpo file corresponding to your model (using oplrun -d dumpedmodel.cpo ... ), it'll help us have a closer look at your problem.

    Cheers,

                    Renaud

     

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Bench Marking a model

    Posted 08/26/15 04:48 AM

    Originally posted by: rdumeur


    Hi,

    I tried to reproduce your problem, and your OPL script appears to be incorrect.

    Please try:

    ange cores = 1..10;
    int NoWorker[cores] = [32,24,20,16,12, 8,6,4,2,1];
    
     main {
     
       thisOplModel.generate();
       //   var data1 = thisOplModel.dataElements;
    
       var opl2 = new IloOplRunConfiguration("Learning_BenchMarking.mod", "Learning_BenchMarking.dat");
       opl2.oplModel.generate();
    
       //   var source2 = new IloOplModelSource("Learning_BenchMarking.mod");
       //   var data1 = new IloOplDataSource("Learning_BenchMarking.dat");
       
       opl2.cp.param.timemode = "ElapsedTime";
       opl2.cp.param.timelimit = 150;
       opl2.cp.param.SearchType = "MultiPoint";
    
              writeln("Cores    Objective")
    
        for(var i in thisOplModel.cores){
           opl2.cp.param.workers = thisOplModel.NoWorker[i];
          if (opl2.cp.solve()){
              writeln(thisOplModel.NoWorker[i],"    ",opl2.cp.getObjValue());  
          }
          
        }
    }
    

    You don't generate the model loaded from the configuration, and you needlessly create model source and data sources which are already created by the run configuration.

    I hope this helps.

     

    Cheers,

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Bench Marking a model

    Posted 08/27/15 05:39 AM

    Originally posted by: Rajasekhar_Kadambur


    Hi @rdumeur 9d5f323d-1ec8-4bc7-9d0a-74fe731d4a14

     

    Sorry for Late reply, I am occupied with some other work.

     

    Thanks for your Help, Its Working.

    I do need some help how to master or explore all the feature for OPL Programming for CPLEX and CP Optimizer.

    If there is any documents regarding this would a great help.

     

    The problem i am working on have to be solved iteratively and/or calling mutiple submodels.

    how to export the EngineLog and track the performance of each submodel such as number of fails and choice points ...


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: Bench Marking a model

    Posted 08/27/15 06:11 AM

    Originally posted by: rdumeur


    Dear Rajasekhar_K...

     

    You can find documentation there: http://www-01.ibm.com/support/knowledgecenter/SSSA5P_12.6.2/ilog.odms.studio.help/Optimization_Studio/topics/COS_home.html?lang=en

    for both CPLEX and CP optimizers.

    To track performance by gathering infos such as number of fails and choice points you can try access infos of the cp solver by using in your model :

       opl2.cp.info.XXX

    to access property XXX (please consult CPOptimizer's documentation for the list of infos).

    To export the engine log, I have to dig myself in the doc, and will be back to you!

    Cheers,

     

    Edit: there is an OPL example which load & solves multiple models: You can find it in the distribution at : CPLEX_Studio1262/opl/examples/opl/vellino. Note that it shows that you have to invoke .end() on each run configuration when it is no longer needed.

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 6.  Re: Bench Marking a model

    Posted 08/27/15 06:14 AM

    Originally posted by: Rajasekhar_Kadambur


    Thanks For the help.

    I will get back to you if stuck somewhere.

     

    Regards Raj


    #DecisionOptimization
    #OPLusingCPOptimizer