Skip to content

Commit 640603d

Browse files
Merge branch '3462_fix_individual_donotaggr_in_setppc' into 'v80-bugfix'
fix problems with forbidden aggregation for individual vars See merge request integer/scip!2963
2 parents 273138d + b768907 commit 640603d

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

Diff for: CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Fixed bugs
3636
- fixed that the implication presolver tried to aggregate or tighten bounds of multiaggregated variables
3737
- fixed a sign check in detection of linear constraints that are parallel to the objective
3838
- fixed bug in Clp and lpi_clp with missing basis information when calling the barrier with crossover; needs new Clp version
39+
- do not assume aggregation is successful in cons_setppc.c
3940

4041
Miscellaneous
4142
-------------

Diff for: src/scip/cons_setppc.c

+25-21
Original file line numberDiff line numberDiff line change
@@ -5519,11 +5519,11 @@ SCIP_RETCODE multiAggregateBinvar(
55195519
{
55205520
SCIP_Bool redundant;
55215521

5522-
SCIPdebugMsg(scip, "aggregating %s = 1 - %s\n", SCIPvarGetName(vars[pos]), SCIPvarGetName(vars[nvars - pos - 1]));
5523-
55245522
/* perform aggregation on variables resulting from a set-packing constraint */
55255523
SCIP_CALL( SCIPaggregateVars(scip, vars[pos], vars[nvars - pos - 1], 1.0, 1.0, 1.0, infeasible, &redundant, aggregated) );
5526-
assert(*infeasible || *aggregated);
5524+
5525+
if( *aggregated )
5526+
SCIPdebugMsg(scip, "aggregated %s = 1 - %s\n", SCIPvarGetName(vars[pos]), SCIPvarGetName(vars[nvars - pos - 1]));
55275527

55285528
return SCIP_OKAY;
55295529
}
@@ -5832,8 +5832,6 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58325832

58335833
if( nuplocks == 1 && objval <= 0 )
58345834
{
5835-
SCIPdebugMsg(scip, "dualpresolve, aggregating %s + %s = 1, in set-packing constraint %s\n", SCIPvarGetName(var), SCIPvarGetName(consdata->vars[1]), SCIPconsGetName(cons));
5836-
58375835
/* perform aggregation on variables resulting from a set-packing constraint */
58385836
SCIP_CALL( SCIPaggregateVars(scip, var, consdata->vars[1], 1.0, 1.0, 1.0, &infeasible, &redundant, &aggregated) );
58395837

@@ -5843,11 +5841,14 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58435841
break;
58445842
}
58455843

5846-
assert(aggregated);
5847-
++(*naggrvars);
5844+
if( aggregated )
5845+
{
5846+
SCIPdebugMsg(scip, "dualpresolve, aggregated %s + %s = 1, in set-packing constraint %s\n", SCIPvarGetName(var), SCIPvarGetName(consdata->vars[1]), SCIPconsGetName(cons));
5847+
++(*naggrvars);
58485848

5849-
SCIP_CALL( SCIPdelCons(scip, cons) );
5850-
++(*ndelconss);
5849+
SCIP_CALL( SCIPdelCons(scip, cons) );
5850+
++(*ndelconss);
5851+
}
58515852

58525853
continue;
58535854
}
@@ -5863,8 +5864,6 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58635864

58645865
if( nuplocks == 1 && objval <= 0 )
58655866
{
5866-
SCIPdebugMsg(scip, "dualpresolve, aggregating %s + %s = 1, in set-packing constraint %s\n", SCIPvarGetName(var), SCIPvarGetName(consdata->vars[0]), SCIPconsGetName(cons));
5867-
58685867
/* perform aggregation on variables resulting from a set-packing constraint */
58695868
SCIP_CALL( SCIPaggregateVars(scip, var, consdata->vars[0], 1.0, 1.0, 1.0, &infeasible, &redundant, &aggregated) );
58705869

@@ -5873,11 +5872,15 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58735872
*cutoff = TRUE;
58745873
break;
58755874
}
5876-
assert(aggregated);
5877-
++(*naggrvars);
58785875

5879-
SCIP_CALL( SCIPdelCons(scip, cons) );
5880-
++(*ndelconss);
5876+
if( aggregated )
5877+
{
5878+
SCIPdebugMsg(scip, "dualpresolve, aggregated %s + %s = 1, in set-packing constraint %s\n", SCIPvarGetName(var), SCIPvarGetName(consdata->vars[0]), SCIPconsGetName(cons));
5879+
++(*naggrvars);
5880+
5881+
SCIP_CALL( SCIPdelCons(scip, cons) );
5882+
++(*ndelconss);
5883+
}
58815884

58825885
continue;
58835886
}
@@ -5887,8 +5890,6 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58875890
{
58885891
SCIP_Bool redundant;
58895892

5890-
SCIPdebugMsg(scip, "aggregating %s + %s = 1, in set-partition constraint %s\n", SCIPvarGetName(consdata->vars[0]), SCIPvarGetName(consdata->vars[1]), SCIPconsGetName(cons));
5891-
58925893
/* perform aggregation on variables resulting from a set-partitioning constraint */
58935894
SCIP_CALL( SCIPaggregateVars(scip, consdata->vars[0], consdata->vars[1], 1.0, 1.0, 1.0, &infeasible, &redundant, &aggregated) );
58945895

@@ -5898,11 +5899,14 @@ SCIP_RETCODE removeDoubleAndSingletonsAndPerformDualpresolve(
58985899
break;
58995900
}
59005901

5901-
assert(aggregated);
5902-
++(*naggrvars);
5902+
if( aggregated )
5903+
{
5904+
SCIPdebugMsg(scip, "aggregated %s + %s = 1, in set-partition constraint %s\n", SCIPvarGetName(consdata->vars[0]), SCIPvarGetName(consdata->vars[1]), SCIPconsGetName(cons));
5905+
++(*naggrvars);
59035906

5904-
SCIP_CALL( SCIPdelCons(scip, cons) );
5905-
++(*ndelconss);
5907+
SCIP_CALL( SCIPdelCons(scip, cons) );
5908+
++(*ndelconss);
5909+
}
59065910

59075911
continue;
59085912
}

0 commit comments

Comments
 (0)