Skip to content

Commit 7bc73d2

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents ea08dee + 22fd686 commit 7bc73d2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/scip/cons_linear.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7571,7 +7571,7 @@ SCIP_RETCODE separateCons(
75717571
SCIP_CALL( addRelaxation(scip, cons, cutoff) );
75727572
(*ncuts)++;
75737573
}
7574-
else if( !SCIPconsIsModifiable(cons) && separatecards )
7574+
else if( !SCIPconsIsModifiable(cons) && separatecards && consdata->nvars > 0 )
75757575
{
75767576
/* relax linear constraint into knapsack constraint and separate lifted cardinality cuts */
75777577
if( !separateall && sol == NULL )

src/scip/sepa_interminor.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,7 @@ SCIP_RETCODE separateDeterminant(
15701570
SCIP_Real solxil;
15711571
SCIP_Real solxjk;
15721572
SCIP_Real solxjl;
1573+
SCIP_Real viol;
15731574

15741575
ncols = SCIPgetNLPCols(scip);
15751576
nrows = SCIPgetNLPRows(scip);
@@ -1646,10 +1647,15 @@ SCIP_RETCODE separateDeterminant(
16461647
/* merge coefficients that belong to same variable */
16471648
SCIPmergeRowprepTerms(scip, rowprep);
16481649

1649-
SCIP_CALL( SCIPcleanupRowprep(scip, rowprep, NULL, sepadata->mincutviol, NULL, &success) );
1650+
SCIP_CALL( SCIPcleanupRowprep2(scip, rowprep, NULL, SCIPgetHugeValue(scip), &success) );
16501651

1651-
/* if cleanup was successfull, create row out of rowprep and add it */
1652-
if( success )
1652+
if( !success )
1653+
goto CLEANUP;
1654+
1655+
viol = SCIPgetRowprepViolation(scip, rowprep, NULL, &success);
1656+
1657+
/* if cut is violated, create row out of rowprep and add it */
1658+
if( success && viol >= sepadata->mincutviol )
16531659
{
16541660
SCIP_ROW* row;
16551661
SCIP_Bool infeasible;

0 commit comments

Comments
 (0)