89#define CONSHDLR_NAME "xor"
90#define CONSHDLR_DESC "constraint handler for xor constraints: r = xor(x1, ..., xn)"
91#define CONSHDLR_SEPAPRIORITY +850200
92#define CONSHDLR_ENFOPRIORITY -850200
93#define CONSHDLR_CHECKPRIORITY -850200
94#define CONSHDLR_SEPAFREQ 0
95#define CONSHDLR_PROPFREQ 1
96#define CONSHDLR_EAGERFREQ 100
98#define CONSHDLR_MAXPREROUNDS -1
99#define CONSHDLR_DELAYSEPA FALSE
100#define CONSHDLR_DELAYPROP FALSE
101#define CONSHDLR_NEEDSCONS TRUE
103#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
104#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
106#define EVENTHDLR_NAME "xor"
107#define EVENTHDLR_DESC "event handler for xor constraints"
109#define LINCONSUPGD_PRIORITY +600000
111#define DEFAULT_PRESOLPAIRWISE TRUE
112#define DEFAULT_ADDEXTENDEDFORM FALSE
113#define DEFAULT_ADDFLOWEXTENDED FALSE
114#define DEFAULT_SEPARATEPARITY FALSE
115#define DEFAULT_GAUSSPROPFREQ 5
116#define HASHSIZE_XORCONS 500
117#define DEFAULT_PRESOLUSEHASHING TRUE
118#define NMINCOMPARISONS 200000
119#define MINGAINPERNMINCOMPARISONS 1e-06
120#define MAXXORCONSSSYSTEM 1000
121#define MAXXORVARSSYSTEM 1000
149 unsigned int deleteintvar:1;
150 unsigned int propagated:1;
151 unsigned int sorted:1;
152 unsigned int changed:1;
156struct SCIP_ConshdlrData
159 SCIP_Bool presolpairwise;
160 SCIP_Bool presolusehashing;
161 SCIP_Bool addextendedform;
162 SCIP_Bool addflowextended;
163 SCIP_Bool separateparity;
234 (*conshdlrdata)->eventhdlr = eventhdlr;
263 assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);
264 assert(watchedvar1 != -1 || watchedvar2 == -1);
265 assert(watchedvar1 == -1 || (0 <= watchedvar1 && watchedvar1 < consdata->
nvars));
266 assert(watchedvar2 == -1 || (0 <= watchedvar2 && watchedvar2 < consdata->
nvars));
269 if( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )
273 tmp = consdata->watchedvar1;
274 consdata->watchedvar1 = consdata->watchedvar2;
275 consdata->watchedvar2 = tmp;
276 tmp = consdata->filterpos1;
277 consdata->filterpos1 = consdata->filterpos2;
278 consdata->filterpos2 = tmp;
280 assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);
281 assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);
284 if( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )
286 assert(consdata->filterpos1 != -1);
290 if( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )
292 assert(consdata->filterpos2 != -1);
298 if( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )
303 if( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )
310 consdata->watchedvar1 = watchedvar1;
311 consdata->watchedvar2 = watchedvar2;
325 assert(consdata->nvars <= consdata->varssize);
327 if( num > consdata->varssize )
333 consdata->varssize = newsize;
335 assert(num <= consdata->varssize);
359 (*consdata)->rhs = rhs;
360 (*consdata)->intvar = intvar;
362 (*consdata)->rows[
r] =
NULL;
363 (*consdata)->nvars =
nvars;
364 (*consdata)->varssize =
nvars;
365 (*consdata)->watchedvar1 = -1;
366 (*consdata)->watchedvar2 = -1;
367 (*consdata)->filterpos1 = -1;
368 (*consdata)->filterpos2 = -1;
369 (*consdata)->deleteintvar = (intvar ==
NULL);
370 (*consdata)->propagated =
FALSE;
371 (*consdata)->sorted =
FALSE;
372 (*consdata)->changed =
TRUE;
373 (*consdata)->extvars =
NULL;
374 (*consdata)->nextvars = 0;
375 (*consdata)->extvarssize = 0;
382 if( (*consdata)->intvar !=
NULL )
398 for( v = (*consdata)->nvars - 1; v >= 0; --v )
406 if( (*consdata)->intvar !=
NULL )
428 if( consdata->rows[
r] !=
NULL )
456 if ( (*consdata)->nextvars > 0 )
459 for (j = 0; j < (*consdata)->extvarssize; ++j)
461 if ( (*consdata)->extvars[j] !=
NULL )
468 (*consdata)->nextvars = 0;
469 (*consdata)->extvarssize = 0;
474 assert((*consdata)->watchedvar1 == -1);
475 assert((*consdata)->watchedvar2 == -1);
482 if( (*consdata)->intvar !=
NULL )
519 if( consdata->intvar !=
NULL )
541 SCIP_Bool transformed;
561 if( consdata->intvar !=
NULL )
567 consdata->intvar =
var;
568 consdata->changed =
TRUE;
575 if( consdata->rows[0] !=
NULL )
577 SCIPerrorMessage(
"cannot change intvar of xor constraint after LP relaxation was created\n");
593 SCIP_Bool transformed;
613 consdata->vars[consdata->nvars] =
var;
615 consdata->sorted = (consdata->nvars == 1);
616 consdata->changed =
TRUE;
641 if( consdata->rows[0] !=
NULL )
643 SCIPerrorMessage(
"cannot add coefficients to xor constraint after LP relaxation was created\n");
682 if( consdata->watchedvar1 == pos )
686 if( consdata->watchedvar2 == pos )
691 assert(pos != consdata->watchedvar1);
692 assert(pos != consdata->watchedvar2);
695 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
699 if( consdata->watchedvar1 == consdata->nvars )
700 consdata->watchedvar1 = pos;
701 if( consdata->watchedvar2 == consdata->nvars )
702 consdata->watchedvar2 = pos;
704 consdata->propagated =
FALSE;
705 consdata->sorted =
FALSE;
706 consdata->changed =
TRUE;
719 if( !consdata->sorted )
721 if( consdata->nvars <= 1 )
722 consdata->sorted =
TRUE;
729 if( consdata->watchedvar1 != -1 )
731 var1 = consdata->vars[consdata->watchedvar1];
733 consdata->watchedvar1 = -1;
734 if( consdata->watchedvar2 != -1 )
736 var2 = consdata->vars[consdata->watchedvar2];
738 consdata->watchedvar2 = -1;
741 assert(consdata->watchedvar1 == -1);
742 assert(consdata->watchedvar2 == -1);
746 SCIPsortPtr((
void**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);
747 consdata->sorted =
TRUE;
757 for( v = consdata->nvars - 1; v >= 0; --v )
759 if( consdata->vars[v] == var1 )
761 consdata->watchedvar1 = v;
762 if( var2 ==
NULL || consdata->watchedvar2 != -1 )
765 else if( consdata->vars[v] == var2 )
768 consdata->watchedvar2 = v;
769 if( consdata->watchedvar1 != -1 )
773 assert(consdata->watchedvar1 != -1);
774 assert(consdata->watchedvar2 != -1 || var2 ==
NULL);
775 assert(consdata->watchedvar1 < consdata->nvars);
776 assert(consdata->watchedvar2 < consdata->nvars);
786 for( v = 0; v < consdata->nvars; ++v )
821 if( consdata1->nvars != consdata2->nvars )
827 assert(consdata1->sorted);
828 assert(consdata2->sorted);
830 for(
i = 0;
i < consdata1->nvars ; ++
i )
833 if( consdata1->vars[
i] != consdata2->vars[
i] )
857 assert(consdata->nvars > 0);
861 assert(consdata->vars[consdata->nvars / 2] !=
NULL);
862 assert(consdata->vars[consdata->nvars - 1] !=
NULL);
874 return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
894 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
901 while( v < consdata->
nvars )
905 var = consdata->vars[v];
918 consdata->rhs = !consdata->rhs;
933 if( negated && consdata->intvar ==
NULL )
938 consdata->rhs = !consdata->rhs;
965 v = consdata->nvars-2;
968 if( consdata->vars[v] == consdata->vars[v+1] )
973 newvars[2] = consdata->vars[v];
977 SCIPdebugMsg(
scip,
"xor constraint <%s>: deleting pair of equal variables <%s>\n",
982 v =
MIN(v, consdata->nvars-1);
990 if( consdata->intvar !=
NULL )
1010 newvars[1] = consdata->intvar;
1032 SCIPdebugMsg(
scip,
"xor constraint <%s>: deleting pair of negated variables <%s> and <%s>\n",
1037 consdata->rhs = !consdata->rhs;
1038 v =
MIN(v, consdata->nvars-1);
1045 if( consdata->rhs && consdata->intvar !=
NULL )
1052 SCIP_Bool aggregated;
1053 SCIP_Bool infeasible;
1054 SCIP_Bool redundant;
1107 newvars[0] = consdata->intvar;
1109 newvars[1] = newvar;
1182 if ( consdata->extvars !=
NULL )
1186 if ( consdata->nvars <= 3 )
1191 assert( consdata->nextvars == 0 );
1192 assert( consdata->extvarssize == 0 );
1195 consdata->extvarssize = 4 * (consdata->nvars);
1199 for (
i = 0;
i < consdata->nvars; ++
i)
1207 SCIP_Real rhs = 0.0;
1208 SCIP_Bool infeasible =
FALSE;
1209 SCIP_Bool redundant =
FALSE;
1210 SCIP_Bool aggregated =
FALSE;
1217 SCIP_CALL(
SCIPcreateVar(
scip, &varnn, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1221 SCIP_CALL(
SCIPcreateVar(
scip, &varns, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1237 if (
i == consdata->nvars-1 )
1239 if ( consdata->rhs )
1243 SCIP_CALL(
SCIPcreateVar(
scip, &varns, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1247 SCIP_CALL(
SCIPcreateVar(
scip, &varss, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1265 SCIP_CALL(
SCIPcreateVar(
scip, &varnn, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1269 SCIP_CALL(
SCIPcreateVar(
scip, &varsn, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1288 SCIP_CALL(
SCIPcreateVar(
scip, &varnn, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1292 SCIP_CALL(
SCIPcreateVar(
scip, &varns, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1296 SCIP_CALL(
SCIPcreateVar(
scip, &varsn, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1300 SCIP_CALL(
SCIPcreateVar(
scip, &varss, name, 0.0, 1.0, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1310 if ( varns !=
NULL )
1315 if ( varsn !=
NULL )
1321 vars[cnt] = consdata->vars[
i];
1339 if ( varprevss !=
NULL )
1341 vars[cnt] = varprevss;
1344 if ( varprevns !=
NULL )
1346 vars[cnt] = varprevns;
1351 if ( varss !=
NULL )
1356 if ( varsn !=
NULL )
1377 if ( varprevnn !=
NULL )
1379 vars[cnt] = varprevnn;
1382 if ( varprevsn !=
NULL )
1384 vars[cnt] = varprevsn;
1389 if ( varnn !=
NULL )
1394 if ( varns !=
NULL )
1416 consdata->extvars[4*
i] = varnn;
1417 consdata->extvars[4*
i + 1] = varns;
1418 consdata->extvars[4*
i + 2] = varsn;
1419 consdata->extvars[4*
i + 3] = varss;
1421 if ( varnn !=
NULL )
1422 ++(consdata->nextvars);
1423 if ( varns !=
NULL )
1424 ++(consdata->nextvars);
1425 if ( varsn !=
NULL )
1426 ++(consdata->nextvars);
1427 if ( varss !=
NULL )
1428 ++(consdata->nextvars);
1488 if ( consdata->extvars !=
NULL )
1492 if ( consdata->nvars <= 3 )
1497 assert( consdata->nextvars == 0 );
1500 consdata->extvarssize = consdata->nvars;
1501 consdata->nextvars = consdata->nvars;
1505 for (
i = 0;
i < consdata->nvars; ++
i)
1507 SCIP_Bool infeasible =
FALSE;
1508 SCIP_Bool redundant =
FALSE;
1509 SCIP_Bool aggregated =
FALSE;
1516 if (
i == consdata->nvars-1 )
1518 if ( consdata->rhs )
1532 SCIP_CALL(
SCIPcreateVar(
scip, &artvar, name, lb, ub, 0.0,
SCIP_VARTYPE_IMPLINT,
SCIPconsIsInitial(cons),
SCIPconsIsRemovable(cons),
NULL,
NULL,
NULL,
NULL,
NULL) );
1555 vars[2] = consdata->vars[
i];
1572 vars[2] = consdata->vars[
i];
1589 vars[2] = consdata->vars[
i];
1606 vars[2] = consdata->vars[
i];
1620 consdata->extvars[
i] = artvar;
1659 if( consdata->intvar ==
NULL )
1664 ub = consdata->nvars/2;
1670#ifdef WITH_DEBUG_SOLUTION
1671 if( SCIPdebugIsMainscip(
scip) )
1677 for( v = consdata->nvars - 1; v >= 0; --v )
1680 count += (solval > 0.5 ? 1 : 0);
1682 assert((count - consdata->rhs) % 2 == 0);
1683 solval = (
SCIP_Real) ((count - consdata->rhs) / 2);
1695 rhsval = (consdata->rhs ? 1.0 : 0.0);
1701 else if( !consdata->rhs )
1707 for(
r = 0;
r < 3; ++
r )
1714 for( v = 0; v < 3; ++v )
1727 if( consdata->intvar !=
NULL )
1741 for(
r = 0;
r < 3; ++
r )
1748 for( v = 0; v < 3; ++v )
1761 if( consdata->intvar !=
NULL )
1778 SCIP_Bool* infeasible
1789 if( consdata->rows[0] ==
NULL )
1794 for(
r = 0;
r <
NROWS && !(*infeasible); ++
r )
1813 if( consdata->rows[0] ==
NULL )
1833 SCIP_Bool checklprows,
1834 SCIP_Bool printreason,
1850 SCIP_Real maxcenval = 0.0;
1851 SCIP_Real sumcenval = 0.0;
1852 SCIP_Real sumsolval = 0.0;
1856 SCIP_Bool odd = consdata->rhs;
1869 for(
i = 0;
i < consdata->nvars; ++
i )
1877 cenval = 1.0 - solval;
1882 if( maxcenval < cenval )
1885 sumcenval += cenval;
1886 sumsolval += solval;
1893 viol =
MAX(0.0, (odd ? 1.0 : 2.0 * maxcenval) - sumcenval);
1896 if( consdata->intvar !=
NULL )
1920 if( consdata->intvar ==
NULL )
1979 SCIP_Bool separateparity,
1980 SCIP_Bool* separated,
1985 SCIP_Real feasibility;
1998 if( consdata->rows[0] ==
NULL )
2021 if ( separateparity && consdata->nvars > 3 )
2024 SCIP_Real maxval = -1.0;
2025 SCIP_Real minval = 2.0;
2026 SCIP_Real sum = 0.0;
2036 for (j = 0; j < consdata->nvars; ++j)
2063 if ( (cnt - (
int) consdata->rhs) % 2 == 1 )
2069 SCIPdebugMsg(
scip,
"found violated parity cut (efficiacy: %f)\n", 1.0 - sum);
2076 for (j = 0; j < consdata->nvars; ++j)
2104 SCIPdebugMsg(
scip,
"found violated parity cut (efficiacy: %f, minval: %f)\n", 1.0 - (sum - 1.0 + 2.0 * minval), minval);
2112 for (j = 0; j < consdata->nvars; ++j)
2140 SCIPdebugMsg(
scip,
"found violated parity cut (efficiacy: %f, maxval: %f)\n", 1.0 - (sum + 1.0 - 2.0 * maxval), maxval);
2148 for (j = 0; j < consdata->nvars; ++j)
2209 for (
i = 0;
i < m; ++
i)
2216 for (
i = 0;
i < m &&
i < n; ++
i)
2231 while ( k < m && A[p[k]][j] == 0 )
2253 assert( A[p[k]][j] != 0 );
2266 for (k =
i+1; k < m; ++k)
2270 if ( A[pk][s[
i]] != 0 )
2272 for (j = s[
i]; j < n; ++j)
2273 A[pk][j] = A[pk][j] ^ A[pi][j];
2274 b[pk] =
b[pk] ^
b[pi];
2279 if (
i % 100 == 99 )
2319 for (k = 0; k < n; ++k)
2323 for (
i =
r-1;
i >= 0; --
i)
2331 for (k =
i+1; k <
r; ++k)
2333 assert(
i <= s[k] && s[k] <= n );
2334 if ( A[p[
i]][s[k]] != 0 )
2335 val = val ^
x[s[k]];
2368 SCIP_Bool* xoractive;
2371 SCIP_Bool noaggr =
TRUE;
2378 int nconssactive = 0;
2393 SCIPdebugMsg(
scip,
"Checking feasibility via the linear equation system over GF2 using Gauss.\n");
2405 for (
i = 0;
i < nconss; ++
i)
2416 for (j = 0; j < consdata->nvars; ++j)
2420 var = consdata->vars[j];
2442 xorvars[nvarsmat++] =
var;
2450 xoractive[
i] =
TRUE;
2453#ifdef SCIP_DISABLED_CODE
2460 for (j = 0; j < consdata->nvars; ++j)
2468 if ( ( cnt - consdata->rhs ) % 2 != 0 )
2478 assert( nconssactive <= nconss );
2482 SCIPdebugMsg(
scip,
"Skip checking the xor system over GF2 (%d conss, %d vars).\n", nconssactive, nvarsmat);
2492 for (j = 0; j < nvarsmat; ++j)
2505 for (j = 0; j < nvarsmat; ++j)
2507 assert( 0 <= xoridx[j] && xoridx[j] < nvarsmat );
2508 xorbackidx[xoridx[j]] = j;
2514 for (
i = 0;
i < nconss; ++
i)
2516 if ( ! xoractive[
i] )
2522 assert( consdata->nvars > 0 );
2528 b[nconssmat] = (
Type) consdata->rhs;
2529 for (j = 0; j < consdata->nvars; ++j)
2534 var = consdata->vars[j];
2542 b[nconssmat] = !
b[nconssmat];
2559 b[nconssmat] = !
b[nconssmat];
2568 b[nconssmat] = !
b[nconssmat];
2587 b[nconssmat] = !
b[nconssmat];
2598 assert( idx < nvarsmat );
2599 assert( 0 <= xorbackidx[idx] && xorbackidx[idx] < nvarsmat );
2600 A[nconssmat][xorbackidx[idx]] = 1;
2606 SCIPdebugMsg(
scip,
"Found %d non-fixed variables in %d nonempty xor constraints.\n", nvarsmat, nconssmat);
2607 assert( nconssmat == nconssactive );
2615 for (
i = 0;
i < nconssmat; ++
i)
2617 for (j = 0; j < nvarsmat; ++j)
2628 assert( rank <= nconssmat && rank <= nvarsmat );
2636 for (
i = 0;
i < nconssmat; ++
i)
2638 for (j = 0; j < nvarsmat; ++j)
2646 for (
i = rank;
i < nconssmat; ++
i)
2653 if (
i >= nconssmat )
2655 SCIPdebugMsg(
scip,
"System feasible with rank %d (nconss=%d)\n", rank, nconssmat);
2658 if( rank == nvarsmat && noaggr )
2660 SCIP_Bool tightened;
2661 SCIP_Bool infeasible;
2672 for (j = 0; j < nvarsmat; ++j)
2678 for( j = 0; j < nvarsmat; ++j )
2709 if ( heurtrysol !=
NULL )
2722 for (j = 0; j < nvarsmat; ++j)
2731 for (j = 0; j < nvarsmat; ++j)
2745 for (j = 0; j <
nvars; ++j)
2755 for (
i = 0;
i < nconss; ++
i)
2766 for (j = 0; j < consdata->nvars; ++j)
2772 assert( ! noaggr || nones % 2 == (
int) consdata->rhs );
2773 if ( (
unsigned int) nones != consdata->rhs )
2775 val = (
SCIP_Real) (nones - (
int) consdata->rhs)/2;
2814 for (
i = nconss - 1;
i >= 0 ; --
i)
2819 if ( consdata->nvars == 0 )
2858 vars = consdata->vars;
2859 nvars = consdata->nvars;
2864 assert( infervar ==
NULL || infervar == consdata->intvar );
2901 if( infervar != consdata->intvar )
2921 if( infervar != consdata->intvar )
2991 SCIP_Bool infeasible;
2992 SCIP_Bool tightened;
3016 vars = consdata->vars;
3017 nvars = consdata->nvars;
3020 if( consdata->propagated )
3033 watchedvar1 = consdata->watchedvar1;
3034 watchedvar2 = consdata->watchedvar2;
3037 if( watchedvar1 != -1 )
3042 if( watchedvar2 != -1 )
3049 if( watchedvar1 == -1 )
3051 watchedvar1 = watchedvar2;
3054 assert(watchedvar1 != -1 || watchedvar2 == -1);
3057 odd = consdata->rhs;
3061 if( watchedvar2 == -1 )
3077 if( watchedvar1 == -1 )
3079 assert(watchedvar2 == -1);
3082 else if( watchedvar2 == -1 && watchedvar1 !=
i )
3090 assert(watchedvar1 != -1 || watchedvar2 == -1);
3093 if( watchedvar1 == -1 )
3095 assert(watchedvar2 == -1);
3111 if ( consdata->intvar !=
NULL && !consdata->deleteintvar )
3116 assert( (nfixedones - (
int) consdata->rhs) % 2 == 0 );
3118 fixval = (nfixedones - (int) consdata->rhs)/2;
3126 SCIPdebugMsg(
scip,
"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n",
3137 SCIPdebugMsg(
scip,
"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n",
3175 if( watchedvar2 == -1 )
3177 assert(watchedvar1 != -1);
3180 SCIPdebugMsg(
scip,
"constraint <%s>: only one unfixed variable -> fix <%s> to %u\n",
3198 assert( (nfixedones - (
int) consdata->rhs) % 2 == 0 );
3200 fixval = (nfixedones - (int) consdata->rhs)/2;
3207 SCIPdebugMsg(
scip,
"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n",
3218 SCIPdebugMsg(
scip,
"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n",
3254 if ( consdata->intvar !=
NULL && !consdata->deleteintvar )
3263 assert(nfixedzeros == 0);
3279 nonesmin = 2 * (int)(
SCIPvarGetLbLocal(consdata->intvar) + 0.5) + (
int) consdata->rhs;
3280 nonesmax = 2 * (int)(
SCIPvarGetUbLocal(consdata->intvar) + 0.5) + (
int) consdata->rhs;
3283 if (
nvars - nfixedzeros < nonesmin )
3296 if ( nfixedones > nonesmax )
3298 SCIPdebugMsg(
scip,
"constraint <%s>: at least %d variables are fixed to 1, but there should be at most %d.\n",
SCIPconsGetName(cons), nfixedones, nonesmax);
3311 newlb = (
SCIP_Real)((nfixedones + 1 - (
int) consdata->rhs) / 2);
3312 newub = (
SCIP_Real)((
nvars - nfixedzeros - (
int) consdata->rhs) / 2);
3324 nonesmin = 2 * (int)(
SCIPvarGetLbLocal(consdata->intvar) + 0.5) + (
int) consdata->rhs;
3337 nonesmax = 2 * (int)(
SCIPvarGetUbLocal(consdata->intvar) + 0.5) + (
int) consdata->rhs;
3341 assert(nfixedones <= nonesmax);
3344 if (
nvars - nfixedzeros == nonesmin )
3366 if ( nfixedones == nonesmax )
3392 consdata->propagated =
TRUE;
3412 SCIPdebugMsg(
scip,
"resolving fixations according to rule %d\n", (
int) proprule);
3457 vars = consdata->vars;
3458 nvars = consdata->nvars;
3464 if( !consdata->deleteintvar )
3468 if( !consdata->changed )
3519 if( posnotinclq1 == v )
3525 for( v1 = v+1; v1 <
nvars; ++v1 )
3527 if( posnotinclq1 == v1 )
3542 if( posnotinclq1 == -1 )
3550 if( restart || (posnotinclq2 != v && posnotinclq2 != v1) )
3557 posnotinclq1 = posnotinclq2;
3578 if( posnotinclq1 == -1 )
3604 SCIP_Bool infeasible;
3607 SCIPdebugMsg(
scip,
"all variables of xor constraints <%s> are in one clique, so fixed all variables to 0\n",
3611 for( v =
nvars - 1; v >= 0; --v )
3616 assert(infeasible || fixed);
3640 if( !consdata->rhs )
3648 for( v = 0; v <
nvars; ++v )
3650 if( v == posnotinclq1 )
3684 if( consdata->intvar !=
NULL )
3686 SCIP_Bool infeasible;
3737 hashtablesize = nconss;
3741 hashGetKeyXorcons, hashKeyEqXorcons, hashKeyValXorcons, (
void*)
scip) );
3744 for(
c = 0;
c < nconss; ++
c )
3777 if( consdata0->nvars <= 1 )
3779 if( consdata0->nvars == 0 )
3782 if( consdata0->rhs )
3791 SCIP_Bool infeasible;
3803 if( consdata0->intvar !=
NULL && !consdata0->deleteintvar )
3805 SCIP_Bool infeasible;
3824 assert(consdata0->sorted);
3839 assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);
3841 assert(consdata0->sorted && consdata1->sorted);
3842 assert(consdata0->vars[0] == consdata1->vars[0]);
3844 if( consdata0->rhs != consdata1->rhs )
3851 if( consdata0->intvar != consdata1->intvar && consdata0->intvar !=
NULL )
3853 if( consdata1->intvar !=
NULL )
3855 SCIP_Bool redundant;
3856 SCIP_Bool aggregated;
3857 SCIP_Bool infeasible;
3929 SCIP_Bool cons0changed;
3933 assert(firstchange <= chkind);
3941 cons0 = conss[chkind];
3947 assert(consdata0->nvars >= 1);
3966 assert(consdata0->sorted);
3969 cons0changed = consdata0->changed;
3970 consdata0->changed =
FALSE;
3978 SCIP_Bool cons0hastwoothervars;
3979 SCIP_Bool cons1hastwoothervars;
3981 SCIP_Bool infeasible;
3983 SCIP_Bool redundant;
3984 SCIP_Bool aggregated;
3997 if( !consdata1->deleteintvar )
4011 SCIPdebugMsg(
scip,
"preprocess xor constraint pair <%s>[chg:%u] and <%s>[chg:%u]\n",
4015 if( !cons0changed && !consdata1->changed )
4019 if( consdata1->nvars == 0 )
4021 if( consdata1->rhs )
4029 if( consdata1->intvar !=
NULL && !consdata1->deleteintvar )
4044 else if( consdata1->nvars == 1 )
4054 if( consdata1->intvar !=
NULL && !consdata1->deleteintvar )
4071 assert(consdata0->sorted);
4075 else if( consdata1->nvars == 2 )
4077 if( !(consdata1->rhs) )
4081 &infeasible, &redundant, &aggregated) );
4087 &infeasible, &redundant, &aggregated) );
4103 assert(consdata0->sorted);
4109 if( consdata1->intvar !=
NULL && !consdata1->deleteintvar )
4113 if( consdata1->rhs )
4128 &infeasible, &redundant, &aggregated) );
4148 assert(consdata0->sorted);
4152 assert(consdata1->sorted);
4160 parity = (consdata0->rhs ^ consdata1->rhs);
4161 cons0hastwoothervars =
FALSE;
4162 cons1hastwoothervars =
FALSE;
4167 while( (v0 < consdata0->
nvars || v1 < consdata1->
nvars) && !aborted )
4174 if( v0 == consdata0->nvars )
4176 else if( v1 == consdata1->nvars )
4186 if( singlevar0 ==
NULL )
4188 singlevar0 = consdata0->vars[v0];
4189 if( cons1hastwoothervars )
4194 cons0hastwoothervars =
TRUE;
4195 if( singlevar1 !=
NULL )
4204 if( singlevar1 ==
NULL )
4206 singlevar1 = consdata1->vars[v1];
4207 if( cons0hastwoothervars )
4212 cons1hastwoothervars =
TRUE;
4213 if( singlevar0 !=
NULL )
4224 if( consdata0->vars[v0] != consdata1->vars[v1] )
4241 if( (cons0hastwoothervars && singlevar1 !=
NULL) || (cons1hastwoothervars && singlevar0 !=
NULL) )
4245 if( singlevar0 ==
NULL && singlevar1 ==
NULL )
4251 SCIPdebugMsg(
scip,
"xor constraints <%s> and <%s> are redundant: delete <%s>\n",
4261 if( consdata1->intvar !=
NULL )
4271 if( consdata0->intvar ==
NULL )
4279 &infeasible, &redundant, &aggregated) );
4295 newvars[0] = consdata1->intvar;
4297 newvars[1] = consdata0->intvar;
4325 else if( singlevar1 ==
NULL )
4328 if( !cons0hastwoothervars )
4350 SCIPdebugMsg(
scip,
"xor constraint <%s> is superset of <%s> with parity %u\n",
4354 for( v = 0; v < consdata1->nvars; ++v )
4361 assert(consdata0->nvars >= 2);
4368 assert(consdata0->sorted);
4370 else if( singlevar0 ==
NULL )
4373 if( !cons1hastwoothervars )
4381 assert(infeasible || fixed);
4395 SCIPdebugMsg(
scip,
"xor constraint <%s> is subset of <%s> with parity %u\n",
4399 for( v = 0; v < consdata0->nvars; ++v )
4405 assert(consdata1->nvars >= 2);
4411 assert(consdata1->sorted);
4416 assert(!cons0hastwoothervars);
4417 assert(!cons1hastwoothervars);
4420 SCIPdebugMsg(
scip,
"xor constraints <%s> and <%s> yield sum %u == xor(<%s>,<%s>)\n",
4427 &infeasible, &redundant, &aggregated) );
4433 &infeasible, &redundant, &aggregated) );
4448 if( consdata1->intvar !=
NULL )
4450 if( consdata0->intvar ==
NULL )
4458 &infeasible, &redundant, &aggregated) );
4467 if( !consdata0->sorted )
4469 assert(consdata0->sorted);
4515 SCIP_Bool modifiable,
4521 SCIP_Bool removable,
4523 SCIP_Bool stickingatnode
4533 if( conshdlr ==
NULL )
4543 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
4544 local, modifiable, dynamic, removable, stickingatnode) );
4601 if( integral && nposcont + nnegcont == 0 && nposbin + nnegbin + nposimplbin + nnegimplbin >=
nvars-1 && ncoeffspone + ncoeffsnone ==
nvars-1 && ncoeffspint + ncoeffsnint == 1 )
4603 assert( ncoeffspfrac + ncoeffsnfrac == 0 );
4609 SCIP_Bool postwo =
FALSE;
4616 for( j =
nvars - 1; j >= 0; --j )
4620 parityvar =
vars[j];
4621 postwo = (vals[j] > 0.0);
4641 xorvars[cnt] =
vars[j];
4646 if( parityvar !=
NULL )
4655 SCIP_Bool rhsparity;
4667 if ( (intrhs != 1 && intrhs != 0) || postwo )
4680 SCIP_Bool infeasible;
4681 SCIP_Bool redundant;
4682 SCIP_Bool aggregated;
4685 intrhshalfed = intrhs / 2;
4724 (
SCIP_Real) (postwo ? intrhshalfed : -intrhshalfed), &infeasible, &redundant, &aggregated) );
4768 assert(intvar != parityvar);
4794 SCIP_Real constant = 0.0;
4813 for(
i = 0;
i < nlocvars; ++
i )
4822 vals[nlocvars++] = 2.0;
4830 cons, lrhs, lrhs, success) );
4883 for(
c = 0;
c < nconss; ++
c )
4906 for( v = (*consdata)->nvars - 1; v >= 0; --v )
4928 assert(sourcedata->nvars >= 1);
4953 *infeasible =
FALSE;
4955 for(
i = 0;
i < nconss && !(*infeasible);
i++ )
4970 SCIP_Bool separated;
4980 for(
c = 0;
c < nusefulconss; ++
c )
4985 else if ( separated )
5001 SCIP_Bool separated;
5011 for(
c = 0;
c < nusefulconss; ++
c )
5016 else if ( separated )
5040 for(
i = 0;
i < nconss;
i++ )
5045 SCIP_Bool separated;
5077 for(
i = 0;
i < nconss;
i++ )
5082 SCIP_Bool separated;
5109 for(
i = 0;
i < nconss;
i++ )
5160 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
5168 else if( nfixedvars > 0 || nchgbds > 0 )
5179 freq = conshdlrdata->gausspropfreq;
5180 if ( (
depth == 0 && freq == 0) || (freq > 0 &&
depth % freq == 0) )
5205 for(
c = nconss - 1;
c >= 0; --
c )
5210 for( v = consdata->nvars - 1; v >= 0; --v )
5234 for(
c = 0;
c < nconss; ++
c )
5241 for( v = 0; v < consdata->nvars; ++v )
5260 SCIP_Bool redundant;
5261 SCIP_Bool aggregated;
5272 oldnfixedvars = *nfixedvars;
5273 oldnchgbds = *nchgbds;
5274 oldnaggrvars = *naggrvars;
5275 oldndelconss = *ndelconss;
5276 oldnchgcoefs = *nchgcoefs;
5283 firstchange = INT_MAX;
5293 consdata->propagated =
FALSE;
5296 if( firstchange == INT_MAX && consdata->changed )
5312 assert(consdata->nvars >= 2);
5315 if( consdata->nvars == 2 )
5317 SCIPdebugMsg(
scip,
"xor constraint <%s> has only two unfixed variables, rhs=%u\n",
5326 if( !consdata->rhs )
5332 &
cutoff, &redundant, &aggregated) );
5340 &
cutoff, &redundant, &aggregated) );
5353 SCIP_Bool fixedintvar;
5393 if( firstchange < nconss && conshdlrdata->presolusehashing )
5397 nfixedvars, naggrvars, ndelconss, naddconss, &
cutoff) );
5399 if( conshdlrdata->presolpairwise )
5401 SCIP_Longint npaircomparisons;
5403 npaircomparisons = 0;
5404 lastndelconss = *ndelconss;
5413 &
cutoff, nfixedvars, naggrvars, ndelconss, naddconss, nchgcoefs) );
5419 lastndelconss = *ndelconss;
5420 npaircomparisons = 0;
5430 else if( *nfixedvars > oldnfixedvars || *nchgbds > oldnchgbds || *naggrvars > oldnaggrvars
5431 || *ndelconss > oldndelconss || *nchgcoefs > oldnchgcoefs )
5441 int naddedconss = 0;
5448 if ( consdata->extvars !=
NULL )
5451 if ( conshdlrdata->addflowextended )
5459 (*naddconss) += naddedconss;
5490 for(
i = 0;
i < consdata->nvars; ++
i )
5496 if( consdata->intvar !=
NULL )
5527 const char* consname;
5541 sourcevars = sourceconsdata->vars;
5542 nvars = sourceconsdata->nvars;
5543 intvar = sourceconsdata->intvar;
5544 targetintvar =
NULL;
5553 if( intvar !=
NULL )
5558 if( targetintvar !=
NULL )
5569 targetintvar, initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable,
5601 targetintvar, initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable,
5638 if( varssize < requiredsize )
5641 varssize = requiredsize;
5649 assert(varssize >= requiredsize);
5654 endptr = strchr(endptr,
'=');
5657 if( endptr ==
NULL )
5667 str += *(str+1) ==
'=' ? 2 : 1;
5683 str = strchr(str+1,
'=');
5697 if( intvar ==
NULL )
5705 endptr = strchr(endptr,
')');
5707 if( endptr ==
NULL )
5715 if( intvar !=
NULL )
5719 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
5725 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
5753 if ( consdata->intvar !=
NULL )
5756 if ( varssize < consdata->
nvars + nintvar + consdata->nextvars )
5762 if ( consdata->intvar !=
NULL )
5763 vars[consdata->nvars] = consdata->intvar;
5765 if ( consdata->nextvars > 0 )
5768 cnt = consdata->nvars + nintvar;
5769 for (j = 0; j < consdata->extvarssize; ++j)
5771 if ( consdata->extvars[j] !=
NULL )
5772 vars[cnt++] = consdata->extvars[j];
5774 assert( cnt == consdata->nvars + nintvar + consdata->nextvars );
5794 if( consdata->intvar ==
NULL )
5795 (*nvars) = consdata->nvars + consdata->nextvars;
5797 (*
nvars) = consdata->nvars + 1 + consdata->nextvars;
5844 consdata->sorted =
FALSE;
5847 consdata->propagated =
FALSE;
5868 eventExecXor,
NULL) );
5876 consEnfolpXor, consEnfopsXor, consCheckXor, consLockXor,
5911 "constraints/xor/presolpairwise",
5912 "should pairwise constraint comparison be performed in presolving?",
5916 "constraints/xor/presolusehashing",
5917 "should hash table be used for detecting redundant constraints in advance?",
5921 "constraints/xor/addextendedform",
5922 "should the extended formulation be added in presolving?",
5926 "constraints/xor/addflowextended",
5927 "should the extended flow formulation be added (nonsymmetric formulation otherwise)?",
5931 "constraints/xor/separateparity",
5932 "should parity inequalities be separated?",
5936 "constraints/xor/gausspropfreq",
5937 "frequency for applying the Gauss propagator",
5966 SCIP_Bool modifiable,
5972 SCIP_Bool removable,
5974 SCIP_Bool stickingatnode
5984 if( conshdlr ==
NULL )
5994 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
5995 local, modifiable, dynamic, removable, stickingatnode) );
6040 return consdata->nvars;
6063 return consdata->vars;
6086 return consdata->intvar;
6108 return consdata->rhs;
Constraint handler for linear constraints in their most general form, .
Constraint handler for the set partitioning / packing / covering constraints .
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
static SCIP_RETCODE consdataFreeRows(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define DEFAULT_SEPARATEPARITY
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 addExtendedAsymmetricFormulation(SCIP *scip, SCIP_CONS *cons, int *naggrvars, int *naddedconss)
static SCIP_RETCODE checkSystemGF2(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *currentsol, SCIP_RESULT *result)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE setIntvar(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define DEFAULT_ADDFLOWEXTENDED
static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
#define DEFAULT_GAUSSPROPFREQ
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE cliquePresolve(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *nchgcoefs, int *ndelconss, int *naddconss, SCIP_Bool *cutoff)
#define DEFAULT_PRESOLPAIRWISE
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule)
static SCIP_Bool allRowsInLP(SCIP_CONSDATA *consdata)
#define MAXXORCONSSSYSTEM
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_VAR *intvar)
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 void solveRowEchelonGF2(int m, int n, int r, int *p, int *s, Type **A, Type *b, Type *x)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *nchgbds)
#define MINGAINPERNMINCOMPARISONS
static SCIP_RETCODE addExtendedFlowFormulation(SCIP *scip, SCIP_CONS *cons, int *naggrvars, int *naddedconss)
static SCIP_RETCODE addConflictBounds(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_BDCHGIDX *bdchgidx, PROPRULE proprule)
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool separateparity, SCIP_Bool *separated, SCIP_Bool *cutoff)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, int *nchgcoefs, int *nfixedvars, int *naggrvars, int *ndelconss, int *naddconss, SCIP_Bool *cutoff)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss, int *naddconss, int *nchgcoefs)
#define CONSHDLR_EAGERFREQ
#define DEFAULT_ADDEXTENDEDFORM
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE createConsXorIntvar(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_VAR *intvar, 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)
#define CONSHDLR_ENFOPRIORITY
#define LINCONSUPGD_PRIORITY
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
#define CONSHDLR_DELAYSEPA
static int computeRowEchelonGF2(SCIP *scip, int m, int n, int *p, int *s, Type **A, Type *b)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int *nchgcoefs, int *naggrvars, int *naddconss, SCIP_Bool *cutoff)
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file, SCIP_Bool endline)
Constraint handler for XOR constraints, .
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIP_MAXTREEDEPTH
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
int SCIPgetNVarsXor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)
SCIP_VAR * SCIPgetIntVarXor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, 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 SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define SCIP_DECL_LINCONSUPGD(x)
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_Bool SCIPgetRhsXor(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsXor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeConshdlrXor(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_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(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_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
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,...)
SCIP_RETCODE SCIPheurPassSolAddSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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)
void SCIPswapPointers(void **pointer1, void **pointer2)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
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 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_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)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
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_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_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
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_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#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_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
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 SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
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)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPcheckSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPextendPermsymDetectionGraphLinear(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool *success)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
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_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
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_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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)
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_Bool SCIPvarIsRemovable(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)
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_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
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_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortRealIntPtr(SCIP_Real *realarray, int *intarray, void **ptrarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
primal heuristic that tries a given solution
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
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 methods for primal heuristic plugins and divesets
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
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
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)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
#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)
#define SCIP_EVENTTYPE_BOUNDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_VARFIXED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_INITPRESOLVE
@ SCIP_STAGE_EXITPRESOLVE
enum SYM_Symtype SYM_SYMTYPE
#define SCIP_PRESOLTIMING_MEDIUM
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_Vartype SCIP_VARTYPE