Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/22/11 01:50 PM

    Originally posted by: RafaelMartinelli


    Hello,

    I generated a .lp file which gives different solutions using default parameters on Interactive Optimizer and C++ Concert / C Callable Library. I am using CPLEX 12.2.0.2 32-bits for Windows. I also ran this .lp on different versions of Interactive Optimizer and it was really weird. Here are the solutions found:

    Interactive Optimizer 12.2.0.2 Windows 32-bits: 1.0
    C++ Concert 12.2.0.2 Windows 32-bits: 0.0
    C Callable Library 12.2.0.2 Windows 32-bits: 0.0
    Interactive Optimizer 12.1 Windows 32-bits: 1.0
    Interactive Optimizer 11.2 Linux 64-bits: 1.9997829227e+00

    To avoid this problem, I have set the reduction type for only primal reductions (cplex.setParam(IloCplex::Reduce, 1) on C++ Concert and CPXsetintparam(env, CPX_PARAM_REDUCE, CPX_PREREDUCE_PRIMALONLY) on C Callable Library) and the solution found was 1.0.

    The .lp file is attached. Does anyone know why this happens?

    Thank you.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/22/11 10:57 PM

    Originally posted by: SystemAdmin


    Are you sure that this is the correct .lp file? I am getting a very solid solution of 26, with and without presolve. There do not seem to be any issues at all. And since it is a maximization problem, those solution values of 0, 1, or almost 2 cannot be correct.

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/23/11 01:25 AM

    Originally posted by: RafaelMartinelli


    I am really sorry. It was the wrong .lp file. Now I am sure it's the right one.

    Thank you.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/23/11 01:43 AM

    Originally posted by: SystemAdmin


    I confirm that this is most likely a numerical issue in CPLEX. The correct solution seems to be 1.999799. We produce an invalid Gomory and/or c-MIR cut that cuts off this solution. If you disable these two types of cutting planes, then you get the correct solution (at least I am getting the correct solution then).

    I will investigate this issue further...

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/23/11 11:16 AM

    Originally posted by: RafaelMartinelli


    I disabled all the cuts and CPLEX gave me 1.999799. But as you can see, it's not an integer solution. Several integer variables have value 0.000008 and 0.000004. If you set integer tolerance to 1e-7 after disabling all the cuts, you will get 1.000000. I think this is the correct solution.

    Thank you.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Different MIP Solution on Interactive Optimizer and C/C++ Libraries

    Posted 06/23/11 04:24 PM

    Originally posted by: SystemAdmin


    Yes, you are right. If I set the integrality tolerance to 0.0, then I get the solution with objective 1 as well.

    The confusing issue in your case is: both answers (optimal value 1, and optimal value 1.99979) are correct. This seems to be completely stupid and from a theoretical point of view absolutely bogus, but this is the reality when tolerances are used for floating point calculations.
    Namely, the integrality tolerance (default is 1e-5) means that CPLEX can accept any solution that is integral within the tolerance, but it does not need to accept such a solution. So, an x vector with integral variable values |x_j - floor(x_j) + tol| <= tol for all j, and at least one j with x_j not exactly integral is both, feasible and infeasible, and CPLEX can just decide what it likes better.

    The same is true for the feasibility tolerance. This effect can even mean that for a given model both answers, feasible and infeasible, are correct---provided that the model is infeasible in exact arithmetics and there is a solution that is feasible within the tolerances.

    Your model is particularly nasty, as all the matrix coefficients look very innocent. Nevertheless, it seems that the numerical calculations allow for a solution with fractional values of about 1e-6 away from integrality that has a significantly larger objective value than the "true" optimal solution.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization