Skip to content

Incorrect Best Bound when random_seed is set. #2382

Open
@Thell

Description

@Thell

Hello again. This issue is fairly scary in that I, and assumably everyone else, expects that the Best Bounds are going to always be truthful. In this case they are not. This is particularly scary when, for reproducibility random_seed is set during development.

Consider the following two outputs (first without and second with random_seed) and note the final presolves and the BestBound values.

 highs viz_model.mps
Running HiGHS 1.7.2 (git hash: 00e812dab): Copyright (c) 2024 HiGHS under MIT licence terms
Number of BV entries in BOUNDS section is 60239
Number of UI entries in BOUNDS section is 50508
MIP  viz_model has 259400 rows; 110747 cols; 651106 nonzeros; 110747 integer variables
Coefficient ranges:
  Matrix [1e+00, 2e+01]
  Cost   [1e+00, 3e+00]
  Bound  [1e+00, 2e+01]
  RHS    [1e+00, 2e+01]
Presolving model
166797 rows, 86937 cols, 426946 nonzeros  0s
131595 rows, 58866 cols, 335886 nonzeros  0s
87320 rows, 58711 cols, 247002 nonzeros  0s
82499 rows, 55421 cols, 236060 nonzeros  1s
Objective function is integral with scale 1

Solving MIP model with:
   82499 rows
   55421 cols (28530 binary, 26891 integer, 0 implied int., 0 continuous)
   236060 nonzeros

   Nodes      |    B&B Tree     |            Objective Bounds     |  Dynamic Constraints |       Work
Proc. InQueue |  Leaves   Expl. | BestBound       BestSol     Gap |   Cuts   InLp Confl. | LpIters     Time
    0       0         0   0.00%   411             inf         inf        0      0      0         0     2.1s
    0       0         0   0.00%   425.6462312     inf         inf        0      0      3      2567     2.5s
    0       0         0   0.00%   431.9604451     inf         inf     2510    222    139      6737     7.6s
    0       0         0   0.00%   432.9199454     inf         inf     2697    267    167     11511    12.6s
    0       0         0   0.00%   433.9754869     inf         inf     2152    328    184     17538    18.1s
    0       0         0   0.00%   434.9020846     inf         inf     1880    351    193     23230    23.3s
^C
highs --random_seed 42 viz_model.mps
Running HiGHS 1.7.2 (git hash: 00e812dab): Copyright (c) 2024 HiGHS under MIT licence terms
Number of BV entries in BOUNDS section is 60239
Number of UI entries in BOUNDS section is 50508
MIP  viz_model has 259400 rows; 110747 cols; 651106 nonzeros; 110747 integer variables
Coefficient ranges:
  Matrix [1e+00, 2e+01]
  Cost   [1e+00, 3e+00]
  Bound  [1e+00, 2e+01]
  RHS    [1e+00, 2e+01]
Presolving model
166797 rows, 86937 cols, 426946 nonzeros  0s
131595 rows, 58866 cols, 335886 nonzeros  0s
87320 rows, 58711 cols, 247002 nonzeros  0s
82472 rows, 55407 cols, 235841 nonzeros  1s
Objective function is integral with scale 1

Solving MIP model with:
   82472 rows
   55407 cols (28520 binary, 26887 integer, 0 implied int., 0 continuous)
   235841 nonzeros

   Nodes      |    B&B Tree     |            Objective Bounds     |  Dynamic Constraints |       Work
Proc. InQueue |  Leaves   Expl. | BestBound       BestSol     Gap |   Cuts   InLp Confl. | LpIters     Time
    0       0         0   0.00%   414             inf         inf        0      0      0         0     2.1s
    0       0         0   0.00%   437.1700407     inf         inf        0      0      1      5007     3.3s
    0       0         0   0.00%   444.4279977     inf         inf     2848    235    212     11426     8.7s
    0       0         0   0.00%   445.4705785     inf         inf     3467    264    225     17652    14.3s
^C

When run to completion (just over an hour on my Ryzen 5700G), the first finds the optimal answer (443) and the second arrives at 459! With presolve off and the random_seed set the incorrect BestBound was still used.

See discord for more info on how this was found by pure luck and almost not found prior to several days worth of processing with random_seed set (for reproducibilty).

viz_model.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions