Skip to main content

Potential Numerical Issue in MIP Solving

Answered

Comments

5 comments

  • Ryuta Tamura
    • Gurobi Staff Gurobi Staff

    Hi Xintong Zhou,

    Could you also provide a Gurobi Log showing this situation?

    Thanks,
    Ryuta

    0
  • Xintong Zhou
    • Curious
    • Conversationalist
    $> gurobi_cl seed.lp 
    Set parameter Username
    Set parameter LicenseID to value 2648392
    Set parameter LogFile to value "gurobi.log"
    Using license file /home/x27zhou/gurobi.lic
    Academic license - for non-commercial use only - expires 2026-04-07
    
    Gurobi Optimizer version 12.0.1 build v12.0.1rc0 (linux64 - "Ubuntu 20.04.5 LTS")
    Copyright (c) 2025, Gurobi Optimization, LLC
    
    Read LP format model from file seed.lp
    Reading time = 0.01 seconds
    OBJ: 202 rows, 15 columns, 3030 nonzeros
    
    Using Gurobi shared library /home/x27zhou/solvers/gurobi/gurobi1201/linux64/lib/libgurobi.so.12.0.1
    
    CPU model: AMD Ryzen 9 7950X 16-Core Processor, instruction set [SSE2|AVX|AVX2|AVX512]
    Thread count: 16 physical cores, 32 logical processors, using up to 32 threads
    
    Optimize a model with 202 rows, 15 columns and 3030 nonzeros
    Model fingerprint: 0x9866a569
    Variable types: 8 continuous, 7 integer (0 binary)
    Coefficient statistics:
      Matrix range     [3e-02, 1e+02]
      Objective range  [9e+00, 1e+02]
      Bounds range     [2e+02, 2e+02]
      RHS range        [1e+01, 5e+03]
    Presolve time: 0.00s
    Presolved: 202 rows, 15 columns, 3030 nonzeros
    Variable types: 8 continuous, 7 integer (0 binary)
    
    Root relaxation: objective 7.327768e+02, 34 iterations, 0.00 seconds (0.00 work units)
    
        Nodes    |    Current Node    |     Objective Bounds      |     Work
     Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time
    
         0     0  732.77678    0    7          -  732.77678      -     -    0s
    H    0     0                     813.3720500  732.77678  9.91%     -    0s
    H    0     0                     798.2203792  732.77678  8.20%     -    0s
    H    0     0                     772.6490167  732.77678  5.16%     -    0s
    
    Cutting planes:
      Gomory: 3
    
    Explored 1 nodes (34 simplex iterations) in 0.25 seconds (0.03 work units)
    Thread count was 32 (of 32 available processors)
    
    Solution count 3: 772.649 798.22 813.372 
    
    Optimal solution found (tolerance 1.00e-04)
    Best objective 7.726490166923e+02, best bound 7.726490166923e+02, gap 0.0000%
    $>
    $>
    $>
    $> gurobi_cl ScaleFlag=1 NodeMethod=2 seed.lp 
    Set parameter Username
    Set parameter LicenseID to value 2648392
    Set parameter ScaleFlag to value 1
    Set parameter NodeMethod to value 2
    Set parameter LogFile to value "gurobi.log"
    Using license file /home/x27zhou/gurobi.lic
    Academic license - for non-commercial use only - expires 2026-04-07
    
    Gurobi Optimizer version 12.0.1 build v12.0.1rc0 (linux64 - "Ubuntu 20.04.5 LTS")
    Copyright (c) 2025, Gurobi Optimization, LLC
    
    Read LP format model from file seed.lp
    Reading time = 0.01 seconds
    OBJ: 202 rows, 15 columns, 3030 nonzeros
    
    Using Gurobi shared library /home/x27zhou/solvers/gurobi/gurobi1201/linux64/lib/libgurobi.so.12.0.1
    
    CPU model: AMD Ryzen 9 7950X 16-Core Processor, instruction set [SSE2|AVX|AVX2|AVX512]
    Thread count: 16 physical cores, 32 logical processors, using up to 32 threads
    
    Non-default parameters:
    ScaleFlag  1
    NodeMethod  2
    
    Optimize a model with 202 rows, 15 columns and 3030 nonzeros
    Model fingerprint: 0x9866a569
    Variable types: 8 continuous, 7 integer (0 binary)
    Coefficient statistics:
      Matrix range     [3e-02, 1e+02]
      Objective range  [9e+00, 1e+02]
      Bounds range     [2e+02, 2e+02]
      RHS range        [1e+01, 5e+03]
    Presolve time: 0.00s
    Presolved: 202 rows, 15 columns, 3030 nonzeros
    Variable types: 8 continuous, 7 integer (0 binary)
    
    Root relaxation: objective 7.327768e+02, 34 iterations, 0.00 seconds (0.00 work units)
    
        Nodes    |    Current Node    |     Objective Bounds      |     Work
     Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time
    
         0     0  732.77678    0    7          -  732.77678      -     -    0s
    H    0     0                     813.3720500  732.77678  9.91%     -    0s
    H    0     0                     798.2203792  732.77678  8.20%     -    0s
         0     0  740.73595    0    5  798.22038  740.73595  7.20%     -    0s
         0     0  741.89681    0    6  798.22038  741.89681  7.06%     -    0s
         0     0  742.06816    0    6  798.22038  742.06816  7.03%     -    0s
         0     0  743.23671    0    6  798.22038  743.23671  6.89%     -    0s
         0     0  743.88998    0    6  798.22038  743.88998  6.81%     -    0s
         0     0  744.63660    0    6  798.22038  744.63660  6.71%     -    0s
         0     0  744.75251    0    6  798.22038  744.75251  6.70%     -    0s
         0     0  744.75251    0    6  798.22038  744.75251  6.70%     -    0s
         0     2  744.75251    0    6  798.22038  744.75251  6.70%     -    0s
    
    Cutting planes:
      Gomory: 7
    
    Explored 51 nodes (310 simplex iterations) in 1.81 seconds (0.71 work units)
    Thread count was 32 (of 32 available processors)
    
    Solution count 2: 798.22 813.372 
    
    Optimal solution found (tolerance 1.00e-04)
    Best objective 7.982203791672e+02, best bound 7.982203791672e+02, gap 0.0000%
    0
  • Ryuta Tamura
    • Gurobi Staff Gurobi Staff

    Thank you for sharing your logs! I will take a look.

    0
  • Ryuta Tamura
    • Gurobi Staff Gurobi Staff

    Hi Xintong Zhou,

    Gurobi 12.0.2 was recently released and I am consistently getting a result of “772.64..” on my machine(win/Linux) with ver. 12.0.1/12.0.2 using your parameters with 10000 seeds. The latest version may improve the situation on your side.

    Regarding parameter settings,  NodeMethod=2 appears to slow down the execution speed of this model. As noted in this section, this parameter rarely contributes to speedup, and it is recommended that this parameter be set to default for models like this one, which will not be speeded up.

    Thanks,
    Ryuta

    0
  • Xintong Zhou
    • Curious
    • Conversationalist

    Hi,

    I just tried 12.0.2, and I can get the correct solution. While 12.0.1 still gives the wrong answer on my machine. 

    Thanks for your reply anyway! I will use the newest release. 

    0

Please sign in to leave a comment.