Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/09/20 01:15 PM
    Hi!
    I was trying to use the parameter sets for a hierarchical solve of my multiobjective MILP model, but I am not able to force him to use Barrier to solve the relaxation of the root node.
    But if I am not using parameter sets at all, then Barrier is used for the root node without any problem.
    Can you help me please?
    Thanks

    ------------------------------
    Serge Bisaillon
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/09/20 01:32 PM
    In fact, this C++ parameter ( IloCplex::Param::RootAlgorithm ) seems to be ignored whatever the algorithm chosen when used in parameter sets which is not the case for the NodeAlgorithm parameter.

    ------------------------------
    Serge Bisaillon
    ------------------------------



  • 3.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/10/20 01:21 AM
    Can you show your code? Is it analogous to what is done in the multi-objective example that ships with CPLEX (ilodiet.cpp).

    ------------------------------
    Daniel Junglas
    ------------------------------



  • 4.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/10/20 11:25 AM
    Hi Daniel.

    This is the piece of code I am using to set the parameters for each iteration:

    IloArray<IloCplex::ParameterSet> params(env, 6);

    for (int i = 0 ; i < 6; i++)
    {
    params[i] = IloCplex::ParameterSet(env);
    params[i].setParam(IloCplex::Param::TimeLimit, 57600);
    params[i].setParam(IloCplex::Param::Threads, 1);
    params[i].setParam(IloCplex::Param::ClockType, 1);
    params[i].setParam(IloCplex::Param::Advance, 1);
    params[i].setParam(IloCplex::Param::Preprocessing::Symmetry, 5);
    params[i].setParam(IloCplex::Param::SolutionType, CPX_BASIC_SOLN);
    params[i].setParam(IloCplex::Param::Emphasis::MIP, 5);
    params[i].setParam(IloCplex::Param::MIP::Tolerances::MIPGap, 0.05);
    params[i].setParam(IloCplex::Param::MIP::PolishAfter::Nodes, 1);
    params[i].setParam(IloCplex::Param::NodeAlgorithm, (*cplexModelParams), 2);
    params[i].setParam(IloCplex::Param::RootAlgorithm, (*cplexModelParams), 4);
    params[i].setParam(IloCplex::Param::MIP::Pool::Capacity, 20);
    params[i].setParam(IloCplex::Param::MultiObjective::Display, 2);
    params[i].setParam(IloCplex::Param::MIP::Display, 5);
    params[i].setParam(IloCplex::Param::MIP::Limits::CutPasses, -1);
    }

    --------------------------

    All the parameters are exactly the same as the ones I have configured for the global solve.
    And here is the beginning of the resolution:

    Version identifier: 12.10.0.0 | 2019-11-26 | 843d4de
    CPXPARAM_ClockType 1
    CPXPARAM_LPMethod 4
    CPXPARAM_QPMethod 4
    CPXPARAM_Threads 1
    CPXPARAM_SolutionType 1
    CPXPARAM_MultiObjective_Display 2
    CPXPARAM_MIP_Strategy_StartAlgorithm 4
    CPXPARAM_MIP_Strategy_SubAlgorithm 2
    CPXPARAM_Emphasis_MIP 1
    CPXPARAM_Preprocessing_Symmetry 5
    CPXPARAM_MIP_Pool_Capacity 20
    CPXPARAM_MIP_Limits_CutPasses -1
    CPXPARAM_MIP_PolishAfter_Nodes 1
    CPXPARAM_TimeLimit 345600
    CPXPARAM_MIP_Tolerances_MIPGap 0.05


    Multi-objective solve log . . .

    Starting optimization #1 blending 8 objectives with priority 6.

    CPXPARAM_ClockType 1
    CPXPARAM_LPMethod 4
    CPXPARAM_Threads 1
    CPXPARAM_SolutionType 1
    CPXPARAM_MultiObjective_Display 2
    CPXPARAM_MIP_Display 5
    CPXPARAM_MIP_Strategy_SubAlgorithm 2
    CPXPARAM_Emphasis_MIP 1
    CPXPARAM_Preprocessing_Symmetry 5
    CPXPARAM_MIP_Pool_Capacity 20
    CPXPARAM_MIP_Limits_CutPasses -1
    CPXPARAM_MIP_PolishAfter_Nodes 1
    CPXPARAM_TimeLimit 57600
    CPXPARAM_MIP_Tolerances_MIPGap 0.05

    ------------

    As you can see, everything is the same except for the ones in BOLD.

    And when the optimization starts, CPLEX is using the dual simplex to solve the roor node instead of the Barrier algorithm.

    But if I don<t specify any parameter set at all, then Barrier is used at the root node.

    Serge

    ------------------------------
    Serge Bisaillon
    ------------------------------



  • 5.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/11/20 05:05 AM
    This is a bit odd. Does your code even compile?
    You have
    params[i].setParam(IloCplex::Param::Emphasis::MIP, 5);
    but the maximum value for this parameter is 4. This should raise an error sooner or later. Moreover, your output shows that this parameter is set to 1. So there is a disconnect between the code and the output you posted.

    Then you have
    params[i].setParam(IloCplex::Param::NodeAlgorithm, (*cplexModelParams), 2);
    params[i].setParam(IloCplex::Param::RootAlgorithm, (*cplexModelParams), 4);
    This calls setParam() with 3 parameters but the function only takes 2 arguments.


    Finally, you have hit a bug in the CPLEX Concert API: Setting RootAlgorithm on a parameter set will not set the StartAlgorithm for a multi-objective sub-solve. This is unintended and I have filed a bug report for that. In order to correctly set the start algorithm in a parameter set you can use this code:
    t.setParam(IloCplex::IntParam(CPXPARAM_MIP_Strategy_StartAlgorithm), 4);
    (note that for setting the start algorithm on IloCplex you should still use the RootAlgorithm parameter).

    ------------------------------
    Daniel Junglas
    ------------------------------



  • 6.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/11/20 08:14 AM
    Hi Daniel.

    I have to tell you that I read the parameters from a file and I have put the "right" values instead of the variables, which explains the first 2 errors.  It's just a matter of cut and paste.

    I will try the workaround that you suggest for the real bug though.
    Do you think that in the next release, this bug will be fixed?

    Thanks

    Serge

    ------------------------------
    Serge Bisaillon
    ------------------------------



  • 7.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/14/20 12:30 AM
    I cannot promise that this bug will be fixed in the next release.

    ------------------------------
    Daniel Junglas
    ------------------------------



  • 8.  RE: Question about parameter sets for multiobjective solve with CPLEX in C++

    Posted 09/10/20 01:33 PM
    I even tried to add the RootAlg parameter in the parameter sets of the ilodiet.cpp file and it's not working neither.

    But if I add it just globally, then the root node is solve with Barrier instead of Dual Simplex.

    ------------------------------
    Serge Bisaillon
    ------------------------------