67#define CONSHDLR_NAME "logicor"
68#define CONSHDLR_DESC "logic or constraints"
69#define CONSHDLR_SEPAPRIORITY +10000
70#define CONSHDLR_ENFOPRIORITY -2000000
71#define CONSHDLR_CHECKPRIORITY -2000000
72#define CONSHDLR_SEPAFREQ 0
73#define CONSHDLR_PROPFREQ 1
74#define CONSHDLR_EAGERFREQ 100
76#define CONSHDLR_MAXPREROUNDS -1
77#define CONSHDLR_DELAYSEPA FALSE
78#define CONSHDLR_DELAYPROP FALSE
79#define CONSHDLR_NEEDSCONS TRUE
81#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
82#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
84#define LINCONSUPGD_PRIORITY +800000
86#define EVENTHDLR_NAME "logicor"
87#define EVENTHDLR_DESC "event handler for logic or constraints"
89#define CONFLICTHDLR_NAME "logicor"
90#define CONFLICTHDLR_DESC "conflict handler creating logic or constraints"
91#define CONFLICTHDLR_PRIORITY LINCONSUPGD_PRIORITY
93#define DEFAULT_PRESOLPAIRWISE TRUE
94#define DEFAULT_STRENGTHEN TRUE
96#define HASHSIZE_LOGICORCONS 500
97#define DEFAULT_PRESOLUSEHASHING TRUE
98#define DEFAULT_DUALPRESOLVING TRUE
99#define DEFAULT_NEGATEDCLIQUE TRUE
100#define DEFAULT_IMPLICATIONS TRUE
105#define AGEINCREASE(n) (1.0 + 0.2 * (n))
107#define AGEINCREASE(n) (0.1 * (n))
118struct SCIP_ConshdlrData
123 SCIP_Bool presolpairwise;
124 SCIP_Bool presolusehashing;
126 SCIP_Bool dualpresolving;
127 SCIP_Bool usenegatedclique;
128 SCIP_Bool useimplications;
130 SCIP_Bool usestrengthening;
134 int nlastcliquesshorten;
135 int nlastimplsshorten;
155 unsigned int signature;
156 unsigned int presolved:1;
159 unsigned int impladded:1;
160 unsigned int sorted:1;
161 unsigned int changed:1;
162 unsigned int merged:1;
163 unsigned int existmultaggr:1;
164 unsigned int validsignature:1;
212 (*conshdlrdata)->nlastcliquesneg = 0;
213 (*conshdlrdata)->nlastimplsneg = 0;
214 (*conshdlrdata)->nlastcliquesshorten = 0;
215 (*conshdlrdata)->nlastimplsshorten = 0;
218 (*conshdlrdata)->eventhdlr = eventhdlr;
245 assert(consdata->nvars <= consdata->varssize);
247 if( num > consdata->varssize )
276 (*consdata)->row =
NULL;
277 (*consdata)->nlrow =
NULL;
281 (*consdata)->varssize =
nvars;
282 (*consdata)->nvars =
nvars;
286 (*consdata)->vars =
NULL;
287 (*consdata)->varssize = 0;
288 (*consdata)->nvars = 0;
290 (*consdata)->watchedvar1 = -1;
291 (*consdata)->watchedvar2 = -1;
292 (*consdata)->filterpos1 = -1;
293 (*consdata)->filterpos2 = -1;
294 (*consdata)->presolved =
FALSE;
295 (*consdata)->impladded =
FALSE;
296 (*consdata)->changed =
TRUE;
297 (*consdata)->sorted = (
nvars <= 1);
298 (*consdata)->merged = (
nvars <= 1);
299 (*consdata)->existmultaggr =
FALSE;
300 (*consdata)->validsignature =
FALSE;
308 for( v = 0; v < (*consdata)->nvars; v++ )
319 for( v = 0; v < (*consdata)->nvars; v++ )
342 if( (*consdata)->row !=
NULL )
348 if( (*consdata)->nlrow !=
NULL )
354 for( v = 0; v < (*consdata)->nvars; v++ )
406 assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);
407 assert(watchedvar1 != -1 || watchedvar2 == -1);
412 if( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )
416 tmp = consdata->watchedvar1;
417 consdata->watchedvar1 = consdata->watchedvar2;
418 consdata->watchedvar2 =
tmp;
419 tmp = consdata->filterpos1;
420 consdata->filterpos1 = consdata->filterpos2;
421 consdata->filterpos2 =
tmp;
423 assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);
424 assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);
427 if( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )
429 assert(consdata->filterpos1 != -1);
432 consdata->filterpos1) );
434 if( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )
436 assert(consdata->filterpos2 != -1);
439 consdata->filterpos2) );
443 if( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )
447 &consdata->filterpos1) );
449 if( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )
453 &consdata->filterpos2) );
457 consdata->watchedvar1 = watchedvar1;
458 consdata->watchedvar2 = watchedvar2;
472 SCIP_Bool transformed;
488 consdata->existmultaggr =
TRUE;
490 consdata->presolved =
FALSE;
496 consdata->vars[consdata->nvars] =
var;
515 consdata->sorted = (consdata->nvars == 1);
516 consdata->changed =
TRUE;
517 consdata->validsignature =
FALSE;
523 if( consdata->row !=
NULL )
528 consdata->merged =
FALSE;
564 if( consdata->watchedvar1 == pos )
568 if( consdata->watchedvar2 == pos )
573 assert(pos != consdata->watchedvar1);
574 assert(pos != consdata->watchedvar2);
580 if( pos != consdata->nvars - 1 )
582 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
583 consdata->sorted =
FALSE;
588 if( consdata->watchedvar1 == consdata->nvars )
589 consdata->watchedvar1 = pos;
590 if( consdata->watchedvar2 == consdata->nvars )
591 consdata->watchedvar2 = pos;
593 consdata->changed =
TRUE;
594 consdata->validsignature =
FALSE;
635 SCIP_Bool infeasible;
664 nvars = consdata->nvars;
672 vars = consdata->vars;
683 for( v =
nvars - 1; v >= 0; --v )
694 if( idx == consdata->nvars - 1 )
762 nvars = consdata->nvars;
769 for( v =
nvars - 1; v >= 0; --v )
800 nvars = consdata->nvars;
810 for( v = 0; v <
nvars; ++v )
879 SCIP_Bool* redundant,
901 assert(consdata->nvars == 0 || consdata->vars !=
NULL);
907 consdata->existmultaggr =
FALSE;
908 consdata->presolved =
TRUE;
913 var = consdata->vars[v];
933 if( consdata->nvars == 0 )
936 nvars = consdata->nvars;
946 for( v =
nvars - 1; v >= 0; --v )
955 SCIP_Real constant = 0.0;
984 for(
v2 = nconsvars - 1;
v2 >= 0; --
v2 )
1005 for(
v2 = nconsvars - 1;
v2 >= 0; --
v2 )
1026 size =
MAX(nconsvars, 1) +
nvars - 1;
1056 lhs = 1.0 - constant;
1077 if( ndelconss !=
NULL && naddconss !=
NULL )
1089 if(
var != consdata->vars[v] )
1101 else if(
var != consdata->vars[v] )
1139 consdata->presolved =
TRUE;
1164 for( v = 0; v < consdata->nvars; ++v )
1207 SCIP_Bool* redundant,
1235 nvars = consdata->nvars;
1239 if( consdata->merged )
1242 if( consdata->nvars <= 1 )
1244 consdata->merged =
TRUE;
1259 assert(consdata->presolved);
1265 vars = consdata->vars;
1268 for( v =
nvars - 1; v >= 0; --v )
1289 (*entries)[pos] = 0;
1293 for( v =
nvars - 1; v >= 0; --v )
1302 (*entries)[pos] =
negarray[v] ? 2 : 1;
1304 else if( (*
entries)[pos] == 1 )
1308 SCIPdebugMsg(
scip,
"logicor constraint <%s> redundant: variable <%s> and its negation are present\n",
1325 SCIPdebugMsg(
scip,
"logicor constraint <%s> redundant: variable <%s> and its negation are present\n",
1343 consdata->merged =
TRUE;
1378 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
1385 vars = consdata->vars;
1386 nvars = consdata->nvars;
1412 watchedvar1 = consdata->watchedvar1;
1417 if( watchedvar1 == -1 )
1419 watchedvar1 = consdata->watchedvar2;
1424 watchedvar2 = consdata->watchedvar2;
1428 assert(watchedvar1 >= 0 || watchedvar2 == -1);
1432 if( watchedvar2 == -1 )
1436 for( v = 0; v <
nvars; ++v )
1438 SCIP_Longint nbranchings;
1441 if( v == consdata->watchedvar1 || v == consdata->watchedvar2 )
1451 assert(v != consdata->watchedvar1);
1452 assert(v != consdata->watchedvar2);
1457 SCIPdebugMsg(
scip,
" -> disabling constraint <%s> (variable <%s> fixed to 1.0)\n",
1459 if( consdata->watchedvar1 != -1 )
1473 assert(nbranchings >= 0);
1478 watchedvar2 = watchedvar1;
1492 assert(watchedvar1 >= 0 || watchedvar2 == -1);
1494 if( watchedvar1 == -1 )
1500 assert(watchedvar2 == -1);
1516 else if( watchedvar2 == -1 )
1532 SCIPdebugMsg(
scip,
" -> single-literal constraint <%s> (fix <%s> to 1.0) at depth %d\n",
1537 if( watchedvar1 != consdata->watchedvar1 )
1547 SCIPdebugMsg(
scip,
" -> new watched variables <%s> and <%s> of constraint <%s> are still unfixed\n",
1584 vars = consdata->vars;
1585 nvars = consdata->nvars;
1589 for( v = 0; v <
nvars && sum < 1.0; ++v )
1601 SCIP_Real
absviol = 1.0 - sum;
1648 if( consdata->nlrow ==
NULL )
1654 for(
i = 0;
i < consdata->nvars; ++
i )
1688 if( consdata->row ==
NULL )
1789 SCIP_Bool* infeasible,
1846 if( !consdata->sorted )
1848 if( consdata->nvars <= 1 )
1849 consdata->sorted =
TRUE;
1856 if( consdata->watchedvar1 != -1 )
1858 var1 = consdata->vars[consdata->watchedvar1];
1860 consdata->watchedvar1 = -1;
1861 if( consdata->watchedvar2 != -1 )
1863 var2 = consdata->vars[consdata->watchedvar2];
1865 consdata->watchedvar2 = -1;
1868 assert(consdata->watchedvar1 == -1);
1869 assert(consdata->watchedvar2 == -1);
1874 consdata->sorted =
TRUE;
1889 consdata->watchedvar1 = pos;
1900 consdata->watchedvar2 = pos;
1911 for( v = consdata->nvars - 1; v > 0; --v )
1984 assert(consdata->sorted);
1985 assert(consdata->nvars > 0);
1990 assert(minidx >= 0 && minidx <= maxidx);
2016 hashtablesize = nconss;
2022 for(
c = 0;
c < nconss; ++
c )
2097 SCIPdebugMsg(
scip,
" -> removing logicor constraint <%s> which is redundant to <%s>\n",
2120 unsigned int signature = 0;
2126 for( v =
nvars - 1; v >= 0; --v )
2128 signature |= ((
unsigned int)1 << ((
unsigned int)
SCIPvarGetIndex(
vars[v]) % (
sizeof(
unsigned int) * 8)));
2142 if( consdata->validsignature )
2145 consdata->signature =
calcSignature(consdata->vars, consdata->nvars);
2146 consdata->validsignature =
TRUE;
2176 nvars = consdata->nvars;
2178 vars = consdata->vars;
2182 for( v =
nvars - 1; v >= 0; --v )
2238 for( v =
nvars - 1; v >= 0; --v )
2296 assert(consdata->nvars > 1);
2297 assert(consdata->validsignature);
2298 assert(consdata->sorted);
2300 vars = consdata->vars;
2314 for(
c = nentries - 1;
c >= 0; --
c )
2330 if(
consdata1->nvars == consdata->nvars )
2333 assert(consdata->validsignature);
2334 assert(consdata->sorted);
2338 if( (consdata->signature & (~
consdata1->signature)) == 0 )
2367 if( v == consdata->nvars )
2432 assert(consdata->nvars > 1);
2434 vars = consdata->vars;
2437 for( v = consdata->nvars - 1; v >= 0; --v )
2466 ++(*occurlistlength);
2522 unsigned int signature;
2543 assert(consdata->sorted);
2545 nvars = consdata->nvars;
2549 vars = consdata->vars;
2581 for(
c = nentries - 1;
c >= 0; --
c )
2601 assert(consdata->sorted);
2602 assert(consdata->merged);
2607 if( (signature & (~
consdata1->signature)) == 0 )
2684 SCIPdebugMsg(
scip,
"variable %s in logicor constraint <%s> is redundant and will be removed (used constraint %s)\n",
2715 SCIPdebugMsg(
scip,
"logicor constraint <%s> is redundant due to constraint <%s> after removing variable <%s>\n",
2782 for(
c = 0;
c < nconss; ++
c )
2794 nvars = consdata->nvars;
2800 vars = consdata->vars;
2803 for( v =
nvars - 1; v >= 0; --v )
2844 SCIP_Bool* redundant,
2867 assert(consdata->nvars > 0);
2872 if( !consdata->presolved )
2892 if( consdata->nvars == 0 )
2896 else if( consdata->nvars == 1 )
2898 SCIP_Bool infeasible;
2901 SCIPdebugMsg(
scip,
" -> fix last remaining variable and delete constraint\n");
2913 consdata->presolved =
TRUE;
2942 SCIP_Bool usestrengthening,
2958 SCIP_Bool redundant;
2983 SCIPdebugMsg(
scip,
"starting removeRedundantConssAndNonzeros(), pairwise comparison to detect covered logicor constraints\n");
2989 lastnfixedvars = -1;
2990 while( *nfixedvars != lastnfixedvars )
2992 lastnfixedvars = *nfixedvars;
2993 for(
c = nconss - 1;
c >= 0; --
c )
3032 assert(consdata->nvars >= 2);
3086 assert(consdata->validsignature);
3088 consdata->changed =
FALSE;
3103 while( consdata->nvars ==
nmaxvars );
3116 assert(consdata->validsignature);
3131 consdata->changed =
FALSE;
3175#define MAX_CONSLENGTH 200
3199 SCIP_Bool* boundtypes;
3236 for(
c = nconss - 1;
c >= 0; --
c )
3238 SCIP_Bool redundant =
FALSE;
3252 consdata->presolved =
FALSE;
3264 assert(consdata->nvars >= 2);
3271 for( v = consdata->nvars - 1; v >= 0; --v)
3273 var = consdata->vars[v];
3281 boundtypes[v] =
FALSE;
3287 boundtypes[v] =
TRUE;
3321 for( v = consdata->nvars - 1; v >= 0; --v )
3334 if( consdata->nvars == 1 )
3336 SCIP_Bool infeasible;
3339 SCIPdebugMsg(
scip,
" -> fix last remaining variable and delete constraint\n");
3355 for(
c = nconss - 1;
c >= 0; --
c )
3365 consdata->presolved =
FALSE;
3378#define MAXCOMPARISONS 1000000
3407 SCIP_Bool redundant;
3448 for(
c = nconss - 1;
c >= 0; --
c )
3474 assert(consdata->nvars >= 2);
3475 assert(consdata->nvars <= size);
3476 assert(consdata->presolved);
3492 for( v = consdata->nvars - 1; v >= 0; --v )
3498 for( v = consdata->nvars - 1; v > 0; --v )
3530 for(
w = v - 1;
w >= 0; --
w )
3561 SCIPdebugMsg(
scip,
"logicor constraint <%s> is redundant, because variable <%s> and its negation <%s> exist\n",
3573 SCIPdebugMsg(
scip,
"in logicor constraint <%s>, active variable of <%s> and active variable of <%s> are the same, removing the first\n",
3623 SCIPdebugMsg(
scip,
"logicor constraint <%s> is redundant due to negated clique information and will be replaced by a setppc constraint \n",
3674 SCIP_Bool infeasible;
3699 if( consdata->nvars == 2 )
3702 if( !consdata->impladded )
3706 SCIP_Bool values[2];
3724 SCIP_Bool redundant;
3740 consdata->impladded =
TRUE;
3744 if( consdata->nvars == 2 && conshdlrsetppc !=
NULL )
3774 if( consdata->nvars == 0 )
3780 else if( consdata->nvars == 1 )
3782 SCIPdebugMsg(
scip,
"logic or constraint <%s> has only one variable not fixed to 0.0\n",
3806 else if( conshdlrlinear !=
NULL )
3812 SCIPdebugMsg(
scip,
" -> variable is multi-aggregated, upgrade to linear constraint <%s> == 1 \n",
3863 SCIP_Bool modifiable,
3869 SCIP_Bool removable,
3871 SCIP_Bool stickingatnode
3887 for( v = 0; v <
nvars; ++v )
3889 if(
mult * vals[v] > 0.0 )
3900 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3970 SCIPdebugMsg(
scip,
"Enforcing %d logic or constraints for %s solution\n", nconss,
sol ==
NULL ?
"LP" :
"relaxation");
4060 conshdlrdata->nlastcliquesneg = 0;
4061 conshdlrdata->nlastimplsneg = 0;
4062 conshdlrdata->nlastcliquesshorten = 0;
4063 conshdlrdata->nlastimplsshorten = 0;
4066 for(
c = nconss - 1;
c >= 0; --
c )
4071 for( v = consdata->nvars - 1; v >= 0; --v )
4095 for(
c = 0;
c < nconss; ++
c )
4100 for( v = 0; v < consdata->nvars; ++v )
4108 SCIP_Bool redundant;
4127 consdata->presolved =
FALSE;
4144 for(
c = 0;
c < nconss; ++
c )
4161 for(
c = 0;
c < nconss; ++
c )
4166 if( consdata->row !=
NULL )
4171 if( consdata->nlrow !=
NULL )
4198 for( v = (*consdata)->nvars - 1; v >= 0; --v )
4251 *infeasible =
FALSE;
4253 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
4383 SCIP_Bool infeasible;
4417 else if( infeasible )
4456 for( v = 0; v < consdata->nvars; ++v )
4528 SCIP_Bool redundant;
4577 if( !consdata->presolved )
4603 if( consdata->nvars <= 2 )
4609 conshdlrdata->conshdlrsetppc, nfixedvars, nchgbds, nchgcoefs, ndelconss, naddconss, nupgdconss, &
cutoff) );
4635 if( consdata->nvars <= 2 )
4641 conshdlrdata->conshdlrsetppc, nfixedvars, nchgbds, nchgcoefs, ndelconss, naddconss, nupgdconss, &
cutoff) );
4682 conshdlrdata->usestrengthening, &
firstchange, nfixedvars, ndelconss, nchgcoefs, &
cutoff) );
4699 &
entries, &nentries, nfixedvars, ndelconss, nchgcoefs, &
cutoff) );
4712 conshdlrdata->eventhdlr, conss, nconss, &
entries, &nentries, nfixedvars, ndelconss,
4713 nupgdconss, nchgcoefs, &
cutoff) );
4751 SCIPdebugMsg(
scip,
"conflict resolving method of logic or constraint handler\n");
4761 for( v = 0; v < consdata->nvars; ++v )
4763 if( consdata->vars[v] !=
infervar )
4796 for(
i = 0;
i < consdata->nvars; ++
i )
4821 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
4827 if( consdata->watchedvar1 != -1 )
4831 &consdata->filterpos1) );
4833 if( consdata->watchedvar2 != -1 )
4837 &consdata->filterpos2) );
4865 assert(consdata->watchedvar1 == -1 || consdata->watchedvar1 != consdata->watchedvar2);
4871 if( consdata->watchedvar1 != -1 )
4873 assert(consdata->filterpos1 != -1);
4876 consdata->filterpos1) );
4877 consdata->watchedvar1 = -1;
4878 consdata->filterpos1 = -1;
4880 if( consdata->watchedvar2 != -1 )
4882 assert(consdata->filterpos2 != -1);
4885 consdata->filterpos2) );
4886 consdata->watchedvar2 = -1;
4887 consdata->filterpos2 = -1;
4920 const char* consname;
4935 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
valid) );
5011 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
5028 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
5067 (*nvars) = consdata->nvars;
5085 SCIPdebugMsg(
scip,
"exec method of event handler for logic or constraints\n");
5113 consdata->presolved =
FALSE;
5120 consdata->merged =
FALSE;
5122 if( !consdata->existmultaggr )
5125 consdata->existmultaggr =
TRUE;
5148 assert(bdchginfos !=
NULL || nbdchginfos == 0);
5158 if( nbdchginfos == 2 )
5165 for(
i = 0;
i < nbdchginfos; ++
i )
5183 if(
i == nbdchginfos )
5265 if( conshdlrdata->conshdlrlinear !=
NULL )
5273 "constraints/logicor/presolpairwise",
5274 "should pairwise constraint comparison be performed in presolving?",
5277 "constraints/logicor/presolusehashing",
5278 "should hash table be used for detecting redundant constraints in advance",
5281 "constraints/logicor/dualpresolving",
5282 "should dual presolving steps be performed?",
5285 "constraints/logicor/negatedclique",
5286 "should negated clique information be used in presolving",
5289 "constraints/logicor/implications",
5290 "should implications/cliques be used in presolving",
5293 "constraints/logicor/strengthen",
5294 "should pairwise constraint comparison try to strengthen constraints by removing superflous non-zeros?",
5323 SCIP_Bool modifiable,
5329 SCIP_Bool removable,
5331 SCIP_Bool stickingatnode
5343 if( conshdlr ==
NULL )
5353 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
5354 local, modifiable, dynamic, removable, stickingatnode) );
5364 for( v = consdata->nvars - 1; v >= 0; --v )
5441 return consdata->nvars;
5464 return consdata->vars;
5487 if( consdata->row !=
NULL )
5513 if( consdata->row !=
NULL )
5541 return consdata->row;
5562 if( conshdlr ==
NULL )
5577 for(
i = nconss - 1;
i > 0; --
i )
5580 SCIP_Bool redundant;
Constraint handler for linear constraints in their most general form, .
static SCIP_Bool isConsViolated(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define DEFAULT_DUALPRESOLVING
#define DEFAULT_IMPLICATIONS
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONFLICTHDLR_PRIORITY
static void consdataCalcSignature(SCIP_CONSDATA *consdata)
static SCIP_RETCODE dualPresolving(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int *nfixedvars, int *ndelconss, int *nchgcoefs, SCIP_RESULT *result)
#define CONFLICTHDLR_NAME
static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE createRow(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE processWatchedVars(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *reduceddom, SCIP_Bool *addcut, SCIP_Bool *mustcheck)
static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
static SCIP_RETCODE addConsToOccurList(SCIP *scip, SCIP_CONS *cons, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int *occurlistsizes, int *occurlistlength, int occurlistsize)
#define CONFLICTHDLR_DESC
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE removeConstraintsDueToNegCliques(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLR *conshdlrsetppc, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS **conss, int nconss, unsigned char **entries, int *nentries, int *nfixedvars, int *ndelconss, int *nupgdconss, int *nchgcoefs, SCIP_Bool *cutoff)
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
#define DEFAULT_STRENGTHEN
static SCIP_RETCODE removeRedundantConss(SCIP *scip, SCIP_CONS *cons, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int occurlistlength, int *ndelconss)
#define CONSHDLR_MAXPREROUNDS
static void findShortestOccurlist(SCIP_VAR **vars, int nvars, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int occurlistlength, int *nentries, SCIP_CONS ***shortestlist)
static SCIP_RETCODE removeRedundantConssAndNonzeros(SCIP *scip, SCIP_CONS **conss, int nconss, unsigned char **entries, int *nentries, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool usestrengthening, int *firstchange, int *nfixedvars, int *ndelconss, int *nchgcoefs, SCIP_Bool *cutoff)
static SCIP_RETCODE prepareCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, SCIP_Bool *redundant, int *nfixedvars, int *nchgcoefs, int *ndelconss, SCIP_Bool *cutoff)
#define DEFAULT_PRESOLPAIRWISE
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE enforcePseudo(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *infeasible, SCIP_Bool *reduceddom, SCIP_Bool *solvelp)
#define DEFAULT_NEGATEDCLIQUE
static SCIP_RETCODE createNormalizedLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, int mult, 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)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE shortenConss(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS **conss, int nconss, unsigned char **entries, int *nentries, int *nfixedvars, int *ndelconss, int *nchgcoefs, SCIP_Bool *cutoff)
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
#define DEFAULT_PRESOLUSEHASHING
static SCIP_RETCODE switchWatchedvars(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int watchedvar1, int watchedvar2)
static SCIP_RETCODE fixDeleteOrUpgradeCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_CONSHDLR *conshdlrlinear, SCIP_CONSHDLR *conshdlrsetppc, int *nfixedvars, int *nchgbds, int *nchgcoefs, int *ndelconss, int *naddconss, int *nupgdconss, SCIP_Bool *cutoff)
#define HASHSIZE_LOGICORCONS
static unsigned int calcSignature(SCIP_VAR **vars, int nvars)
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, int *ndelconss)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *separated, SCIP_Bool *reduceddom)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addNlrow(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE strengthenConss(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int occurlistlength, SCIP_EVENTHDLR *eventhdlr, int *ndelconss, int *nchgcoefs)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, unsigned char **entries, int *nentries, SCIP_Bool *redundant, int *nchgcoefs)
#define CONSHDLR_ENFOPRIORITY
#define LINCONSUPGD_PRIORITY
#define CONSHDLR_DELAYSEPA
static void removeConsFromOccurList(SCIP_CONS *cons, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int occurlistlength)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *redundant, int *nchgcoefs, int *naddconss, int *ndelconss)
static SCIP_RETCODE disableCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE removeRedundantCons(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, int *ndelconss)
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE removeRedundantNonZeros(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *artvar, int artpos, SCIP_HASHMAP *varstopos, SCIP_CONS ***occurlist, int *noccurlistentries, int occurlistlength, SCIP_EVENTHDLR *eventhdlr, int *nchgcoefs, SCIP_Bool *deleted)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file, SCIP_Bool endline)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
Constraint handler for the set partitioning / packing / covering constraints .
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetDualsolLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_ROW * SCIPgetRowLogicor(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 SCIPcleanupConssLogicor(SCIP *scip, SCIP_Bool onlychecked, int *naddconss, int *ndelconss, int *nchgcoefs)
#define SCIP_DECL_LINCONSUPGD(x)
SCIP_RETCODE SCIPcopyConsLinear(SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, 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 global, SCIP_Bool *valid)
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_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
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_Real SCIPgetDualfarkasLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLogicor(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPincludeConshdlrLogicor(SCIP *scip)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
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_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 SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
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)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
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_CONS ** SCIPconshdlrGetCheckConss(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,)
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 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)
int SCIPconshdlrGetNActiveConss(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_CONS ** SCIPconshdlrGetConss(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_RETCODE SCIPenableCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_RETCODE SCIPenableConsPropagation(SCIP *scip, SCIP_CONS *cons)
int SCIPconsGetValidDepth(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)
SCIP_RETCODE SCIPdisableCons(SCIP *scip, 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 SCIPdisableConsPropagation(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsAge(SCIP *scip, SCIP_CONS *cons, SCIP_Real deltaage)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(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)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
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_Bool SCIPhasCurrentNodeLP(SCIP *scip)
#define SCIPfreeCleanBufferArray(scip, ptr)
#define SCIPallocCleanBufferArray(scip, ptr, num)
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 SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(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_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
int SCIPgetNImplications(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_RETCODE SCIPshrinkDisjunctiveVarSet(SCIP *scip, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_Bool *boundtypes, SCIP_Bool *redundants, int nvars, int *nredvars, int *nglobalred, SCIP_Bool *setredundant, SCIP_Bool *glbinfeas, SCIP_Bool fullshortening)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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 SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(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 SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
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 SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
int SCIPvarGetNImpls(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
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_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
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_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPcleanupCliques(SCIP *scip, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
int SCIPgetNCliques(SCIP *scip)
SCIP_Real SCIPvarGetLbGlobal(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_Longint SCIPvarGetNBranchingsCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
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,...)
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
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
methods commonly used for presolving
public methods for conflict analysis handlers
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 cuts and aggregation rows
public methods for event handler plugins and event handlers
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 querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
#define SCIP_DECL_CONFLICTEXEC(x)
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#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)
#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)
#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_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_EVENTTYPE_VARFIXED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
@ SCIP_BRANCHDIR_DOWNWARDS
#define SCIP_DECL_SORTPTRCOMP(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_TRANSFORMING
#define SCIP_PRESOLTIMING_MEDIUM
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARSTATUS_MULTAGGR