Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scip generate inconsistent result with presolving/subrestartfac = 0.1 #128

Closed
zxt5 opened this issue Feb 16, 2025 · 2 comments
Closed

scip generate inconsistent result with presolving/subrestartfac = 0.1 #128

zxt5 opened this issue Feb 16, 2025 · 2 comments

Comments

@zxt5
Copy link

zxt5 commented Feb 16, 2025

scip works fine in default mode where presolving/subrestartfac = 1 and generates the correct answer -12407.97... But setting presolving/subrestartfac = 0.1 leads to a different result, which seems to break the constraints:

root@b9f8d0525121:/tmp# cat scip.set
presolving/subrestartfac = 0.1
root@b9f8d0525121:/tmp# scip -s scip.set
SCIP version 10.0.0 [precision: 8 byte] [memory: block] [mode: debug] [LP solver: Soplex 8.0.0] [GitHash: 9a164ab933]
Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB)

External libraries:
  Readline 8.0         GNU library for command line editing (gnu.org/s/readline)
  Soplex 8.0.0         Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: f1cf1fed]
  CppAD 20180000.0     Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
  ZLIB 1.2.11          General purpose compression library by J. Gailly and M. Adler (zlib.net)
  TinyCThread 1.2      small portable implementation of the C11 threads API (tinycthread.github.io)
  GMP 6.2.0            GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
  AMPL/MP 4.0.0        AMPL .nl file reader library (github.com/ampl/mp)
  Nauty 2.8.8          Computing Graph Automorphism Groups by Brendan D. McKay (users.cecs.anu.edu.au/~bdm/nauty)
  sassy 2.0            Symmetry preprocessor by Markus Anders (github.com/markusa4/sassy)

reading user parameter file <scip.set>

SCIP> read seed.mps

read problem <seed.mps>
============

original problem has 7 variables (0 bin, 6 int, 0 impl, 1 cont) and 95 constraints
SCIP> opt

presolving:
   (0.0s) symmetry computation started: requiring (bin +, int +, cont +), (fixed: bin -, int -, cont -)
   (0.0s) no symmetry present (symcode time: 0.00)
presolving (1 rounds: 1 fast, 1 medium, 1 exhaustive):
 0 deleted vars, 0 deleted constraints, 0 added constraints, 0 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
presolved problem has 7 variables (0 bin, 6 int, 0 impl, 1 cont) and 95 constraints
     95 constraints of type <linear>
Presolving Time: 0.01

 time | node  | left  |LP iter|LP it/n|mem/heur|mdpt |vars |cons |rows |cuts |sepa|confs|strbr|  dualbound   | primalbound  |  gap   | compl.
  0.0s|     1 |     0 |    16 |     - |  1214k |   0 |   7 |  95 |  95 |   0 |  0 |   0 |   0 |-1.244341e+04 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    17 |     - |  1289k |   0 |   7 |  95 |  97 |   2 |  1 |   0 |   0 |-1.244082e+04 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    18 |     - |  1299k |   0 |   7 |  95 |  99 |   4 |  2 |   0 |   0 |-1.242920e+04 |      --      |    Inf | unknown
r 0.0s|     1 |     0 |    18 |     - |shifting|   0 |   7 |  95 |  99 |   4 |  2 |   0 |   0 |-1.242920e+04 |-1.225975e+04 |   1.38%| unknown
  0.0s|     1 |     0 |    19 |     - |  1318k |   0 |   7 |  95 | 100 |   5 |  3 |   0 |   0 |-1.242811e+04 |-1.225975e+04 |   1.37%| unknown
  0.0s|     1 |     0 |    19 |     - |  1319k |   0 |   7 |  95 | 100 |   5 |  3 |   0 |   0 |-1.242811e+04 |-1.225975e+04 |   1.37%| unknown
  0.0s|     1 |     0 |    20 |     - |  1329k |   0 |   7 |  95 | 101 |   6 |  4 |   0 |   0 |-1.242607e+04 |-1.225975e+04 |   1.36%| unknown
  0.1s|     1 |     0 |    22 |     - |  1340k |   0 |   7 |  95 | 102 |   7 |  5 |   0 |   0 |-1.242519e+04 |-1.225975e+04 |   1.35%| unknown
  0.1s|     1 |     0 |    24 |     - |  1373k |   0 |   7 |  95 | 103 |   8 |  6 |   0 |   0 |-1.242502e+04 |-1.225975e+04 |   1.35%| unknown
  0.1s|     1 |     0 |    25 |     - |  1386k |   0 |   7 |  95 | 104 |   9 |  7 |   0 |   0 |-1.242501e+04 |-1.225975e+04 |   1.35%| unknown
  0.1s|     1 |     0 |    26 |     - |  1397k |   0 |   7 |  95 | 105 |  10 |  8 |   0 |   0 |-1.242496e+04 |-1.225975e+04 |   1.35%| unknown
r 0.1s|     1 |     0 |    26 |     - |shifting|   0 |   7 |  95 | 105 |  10 |  8 |   0 |   0 |-1.242496e+04 |-1.234741e+04 |   0.63%| unknown
  0.1s|     1 |     0 |    29 |     - |  1408k |   0 |   7 |  95 | 106 |  11 |  9 |   0 |   0 |-1.242484e+04 |-1.234741e+04 |   0.63%| unknown
  0.1s|     1 |     0 |    29 |     - |  1409k |   0 |   7 |  95 | 106 |  11 |  9 |   0 |   0 |-1.242484e+04 |-1.234741e+04 |   0.63%| unknown
  0.1s|     1 |     0 |    31 |     - |  1420k |   0 |   7 |  95 | 107 |  12 | 10 |   0 |   0 |-1.242460e+04 |-1.234741e+04 |   0.63%| unknown
 time | node  | left  |LP iter|LP it/n|mem/heur|mdpt |vars |cons |rows |cuts |sepa|confs|strbr|  dualbound   | primalbound  |  gap   | compl.
  0.1s|     1 |     0 |    31 |     - |  1430k |   0 |   7 |  95 | 107 |  12 | 11 |   0 |   0 |-1.242460e+04 |-1.234741e+04 |   0.63%| unknown
L 0.1s|     1 |     0 |    68 |     - |    alns|   0 |   7 |  97 | 107 |  12 | 12 |   2 |   0 |-1.242460e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    68 |     - |  1449k |   0 |   7 |  97 | 107 |  12 | 12 |   2 |   0 |-1.242460e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    70 |     - |  1452k |   0 |   7 |  97 | 107 |  12 | 13 |   3 |   3 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    70 |     - |  1452k |   0 |   7 |  97 | 107 |  12 | 13 |   3 |   3 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    71 |     - |  1452k |   0 |   7 |  97 | 108 |  13 | 14 |   3 |   3 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    72 |     - |  1453k |   0 |   7 |  97 | 106 |  14 | 15 |   3 |   3 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.1s|     1 |     0 |    72 |     - |  1453k |   0 |   7 |  97 | 106 |  14 | 15 |   3 |   3 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.2s|     1 |     0 |    72 |     - |  1453k |   0 |   7 |  95 | 106 |  14 | 16 |   3 |   5 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
  0.2s|     1 |     2 |    72 |     - |  1453k |   0 |   7 |  95 | 106 |  14 | 17 |   3 |   5 |-1.242447e+04 |-1.235364e+04 |   0.57%| unknown
r 0.2s|     9 |    10 |   106 |   8.9 |ziroundi|   4 |   7 |  97 |  98 |  14 |  2 |   5 |  15 |-1.242361e+04 |-1.236732e+04 |   0.46%| unknown
r 0.2s|    19 |     9 |   129 |   5.2 |rounding|   8 |   7 |  98 |  98 |  14 |  0 |   6 |  16 |-1.242328e+04 |-1.237968e+04 |   0.35%|  28.25%
(run 1, node 19) restarting after 1 global fixings of integer variables

(restart) converted 3 cuts from the global cut pool into linear constraints

presolving:
(round 1, fast)       1 del vars, 0 del conss, 0 add conss, 4 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 2, fast)       1 del vars, 8 del conss, 0 add conss, 10 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 3, fast)       1 del vars, 12 del conss, 0 add conss, 14 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 4, fast)       1 del vars, 13 del conss, 0 add conss, 15 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
presolving (5 rounds: 5 fast, 1 medium, 1 exhaustive):
 1 deleted vars, 13 deleted constraints, 0 added constraints, 15 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
presolved problem has 6 variables (0 bin, 5 int, 0 impl, 1 cont) and 88 constraints
     88 constraints of type <linear>
Presolving Time: 0.01
transformed 6/6 original solutions to the transformed problem space

 time | node  | left  |LP iter|LP it/n|mem/heur|mdpt |vars |cons |rows |cuts |sepa|confs|strbr|  dualbound   | primalbound  |  gap   | compl.
  0.2s|     1 |     0 |   142 |     - |  1512k |   0 |   6 |  88 |  83 |   0 |  0 |   6 |  16 |-1.242328e+04 |-1.237968e+04 |   0.35%| unknown
  0.2s|     1 |     0 |   144 |     - |  1521k |   0 |   6 |  88 |  84 |   1 |  1 |   6 |  16 |-1.242328e+04 |-1.237968e+04 |   0.35%| unknown
WARNING: Dual bound -12423.3 is larger than the objective of the primal solution -12423.3. The solution might not be optimal.
r 0.2s|     1 |     0 |   144 |     - |shifting|   0 |   6 |  88 |  84 |   1 |  1 |   6 |  16 |-1.242333e+04 |-1.242333e+04 |   0.00%| unknown
  0.2s|     1 |     0 |   144 |     - |  1522k |   0 |   6 |  88 |  84 |   1 |  1 |   6 |  16 |-1.242333e+04 |-1.242333e+04 |   0.00%| unknown

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.22
Solving Nodes      : 1 (total of 20 nodes in 2 runs)
Primal Bound       : -1.24233286437909e+04 (7 solutions)
Dual Bound         : -1.24233286437909e+04
Gap                : 0.00 %
  [linear] <_C62>:  -5.19<x0>[I] (+192) +10.88<x1>[I] (+64) +15.93<x2>[I] (+200) -4.48<x3>[I] (-27) -5.52<x4>[C] (+100.910948) +9.38<x5>[I] (-106) +10.2<x6>[I] (-144) <= -13.31;
;
violation: right hand side is violated by 0.00156862745967423
best solution is not feasible in original problem

SCIP> checksol

check best solution
  [linear] <_C62>:  -5.19<x0>[I] (+192) +10.88<x1>[I] (+64) +15.93<x2>[I] (+200) -4.48<x3>[I] (-27) -5.52<x4>[C] (+100.910948) +9.38<x5>[I] (-106) +10.2<x6>[I] (-144) <= -13.31;
;
violation: right hand side is violated by 0.00156862745967423
Violation          :    absolute    relative
  bounds           : 0.00000e+00 0.00000e+00
  integrality      : 8.38440e-13           -
  LP rows          : 1.56863e-03 1.17853e-04
  constraints      : 1.56863e-03 1.17853e-04
@DominikKamp
Copy link
Contributor

Probably related to #126. Currently, on these instances this can just fail as soon as presolving deletes certain variables. If this is an obstacle, you might want to try the exact-rational branch with exact/enabled = TRUE to get exact results.

@DominikKamp
Copy link
Contributor

We are working on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants