84#define CONSHDLR_NAME "and"
85#define CONSHDLR_DESC "constraint handler for AND-constraints: r = and(x1, ..., xn)"
86#define CONSHDLR_SEPAPRIORITY +850100
87#define CONSHDLR_ENFOPRIORITY -850100
88#define CONSHDLR_CHECKPRIORITY -850100
89#define CONSHDLR_SEPAFREQ 1
90#define CONSHDLR_PROPFREQ 1
91#define CONSHDLR_EAGERFREQ 100
93#define CONSHDLR_MAXPREROUNDS -1
94#define CONSHDLR_DELAYSEPA FALSE
95#define CONSHDLR_DELAYPROP FALSE
96#define CONSHDLR_NEEDSCONS TRUE
98#define CONSHDLR_PRESOLTIMING (SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_EXHAUSTIVE)
99#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
101#define EVENTHDLR_NAME "and"
102#define EVENTHDLR_DESC "bound change event handler for AND-constraints"
104#define DEFAULT_PRESOLPAIRWISE TRUE
105#define DEFAULT_LINEARIZE FALSE
106#define DEFAULT_ENFORCECUTS TRUE
107#define DEFAULT_AGGRLINEARIZATION FALSE
108#define DEFAULT_UPGRRESULTANT FALSE
109#define DEFAULT_DUALPRESOLVING TRUE
111#define HASHSIZE_ANDCONS 500
112#define DEFAULT_PRESOLUSEHASHING TRUE
113#define NMINCOMPARISONS 200000
114#define MINGAINPERNMINCOMPARISONS 1e-06
137 unsigned int propagated:1;
138 unsigned int nofixedzero:1;
139 unsigned int impladded:1;
140 unsigned int opimpladded:1;
141 unsigned int sorted:1;
142 unsigned int changed:1;
143 unsigned int merged:1;
147struct SCIP_ConshdlrData
222 (*conshdlrdata)->eventhdlr = eventhdlr;
304 for(
i = 0;
i < consdata->nvars; ++
i )
330 for(
i = 0;
i < consdata->nvars; ++
i )
350 assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);
351 assert(watchedvar1 != -1 || watchedvar2 == -1);
352 assert(watchedvar1 == -1 || (0 <= watchedvar1 && watchedvar1 < consdata->
nvars));
353 assert(watchedvar2 == -1 || (0 <= watchedvar2 && watchedvar2 < consdata->
nvars));
356 if( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )
360 tmp = consdata->watchedvar1;
361 consdata->watchedvar1 = consdata->watchedvar2;
362 consdata->watchedvar2 = tmp;
363 tmp = consdata->filterpos1;
364 consdata->filterpos1 = consdata->filterpos2;
365 consdata->filterpos2 = tmp;
367 assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);
368 assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);
371 if( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )
373 assert(consdata->filterpos1 != -1);
376 if( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )
378 assert(consdata->filterpos2 != -1);
383 if( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )
387 if( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )
393 consdata->watchedvar1 = watchedvar1;
394 consdata->watchedvar2 = watchedvar2;
408 assert(consdata->nvars <= consdata->varssize);
410 if( num > consdata->varssize )
416 consdata->varssize = newsize;
418 assert(num <= consdata->varssize);
442 (*consdata)->resvar = resvar;
443 (*consdata)->rows =
NULL;
444 (*consdata)->aggrrow =
NULL;
445 (*consdata)->nlrow =
NULL;
446 (*consdata)->nvars =
nvars;
447 (*consdata)->varssize =
nvars;
448 (*consdata)->nrows = 0;
449 (*consdata)->watchedvar1 = -1;
450 (*consdata)->watchedvar2 = -1;
451 (*consdata)->filterpos1 = -1;
452 (*consdata)->filterpos2 = -1;
453 (*consdata)->propagated =
FALSE;
454 (*consdata)->nofixedzero =
FALSE;
455 (*consdata)->impladded =
FALSE;
456 (*consdata)->opimpladded =
FALSE;
457 (*consdata)->sorted =
FALSE;
458 (*consdata)->changed =
TRUE;
459 (*consdata)->merged =
FALSE;
478 for( v = 0; v < (*consdata)->nvars; ++v )
488 for( v = 0; v < (*consdata)->nvars; v++ )
509 if( consdata->rows !=
NULL )
511 for(
r = 0;
r < consdata->nrows; ++
r )
520 if( consdata->aggrrow !=
NULL )
523 consdata->aggrrow =
NULL;
552 assert((*consdata)->watchedvar1 == -1);
553 assert((*consdata)->watchedvar2 == -1);
560 if( (*consdata)->nlrow !=
NULL )
566 for( v = 0; v < (*consdata)->nvars; v++ )
634 consdata->vars[consdata->nvars] =
var;
636 consdata->sorted = (consdata->nvars == 1);
637 consdata->changed =
TRUE;
638 consdata->merged =
FALSE;
655 if( consdata->rows !=
NULL )
657 SCIPerrorMessage(
"cannot add coefficients to AND-constraint after LP relaxation was created\n");
695 if( consdata->watchedvar1 == pos )
699 if( consdata->watchedvar2 == pos )
704 assert(pos != consdata->watchedvar1);
705 assert(pos != consdata->watchedvar2);
711 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
715 if( consdata->watchedvar1 == consdata->nvars )
716 consdata->watchedvar1 = pos;
717 if( consdata->watchedvar2 == consdata->nvars )
718 consdata->watchedvar2 = pos;
720 consdata->propagated =
FALSE;
721 consdata->sorted =
FALSE;
722 consdata->changed =
TRUE;
735 if( !consdata->sorted )
737 if( consdata->nvars <= 1 )
738 consdata->sorted =
TRUE;
745 if( consdata->watchedvar1 != -1 )
747 var1 = consdata->vars[consdata->watchedvar1];
749 consdata->watchedvar1 = -1;
750 if( consdata->watchedvar2 != -1 )
752 var2 = consdata->vars[consdata->watchedvar2];
754 consdata->watchedvar2 = -1;
757 assert(consdata->watchedvar1 == -1);
758 assert(consdata->watchedvar2 == -1);
762 SCIPsortPtr((
void**)consdata->vars, SCIPvarComp, consdata->nvars);
763 consdata->sorted =
TRUE;
772 found =
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var1, consdata->nvars, &pos);
775 (void)
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var1, consdata->nvars, &pos);
778 consdata->watchedvar1 = pos;
783 found =
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var2, consdata->nvars, &pos);
786 (void)
SCIPsortedvecFindPtr((
void**)consdata->vars, SCIPvarComp, (
void*)var2, consdata->nvars, &pos);
789 consdata->watchedvar2 = pos;
800 for( v = 0; v < consdata->nvars; ++v )
828 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
831 while( v < consdata->
nvars )
833 var = consdata->vars[v];
864#ifdef SCIP_DISABLED_CODE
876 if( repvar != consdata->resvar )
895 consdata->resvar = repvar;
896 consdata->changed =
TRUE;
924 nvars = consdata->nvars;
927 consdata->nrows =
nvars + 1;
978 if( consdata->aggrrow ==
NULL )
997 if( consdata->rows ==
NULL )
1034 if( consdata->nlrow ==
NULL )
1042 for(
i = 0;
i < consdata->nvars; ++
i )
1053 for(
i = 0;
i < consdata->nvars; ++
i )
1091 mustcheck = checklprows;
1092 mustcheck = mustcheck || (consdata->rows ==
NULL);
1097 for(
r = 0;
r < consdata->nrows; ++
r )
1124 for(
i = 0;
i < consdata->nvars; ++
i )
1128 if( minsolval > solval )
1134 sumsolval += solval;
1141 viol =
MAX3(0.0, solval - minsolval, sumsolval - (consdata->nvars - 1.0 + solval));
1204 if( consdata->rows ==
NULL )
1211 for(
r = 0;
r < consdata->nrows; ++
r )
1246 assert(0 <= falsepos && falsepos < consdata->
nvars);
1285 for( v = 0; v < consdata->nvars; ++v )
1311 SCIPdebugMsg(
scip,
"constraint <%s>: operator %d fixed to 0.0 -> fix resultant <%s> to 0.0\n",
1351 for( v = 0; v <
nvars && !(*cutoff); ++v )
1353 SCIPdebugMsg(
scip,
"constraint <%s>: resultant fixed to 1.0 -> fix operator var <%s> to 1.0\n",
1365 else if( tightened )
1412 nvars = consdata->nvars;
1413 conscreated =
FALSE;
1437 else if( tightened )
1446 else if( tightened )
1466 for( v = 0; v <
nvars; ++v )
1516 if( watchedvar2 == -1 )
1521 assert(watchedvar1 != -1);
1528 for( v = consdata->nvars - 1; v >= 0; --v )
1529 if( v != watchedvar1 )
1534 SCIPdebugMsg(
scip,
"constraint <%s>: resultant <%s> fixed to 0.0, only one unfixed operand -> fix operand <%s> to 0.0\n",
1566 unsigned char** entries,
1598 if( consdata->merged )
1602 if( consdata->nvars <= 1 )
1604 consdata->merged =
TRUE;
1608 vars = consdata->vars;
1609 nvars = consdata->nvars;
1618 assert(*nentries >= nbinvars + nintvars + nimplvars);
1622 for( v =
nvars - 1; v >= 0; --v )
1639 (probidx >= nbinvars + nintvars && probidx < nbinvars + nintvars + nimplvars &&
1643 (*entries)[probidx] = 0;
1650 for( v =
nvars - 1; v >= 0; --v )
1660 assert(0 <= probidx && probidx < *nentries);
1663 if( (*entries)[probidx] == 0 )
1681 SCIPdebugMsg(
scip,
"AND-constraint <%s> is redundant: variable <%s> and its negation are present -> fix resultant <%s> = 0\n",
1704 consdata->merged =
TRUE;
1745 resvar = consdata->resvar;
1746 vars = consdata->vars;
1747 nvars = consdata->nvars;
1752 if( consdata->propagated )
1754 assert(consdata->nofixedzero);
1766 if( !consdata->nofixedzero )
1776 consdata->nofixedzero =
TRUE;
1817 watchedvar1 = consdata->watchedvar1;
1818 watchedvar2 = consdata->watchedvar2;
1821 if( watchedvar1 != -1 )
1827 if( watchedvar2 != -1 )
1835 if( watchedvar1 == -1 )
1837 watchedvar1 = watchedvar2;
1840 assert(watchedvar1 != -1 || watchedvar2 == -1);
1843 if( watchedvar2 == -1 )
1850 if( watchedvar1 == -1 )
1852 assert(watchedvar2 == -1);
1855 else if( watchedvar1 !=
i )
1863 assert(watchedvar1 != -1 || watchedvar2 == -1);
1866 if( watchedvar1 == -1 )
1868 assert(watchedvar2 == -1);
1870 SCIPdebugMsg(
scip,
"constraint <%s>: all operator vars fixed to 1.0 -> fix resultant <%s> to 1.0\n",
1899 assert(watchedvar1 != -1);
1943 vars = consdata->vars;
1944 nvars = consdata->nvars;
1951 assert(infervar == consdata->resvar);
1975 assert(infervar == consdata->resvar);
1991 if(
vars[
i] != infervar )
2016 unsigned char** entries,
2063 for(
c = nconss - 1;
c >= 0 && !(*cutoff); --
c )
2091 vars = consdata->vars;
2092 nvars = consdata->nvars;
2100 resvar = consdata->resvar;
2118 int oldnfixedvars = *nfixedvars;
2119 int oldnaggrvars = *naggrvars;
2124 for( v =
nvars - 1; v >= 0; --v )
2134 impoperands[nimpoperands] =
var;
2147 maxpos = nimpoperands - 1;
2152 assert(nimpoperands >= 0 && nimpoperands <=
nvars);
2155 if( nimpoperands == 0 )
2169 if( nimpoperands ==
nvars && poscontissmall )
2179 for( v =
nvars - 1; v >= 0 && !(*cutoff); --v )
2198 assert(nimpoperands > 0);
2200 SCIPdebugMsg(
scip,
"dual-fixing all variables in constraint <%s> with positive contribution (when together exceeding the negative contribution of the resultant) to 0 and with negative contribution to 1\n",
SCIPconsGetName(cons));
2202 for( v = nimpoperands - 1; v >= 0 && !(*cutoff); --v )
2215 else if( !poscontissmall )
2231 &infeasible, &redundant, &aggregated) );
2239 aggregationperformed =
TRUE;
2245 assert(*nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars <= nimpoperands);
2250 if( aggregationperformed || zerofix )
2265 if( fixval < 0.5 || *nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars ==
nvars )
2290 assert(nimpoperands > 0);
2304 SCIPdebugMsg(
scip,
"dual-fixing variable <%s> in constraint <%s> to %g, because the contribution is%s " \
2305 "enough to nullify/exceed the contribution of the resultant \n",
2309 zerofix = (fixval < 0.5);
2316 SCIPdebugMsg(
scip,
"dual-fixing all variables, except the variable with the highest contribution to " \
2317 "the objective, in constraint <%s> with positive contribution to 0 and with negative contribution to 1\n",
2320 for( v = nimpoperands - 1; v >= 0 && !(*cutoff); --v )
2342 assert(*nfixedvars - oldnfixedvars <= nimpoperands);
2346 if( *nfixedvars - oldnfixedvars ==
nvars )
2375 int oldnchgcoefs = *nchgcoefs;
2376 int oldnfixedvars = *nfixedvars;
2389 for( v =
nvars - 1; v >= 0; --v )
2422 "dual aggregating operand <%s> with 1 up- and downlock to the resultant <%s> in constraint <%s>\n",
2429 goodvarsfound =
TRUE;
2444 if( !*
cutoff && goodvarsfound && linearize )
2447 for( v = consdata->nvars - 1; v >= 0; --v )
2461 "dual-fixing variable <%s> in constraint <%s> to 1, because the contribution is negative\n",
2471 assert(*nfixedvars - oldnfixedvars <= consdata->
nvars);
2473 assert(*nchgcoefs - oldnchgcoefs + *nfixedvars - oldnfixedvars <=
nvars);
2483 for( v =
nvars - 1; v >= 0; --v )
2576 consvars[0] = consdata->resvar;
2581 for( v = consdata->nvars - 1; v >= 0; --v )
2584 consvars[1] = consdata->vars[v];
2596 (*naddconss) += consdata->nvars;
2604 else if( consdata->nvars == 1 )
2610 &infeasible, &redundant, &aggregated) );
2711 vars = consdata->vars;
2712 nvars = consdata->nvars;
2720 for( v =
nvars - 1; v >= 0; --v )
2726 SCIPdebugMsg(
scip,
"In constraint <%s> the operand <%s> is fixed to 1 so remove it from the constraint\n",
2739 SCIPdebugMsg(
scip,
"constraint <%s> redundant: because operand <%s> is fixed to zero so we can fix the resultant <%s> to 0\n",
2755 if( consdata->nvars <
nvars )
2762 if( consdata->nvars == 0 )
2764 SCIPdebugMsg(
scip,
"All operand in constraint <%s> were deleted, so the resultant needs to be fixed to 1\n",
2778 else if( consdata->nvars == 1 )
2785 &infeasible, &redundant, &aggregated) );
2798 nvars = consdata->nvars;
2808 for( v =
nvars - 1; v > 0; --v )
2826 for( v2 = v - 1; v2 >= 0; --v2 )
2855 SCIPdebugMsg(
scip,
"constraint <%s> redundant: because variable <%s> and variable <%s> are in a clique, the resultant <%s> can be fixed to 0\n",
2899 var1 = consdata->resvar;
2912 SCIPdebugMsg(
scip,
"In constraint <%s> the resultant <%s> is fixed to 1 so fix all operands to 1\n",
2916 for( v =
nvars - 1; v >= 0 && !(*cutoff); --v )
2946 for( v =
nvars - 1; v >= 0; --v )
2968 if( value1 != value2 )
2970 SCIPdebugMsg(
scip,
"In constraint <%s> the resultant <%s> can be fixed to 0 because the negation of it is an operand.\n",
2988 assert(value1 == value2);
2990 consvars[0] = consdata->resvar;
2992 for( v2 =
nvars - 1; v2 >= 0; --v2 )
3010 if( value1 == negated )
3012 SCIPdebugMsg(
scip,
"In constraint <%s> the resultant <%s> can be fixed to 0 because the negation of it is an operand.\n",
3060 SCIPdebugMsg(
scip,
"in constraint <%s> the resultant <%s> can be fixed to 0 because it is in a clique with operand <%s>\n",
3077 for( v =
nvars - 1; v >= 0; --v )
3096 allnegoperandsexist =
FALSE;
3101 allnegoperandsexist =
TRUE;
3106 else if( v2 >= 0 && v == -1 )
3120 for( v = vstart; v >= vend; --v )
3136 for( v2 =
nvars - 1; v2 >= 0; --v2 )
3161 if( var1 == var2 && value1 == value2 )
3163 SCIPdebugMsg(
scip,
"in constraint <%s> the resultant <%s> can be fixed to 0 because two operands are negated of each other\n",
3177 if( var1 == var2 && value1 != value2 )
3189 SCIPdebugMsg(
scip,
"In constraint <%s> the operand <%s> is in a negated clique with all other operands, so we can aggregated this operand to the resultant <%s>.\n",
3193 &infeasible, &redundant, &aggregated) );
3217 var1 = consdata->resvar;
3222 newvars[
nvars] = var1;
3225 for( v =
nvars - 1; v >= 0; --v )
3244 for( v =
nvars - 1; v >= 0 && upgrade; --v )
3246 for( v2 = v - 1; v2 >= 0; --v2 )
3264 if( negations[
nvars] )
3274 for( v =
nvars - 1; v >= 0; --v )
3338 if( consdata1->nvars != consdata2->nvars )
3344 assert(consdata1->sorted);
3345 assert(consdata2->sorted);
3349 for(
i = 0;
i < consdata1->nvars ; ++
i )
3352 if( consdata1->vars[
i] != consdata2->vars[
i] )
3376 assert(consdata->sorted);
3377 assert(consdata->nvars > 0);
3382 assert(minidx >= 0 && minidx <= maxidx);
3384 return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
3410 hashtablesize = nconss;
3413 hashGetKeyAndcons, hashKeyEqAndcons, hashKeyValAndcons, (
void*)
scip) );
3418 for(
c = 0;
c < nconss; ++
c )
3433 assert(consdata0->sorted);
3449 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
3451 assert(consdata0->sorted && consdata1->sorted);
3452 assert(consdata0->vars[0] == consdata1->vars[0]);
3456 if( consdata0->resvar != consdata1->resvar )
3464 cutoff, &redundant, &aggregated) );
3529 for(
i = 0;
i < nconss;
i++ )
3535 if( !conshdlrdata->enforcecuts )
3547 else if( separated )
3582 assert(firstchange <= chkind);
3589 cons0 = conss[chkind];
3598 assert(consdata0->nvars >= 1);
3599 assert(consdata0->sorted);
3602 cons0changed = consdata0->changed;
3606 for(
c = (cons0changed ? 0 : firstchange);
c < chkind && !(*cutoff); ++
c )
3627#ifdef SCIP_DISABLED_CODE
3628 SCIPdebugMsg(
scip,
"preprocess AND-constraint pair <%s>[chg:%d] and <%s>[chg:%d]\n",
3633 if( !cons0changed && !consdata1->changed )
3636 assert(consdata1->nvars >= 1);
3640 assert(consdata1->sorted);
3648 cons0superset =
TRUE;
3649 cons1superset =
TRUE;
3650 while( (v0 < consdata0->
nvars || v1 < consdata1->
nvars) && (cons0superset || cons1superset) )
3655 if( v0 < consdata0->
nvars && v1 < consdata1->
nvars )
3656 varcmp =
SCIPvarCompare(consdata0->vars[v0], consdata1->vars[v1]);
3657 else if( v0 < consdata0->
nvars )
3666 cons1superset =
FALSE;
3672 cons0superset =
FALSE;
3690 if( cons0superset && cons1superset )
3697 SCIPdebugMsg(
scip,
"equivalent AND-constraints <%s> and <%s>: aggregate resultants <%s> == <%s>\n",
3703 &infeasible, &redundant, &aggregated) );
3724 else if( cons0superset )
3730 SCIPdebugMsg(
scip,
"AND-constraint <%s> is superset of <%s>: add implication <%s> = 1 -> <%s> = 1\n",
3736 &infeasible, &nboundchgs) );
3738 (*nbdchgs) += nboundchgs;
3740 else if( cons1superset )
3746 SCIPdebugMsg(
scip,
"AND-constraint <%s> is superset of <%s>: add implication <%s> = 1 -> <%s> = 1\n",
3752 &infeasible, &nboundchgs) );
3754 (*nbdchgs) += nboundchgs;
3758 consdata0->changed =
FALSE;
3801 vars[0] = consdata->resvar;
3812 andvars = consdata->vars;
3813 for(
i = 0;
i < consdata->nvars; ++
i )
3816 vars[0] = andvars[
i];
3884 if( conshdlrdata->linearize )
3902 for(
c = 0;
c < nconss; ++
c )
3915 nvars = consdata->nvars;
3917 if( !conshdlrdata->aggrlinearization )
3919 vars[0] = consdata->resvar;
3924 for( v = 0; v <
nvars; ++v )
3927 vars[1] = consdata->vars[v];
3945 for( v = 0; v <
nvars; ++v )
3947 vars[v] = consdata->vars[v];
3953 if( conshdlrdata->aggrlinearization )
3999#ifdef GMLGATEPRINTING
4041 gmlfile = fopen(fname,
"w");
4043 if( gmlfile ==
NULL )
4057 for(
c = nconss - 1;
c >= 0; --
c )
4069 if( consdata->nvars == 0 )
4098 for( v = consdata->nvars - 1; v >= 0; --v )
4120#ifdef SCIP_DISABLED_CODE
4121 for( v =
nvars - 1; v >= 0; --v )
4162 for(
c = 0;
c < nconss; ++
c )
4179 for(
c = 0;
c < nconss; ++
c )
4186 if( consdata->nlrow !=
NULL )
4227 sourcedata->nvars, sourcedata->vars, sourcedata->resvar) );
4246 *infeasible =
FALSE;
4248 for(
i = 0;
i < nconss && !(*infeasible);
i++ )
4269 for(
c = 0;
c < nusefulconss; ++
c )
4274 else if ( separated )
4296 for(
c = 0;
c < nusefulconss; ++
c )
4301 else if ( separated )
4338 for(
i = 0;
i < nconss;
i++ )
4389 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
4397 else if( nfixedvars > 0 || nupgdconss > 0 )
4413 unsigned char* entries;
4426 oldnfixedvars = *nfixedvars;
4427 oldnaggrvars = *naggrvars;
4428 oldnchgbds = *nchgbds;
4429 oldndelconss = *ndelconss;
4430 oldnupgdconss = *nupgdconss;
4440 firstchange = INT_MAX;
4450 consdata->propagated =
FALSE;
4453 if( firstchange == INT_MAX && consdata->changed )
4472 assert(consdata->nvars >= 1);
4475 if( consdata->nvars == 1 )
4488 &
cutoff, &redundant, &aggregated) );
4504 else if( !consdata->impladded )
4509 for(
i = 0;
i < consdata->nvars && !
cutoff; ++
i )
4515 (*nchgbds) += nimplbdchgs;
4517 consdata->impladded =
TRUE;
4528 (*nchgbds) += nimplbdchgs;
4529 consdata->opimpladded =
TRUE;
4537 SCIP_CALL(
dualPresolve(
scip, conss, nconss, conshdlrdata->eventhdlr, &entries, &nentries, &
cutoff, nfixedvars, naggrvars, nchgcoefs, ndelconss, nupgdconss, naddconss) );
4577 if( *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars )
4579 if( firstchange < nconss )
4583 oldnaggrvars = *naggrvars;
4590 if( *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars )
4593 npaircomparisons = 0;
4594 oldndelconss = *ndelconss;
4609 oldndelconss = *ndelconss;
4610 oldnaggrvars = *naggrvars;
4611 oldnchgbds = *nchgbds;
4613 npaircomparisons = 0;
4625 else if( *nfixedvars > oldnfixedvars || *naggrvars > oldnaggrvars || *nchgbds > oldnchgbds
4626 || *ndelconss > oldndelconss || *nupgdconss > oldnupgdconss )
4659 for(
i = 0;
i < consdata->nvars; ++
i )
4722 const char* consname;
4749 for( v = 0; v <
nvars; ++v )
4766 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
4793 if( resvar ==
NULL )
4799 char* strcopy =
NULL;
4805 startptr = strchr((
char*)str,
'(');
4807 if( startptr ==
NULL )
4809 SCIPerrorMessage(
"missing starting character '(' parsing AND-constraint\n");
4817 endptr = strrchr(startptr,
')');
4819 if( endptr ==
NULL )
4824 assert(endptr >= startptr);
4826 if( endptr > startptr )
4830 strcopy[endptr-startptr] =
'\0';
4843 if( varssize < requiredsize )
4846 varssize = requiredsize;
4854 assert(varssize >= requiredsize);
4858 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
4875 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
4893 if( varssize < consdata->
nvars + 1 )
4898 vars[consdata->nvars] = consdata->resvar;
4916 (*nvars) = consdata->nvars + 1;
4958 consdata->nofixedzero =
FALSE;
4960 consdata->propagated =
FALSE;
4981 eventExecAnd,
NULL) );
4989 consEnfolpAnd, consEnfopsAnd, consCheckAnd, consLockAnd,
4999#ifdef GMLGATEPRINTING
5025 "should pairwise constraint comparison be performed in presolving?",
5028 "constraints/and/presolusehashing",
5029 "should hash table be used for detecting redundant constraints in advance",
5033 "should the AND-constraint get linearized and removed (in presolving)?",
5037 "should cuts be separated during LP enforcing?",
5041 "should an aggregated linearization be used?",
5045 "should implied integrality of resultant variables be detected?",
5049 "should dual presolving be performed?",
5099 if( conshdlr ==
NULL )
5137 activeresvar = resvar;
5142 for( v =
nvars - 1; v >= 0; --v )
5147 activevar =
vars[v];
5166 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
5167 local, modifiable, dynamic, removable, stickingatnode) );
5214 return consdata->nvars;
5233 return consdata->vars;
5252 return consdata->resvar;
5271 return consdata->sorted;
5291 assert(consdata->sorted);
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
static SCIP_RETCODE consdataFreeRows(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
static SCIP_RETCODE consdataCatchWatchedEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int *filterpos)
static SCIP_RETCODE consdataDropEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
#define DEFAULT_DUALPRESOLVING
static SCIP_RETCODE dualPresolve(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *nchgcoefs, int *ndelconss, int *nupgdconss, int *naddconss)
static SCIP_RETCODE consdataSwitchWatchedvars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int watchedvar1, int watchedvar2)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE consdataFixOperandsOne(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars, SCIP_Bool *cutoff, int *nfixedvars)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *separated, SCIP_Bool *cutoff)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_VAR *var)
static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE analyzeZeroResultant(SCIP *scip, SCIP_CONS *cons, int watchedvar1, int watchedvar2, SCIP_Bool *cutoff, int *nfixedvars)
#define DEFAULT_UPGRRESULTANT
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE consdataFixResultantZero(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *resvar, int pos, SCIP_Bool *cutoff, int *nfixedvars)
#define DEFAULT_PRESOLPAIRWISE
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE analyzeConflictOne(SCIP *scip, SCIP_CONS *cons, int falsepos)
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss)
#define DEFAULT_LINEARIZE
static SCIP_RETCODE cliquePresolve(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *nchgcoefs, int *ndelconss, int *naddconss)
static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *naggrvars, int *nbdchgs, int *ndelconss)
static SCIP_RETCODE consdataLinearize(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *nupgdconss)
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool *violated)
#define DEFAULT_PRESOLUSEHASHING
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE consdataDropWatchedEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos, int filterpos)
#define MINGAINPERNMINCOMPARISONS
static SCIP_RETCODE analyzeConflictZero(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROPFREQ
#define DEFAULT_ENFORCECUTS
#define CONSHDLR_PRESOLTIMING
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addNlrow(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr, int nvars, SCIP_VAR **vars, SCIP_VAR *resvar)
#define CONSHDLR_ENFOPRIORITY
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int *nchgcoefs)
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
#define CONSHDLR_DELAYSEPA
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, int *nfixedvars, int *nchgcoefs, int *ndelconss)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
#define DEFAULT_AGGRLINEARIZATION
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *nupgdconss)
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE consdataCatchEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
Constraint handler for AND constraints, .
Constraint handler for linear constraints in their most general form, .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
constraint handler for pseudoboolean constraints
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIP_STRINGEQ(name, reference, retcode)
#define SCIP_CALL_FINALLY(x, y)
product expression handler
variable expression handler
SCIP_RETCODE SCIPcreateConsAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPsortAndCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisAndConsSorted(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPincludeConshdlrAnd(SCIP *scip)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprProduct(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real coefficient, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
void SCIPgmlWriteClosing(FILE *file)
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
SCIP_RETCODE SCIPaddConsUpgrade(SCIP *scip, SCIP_CONS *oldcons, SCIP_CONS **newcons)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashFour(a, b, c, d)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPcutoffNode(SCIP *scip, SCIP_NODE *node)
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
void SCIPvarsGetProbvar(SCIP_VAR **vars, int nvars)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPvarGetAggregatedObj(SCIP_VAR *var, SCIP_Real *aggrobj)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetBinvarRepresentatives(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPparseVarsList(SCIP *scip, const char *str, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize, char **endptr, char delimiter, SCIP_Bool *success)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarImplType(SCIP *scip, SCIP_VAR *var, SCIP_IMPLINTTYPE impltype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public functions to work with algebraic expressions
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for the branch-and-bound tree
public methods for SCIP variables
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
structs for symmetry computations
methods for dealing with symmetry detection graphs
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
struct SCIP_Cons SCIP_CONS
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
struct SYM_Graph SYM_GRAPH
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSACTIVE(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSDEACTIVE(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCOPY(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_BOUNDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
struct SCIP_Expr SCIP_EXPR
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashTable SCIP_HASHTABLE
struct SCIP_NlRow SCIP_NLROW
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_EXITPRESOLVE
enum SYM_Symtype SYM_SYMTYPE
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_IMPLINTTYPE_STRONG
struct SCIP_BdChgIdx SCIP_BDCHGIDX