Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Cplex Java Api IloCplex.getNnodes() returns 0

    Posted 08/24/20 09:50 PM

    I am solving a mixed integer linear program in Java using Cplex Java API. After cplex solver has solved the problem, I want to know how many branch-and-bound nodes were explored in the process. However, when I use the function cplex.getNnodes() (where cplex is an IloCplex object), I get 0 regardless of the problem instance.

    What could be going wrong? Is there any other way to access the number of nodes explored by Cplex for finding the solution?






    #DecisionOptimization
    #Support
    #SupportMigration


  • 2.  RE: Cplex Java Api IloCplex.getNnodes() returns 0

    Posted 08/24/20 09:54 PM

    If it helps, here is the Cplex log for a problem instance.

    CPXPARAM_Simplex_Tolerances_Optimality 1.0000000000000001e-09

    CPXPARAM_Read_APIEncoding "UTF8"

    CPXPARAM_MIP_Interval 10

    CPXPARAM_MIP_Strategy_VariableSelect 1

    Found incumbent of value 339.000000 after 0.01 sec. (0.24 ticks)

    Tried aggregator 3 times.

    MIP Presolve eliminated 3 rows and 18 columns.

    MIP Presolve modified 1726 coefficients.

    Aggregator did 17 substitutions.

    Reduced MIP has 320 rows, 5289 columns, and 17880 nonzeros.

    Reduced MIP has 5289 binaries, 0 generals, 0 SOSs, and 0 indicators.

    Presolve time = 0.06 sec. (37.17 ticks)

    Tried aggregator 1 time.

    Reduced MIP has 320 rows, 5289 columns, and 17880 nonzeros.

    Reduced MIP has 5289 binaries, 0 generals, 0 SOSs, and 0 indicators.

    Presolve time = 0.02 sec. (11.80 ticks)

    Probing time = 0.03 sec. (3.76 ticks)

    Clique table members: 335.

    MIP emphasis: balance optimality and feasibility.

    MIP search method: dynamic search.

    Parallel mode: deterministic, using up to 4 threads.

    Root relaxation solution time = 0.07 sec. (45.35 ticks)

    Nodes Cuts/

    Node Left Objective IInf Best Integer Best Bound ItCnt Gap

    * 0+ 0 339.0000 14.0000 95.87%

    * 0+ 0 329.0000 14.0000 95.74%

    * 0+ 0 143.0000 14.0000 90.21%

    0 0 115.2587 151 143.0000 115.2587 842 19.40%

    0 0 116.2790 198 143.0000 Cuts: 87 1024 18.69%

    0 0 116.4667 200 143.0000 Cuts: 33 1134 18.55%

    * 0+ 0 120.0000 116.4667 2.94%

    0 0 116.5124 191 120.0000 Cuts: 38 1240 2.91%

    0 0 116.5436 167 120.0000 Cuts: 25 1331 2.88%

    0 0 116.5844 136 120.0000 Cuts: 22 1436 2.85%

    0 0 116.5951 233 120.0000 Cuts: 14 1516 2.84%

    0 0 116.6005 247 120.0000 Cuts: 18 1589 2.83%

    0 0 116.6031 240 120.0000 Cuts: 9 1612 2.83%

    * 0+ 0 119.0000 116.6031 2.01%

    * 0+ 0 118.0000 116.6031 1.18%

    * 0+ 0 117.0000 116.6031 0.34%

    0 0 cutoff 117.0000 116.6031 1612 0.34%

    Elapsed time = 2.07 sec. (715.08 ticks, tree = 0.01 MB, solutions = 6)

    Clique cuts applied: 53

    Zero-half cuts applied: 45

    Gomory fractional cuts applied: 10

    Root node processing (before b&c):

    Real time = 2.08 sec. (715.58 ticks)

    Parallel b&c, 4 threads:

    Real time = 0.00 sec. (0.00 ticks)

    Sync time (average) = 0.00 sec.

    Wait time (average) = 0.00 sec.

    ------------

    Total (root+branch&cut) = 2.08 sec. (715.58 ticks)






    #DecisionOptimization
    #Support
    #SupportMigration