Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  BUG: IloCplex::getNnodes() returns 0 on a MIP

    Posted 04/28/15 11:25 AM

    Originally posted by: StephanBeyer


    Hi,

    the IloCplex documentation says that IloCplex::getNnodes() returns 0 if the model is not a MIP. I attach a simple example (but stumbled over the bug in much bigger models) where it returns 0 although it is a MIP. I guess it still returns 0 because the model can be solved using the root node only. However, the correct answer should be 1 then. (Or the documentation must be fixed.)

    Note that the "if it is not a MIP"  sentence occurs also for other methods of IloCplex (possibly the same bug).

    Best
    Stephan
     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: BUG: IloCplex::getNnodes() returns 0 on a MIP

    Posted 04/29/15 12:57 PM

    I think you misread the documentation. What the documentation says is that "if the problem is not a MIP, the function will return 0".

    The reverse is however not true. In other words, if the function returns 0 then you cannot conclude that the problem is not a MIP.

    It may be debatable whether CPLEX should return 0 or 1 if the problem solves very early (in your case in presolve). We chose to return 0 in that case.

    In order to test the problem type you can use functions like IloCplex::isMIP(), IloCplex::isQC(), IloCplex::isQO().


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: BUG: IloCplex::getNnodes() returns 0 on a MIP

    Posted 04/29/15 01:38 PM

    Originally posted by: StephanBeyer


    You are right, it says "if" and not "if and only if". So it is perhaps no bug ;-)

    However, if 0 means "it is solved in presolve" and not "it is solved in the root node", then it is weird that it shows a time for the root relaxation > 0 (I think it does, I have to recheck with some bigger problem).

    Also please note that I used IloCplex::isMIP() in the example code. ;-)


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: BUG: IloCplex::getNnodes() returns 0 on a MIP

    Posted 05/05/15 01:55 AM

    It might be that there is some fuzziness in the definition of "root node" among the several functions. If you find anything then we will be happy to fix that up.


    #CPLEXOptimizers
    #DecisionOptimization