Decision Optimization

Decision Optimization

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


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

Tuning with the Cplex tuner

  • 1.  Tuning with the Cplex tuner

    Posted 04/08/16 09:57 AM

    Originally posted by: BLAIS


     

    Is this possible to explore more parameter configuration with the Cplex tuner? The default setting only tries a couple of configurations and stop. I can wait for a more extensive exploration of the multiple possible parameters configurations.

    In SAS we can give a list of parameters follow by a list of parameter value to test and the tuner explore all the combination of parameter value.

       [("Cliques", [0; 2]);

        ("Covers", [1]);

        ("MIRCuts", [2; 3])]

    By example, the above list would generate all those trial:

    01 "Cliques"=0 "Covers"=1 "MIRCuts"=2

    02 "Cliques"=2 "Covers"=1 "MIRCuts"=2

    03 "Cliques"=0 "Covers"=1 "MIRCuts"=3

    04 "Cliques"=2 "Covers"=1 "MIRCuts"=3

    Link to the SAS tuner help:http://support.sas.com/documentation/cdl/en/ormpug/67517/HTML/default/viewer.htm#ormpug_tuner_examples02.htm


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Tuning with the Cplex tuner

    Posted 04/08/16 12:12 PM

    Hi,

    have you tried to use flow control ?

    Suppose you have an lp file test.lp you want to tune.

    Then you could write:

    {int} Cliques={0,2};
     {int} Covers={1};
     {int} MirCuts={1,2};
     


    main
    {
    for (var cliques in thisOplModel.Cliques)
        for(var covers in thisOplModel.Covers)
            for(var mircuts in thisOplModel.MirCuts)    
                {
                    writeln("settings ",cliques," ",covers," ",mircuts);            
                    cplex=new IloCplex();
                    cplex.importModel("test.lp");
                    
                    cplex.cliques=cliques;
                    cplex.mircuts=mircuts;
                    cplex.covers=covers;
                    var d1=new Date();
                    cplex.solve();
                    var d2=new Date();
                    writeln("time in s = ",(d2-d1)/1000);
                    cplex.end();
                            
                }

     

    }

    which will give

    settings 0 1 1
    time in s = 26.861
    settings 0 1 2
    time in s = 28.439
    settings 2 1 1
    time in s = 27.515
    settings 2 1 2
    time in s = 28.134

    regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Tuning with the Cplex tuner

    Posted 05/11/16 12:41 PM

    Originally posted by: BLAIS


    Alex,

        Thank you for your answer. What I want is to only specify a list of parameter to tune and the tuner test the all possible combination.

    By example, if I give a model, a data file and the following list:

            [("TiLim", [DoubleParam 140.0]);

            ("RootAlg", [IntParam 4]);

            ("BarAlg", [ IntParam 3]);

            ("BarStartAlg", [IntParam 4]);

            ("BarOrder", [IntParam 1;IntParam 2;IntParam 3]);

            ("BarCrossAlg", [IntParam 1]);

            ("BarColNz", [IntParam 229;IntParam 100;IntParam 300;IntParam 400]);

            ("EpGap", [DoubleParam 0.05]);

            ("NodeAlg", [IntParam 4]);

            ("HeurFreq",[IntParam 10]);

            ("CutPass", [IntParam -1]);

            ]

    All combination of BasOrder and BarColNz will be test. Others parameters in the list are only set once.

    I want to give a list and change it easily.

    I post a small .NET code that does this job on: http://www.fssnip.net/7PD


    #DecisionOptimization
    #OPLusingCPLEXOptimizer