Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Confusion by the best bounds?

    Posted Mon October 18, 2021 08:04 AM
    Hello  everyone,
     I want to ask a small question.  In an article I read, in the computation experiments part, it is said  the CPLEX solver and the heuristic are stopped after 60 min. of computation time  and  "best bound found with the heuristic and the best bound found by linear relaxation" are compared. Here, what do they mean by "best bound found by linear relaxation" ? Which in the log file of cplex is meant  or how can I obtain it ? Thank you so much in advance.

    ------------------------------
    milena kafka
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Confusion by the best bounds?

    Posted Mon October 18, 2021 11:35 AM
    "Linear relaxation" (arguably not the best terminology) actually means relaxing the integrality constraints, so the "best bound found by linear relaxation" is just the best value of any node LP among the nodes still alive at termination. In the CPLEX log file, it is the value in the "Cuts/Best Bound" column.

    It is important to note that the final best bound may not appear in the log file, because CPLEX typically does not output a line at every node. One workaround is to set the log frequency to 1 (print a line for each node), but that is usually not very practical. If you are using one of the programming APIs, there will be a method you an invoke to get the final best bound. In the Java API, for instance, the method is IloCplex.getBestObjValue().

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 3.  RE: Confusion by the best bounds?

    Posted Tue October 19, 2021 05:16 AM
    Thank you so much Prof. Rubin, 
    I got the value I looked for with the method  IloCplex.getBestObjValue(). So, can we interpret it  the following way: the coloumn labeled by  Best Integer gives us the UB and the the coloumn Cuts/Best Bound gives us LB for a minimization problem when it is solved by cplex solver , i.e. branch and cut algorithm? 

    Thank you so much 


    ------------------------------
    milena kafka
    ------------------------------



  • 4.  RE: Confusion by the best bounds?

    Posted Tue October 19, 2021 11:13 AM
    Yes, your interpretation is correct, with the qualification that the log will always contain a line when the best integer value changes but will not always contain the current best bound (unless the log frequency is set to 1).

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 5.  RE: Confusion by the best bounds?

    Posted Wed October 20, 2021 11:10 AM
    Thank you so much Prof.Rubin, it is clear now.

    ------------------------------
    milena kafka
    ------------------------------



  • 6.  RE: Confusion by the best bounds?

    Posted Wed November 10, 2021 11:51 AM
    Edited by System Admin Fri January 20, 2023 04:47 PM
    Hello Prof. Rubin, 
    I tested a bunch of instances and the things go well so far. Today, I came across one instance that had led me to ask my first question nearly 25 days ago. As you can see in the attached log file,  we do not see 2 under the best bound column and the Gap is shown 26.32%. which is the gap between 1.47 and 2. When I get the best bound value by cplex.getBestObjValue()  it shows me 2  which is "Optimal Best Objective 2" in the log file.  I thought ,maybe, I should set the node frequency to 1. I did it as follows:

    cplex.setParam(IloCplex::Param::MIP::Interval,1);  

    Nothing changed .I see the same log at the end of execution. I could not understand what's happening here ? Is not my way of setting frequency correct ? Or , if it is correct, how can it be possible when the gap is 26.32%. , the solution is optimal , or how should we explain "Best Objective 2 "case. Apparently, the solver compares it with Best Integer one , since they are the same , the solution is optimal. However, I could not understand where the Best Objective =2 is found under the column of Best Bound. 

    Thank you so much in advance

    ------------------------------
    milena kafka
    ------------------------------



  • 7.  RE: Confusion by the best bounds?

    Posted Wed November 10, 2021 12:06 PM
    Milena,

    Changing the log frequency to 1 (which you did correctly) will not help in this case because CPLEX solves the problem at the root node (without doing any branching). After 31 iterations (which I assume means simplex iterations), it has found what turns out to be the optimal solution and has a 26% gap. It then does some extra work (possibly some cuts and bound tightening, possibly more simplex iterations, possibly both), gets the bound down to zero and declares victory without any further output.

    There are function calls that will let you get the total number of cuts generated and (I believe) the total number of simplex iterations, in case you want to see how much more work occurred at the root node. I personally have never used them, since I am usually just happy to get an optimal solution.

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 8.  RE: Confusion by the best bounds?

    Posted Thu November 11, 2021 08:34 AM
    Thank you so much Prof.Rubin, I got it now . 

    Thank you so much again

    ------------------------------
    milena kafka
    ------------------------------