Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Effective Optimality Tolerance

    Posted 09/07/12 10:29 PM

    Originally posted by: SystemAdmin


    Dear Forum,

    I am trying to solve a number of small optimization problems that are very nicely suited to CP Optimizer: each can be modeled with only some integer variables and a couple of global constraints. The objective function value is always integer as well, and CPO finds the optimal solution very fast. The catch is that I am required to always have the exact optimal value to each of these problems, as the solutions will be used in a cut generation procedure for an MILP model.

    The issue I am facing is that the objective function value for some of these models are between 300000 and 400000, and CPO imposes an "effective optimality tolerance" of around 10% of that value that cuts the optimal solution out.

    My question is: is there some way to impose an effective optimality tolerance of zero, since I need to be extremely precise?

    As a very simple example to clarify, consider the following model encoded in C++:

    try {
    IloEnv env;
    IloModel model(env);

    // model
    IloIntVarArray x(env, 3, 1, 3);
    model.add( IloAllDiff(env, x) );

    // objective function
    IloIntVar obj_var(env, 0, IloIntMax);
    model.add( IloIfThen(env, x[0] == 1 && x[1] == 2 && x[2] == 3, obj_var == 100000 ) );
    model.add( IloIfThen(env, x[0] == 1 && x[1] == 3 && x[2] == 2, obj_var == 99999 ) );
    model.add( IloIfThen(env, x[0] != 1, obj_var == 100000 ) );
    model.add( IloMinimize(env, obj_var) );

    IloCP cp(model);
    cp.setParameter(IloCP::Workers, 1);
    cp.solve( IloGenerate(env, x) );

    } catch (IloException& ex) {
    std::cout << "Error: " << ex << std::endl;
    }

    When I compile and run this model (CPLEX Studio version 12.4.01), I get

    ! Search terminated normally, 1 solution found.
    ! Best objective : 100000 (optimal - effective tol. is 10)
    ! Number of branches : 4
    ! Number of fails : 2

    when I should obtain 99999.

    I couldn't find anything on the manual/examples to circumvent this. Moreover, unfortunately I am not able to scale the objective function in my model.

    Thank you very much for your help,
    Andre
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Effective Optimality Tolerance

    Posted 09/10/12 04:50 AM

    Originally posted by: SystemAdmin


    Hello Andre,
    There are some parameters for controlling the absolute and relative optimality tolerance. You can change them and set them to 0 by using:

    
    cp.setParameter(IloCP::OptimalityTolerance, 0);          
    // Default: 1e-9 cp.setParameter(IloCP::RelativeOptimalityTolerance, 0);  
    // Default: 1e-4
    


    Philippe
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Effective Optimality Tolerance

    Posted 09/10/12 08:19 AM

    Originally posted by: SystemAdmin


    Thanks a lot, Philippe!
    #CPOptimizer
    #DecisionOptimization