Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CutUp cplex 12 c++ instruction

    Posted Sat July 16, 2011 12:57 PM

    Originally posted by: dbaena


    Hello,

    I have a problem with this instruction in cplex 12 with C++. I think I know the problem but I don't sure. I have a problem that I solve and I obtain:

    Warning: Control callbacks may disable some MIP features.
    MIP emphasis: optimality.
    MIP search method: traditional branch-and-cut.
    Parallel mode: none, using 1 thread.
     
    Node log . . .
    Best integer =   5.232939e+05  Node =       0  Best node =   5.189600e+04
    


    I do:

    double BestUB= cplex.getObjValue();

    after if i do cout << BestUB I obtain the value: 523294 and not 5.232939e+05 ¿ok?

    After, I do:

    cta->cplex.setParam(IloCplex::CutUp,BestUB - Eps); where Eps = 0.00001.

    I solve the problem I obtain: 523294

    I think that I have a numerical problem, but How can I do it...

    Thanks a lot!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CutUp cplex 12 c++ instruction

    Posted Sat July 16, 2011 05:51 PM

    Originally posted by: SystemAdmin


    > dbaena wrote:

    >
    > Node log . . .
    > Best integer = 5.232939e+05 Node = 0 Best node = 5.189600e+04
    >
    > {code}
    >
    > I do:
    >
    > double BestUB= cplex.getObjValue();
    >
    > after if i do cout << BestUB I obtain the value: 523294 and not 5.232939e+05 ¿ok?

    That's probably due to the default formatting of the output stream. You can put a formatter in the cout line to get more accuracy if you wish.
    >
    > After, I do:
    >
    > cta->cplex.setParam(IloCplex::CutUp,BestUB - Eps); where Eps = 0.00001.
    >
    > I solve the problem I obtain: 523294

    If you're expecting a strictly smaller value, the first thing you need to do is print getObjValue to more decimal places. Even then I'm not sure your epsilon is big enough to do the job -- it's changing the 11th significant (decimal) digit, which puts it out where I think rounding error could plausibly overwhelm it.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CutUp cplex 12 c++ instruction

    Posted Sat August 06, 2011 02:41 PM

    Originally posted by: dbaena


    Thank you Paul,

    but i don't understand the behaviour of CutUp Cplex instruction...

    I do:

    cta->cplex.setParam(IloCplex::CutUp,UB - Eps);

    where UB - Eps = 8203.35922

    and I solve the problem with cplex.solve().

    I obtain a solution with value:

    8203.35923

    and it is not normal I think...
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CutUp cplex 12 c++ instruction

    Posted Sun August 07, 2011 06:01 PM

    Originally posted by: SystemAdmin


    Dani,

    I'm not positive, but I think rounding error may be at play here. CutUp is defined in terms of the original problem. I think that it is enforced in terms of the preprocessed problem. So perhaps it is possible that the solution is less than or equal to the cutoff in the preprocessed problem, but not when it is converted back to the original problem.

    I'm also not sure which of CPLEX's various "epsilons" might be used in making the decision (EpOpt? EpRHS? presumably not EpInt). The default for EpOpt is 1e-6. If we allow for some rounding in the reported objective value, maybe it's really within 1e-6 of your CutUp value?

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization