Skip to content

Commit ef982c8

Browse files
committed
Merge branch '3911-fix-scip-src-scip-lp-c-11417-scip_retcode-lplexdualsimplex-scip_lp-scip_set-scip_stat-unsigned-int' into 'v92-bugfix'
Resolve "scip/src/scip/lp.c:11417: SCIP_RETCODE lpLexDualSimplex(SCIP_LP *, SCIP_SET *, SCIP_STAT *, unsigned int, unsigned int, unsigned int *): Assertion `SCIPlpiIsOptimal(lp->lpi)' failed" See merge request integer/scip!3843
2 parents 03c1306 + 296abf4 commit ef982c8

File tree

5 files changed

+62
-2
lines changed

5 files changed

+62
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Fixed bugs
99
- avoid hashmap key error in removal of doubletons and singletons in dual presolve of setppc constraints by skipping tripleton locks
1010
- when upgrading to xor constraint require parity variable to be enforced integral
1111
- provide the depth of the applied effective root with SCIPtreeGetEffectiveRootDepth() to avert invalid globalization of constraint set changes
12+
- disable objective limit during lexicographic dual minimization to keep feasibility status
1213

1314
Build system
1415
------------

check/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ set(pairs_Issue
511511
# "instances/Issue/3842.cip\;-16812.7692740365\;default"
512512
"instances/Issue/3870.cip\;5133546551065818\;default"
513513
"instances/Issue/3908.cip\;-20317.1313131313\;subrestart"
514+
"instances/Issue/3911.cip\;-30386.2338470598\;lexdual"
514515
)
515516

516517
#

check/coverage/settings/lexdual.set

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lp/lexdualalgo = TRUE
2+
lp/lexdualstalling = FALSE

check/instances/Issue/3911.cip

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
STATISTICS
2+
Problem name : seed
3+
Variables : 19 (0 binary, 10 integer, 0 implicit integer, 9 continuous)
4+
Constraints : 0 initial, 17 maximal
5+
OBJECTIVE
6+
Sense : minimize
7+
VARIABLES
8+
[integer] <x3>: obj=0, original bounds=[-200,200]
9+
[integer] <x19>: obj=0, original bounds=[-200,200]
10+
[integer] <x16>: obj=45, original bounds=[-200,200]
11+
[integer] <x15>: obj=-67, original bounds=[-200,200]
12+
[integer] <x14>: obj=35, original bounds=[-200,200]
13+
[integer] <x12>: obj=33, original bounds=[-200,200]
14+
[integer] <x10>: obj=45, original bounds=[-200,200]
15+
[integer] <x1>: obj=-73, original bounds=[-200,200]
16+
[integer] <x0>: obj=46, original bounds=[-200,200]
17+
[integer] <x6>: obj=0, original bounds=[-200,200]
18+
[continuous] <x18>: obj=82, original bounds=[-200,200]
19+
[continuous] <x13>: obj=81, original bounds=[-200,200]
20+
[continuous] <x2>: obj=-66, original bounds=[-200,200]
21+
[continuous] <x11>: obj=0, original bounds=[-200,200]
22+
[continuous] <x4>: obj=0, original bounds=[-200,200]
23+
[continuous] <x5>: obj=0, original bounds=[-200,200]
24+
[continuous] <x17>: obj=-63, original bounds=[-200,200]
25+
[continuous] <x7>: obj=43, original bounds=[-200,200]
26+
[continuous] <x8>: obj=0, original bounds=[-200,200]
27+
CONSTRAINTS
28+
[linear] <_C1>: +53.04<x3>[I] +71.89<x19>[I] -0.51<x16>[I] +66.37<x15>[I] -16.04<x14>[I] +0.24<x12>[I] -87.12<x10>[I] +82.18<x1>[I] +76.74<x0>[I] -12.47<x6>[I] -2.55<x18>[C] -48.08<x13>[C] -11.36<x2>[C] -92.81<x11>[C] -73.04<x4>[C] -52.83<x5>[C] -79.84<x17>[C] +60.41<x7>[C] +88.47<x8>[C] <= 11066.88;
29+
[linear] <_C6>: -21<x3>[I] +87<x19>[I] +48<x16>[I] +20<x15>[I] +62<x14>[I] -2<x12>[I] -17<x10>[I] -93<x1>[I] -35<x0>[I] +7<x6>[I] +78<x18>[C] -82<x13>[C] +72<x2>[C] -12<x11>[C] -64<x4>[C] -69<x5>[C] +81<x17>[C] +10<x7>[C] -82<x8>[C] <= 9556;
30+
[linear] <_C32>: -53.41<x3>[I] +31.39<x19>[I] +46.55<x16>[I] -67.59<x15>[I] -90.57<x14>[I] +85.21<x12>[I] +28.46<x10>[I] -6.49<x1>[I] -13.31<x0>[I] -46.45<x6>[I] -82.12<x18>[C] +6.86<x13>[C] -24.06<x2>[C] -81.35<x11>[C] +87.27<x4>[C] +58.41<x5>[C] +31.95<x17>[C] +8.98<x7>[C] +83.06<x8>[C] >= 4921.49;
31+
[linear] <_C38>: -28<x3>[I] -43<x19>[I] +52<x16>[I] +20<x15>[I] +90<x14>[I] -91<x12>[I] +30<x10>[I] -34<x1>[I] +16<x0>[I] +43<x6>[I] +41<x18>[C] -6<x13>[C] +72<x2>[C] -71<x11>[C] -41<x4>[C] +15<x5>[C] +76<x17>[C] +70<x7>[C] -92<x8>[C] >= -5663;
32+
[linear] <_C44>: -14<x3>[I] -3<x19>[I] -64<x16>[I] -32<x15>[I] -58<x14>[I] +24<x12>[I] -37<x10>[I] +58<x1>[I] -60<x0>[I] +<x6>[I] -8<x18>[C] +51<x13>[C] +62<x2>[C] -79<x11>[C] -54<x4>[C] +20<x5>[C] +59<x17>[C] -70<x7>[C] -79<x8>[C] <= 12294;
33+
[linear] <_C47>: +21.94<x3>[I] -98.5<x19>[I] +73<x16>[I] +76.23<x15>[I] -46.96<x14>[I] -43.12<x12>[I] -97.32<x10>[I] +65.37<x1>[I] +65.58<x0>[I] +42.61<x6>[I] +94.21<x18>[C] -32.18<x13>[C] +48.12<x2>[C] +48.61<x11>[C] +70.34<x4>[C] +60.9<x5>[C] -85.59<x17>[C] -11.59<x7>[C] -21.49<x8>[C] >= 15621.22;
34+
[linear] <_C48>: -62.23<x3>[I] +67.46<x19>[I] +59.55<x16>[I] +59.76<x15>[I] +10.48<x14>[I] -26.57<x12>[I] -71.3<x10>[I] -35.85<x1>[I] +16.37<x0>[I] -44.44<x6>[I] -48.01<x18>[C] -94.01<x13>[C] +73.95<x2>[C] +74.94<x11>[C] +11.76<x4>[C] -0.21<x5>[C] -66.46<x17>[C] +86.43<x7>[C] +47.03<x8>[C] <= 19685.14;
35+
[linear] <_C59>: +59.47<x3>[I] +59.93<x19>[I] +40.29<x16>[I] +61.57<x15>[I] +6<x14>[I] -27.57<x12>[I] -52.34<x10>[I] -19.45<x1>[I] +92.08<x0>[I] +10.32<x6>[I] +72.88<x18>[C] +42.05<x13>[C] -61.62<x2>[C] +49.14<x11>[C] +32.13<x4>[C] +97.53<x5>[C] -45.31<x17>[C] +25.31<x7>[C] -23.03<x8>[C] >= 11872.66;
36+
[linear] <_C61>: -66.76<x3>[I] +82.7<x19>[I] -50.77<x16>[I] -5.3<x15>[I] -43.24<x14>[I] +73.53<x12>[I] -55.23<x10>[I] +31.59<x1>[I] -45.31<x0>[I] -51.18<x6>[I] +18.9<x18>[C] +17.72<x13>[C] -59.09<x2>[C] -60.31<x11>[C] -24.16<x4>[C] -90.31<x5>[C] -46.55<x17>[C] +62.58<x7>[C] -15.87<x8>[C] >= 8678.63;
37+
[linear] <_C66>: -12<x3>[I] +82.55<x19>[I] +1.05<x16>[I] -39.52<x15>[I] -44.51<x14>[I] -94.63<x12>[I] +74.86<x10>[I] -77.6<x1>[I] +31.22<x0>[I] -43.52<x6>[I] -35.44<x18>[C] -10.86<x13>[C] +47.88<x2>[C] -38.41<x11>[C] -98.63<x4>[C] +4.81<x5>[C] -42.14<x17>[C] -44.05<x7>[C] -7.14<x8>[C] == -9223.64;
38+
[linear] <_C83>: +67.95<x3>[I] +76.43<x19>[I] +5.63<x16>[I] -42.04<x15>[I] -64.43<x14>[I] -84.78<x12>[I] -70.51<x10>[I] +3.16<x1>[I] +99.36<x0>[I] +64.06<x6>[I] +81.17<x18>[C] -32.73<x13>[C] +18.55<x2>[C] -54.85<x11>[C] -4.52<x4>[C] -19.34<x5>[C] -96.89<x17>[C] +37.68<x7>[C] +72.83<x8>[C] >= 3720.45;
39+
[linear] <_C94>: -62<x3>[I] -14<x19>[I] -52<x16>[I] -86<x15>[I] +76<x14>[I] +18<x12>[I] +97<x10>[I] -25<x1>[I] -21<x0>[I] +13<x6>[I] -12<x18>[C] +31<x13>[C] -22<x2>[C] -97<x11>[C] -83<x4>[C] +40<x5>[C] +21<x17>[C] +84<x7>[C] -93<x8>[C] <= 13670;
40+
[linear] <_C95>: -37.72<x3>[I] +51.12<x19>[I] +33.21<x16>[I] +39.52<x15>[I] -91.45<x14>[I] -88<x12>[I] -53.76<x10>[I] +65.43<x1>[I] -39.93<x0>[I] +72.9<x6>[I] +15.76<x18>[C] -57.03<x13>[C] -15.17<x2>[C] +92.34<x11>[C] -61.19<x4>[C] +16.76<x5>[C] +39.63<x17>[C] -78.65<x7>[C] -20.09<x8>[C] <= 8911.73;
41+
[linear] <_C102>: +56.41<x3>[I] -46.57<x19>[I] -24.77<x16>[I] +16.42<x15>[I] +72.8<x14>[I] -8.17<x12>[I] -94.19<x10>[I] -4.95<x1>[I] -79.47<x0>[I] -22.21<x6>[I] -1.15<x18>[C] -34.4<x13>[C] -20.24<x2>[C] +91.42<x11>[C] -43.47<x4>[C] +21.22<x5>[C] -71.69<x17>[C] +58.94<x7>[C] == 10293.2797236906;
42+
[linear] <_C104>: -42.9<x3>[I] +3.88<x19>[I] -80.87<x16>[I] +80.69<x15>[I] -41.65<x14>[I] -86.74<x12>[I] +43.3<x10>[I] -29.08<x1>[I] +31.56<x0>[I] -88.53<x6>[I] -52.79<x18>[C] -36.67<x13>[C] -60.21<x2>[C] -74.1<x11>[C] +22.81<x4>[C] +53.38<x5>[C] -43.76<x17>[C] -12.69<x7>[C] -7.97<x8>[C] == -7087.74;
43+
[linear] <_C119>: +41<x3>[I] +12<x19>[I] -76<x16>[I] -73<x15>[I] -18<x14>[I] -52<x12>[I] +89<x10>[I] +58<x1>[I] +72<x0>[I] +8<x6>[I] -86<x18>[C] +51<x13>[C] +2<x2>[C] +82<x11>[C] -45<x4>[C] -49<x5>[C] +56<x17>[C] -75<x7>[C] -41<x8>[C] <= -14336;
44+
[linear] <_C120>: -42<x3>[I] -64<x19>[I] +58<x16>[I] -19<x15>[I] -96<x14>[I] -52<x12>[I] -69<x10>[I] -71<x1>[I] -63<x0>[I] +77<x6>[I] +53<x18>[C] -19<x13>[C] -20<x2>[C] +32<x11>[C] -30<x4>[C] +6<x5>[C] -64<x17>[C] -48<x7>[C] -48<x8>[C] >= -19452;
45+
END

src/scip/lp.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10783,7 +10783,6 @@ SCIP_RETCODE lpLexDualSimplex(
1078310783
/* search for lexicographically minimal optimal solution */
1078410784
if( !lp->diving && !lp->probing && SCIPlpiIsOptimal(lp->lpi) )
1078510785
{
10786-
SCIP_Bool chooseBasic;
1078710786
SCIP_Real* primsol;
1078810787
SCIP_Real* dualsol;
1078910788
SCIP_Real* redcost;
@@ -10805,6 +10804,8 @@ SCIP_RETCODE lpLexDualSimplex(
1080510804
int* indrow;
1080610805
int* indallcol;
1080710806
int* indallrow;
10807+
SCIP_Bool chooseBasic;
10808+
SCIP_Bool success;
1080810809
int nDualDeg;
1080910810
int r, c;
1081010811
int cntcol;
@@ -10932,6 +10933,10 @@ SCIP_RETCODE lpLexDualSimplex(
1093210933
}
1093310934
#endif
1093410935

10936+
/* disable objective limit */
10937+
SCIP_CALL( lpSetRealpar(lp, SCIP_LPPAR_OBJLIM, SCIPlpiInfinity(lp->lpi), &success) );
10938+
assert(success);
10939+
1093510940
/* perform lexicographic rounds */
1093610941
pos = -1;
1093710942
nruns = 0;
@@ -11170,7 +11175,7 @@ SCIP_RETCODE lpLexDualSimplex(
1117011175
SCIP_CALL( SCIPlpiChgSides(lp->lpi, lp->nlpirows, indallrow, oldlhs, oldrhs) );
1117111176
SCIP_CALL( SCIPlpiChgObj(lp->lpi, lp->nlpicols, indallcol, oldobj) );
1117211177

11173-
/* resolve to update solvers internal data structures - should only produce few pivots - is this needed? */
11178+
/* resolve to update solvers internal data structures - should only produce few pivots */
1117411179
retcode = SCIPlpiSolveDual(lp->lpi);
1117511180
if( retcode == SCIP_LPERROR )
1117611181
{
@@ -11182,6 +11187,12 @@ SCIP_RETCODE lpLexDualSimplex(
1118211187
SCIP_CALL( retcode );
1118311188
}
1118411189
assert(SCIPlpiIsOptimal(lp->lpi));
11190+
11191+
/* reset objective limit */
11192+
SCIP_CALL( lpSetRealpar(lp, SCIP_LPPAR_OBJLIM, lp->lpiobjlim, &success) );
11193+
assert(success);
11194+
11195+
/* add LP iterations */
1118511196
SCIP_CALL( SCIPlpGetIterations(lp, &iterations) );
1118611197
lexIterations += iterations;
1118711198

0 commit comments

Comments
 (0)