scipopt / scip

SCIP - Solving Constraint Integer Programs
Other
406 stars 67 forks source link

ELEAVE56 ERROR! Tried to put a fixed column variable into the basis #23

Open VonAlphaBisZulu opened 2 years ago

VonAlphaBisZulu commented 2 years ago

Building a certain MILP with indicator constraints produces the following the lines of error and causes the program to crash:

ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=79, lower=0, upper=0

The underlying issue was introduced between scip version 8.0.0 to 8.0.1 (scip 8.0.0 solves the problem correctly, scip 8.0.1 produces the error).

I use pyscipopt in python 3.7 to construct the problem. Both, version 4.2.0 and 4.0.0 work fine.

Here the "writeProblem" output (identical for scip 8.0.0 and 8.0.1):

\ SCIP STATISTICS
\   Problem name     : model
\   Variables        : 112 (26 binary, 0 integer, 0 implicit integer, 86 continuous)
\   Constraints      : 123
Minimize
 Obj: +1 x1 +0.6 x3 +1.1 x4 +0.75 x5 +1 x6 +0.8 x7 +1 x8 +1 x9 +1 x11 +1.5 x13 +1.2 x15
Subject to
 c1: -1 x1 -0.6 x3 -1.1 x4 -0.75 x5 -1 x6 -0.8 x7 -1 x8 -1 x9 -1 x11 -1.5 x13 -1.2 x15 <= +0
 c2: +1 x1 +0.6 x3 +1.1 x4 +0.75 x5 +1 x6 +0.8 x7 +1 x8 +1 x9 +1 x11 +1.5 x13 +1.2 x15 <= +4
 c4: +1 x16 -1 x18 +1 x30 -1 x47 <= +0
 c5: -1 x16 +0.4 x28 +1 x29 -1 x55 <= +0
 c6: +1 x21 +1 x27 -1 x57 <= +0
 c7: +1 x23 +1 x31 <= +0
 c8: +1 x27 -1 x33 <= +0
 c9: +4.5 x27 -1 x43 <= +0
 c10: +1 x24 -100 x27 <= +0
 c11: +1 x25 -100 x27 <= +0
 c12: -100 x27 +1 x32 <= +0
 c13: -100 x27 +1 x33 <= +0
 c14: -100 x27 +1 x34 <= +0
 c15: -1 x24 -100 x27 <= +0
 c16: -100 x27 +1 x35 <= +0
 c17: -100 x27 +1 x36 <= +0
 c18: -1 x25 -100 x27 <= +0
 c19: -100 x27 +1 x37 <= +0
 c20: -100 x27 +1 x38 <= +0
 c21: -10 x27 +1 x39 <= +0
 c22: -100 x27 +1 x40 <= +0
 c23: -100 x27 +1 x41 <= +0
 c24: -100 x27 +1 x42 <= +0
 c25: -0.1 x29 -1 x30 -4.5 x31 -1 x41 +100 x44 +100 x45 +100 x46 +100 x47 +100 x48 +100 x49 +100 x50 +100 x51
  +100 x52 +100 x53 +100 x54 +10 x55 +100 x56 +100 x57 +100 x58 <= -1
 c26: +1 x23 <= +0
 c27: +1 x59 +9 x1 <= +9
 c28: +1 x61 -4.9 x3 <= +0
 c29: +1 x62 +10 x4 <= +10
 c30: +1 x63 +10 x5 <= +10
 c31: +1 x64 -10 x6 <= +0
 c32: +1 x65 +9 x7 <= +9
 c33: +1 x66 +9 x8 <= +9
 c34: +1 x67 +5 x9 <= +5
 c35: +1 x69 +9 x11 <= +9
 c36: +1 x71 +9.8 x13 <= +9.8
 c37: -1 x62 +4.9 x4 <= +4.9
 c38: -1 x65 +10 x7 <= +10
 c39: -1 x73 +5.5 x15 <= +5.5
 c40: +1 x32 +1 x33 +1 x34 +1 x37 -1 x39 = +0
 c41: -1 x25 -1 x32 +1 x36 +1 x38 = +0
 c42: -1 x33 +1 x34 +1 x35 +1 x36 +1 x38 = +0
 c43: +1 x24 -1 x34 +1 x35 = +0
 c44: +1 x25 -1 x36 -1 x37 +1 x40 = +0
 c45: -1 x35 -1 x36 -1 x38 +1 x41 = +0
 c46: -1 x24 -1 x34 -1 x35 -1 x38 +1 x42 = +0
 c47: +1 x26 -1 x36 +1 x43 = +0
 c48: -1 x59 -1 x60 -1 x61 -1 x66 +1 x68 = +0
 c49: +1 x59 -1 x64 -1 x65 -1 x67 = +0
 c50: +1 x60 -1 x61 -1 x63 -1 x64 -1 x67 = +0
 c51: +1 x61 +1 x62 -1 x63 = +0
 c52: +1 x64 +1 x65 +1 x66 -1 x69 = +0
 c53: +1 x63 +1 x64 +1 x67 -1 x70 = +0
 c54: +1 x61 -1 x62 +1 x63 +1 x67 -1 x71 = +0
 c55: +1 x64 -1 x72 +1 x73 = +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x1>[B],<x74>[B]) = 1;
 IndicatorCons: x74 = 1 ->  +1 x16 -1 x17 -1 x46 <= +0
 IndicatorCons: x3 = 1 ->  +1 x16 +1 x18 -1 x19 -1 x22 -1 x48 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x5>[B],<x77>[B]) = 1;
 IndicatorCons: x77 = 1 ->  +1 x18 +1 x19 -1 x21 -1 x22 -1 x50 <= +0
 IndicatorCons: x6 = 1 ->  +1 x17 +1 x18 -1 x20 -1 x21 -1 x23 -1 x51 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x8>[B],<x80>[B]) = 1;
 IndicatorCons: x80 = 1 ->  +1 x16 -1 x20 -1 x53 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x9>[B],<x82>[B]) = 1;
 IndicatorCons: x82 = 1 ->  +1 x17 +1 x18 -1 x21 -1 x22 -1 x54 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x11>[B],<x84>[B]) = 1;
 IndicatorCons: x84 = 1 ->  +1 x20 -1 x28 -1 x56 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x13>[B],<x86>[B]) = 1;
 IndicatorCons: x86 = 1 ->  +1 x22 -1 x58 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x15>[B],<x88>[B]) = 1;
 IndicatorCons: x88 = 1 ->  -1 x23 <= +0
 IndicatorCons: x1 = 1 ->  +1 x32 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x3>[B],<x91>[B]) = 1;
 IndicatorCons: x91 = 1 ->  +1 x34 <= +0
 IndicatorCons: x5 = 1 ->  +1 x35 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x6>[B],<x94>[B]) = 1;
 IndicatorCons: x94 = 1 ->  +1 x36 <= +0
 IndicatorCons: x8 = 1 ->  +1 x37 <= +0
 IndicatorCons: x9 = 1 ->  +1 x38 <= +0
 IndicatorCons: x11 = 1 ->  +1 x40 <= +0
 IndicatorCons: x13 = 1 ->  +1 x42 <= +0
 IndicatorCons: x15 = 1 ->  +1 x73 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x4>[B],<x101>[B]) = 1;
 IndicatorCons: x101 = 1 ->  +1 x19 -1 x22 -1 x44 +1 x49 <= +0
 IndicatorCons: x101 = 1 ->  -1 x19 +1 x22 +1 x44 -1 x49 <= +0
constraint handler <xor> cannot print requested format
\   [xor] <XORcons>: xor(<x7>[B],<x104>[B]) = 1;
 IndicatorCons: x104 = 1 ->  -1 x17 +1 x20 -1 x45 +1 x52 <= +0
 IndicatorCons: x104 = 1 ->  +1 x17 -1 x20 +1 x45 -1 x52 <= +0
 IndicatorCons: x4 = 1 ->  +1 x24 <= +0
 IndicatorCons: x4 = 1 ->  -1 x24 <= +0
 IndicatorCons: x7 = 1 ->  +1 x25 <= +0
 IndicatorCons: x7 = 1 ->  -1 x25 <= +0
 IndicatorCons: x15 = 1 ->  +1 x26 <= +0
 IndicatorCons: x15 = 1 ->  -1 x26 <= +0
Bounds
 0 <= x1 <= 1
 0 <= x2 <= 0
 0 <= x3 <= 1
 0 <= x4 <= 1
 0 <= x5 <= 1
 0 <= x6 <= 1
 0 <= x7 <= 1
 0 <= x8 <= 1
 0 <= x9 <= 1
 0 <= x10 <= 0
 0 <= x11 <= 1
 0 <= x12 <= 0
 0 <= x13 <= 1
 0 <= x14 <= 0
 0 <= x15 <= 1
 0 <= x74 <= 1
 0 <= x77 <= 1
 0 <= x80 <= 1
 0 <= x82 <= 1
 0 <= x84 <= 1
 0 <= x86 <= 1
 0 <= x88 <= 1
 0 <= x91 <= 1
 0 <= x94 <= 1
 0 <= x101 <= 1
 0 <= x104 <= 1
 x27 free
 0 <= x59 <= 100
 1 <= x60 <= 100
 0 <= x61 <= 100
 -100 <= x62 <= 100
 0 <= x63 <= 100
 0 <= x64 <= 100
 -100 <= x65 <= 100
 0 <= x66 <= 100
 0 <= x67 <= 100
 0 <= x68 <= 10
 0 <= x69 <= 100
 0.2 <= x70 <= 100
 0 <= x71 <= 100
 4.5 <= x72
 x73 free
 x16 free
 x17 free
 x18 free
 x19 free
 x20 free
 x21 free
 x22 free
 x23 free
 x24 free
 x25 free
 x26 free
Binaries
 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x74 x77 x80 x82 x84 x86 x88 x91 x94 x101 x104
End
matbesancon commented 2 years ago

hi @VonAlphaBisZulu, I'm getting an error when trying to read in the file, could you write it as an MPS ?

VonAlphaBisZulu commented 2 years ago

Hi, you find the problem here attached. I don't know why, but the LP-file solves with both 8.0.0 and 8.0.1, while the MPS shows infeasible in both. I created both, LP and MPS at the same breakpoint with the function scip.writeProblem. And the error I described earlier doesn't show. Something doesn't fit.

I can reproduce my problem consistently. Not sure, how to share it correctly.

scip_issue_23.zip

ambros-gleixner commented 2 years ago

Can you model the xor constraints as linear constraints x+y=1? Or will you have more complicated xor constraints in the future?

VonAlphaBisZulu commented 2 years ago

@ambros-gleixner You're right, I will do this first.

VonAlphaBisZulu commented 2 years ago

Updated LP and MPS. Same situation as in previous comment, but I also get the lines mentioned in my first post. So, you should be able to reproduce the problem. In SCIP throwing these errors might be okay, but with pyscipopt this leads to a crash. Should this issue be moved to pyscipopt?

scip_issue_23.zip,

This is the output from SCIP 8.0.0

SCIP> read scip_issue_23.lp 

read problem <scip_issue_23.lp>
============

original problem has 112 variables (26 bin, 0 int, 0 impl, 86 cont) and 121 constraints
SCIP> optimize

presolving:
(round 1, fast)       20 del vars, 16 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 16 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 16 del conss, 0 add conss, 19 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 16 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, exhaustive) 20 del vars, 23 del conss, 0 add conss, 20 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, exhaustive) 20 del vars, 23 del conss, 0 add conss, 20 chg bounds, 9 chg sides, 0 chg coeffs, 12 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
presolving (7 rounds: 7 fast, 3 medium, 3 exhaustive):
 20 deleted vars, 23 deleted constraints, 0 added constraints, 20 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 88 implications, 1 cliques
presolved problem has 92 variables (11 bin, 0 int, 0 impl, 81 cont) and 98 constraints
     12 constraints of type <varbound>
     58 constraints of type <linear>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    66 |     - |  1220k |   0 |  92 | 100 |  70 |   0 |  0 |   2 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |   120 |     - |  1233k |   0 |  92 | 103 |  70 |   0 |  2 |   5 |   0 | 0.000000e+00 |      --      |    Inf | unknown
d 0.0s|    26 |    12 |   206 |   7.4 |fracdivi|   7 |  92 | 107 |  70 |   0 |  1 |   9 |   0 | 1.750000e+00 | 3.550000e+00 | 102.86%|  10.89%
* 0.0s|    47 |     0 |   262 |   5.2 |    LP  |   7 |  92 | 109 |  70 |   0 |  1 |  11 |   0 | 3.000000e+00 | 3.000000e+00 |   0.00%|  99.71%

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 47
Primal Bound       : +3.00000000000000e+00 (2 solutions)
Dual Bound         : +3.00000000000000e+00
Gap                : 0.00 %

This is the output from SCIP 8.0.1

SCIP> read scip_issue_23.lp 

read problem <scip_issue_23.lp>
============

original problem has 112 variables (26 bin, 0 int, 0 impl, 86 cont) and 121 constraints
SCIP> optimize

presolving:
(round 1, fast)       20 del vars, 16 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 16 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 16 del conss, 0 add conss, 19 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 16 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, exhaustive) 20 del vars, 23 del conss, 0 add conss, 20 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, exhaustive) 20 del vars, 23 del conss, 0 add conss, 20 chg bounds, 9 chg sides, 0 chg coeffs, 12 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
   (0.0s) symmetry computation skipped: there exist constraints that cannot be handled by symmetry methods.
presolving (7 rounds: 7 fast, 3 medium, 3 exhaustive):
 20 deleted vars, 23 deleted constraints, 0 added constraints, 20 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 88 implications, 1 cliques
presolved problem has 92 variables (11 bin, 0 int, 0 impl, 81 cont) and 98 constraints
     12 constraints of type <varbound>
     58 constraints of type <linear>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    66 |     - |  3730k |   0 |  92 | 100 |  70 |   0 |  0 |   2 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |   120 |     - |  3737k |   0 |  92 | 103 |  70 |   0 |  2 |   5 |   0 | 0.000000e+00 |      --      |    Inf | unknown
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=91, lower=-0, upper=0
d 0.0s|    26 |    12 |   207 |   7.4 |fracdivi|   7 |  92 | 107 |  70 |   0 |  1 |   9 |   0 | 1.750000e+00 | 3.550000e+00 | 102.86%|  10.89%
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=91, lower=-0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=42, lower=-0, upper=-0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=11, lower=-0, upper=-0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=11, lower=-0, upper=-0
* 0.0s|    47 |     0 |   279 |   5.6 |    LP  |   7 |  92 | 110 |  70 |   0 |  1 |  12 |   0 | 3.000000e+00 | 3.000000e+00 |   0.00%|  99.71%

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 47
Primal Bound       : +3.00000000000000e+00 (2 solutions)
Dual Bound         : +3.00000000000000e+00
Gap                : 0.00 %
VonAlphaBisZulu commented 2 years ago

I know my problem has some variables fixed to zero, and hopefully this is not what causes the error. I fix and resolve to generate alternative solutions. I understand that removing the variables would be better practice, but I still feel that this should not throw an error (and neither does SCIP 8.0.0, CPLEX or Gurobi).

ambros-gleixner commented 2 years ago

Of course, this fixing and unfixing should work. So if this happens only through PySCIPOpt, can you provide a PySCIPOpt log? Does it abort after the first ELEAVE message?

VonAlphaBisZulu commented 2 years ago

Okay, this is the full output when I run my code in Python on verbosity level 4. On the last line, it just stalls out. Nothing happens after this point, and I have to interrupt. A CI pipeline of mine on Github, which uses PySCIPOpt, throws a sefault. Not sure after how much time.

I am uncertain if PySCIPOpt contributes anything to this output:

presolving:
(round 1, fast)       20 del vars, 17 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 17 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 17 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 18 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, fast)       20 del vars, 18 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, fast)       21 del vars, 19 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 7, exhaustive) 21 del vars, 26 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 8, exhaustive) 21 del vars, 26 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 12 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
   (0.0s) symmetry computation skipped: there exist constraints that cannot be handled by symmetry methods.
presolving (9 rounds: 9 fast, 3 medium, 3 exhaustive):
 21 deleted vars, 26 deleted constraints, 0 added constraints, 21 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 88 implications, 1 cliques
presolved problem has 91 variables (11 bin, 0 int, 0 impl, 80 cont) and 97 constraints
     12 constraints of type <varbound>
     57 constraints of type <linear>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    24 |     - |  1144k |   0 |  91 |  97 |  41 |   0 |  0 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    31 |     - |  1154k |   0 |  91 |  97 |  44 |   3 |  1 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    32 |     - |  1169k |   0 |  91 |  97 |  45 |   4 |  2 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    33 |     - |  1169k |   0 |  91 |  97 |  46 |   5 |  3 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    34 |     - |  1169k |   0 |  91 |  97 |  47 |   6 |  4 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |    37 |     - |  1177k |   0 |  91 |  97 |  47 |   6 |  6 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
d 0.0s|    33 |    12 |   126 |   3.3 |veclendi|  10 |  91 | 101 |  52 |   0 |  2 |   4 |   0 | 1.350000e+00 | 3.000000e+00 | 122.22%|  14.25%
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=79, lower=0, upper=0

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 47
Primal Bound       : +3.00000000000000e+00 (1 solutions)
Dual Bound         : +3.00000000000000e+00
Gap                : 0.00 %
  [linear] <c124>: <x6>[B] (+1) +<x7>[B] (+1) +<x15>[B] (+1) <= 2;
;
violation: right hand side is violated by 1
all 1 solutions given by solution candidate storage are infeasible

presolving:
(round 1, fast)       20 del vars, 18 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 18 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 18 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 19 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, fast)       20 del vars, 19 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, fast)       21 del vars, 20 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 7, exhaustive) 21 del vars, 27 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 8, exhaustive) 21 del vars, 27 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 13 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
   (0.0s) symmetry computation skipped: there exist constraints that cannot be handled by symmetry methods.
presolving (9 rounds: 9 fast, 3 medium, 3 exhaustive):
 21 deleted vars, 27 deleted constraints, 0 added constraints, 21 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 90 implications, 2 cliques
presolved problem has 91 variables (11 bin, 0 int, 0 impl, 80 cont) and 98 constraints
     12 constraints of type <varbound>
     57 constraints of type <linear>
      1 constraints of type <logicor>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    19 |     - |  1416k |   0 |  91 |  98 |  42 |   0 |  0 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    26 |     - |  1432k |   0 |  91 |  98 |  45 |   3 |  1 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    27 |     - |  1432k |   0 |  91 |  98 |  46 |   4 |  2 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    28 |     - |  1432k |   0 |  91 |  98 |  47 |   5 |  3 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    29 |     - |  1432k |   0 |  91 |  98 |  48 |   6 |  4 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |    32 |     - |  1432k |   0 |  91 |  98 |  48 |   6 |  6 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
VonAlphaBisZulu commented 2 years ago

For completeness the output of SCIP 8.0.0

presolving:
(round 1, fast)       20 del vars, 17 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 17 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 17 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 18 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, fast)       20 del vars, 18 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, fast)       21 del vars, 19 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 7, exhaustive) 21 del vars, 26 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 8, exhaustive) 21 del vars, 26 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 12 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
presolving (9 rounds: 9 fast, 3 medium, 3 exhaustive):
 21 deleted vars, 26 deleted constraints, 0 added constraints, 21 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 88 implications, 1 cliques
presolved problem has 91 variables (11 bin, 0 int, 0 impl, 80 cont) and 97 constraints
     12 constraints of type <varbound>
     57 constraints of type <linear>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    24 |     - |  1144k |   0 |  91 |  97 |  41 |   0 |  0 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    30 |     - |  1154k |   0 |  91 |  97 |  44 |   3 |  1 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    32 |     - |  1169k |   0 |  91 |  97 |  46 |   5 |  2 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    34 |     - |  1169k |   0 |  91 |  97 |  47 |   6 |  3 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |    37 |     - |  1177k |   0 |  91 |  97 |  47 |   6 |  5 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
d 0.0s|    33 |    12 |   133 |   3.6 |fracdivi|  10 |  91 | 101 |  52 |   0 |  2 |   4 |   0 | 1.350000e+00 | 3.000000e+00 | 122.22%|  14.25%

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 47
Primal Bound       : +3.00000000000000e+00 (1 solutions)
Dual Bound         : +3.00000000000000e+00
Gap                : 0.00 %
  [linear] <c124>: <x6>[B] (+1) +<x7>[B] (+1) +<x15>[B] (+1) <= 2;
;
violation: right hand side is violated by 1
all 1 solutions given by solution candidate storage are infeasible

presolving:
(round 1, fast)       20 del vars, 18 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 18 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 18 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 19 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, fast)       20 del vars, 19 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, fast)       21 del vars, 20 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 7, exhaustive) 21 del vars, 27 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 8, exhaustive) 21 del vars, 27 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 13 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
presolving (9 rounds: 9 fast, 3 medium, 3 exhaustive):
 21 deleted vars, 27 deleted constraints, 0 added constraints, 21 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 90 implications, 2 cliques
presolved problem has 91 variables (11 bin, 0 int, 0 impl, 80 cont) and 98 constraints
     12 constraints of type <varbound>
     57 constraints of type <linear>
      1 constraints of type <logicor>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    19 |     - |  1416k |   0 |  91 |  98 |  42 |   0 |  0 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    25 |     - |  1432k |   0 |  91 |  98 |  45 |   3 |  1 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    27 |     - |  1432k |   0 |  91 |  98 |  47 |   5 |  2 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    29 |     - |  1432k |   0 |  91 |  98 |  48 |   6 |  3 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |    32 |     - |  1432k |   0 |  91 |  98 |  48 |   6 |  5 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
* 0.0s|    41 |    14 |   125 |   2.6 |    LP  |   9 |  91 |  98 |  51 |  12 |  2 |   6 |   0 | 2.500000e+00 | 3.900000e+00 |  56.00%|  27.86%
* 0.0s|    44 |    11 |   134 |   2.7 |    LP  |   9 |  91 |  98 |  50 |  13 |  2 |   6 |   0 | 2.500000e+00 | 3.550000e+00 |  42.00%|  29.72%

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 55
Primal Bound       : +3.55000000000000e+00 (2 solutions)
Dual Bound         : +3.55000000000000e+00
Gap                : 0.00 %
  [linear] <c126>: <x5>[B] (+1) +<x6>[B] (+1) +<x7>[B] (+1) +<x9>[B] (+1) <= 3;
;
violation: right hand side is violated by 1
1/2 feasible solution given by solution candidate storage, new primal bound 3.900000e+00

presolving:
(round 1, fast)       20 del vars, 19 del conss, 0 add conss, 18 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 40 impls, 0 clqs
(round 2, fast)       20 del vars, 19 del conss, 0 add conss, 18 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 3, fast)       20 del vars, 19 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 4, fast)       20 del vars, 20 del conss, 0 add conss, 20 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 5, fast)       20 del vars, 20 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 6, fast)       21 del vars, 21 del conss, 0 add conss, 21 chg bounds, 2 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 7, exhaustive) 21 del vars, 28 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 0 upgd conss, 42 impls, 0 clqs
(round 8, exhaustive) 21 del vars, 28 del conss, 0 add conss, 21 chg bounds, 9 chg sides, 0 chg coeffs, 14 upgd conss, 42 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
presolving (9 rounds: 9 fast, 3 medium, 3 exhaustive):
 21 deleted vars, 28 deleted constraints, 0 added constraints, 21 tightened bounds, 0 added holes, 9 changed sides, 0 changed coefficients
 90 implications, 2 cliques
presolved problem has 91 variables (11 bin, 0 int, 0 impl, 80 cont) and 99 constraints
     12 constraints of type <varbound>
     57 constraints of type <linear>
      2 constraints of type <logicor>
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00
transformed 1/1 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.0s|     1 |     0 |    15 |     - |  1948k |   0 |  91 |  99 |  43 |   0 |  0 |   0 |   0 | 0.000000e+00 | 3.900000e+00 |    Inf | unknown
  0.0s|     1 |     0 |    21 |     - |  1964k |   0 |  91 |  99 |  46 |   3 |  1 |   0 |   0 | 0.000000e+00 | 3.900000e+00 |    Inf | unknown
  0.0s|     1 |     0 |    23 |     - |  1964k |   0 |  91 |  99 |  48 |   5 |  2 |   0 |   0 | 0.000000e+00 | 3.900000e+00 |    Inf | unknown
  0.0s|     1 |     0 |    25 |     - |  1964k |   0 |  91 |  99 |  49 |   6 |  3 |   0 |   0 | 0.000000e+00 | 3.900000e+00 |    Inf | unknown
  0.0s|     1 |     2 |    28 |     - |  1965k |   0 |  91 |  99 |  49 |   6 |  5 |   0 |   0 | 0.000000e+00 | 3.900000e+00 |    Inf | unknown

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes      : 83
Primal Bound       : +3.90000000000000e+00 (1 solutions)
Dual Bound         : +3.90000000000000e+00
Gap                : 0.00 %
     28 constraints of type <indicator>
transformed objective value is always integral (scale: 0.05)
Presolving Time: 0.00

 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 |    22 |     - |  3052k |   0 |  91 | 100 |  44 |   0 |  0 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    26 |     - |  3067k |   0 |  91 | 100 |  47 |   3 |  1 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    28 |     - |  3067k |   0 |  91 | 100 |  49 |   5 |  2 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     0 |    30 |     - |  3067k |   0 |  91 | 100 |  50 |   6 |  3 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown
  0.0s|     1 |     2 |    33 |     - |  3067k |   0 |  91 | 100 |  50 |   6 |  5 |   0 |   0 | 0.000000e+00 |      --      |    Inf | unknown

SCIP Status        : problem is solved [infeasible]
Solving Time (sec) : 0.00
Solving Nodes      : 47
Primal Bound       : +1.00000000000000e+20 (0 solutions)
Dual Bound         : +1.00000000000000e+20
Gap                : 0.00 %
matbesancon commented 2 years ago

Thanks a lot, I confirm I can reproduce this with the LP file (the error does not appear with the MPS on my side)

VonAlphaBisZulu commented 2 years ago

However, I have to say that PySCIPOpt does a terrible job at catching errors. Virtually every bit from SCIP that goes into the error stream kills your Python program, which makes debugging very tedious. The PySCIPOpt documentation is minimalistic and adds only very little to the SCIP docs.

matbesancon commented 2 years ago

Sorry, for completeness:

What is the "expected" status for this problem?

VonAlphaBisZulu commented 2 years ago

Optimal (minimal) with value 3 (just take the solution of SCIP 8.0.0 if unsure) Example vector:

x000 = 0.0
x001 = 0.0
x002 = 0.0
x003 = 0.0
x004 = 0.0
x005 = 1.0
x006 = 1.0
x007 = 0.0
x008 = 0.0
x009 = 0.0
x010 = 0.0
x011 = 0.0
x012 = 0.0
x013 = 0.0
x014 = 1.0
x015 = 1.0
x016 = 1.0
x017 = 1.0
x018 = 1.0
x019 = 1.0
x020 = 1.0
x021 = 0.0
x022 = 1.0
x023 = 0.0
x024 = 1.0
x025 = 0.0
x026 = 0.0
x027 = 2.0
x028 = 0.0
x029 = 0.0
x030 = 2.0
x031 = 0.0
x032 = 0.0
x033 = 0.0
x034 = 0.0
x035 = 0.0
x036 = 0.0
x037 = 0.0
x038 = 0.0
x039 = 0.0
x040 = 0.0
x041 = 0.0
x042 = 0.0
x043 = 0.0
x044 = 0.0
x045 = 0.0
x046 = 0.0
x047 = 0.0
x048 = 0.0
x049 = 0.0
x050 = 0.0
x051 = 0.0
x052 = 0.0
x053 = 0.0
x054 = 0.8
x055 = 0.0
x056 = 0.0
x057 = 0.0
x058 = 4.5
x059 = 4.5
x060 = 0.0
x061 = 0.0
x062 = 0.0
x063 = 4.5
x064 = 0.0
x065 = 0.0
x066 = 0.0
x067 = 9.0
x068 = 4.5
x069 = 4.5
x070 = 0.0
x071 = 4.5
x072 = 0.0
x073 = 0.0
x074 = 0.0
x075 = 0.0
x076 = 0.0
x077 = 0.0
x078 = 0.0
x079 = 0.0
x080 = 0.0
x081 = 0.0
x082 = 0.0
x083 = 2.0
x084 = 0.0
x085 = 0.0
x086 = 0.0
x087 = 0.0
x088 = 2.0
x089 = 0.0
x090 =-2.0
x091 = 0.0
x092 = 0.0
x093 = 0.0
x094 = 0.0
x095 = 0.0
x096 = 0.0
x097 = 0.0
x098 = 0.0
x099 = 0.0
x100 = 0.0
x101 = 0.0
x102 = 0.0
x103 = 0.0
x104 = 2.0
matbesancon commented 2 years ago

Thanks!

matbesancon commented 2 years ago

hi @VonAlphaBisZulu, SCIP 8.0.2 was released so I rechecked your issue, it seems that the LP file always finds a solution for me.

The MPS I now have a consistent failure for some reason. Can you check whether v8.0.2 fixed your issue?

VonAlphaBisZulu commented 2 years ago

SCIP 8.0.2 did not fix my issue:

For completeness, again the zip: scip_issue_23.zip containing the identical problem as mps and lp file.

Procedure to solve these:

  1. start scip
  2. read /path/to/scip_issue_23.mps or /path/to/scip_issue_23.lp
  3. optimize
Solving yields: File SCIP 8.0.0 SCIP 8.0.1 SCIP 8.0.2 SCIP 9.1.0
scip_issue_23.lp $\textcolor{green}{\text{optimal (optval=3) }}$ $\textcolor{orange}{\text{optimal (optval=3) but raises ELEAVE56 ERROR! }}$ $\textcolor{orange}{\text{optimal (optval=3) but raises ELEAVE56 ERROR! }}$ $\textcolor{orange}{\text{optimal (optval=3) but raises ELEAVE56 ERROR! }}$
scip_issue_23.mps $\textcolor{green}{\text{optimal (optval=3) }}$ $\textcolor{red}{\text{stalls at ELEAVE56 ERROR! }}$ $\textcolor{red}{\text{stalls at ELEAVE56 ERROR! }}$ $\textcolor{orange}{\text{optimal (optval=3) but raises ELEAVE56 ERROR! }}$
matbesancon commented 2 years ago

I get a different behavior and am wondering what could lead to this. How did you build SCIP here? With PaPILO? If you have the executable, you can just run the binary and show the header

VonAlphaBisZulu commented 2 years ago

I tested on, Windows 11 and WSL2 with Ubuntu 20.04. In both cases, I installed scip through conda, simply with the command: conda install -c conda-forge scip=8.0.2

Headers are in Windows (with python 3.7.12):

SCIP version 8.0.2 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: Soplex 6.0.2] [GitHash: 5f0473c4fb]
Copyright (C) 2002-2022 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)

External libraries: 
  Soplex 6.0.2         Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 45f6420d]
  CppAD 20180000.0     Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
  ZLIB 1.2.12          General purpose compression library by J. Gailly and M. Adler (zlib.net)
  AMPL/MP 4e2d45c4     AMPL .nl file reader library (github.com/ampl/mp)
  PaPILO 2.1.1         parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: 01fada2]
  bliss 0.77           Computing Graph Automorphism Groups by T. Junttila and P. Kaski (www.tcs.hut.fi/Software/bliss/)
  Ipopt 3.14.10        Interior Point Optimizer developed by A. Waechter et.al. (github.com/coin-or/Ipopt)

In WSL (with python 3.9.13):

SCIP version 8.0.2 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: Soplex 6.0.2] [GitHash: 5f0473c4fb]
Copyright (C) 2002-2022 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)

External libraries:
  Soplex 6.0.2         Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 45f6420d]
  CppAD 20180000.0     Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
  ZLIB 1.2.12          General purpose compression library by J. Gailly and M. Adler (zlib.net)
  GMP 6.2.1            GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
  ZIMPL 3.5.3          Zuse Institute Mathematical Programming Language developed by T. Koch (zimpl.zib.de)
  AMPL/MP 4e2d45c4     AMPL .nl file reader library (github.com/ampl/mp)
  PaPILO 2.1.1         parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: 01fada2]
  bliss 0.77           Computing Graph Automorphism Groups by T. Junttila and P. Kaski (www.tcs.hut.fi/Software/bliss/)
  Ipopt 3.14.10        Interior Point Optimizer developed by A. Waechter et.al. (github.com/coin-or/Ipopt)

Results in terms of errors and optimal values are identical in Windows and Linux for me.

matbesancon commented 2 years ago

ok interesting, in debug mode I systematically get

scip: /scratch/opt/mbesanco/scip-dev/scip/src/scip/cons_indicator.c:3419: presolRoundIndicator: Assertion `SCIPconsGetNUpgradeLocks(consdata->lincons) == 0' failed.

no matter the version

matbesancon commented 2 years ago

I'll check now what I get in release mode, it might be that the assert removed leads to something incorrect

matbesancon commented 2 years ago

this is a tough one, for a bit of swapping through version combinations, it seems the culprit for the warning is the new soplex version, not the new SCIP.

But it also seems that additional checks in debug modes were always throwing an error for the MPS, both for v800 and v802

VonAlphaBisZulu commented 2 years ago

As a mere user, I am not familiar with the SCIP code and building process. Just to express my thoughts: "ELEAVE56 ERROR! Tried to put a fixed column variable into the basis." should be caught and, if anything, raise a warning. The user has no way to avoid this, and when solving the identical problem from an LP-file, the solver continues after ELEAVE56. I'm sure you'll come up with a good solution.

VonAlphaBisZulu commented 2 years ago

Should I create an issue in the SoPlex repo?

matbesancon commented 2 years ago

Yes I agree that something should be caught by the solver, what it is exactly is still unclear to me. I tried something different here, taking the MPS file and reading it through JuMP, the model produced by JuMP is valid and produces the expected optimal solution without any error nor assert in debug

matbesancon commented 2 years ago

Should I create an issue in the SoPlex repo?

no need, I think something should be handled on the SCIP side in any case

matbesancon commented 2 years ago

the question the last point raises is whether the problem in the MPS is well-formed, in which case it is the model construction part that is at fault

matbesancon commented 1 year ago

@VonAlphaBisZulu the issue is solved with the LP file it seems, the MPS still causes the same issue, when using 8.0.3

cjrodriguez98 commented 1 year ago

Hello everyone!

I am having the same issue but I couldn't understand If you had found a solution.

Any help is welcomed

VonAlphaBisZulu commented 12 months ago

@cjrodriguez98 This problem has not been fixed yet (SCIP 8.1)

cjrodriguez98 commented 9 months ago

Hey! Just checking if any progress here o could we help in any way?

VonAlphaBisZulu commented 9 months ago

I think that problem persists. Is there anything we can do to help you, to fix it @matbesancon and @ambros-gleixner? Unfortunately, some applications rely on indicator constraints and this makes it impossible to use SCIP for those.

matbesancon commented 9 months ago

thanks for pinging us back on this, I assigned @leoneifler who is working on LP solving

VonAlphaBisZulu commented 4 months ago

Has there been any progress on this topic @leoneifler?

VonAlphaBisZulu commented 4 months ago

I did a bit more digging. It seems like this error is a SoPlex exception. The SoPlex error thrown literally says, "This should never happen". My guess is that SCIP fixes some branched binary variables and then attempts to put them in the basis for LP-solving with SoPlex. I am not familiar with the SCIP-SoPlex-interface and don't have all the debugging set up; so I haven't attempted to resolve this myself.

I wasn't able to find any parameters that allow me to avoid the problem.

svigerske commented 2 months ago

@Joao-Dionisio says we have to resolve this issue now, because we cannot use waiting for Leon as excuse anymore.

I tried to enable some debug output from SoPlex. This is what I managed to get:

[lpi_spx2.cpp:2375] debug: calling SoPlex solve(): 86 cols, 69 rows
DSHIFT02 shiftPvec: OK
starting value = -1.59000000e+02
starting shift = 0.00000000e+00
  L  |    0.0 |       0 |     1 | 0.00e+00 | 2.22e-01 |        1 | -1.59000000e+02
DLEAVE52 SPxSolverBase<R>::getLeaveVals() : col 70 : 1 -> -6 objChange: 0
DLEAVE55 SPxSolverBase<R>::getLeaveVals2(): row 43 : -2 -> 4 objChange: 0
Iteration: 0 updated objValue: 0 new value: 159 correct value: 159
DLEAVE52 SPxSolverBase<R>::getLeaveVals() : col 64 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 57 : -4 -> 2 objChange: 0
Iteration: 1 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 37 : 4 -> -2 objChange: 0
DLEAVE55 SPxSolverBase<R>::getLeaveVals2(): row 38 : -2 -> 4 objChange: 0
Iteration: 2 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 52 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 61 : -4 -> 2 objChange: 0
Iteration: 3 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 53 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 13 : -4 -> 2 objChange: 0
Iteration: 4 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 56 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 15 : -4 -> 2 objChange: 0
Iteration: 5 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 30 : 4 -> -2 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 63 : -1 -> 8 objChange: 0
Iteration: 6 updated objValue: 0 new value: 159 correct value: 159
DLEAVE52 SPxSolverBase<R>::getLeaveVals() : col 51 : 2 -> -4 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 53 : -4 -> 2 objChange: 0
Iteration: 7 updated objValue: 0 new value: 159 correct value: 159
DLEAVE52 SPxSolverBase<R>::getLeaveVals() : col 71 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 65 : -4 -> 2 objChange: 0
Iteration: 8 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 43 : 4 -> -2 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 55 : -4 -> 2 objChange: 0
Iteration: 9 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 24 : 4 -> -2 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 76 : -4 -> 2 objChange: 0
Iteration: 10 updated objValue: 0 new value: 159 correct value: 159
DLEAVE51 SPxSolverBase<R>::getLeaveVals() : row 51 : 1 -> -6 objChange: 0
DLEAVE57 SPxSolverBase<R>::getLeaveVals2(): col 11 : -1 -> 1 objChange: 0
Iteration: 11 updated objValue: 0 new value: 159 correct value: 159
DLEAVE52 SPxSolverBase<R>::getLeaveVals() : col 11 : 1 -> -6 objChange: 0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=11, lower=0, upper=0
DLEAVE59 rejectLeave()  : col 11: -6 -> 1
Caught exception <XLEAVE07 This should never happen.> while solving Real LP.
 --- unscaling external solution
DEBUG: skipping test on non optimal bases

Here is the backtrace:

#0  soplex::SPxSolverBase<double>::getLeaveVals2 (this=0x55555c3c2a20, leaveMax=-1e+100, enterId=..., enterBound=@0x7fffffffc298: 0, newUBbound=@0x7fffffffc2a0: 6.9533558070610999e-310, newLBbound=@0x7fffffffc2a8: 4.6355738660515747e-310, newCoPrhs=@0x7fffffffc2b0: 4.6355763020100284e-310, objChange=...)
    at lib/include/spxinc/soplex/leave.hpp:637
        idx = 11
        enterStat = soplex::SPxBasisBase<double>::Desc::P_FIXED
        __PRETTY_FUNCTION__ = "void soplex::SPxSolverBase<R>::getLeaveVals2(R, soplex::SPxId, R&, R&, R&, R&, soplex::StableSum<T>&) [with R = double]"
        ds = @0x55555c3c2cb8: {rowstat = {thesize = 69, themax = 82, data = 0x55555c48e720, memFactor = 1.2}, colstat = {thesize = 86, themax = 103, data = 0x55555c48e870, memFactor = 1.2}, stat = 0x55555c3c2cd0, costat = 0x55555c3c2cb8}
#1  0x0000555559840a70 in soplex::SPxSolverBase<double>::leave (this=0x55555c3c2a20, leaveIdx=37, polish=false) at lib/include/spxinc/soplex/leave.hpp:1042
        newVector = @0x55555c478048: {m_elem = 0x55555c47e4d0, memsize = 6, memused = 6}
        reject_treshold = 1e-10
        enterBound = 0
        newLBbound = 4.6355738660515747e-310
        newCoPrhs = 4.6355763020100284e-310
        newUBbound = 6.9533558070610999e-310
        __PRETTY_FUNCTION__ = "bool soplex::SPxSolverBase<R>::leave(int, bool) [with R = double]"
        instable = false
        leaveStat = soplex::SPxBasisBase<double>::Desc::D_FREE
        leaveId = {<soplex::DataKey> = {info = 1, idx = 11}, <No data fields>}
        none = {<soplex::DataKey> = {info = 0, idx = -1}, <No data fields>}
        leaveMax = -1e+100
        leavebound = 0
        leaveNum = 11
        objChange = {sum = 0, c = 0}
        enterVal = 0
        oldShift = 0
        enterId = {<soplex::DataKey> = {info = 1, idx = 11}, <No data fields>}
#2  0x00005555597099b3 in soplex::SPxSolverBase<double>::solve (this=0x55555c3c2a20, interrupt=0x55555c3c7042, polish=true) at lib/include/spxinc/soplex/spxsolve.hpp:863
        leaveCycleCount = 0
        leaveFacPivotCount = 0
        maxpricertol = 9.9999999999999995e-07
        minpricertol = 1e-08
        regulardesc = {rowstat = {thesize = 69, themax = 82, data = 0x55555c5b2750, memFactor = 1.2}, colstat = {thesize = 86, themax = 103, data = 0x55555c62fcc0, memFactor = 1.2}, stat = 0x7fffffffc4d8, costat = 0x7fffffffc4c0}
        __PRETTY_FUNCTION__ = "soplex::SPxSolverBase<R>::Status soplex::SPxSolverBase<R>::solve(volatile bool*, bool) [with R = double]"
        enterId = {<soplex::DataKey> = {info = 0, idx = -1}, <No data fields>}
        leaveNum = 37
        loopCount = 0
        minShift = 1e+100
        cycleCount = 0
        priced = false
        lastDelta = 1
        stallRefValue = -159
        stallRefShift = 0
        stallRefIter = -1
        stallNumRecovers = 0
        timesBasisWasStored = 0
        storeBasisFreqLog = true
        stop = false
        tightenedtype = soplex::SPxSolverBase<double>::LEAVE
        tightened = false
#3  0x00005555595e27ae in soplex::SoPlexBase<double>::_solveRealLPAndRecordStatistics (this=0x55555c3c2940, interrupt=0x55555c3c7042) at lib/include/spxinc/soplex.hpp:8572
        _hadBasis = true
        mintol = 9.9999999999999998e-13
#4  0x00005555595378de in soplex::SoPlexBase<double>::_preprocessAndSolveReal (this=0x55555c3c2940, applySimplifier=false, interrupt=0x55555c3c7042) at lib/include/spxinc/soplex/solvereal.hpp:359
        __PRETTY_FUNCTION__ = "void soplex::SoPlexBase<R>::_preprocessAndSolveReal(bool, volatile bool*) [with R = double]"
        copyLP = false
        simplificationStatus = soplex::SPxSimplifier<double>::OKAY
#5  0x000055555946514f in soplex::SoPlexBase<double>::_optimize (this=0x55555c3c2940, interrupt=0x55555c3c7042) at lib/include/spxinc/soplex/solvereal.hpp:84
        __PRETTY_FUNCTION__ = "void soplex::SoPlexBase<R>::_optimize(volatile bool*) [with R = double]"
#6  0x00005555593949f7 in soplex::SoPlexBase<double>::optimize (this=0x55555c3c2940, interrupt=0x55555c3c7042) at lib/include/spxinc/soplex.hpp:10069
        __PRETTY_FUNCTION__ = "typename soplex::SPxSolverBase<R>::Status soplex::SoPlexBase<R>::optimize(volatile bool*) [with R = double; typename soplex::SPxSolverBase<R>::Status = soplex::SPxSolverBase<double>::Status]"
#7  0x000055555934aeec in SPxSCIP::trySolve (this=0x55555c3c2940, printwarning=true) at src/lpi/lpi_spx2.cpp:485
        timespent = 4.6355762593836255e-310
        timelimit = 4.6355737628435834e-310
        __PRETTY_FUNCTION__ = "void SPxSCIP::trySolve(bool)"
#8  0x000055555934c20b in SPxSCIP::doSolve (this=0x55555c3c2940, printwarning=true) at src/lpi/lpi_spx2.cpp:545
        verbosity = soplex::SPxOut::INFO3
        spxStatus = 32767
        __PRETTY_FUNCTION__ = "soplex::SPxSolverBase<double>::Status SPxSCIP::doSolve(bool)"
#9  0x00005555591db737 in spxSolve (lpi=0x55555c384b20) at src/lpi/lpi_spx2.cpp:2407
        __PRETTY_FUNCTION__ = "SCIP_RETCODE spxSolve(SCIP_LPI*)"
        verbosity = soplex::SPxOut::INFO1
        status = soplex::SPxSolverBase<double>::UNBOUNDED
#10 0x00005555591dc3df in SCIPlpiSolveDual (lpi=0x55555c384b20) at src/lpi/lpi_spx2.cpp:2459
        __PRETTY_FUNCTION__ = "SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI*)"

@ambros-gleixner Is that something that helps to see where things went wrong?

Even though there is this exception thrown, the message printed, and SoPlex aborting the solve, SCIP seems to be able to recover and continue solving:

ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=11, lower=0, upper=0
DLEAVE59 rejectLeave()  : col 11: -6 -> 1
Caught exception <XLEAVE07 This should never happen.> while solving Real LP.
 --- unscaling external solution
DEBUG: skipping test on non optimal bases

SoPlex status       : unknown
Solving time (sec)  : 0.00
Iterations          : 12
Objective value     : -1.59000000e+02

[lpi_spx2.cpp:2408] debug:  -> SoPlex status: -1, basis status: 1
[lpi_spx2.cpp:3440] debug: calling SCIPlpiGetIterations()
[lpi_spx2.cpp:4252] debug: calling SCIPlpiGetIntpar()
[lpi_spx2.cpp:4327] debug: calling SCIPlpiSetIntpar()
(node 35) numerical troubles in LP 27 -- solve again with dual simplex without scaling
[...]
Finished solving (status=1, iters=10, leave=10, enter=0, flips=0, objValue=-1.59000000e+02)
  L  |    0.0 |      10 |     2 | 0.00e+00 | 0.00e+00 |        0 | -1.59000000e+02

SoPlex status       : problem is solved [optimal]
Solving time (sec)  : 0.00
Iterations          : 10
Objective value     : -1.59000000e+02

I get 3 as optimal value, the same I get with SCIP using CPLEX. (thus confirming https://github.com/scipopt/scip/issues/23#issuecomment-1279019063)

DominikKamp commented 2 months ago

But for related instances like

scipissue.txt

this does not terminate after

ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=63, lower=-0, upper=0

for the current bugfix version

SCIP version 9.1.1 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: Soplex 7.1.1] [GitHash: 8d13c29f3e]
Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB)

External libraries: 
  Readline EditLine w  GNU library for command line editing (gnu.org/s/readline)
  Soplex 7.1.1         Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 9c8f43d4]
  CppAD 20180000.0     Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
  ZLIB 1.2.12          General purpose compression library by J. Gailly and M. Adler (zlib.net)
  GMP 6.3.0            GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
  ZIMPL 3.6.1          Zuse Institute Mathematical Programming Language developed by T. Koch (zimpl.zib.de)
  AMPL/MP 690e9e7      AMPL .nl file reader library (github.com/ampl/mp)
  PaPILO 2.3.1         parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: 986b7b74]
  Nauty 2.8.8          Computing Graph Automorphism Groups by Brendan D. McKay (users.cecs.anu.edu.au/~bdm/nauty)
  sassy 1.1            Symmetry preprocessor by Markus Anders (github.com/markusa4/sassy)
  Ipopt 3.14.16        Interior Point Optimizer developed by A. Waechter et.al. (github.com/coin-or/Ipopt)

as mentioned in https://github.com/scipopt/scip/issues/23#issuecomment-1279019063 as well, which might be the crucial aspect here.

VonAlphaBisZulu commented 2 months ago

Thank you for taking care of it!