145 #define BOUNDSWITCH 0.51 146 #define POSTPROCESS FALSE 147 #define USEVBDS FALSE 148 #define ALLOWLOCAL FALSE 150 #define MAXFRAC 0.999 155 #ifdef SCIP_CONFGRAPH 162 static FILE* confgraphfile = NULL;
164 static int confgraphnconflictsets = 0;
168 void confgraphWriteNode(
171 const char* nodetype,
172 const char* fillcolor,
173 const char* bordercolor
176 assert(confgraphfile != NULL);
178 SCIPgmlWriteNode(confgraphfile, (
unsigned int)(
size_t)idptr, label, nodetype, fillcolor, bordercolor);
183 void confgraphWriteEdge(
189 assert(confgraphfile != NULL);
191 #ifndef SCIP_CONFGRAPH_EDGE 192 SCIPgmlWriteArc(confgraphfile, (
unsigned int)(
size_t)source, (
unsigned int)(
size_t)target, NULL, color);
194 SCIPgmlWriteEdge(confgraphfile, (
unsigned int)(
size_t)source, (
unsigned int)(
size_t)target, NULL, color);
207 assert(conflict != NULL);
208 assert(confgraphfile == NULL);
211 SCIPinfoMessage(set->scip, NULL,
"storing conflict graph in file <%s>\n", fname);
213 confgraphfile = fopen(fname,
"w");
215 if( confgraphfile == NULL )
224 confgraphWriteNode(NULL,
"conflict",
"ellipse",
"#ff0000",
"#000000");
226 confgraphcurrentbdchginfo = NULL;
237 if( confgraphfile != NULL )
241 fclose(confgraphfile);
243 confgraphfile = NULL;
244 confgraphnconflictsets = 0;
250 void confgraphAddBdchg(
254 const char* colors[] = {
289 confgraphWriteNode(bdchginfo, label,
"ellipse", colors[col],
"#000000");
290 confgraphWriteEdge(bdchginfo, confgraphcurrentbdchginfo,
"#000000");
295 void confgraphLinkBdchg(
299 confgraphWriteEdge(bdchginfo, confgraphcurrentbdchginfo,
"#000000");
304 void confgraphSetCurrentBdchg(
308 confgraphcurrentbdchginfo = bdchginfo;
313 void confgraphMarkConflictset(
320 assert(conflictset != NULL);
322 confgraphnconflictsets++;
324 confgraphWriteNode((
void*)(
size_t)confgraphnconflictsets, label,
"rectangle",
"#ff00ff",
"#000000");
326 confgraphWriteEdge((
void*)(
size_t)confgraphnconflictsets, conflictset->
bdchginfos[i],
"#ff00ff");
354 assert(paramdata != NULL);
368 assert(conflicthdlr != NULL);
370 assert(set->scip != NULL);
372 if( conflicthdlr->conflictcopy != NULL )
375 SCIP_CALL( conflicthdlr->conflictcopy(set->scip, conflicthdlr) );
403 assert(conflicthdlr != NULL);
404 assert(name != NULL);
405 assert(desc != NULL);
410 (*conflicthdlr)->priority = priority;
411 (*conflicthdlr)->conflictcopy = conflictcopy;
412 (*conflicthdlr)->conflictfree = conflictfree;
413 (*conflicthdlr)->conflictinit = conflictinit;
414 (*conflicthdlr)->conflictexit = conflictexit;
415 (*conflicthdlr)->conflictinitsol = conflictinitsol;
416 (*conflicthdlr)->conflictexitsol = conflictexitsol;
417 (*conflicthdlr)->conflictexec = conflictexec;
418 (*conflicthdlr)->conflicthdlrdata = conflicthdlrdata;
419 (*conflicthdlr)->initialized =
FALSE;
428 priority, INT_MIN, INT_MAX, paramChgdConflicthdlrPriority, (
SCIP_PARAMDATA*)(*conflicthdlr)) );
439 assert(conflicthdlr != NULL);
440 assert(*conflicthdlr != NULL);
441 assert(!(*conflicthdlr)->initialized);
445 if( (*conflicthdlr)->conflictfree != NULL )
447 SCIP_CALL( (*conflicthdlr)->conflictfree(set->scip, *conflicthdlr) );
466 assert(conflicthdlr != NULL);
475 if( set->misc_resetstat )
482 if( conflicthdlr->conflictinit != NULL )
487 SCIP_CALL( conflicthdlr->conflictinit(set->scip, conflicthdlr) );
503 assert(conflicthdlr != NULL);
513 if( conflicthdlr->conflictexit != NULL )
518 SCIP_CALL( conflicthdlr->conflictexit(set->scip, conflicthdlr) );
534 assert(conflicthdlr != NULL);
538 if( conflicthdlr->conflictinitsol != NULL )
543 SCIP_CALL( conflicthdlr->conflictinitsol(set->scip, conflicthdlr) );
558 assert(conflicthdlr != NULL);
562 if( conflicthdlr->conflictexitsol != NULL )
567 SCIP_CALL( conflicthdlr->conflictexitsol(set->scip, conflicthdlr) );
592 assert(conflicthdlr != NULL);
594 assert(bdchginfos != NULL || nbdchginfos == 0);
595 assert(result != NULL);
599 if( conflicthdlr->conflictexec != NULL )
604 SCIP_CALL( conflicthdlr->conflictexec(set->scip, conflicthdlr, node, validnode, bdchginfos, relaxedbds, nbdchginfos,
605 conftype, usescutoffbound, set->conf_separate, (
SCIPnodeGetDepth(validnode) > 0), set->conf_dynamic,
606 set->conf_removable, resolved, result) );
615 SCIPerrorMessage(
"execution method of conflict handler <%s> returned invalid result <%d>\n",
616 conflicthdlr->
name, *result);
629 assert(conflicthdlr != NULL);
640 assert(conflicthdlr != NULL);
651 assert(conflicthdlr != NULL);
653 conflicthdlr->conflictcopy = conflictcopy;
662 assert(conflicthdlr != NULL);
664 conflicthdlr->conflictfree = conflictfree;
673 assert(conflicthdlr != NULL);
675 conflicthdlr->conflictinit = conflictinit;
684 assert(conflicthdlr != NULL);
686 conflicthdlr->conflictexit = conflictexit;
695 assert(conflicthdlr != NULL);
697 conflicthdlr->conflictinitsol = conflictinitsol;
706 assert(conflicthdlr != NULL);
708 conflicthdlr->conflictexitsol = conflictexitsol;
716 assert(conflicthdlr != NULL);
718 return conflicthdlr->
name;
726 assert(conflicthdlr != NULL);
728 return conflicthdlr->
desc;
736 assert(conflicthdlr != NULL);
748 assert(conflicthdlr != NULL);
752 set->conflicthdlrssorted =
FALSE;
760 assert(conflicthdlr != NULL);
771 assert(conflicthdlr != NULL);
782 assert(conflicthdlr != NULL);
792 assert(conflicthdlr != NULL);
819 (*lpbdchgs)->nbdchgs = 0;
831 assert(lpbdchgs != NULL);
863 assert(proofset != NULL);
877 assert(proofset != NULL);
880 (*proofset)->vals = NULL;
881 (*proofset)->inds = NULL;
882 (*proofset)->rhs = 0.0;
883 (*proofset)->nnz = 0;
884 (*proofset)->size = 0;
897 assert(conflict != NULL);
898 assert(blkmem != NULL);
912 assert(proofset != NULL);
913 assert(*proofset != NULL);
914 assert(blkmem != NULL);
933 assert(proofset != NULL);
936 assert(vars != NULL);
938 printf(
"proofset: ");
939 for( i = 0; i < proofset->
nnz; i++ )
941 printf(
" <= %.15g\n", proofset->
rhs);
951 assert(proofset != NULL);
953 return proofset->
inds;
962 assert(proofset != NULL);
964 return proofset->
vals;
973 assert(proofset != NULL);
975 return proofset->
rhs;
984 assert(proofset != NULL);
986 return proofset->
nnz;
995 assert(proofset != NULL);
1011 assert(proofset != NULL);
1012 assert(blkmem != NULL);
1014 if( proofset->
size == 0 )
1016 assert(proofset->
vals == NULL);
1017 assert(proofset->
inds == NULL);
1022 proofset->
size = nnz;
1028 assert(proofset->
vals != NULL);
1029 assert(proofset->
inds != NULL);
1031 if( proofset->
size < nnz )
1035 proofset->
size = nnz;
1038 for( i = 0; i < nnz; i++ )
1040 proofset->
vals[i] = vals[i];
1041 proofset->
inds[i] = inds[i];
1045 proofset->
rhs = rhs;
1046 proofset->
nnz = nnz;
1065 assert(proofset != NULL);
1066 assert(
set != NULL);
1069 assert(inds != NULL);
1076 for( i = 0; i < nnz; i++ )
1102 assert(proofset != NULL);
1103 assert(var != NULL);
1104 assert(pos >= 0 && pos < proofset->nnz);
1105 assert(valid != NULL);
1110 if( proofset->
vals[pos] > 0.0 )
1117 assert(proofset->
vals[pos] < 0.0);
1123 proofset->
vals[pos] = proofset->
vals[proofset->
nnz];
1124 proofset->
inds[pos] = proofset->
inds[proofset->
nnz];
1125 proofset->
vals[proofset->
nnz] = 0.0;
1126 proofset->
inds[proofset->
nnz] = 0;
1144 assert(conflict != NULL);
1145 assert(
set != NULL);
1155 assert(num <= conflict->tmpbdchginfossize);
1173 assert(conflict != NULL);
1177 var, boundtype, oldbound, newbound) );
1193 assert(conflict != NULL);
1206 assert(conflictset != NULL);
1225 assert(conflictset != NULL);
1228 (*conflictset)->bdchginfos = NULL;
1229 (*conflictset)->relaxedbds = NULL;
1230 (*conflictset)->sortvals = NULL;
1231 (*conflictset)->bdchginfossize = 0;
1244 int nadditionalelems
1249 assert(targetconflictset != NULL);
1250 assert(sourceconflictset != NULL);
1252 targetsize = sourceconflictset->
nbdchginfos + nadditionalelems;
1257 (*targetconflictset)->bdchginfossize = targetsize;
1263 (*targetconflictset)->nbdchginfos = sourceconflictset->
nbdchginfos;
1264 (*targetconflictset)->validdepth = sourceconflictset->
validdepth;
1265 (*targetconflictset)->insertdepth = sourceconflictset->
insertdepth;
1266 (*targetconflictset)->conflictdepth = sourceconflictset->
conflictdepth;
1267 (*targetconflictset)->repropdepth = sourceconflictset->
repropdepth;
1268 (*targetconflictset)->usescutoffbound = sourceconflictset->
usescutoffbound;
1269 (*targetconflictset)->conflicttype = sourceconflictset->
conflicttype;
1281 assert(conflictset != NULL);
1282 assert(*conflictset != NULL);
1299 assert(conflictset != NULL);
1300 assert(
set != NULL);
1312 assert(num <= conflictset->bdchginfossize);
1327 assert(conflictset != NULL);
1329 return -(
set->conf_weightsize * conflictset->
nbdchginfos 1330 +
set->conf_weightrepropdepth * conflictset->
repropdepth 1331 +
set->conf_weightvaliddepth * conflictset->
validdepth);
1350 score =
set->conf_proofscorefac * (1.0 - proofactdelta/(prooflhs - proofact));
1351 score =
MAX(score, 0.0);
1359 if( proofcoef > 0.0 )
1418 assert(bdchginfo != NULL);
1421 assert(var != NULL);
1471 assert(conflictset != NULL);
1472 assert(bdchginfo != NULL);
1484 assert(idx < INT_MAX/2);
1485 assert((
int)boundtype == 0 || (
int)boundtype == 1);
1486 sortval = 2*idx + (int)boundtype;
1495 assert(pos == conflictset->
nbdchginfos - 1 || sortval < sortvals[pos+1]);
1498 if( pos > 0 && sortval == sortvals[pos-1] )
1514 relaxedbds[pos-1] = boundtype ==
SCIP_BOUNDTYPE_LOWER ?
MAX(relaxedbds[pos-1], relaxedbd) : MIN(relaxedbds[pos-1], relaxedbd);
1537 int confnbdchginfos;
1543 assert(conflict != NULL);
1544 assert(conflictset != NULL);
1545 assert(blkmem != NULL);
1546 assert(
set != NULL);
1547 assert(bdchginfos != NULL || nbdchginfos == 0);
1550 if( nbdchginfos == 0 )
1553 assert(bdchginfos != NULL);
1556 if( nbdchginfos == 1 )
1558 bdchginfo = bdchginfos[0];
1559 assert(bdchginfo != NULL);
1583 confsortvals = conflictset->
sortvals;
1588 for( i = 0; i < nbdchginfos; ++i )
1590 bdchginfo = bdchginfos[i];
1591 assert(bdchginfo != NULL);
1601 assert(idx < INT_MAX/2);
1603 assert((
int)boundtype == 0 || (
int)boundtype == 1);
1604 sortval = 2*idx + (int)boundtype;
1607 confbdchginfos[confnbdchginfos] = bdchginfo;
1609 confsortvals[confnbdchginfos] = sortval;
1620 assert(confnbdchginfos <= conflictset->nbdchginfos + nbdchginfos);
1628 SCIPsortIntPtrReal(confsortvals, (
void**)confbdchginfos, confrelaxedbds, confnbdchginfos);
1632 while( i < confnbdchginfos )
1637 if( confsortvals[k] == confsortvals[i] )
1644 confbdchginfos[k] = confbdchginfos[i];
1645 confrelaxedbds[k] = confrelaxedbds[i];
1646 confsortvals[k] = confsortvals[i];
1651 assert(confsortvals[k] == confsortvals[i]);
1654 confrelaxedbds[k] = (confsortvals[k] % 2 == 0) ?
MAX(confrelaxedbds[k], confrelaxedbds[i]) : MIN(confrelaxedbds[k], confrelaxedbds[i]);
1667 confbdchginfos[k] = confbdchginfos[i];
1668 confrelaxedbds[k] = confrelaxedbds[i];
1669 confsortvals[k] = confsortvals[i];
1680 assert(k + 1 <= confnbdchginfos);
1697 assert(conflictset != NULL);
1709 if( depth > maxdepth[0] )
1711 maxdepth[1] = maxdepth[0];
1712 maxdepth[0] = depth;
1714 else if( depth > maxdepth[1] )
1715 maxdepth[1] = depth;
1717 assert(maxdepth[0] >= maxdepth[1]);
1744 assert(conflictset != NULL);
1745 assert(
set != NULL);
1746 assert(tree != NULL);
1753 assert(currentdepth == tree->
pathlen-1);
1763 depth = MIN(depth, currentdepth+1);
1764 branchingincluded[depth] =
TRUE;
1789 assert(conflictset1 != NULL);
1790 assert(conflictset2 != NULL);
1804 assert(i2 == 0 || conflictset2->
sortvals[i2-1] < conflictset2->
sortvals[i2]);
1806 sortval = conflictset2->
sortvals[i2];
1810 assert(i1 == 0 || conflictset1->
sortvals[i1-1] < conflictset1->
sortvals[i1]);
1823 void conflictsetPrint(
1829 assert(conflictset != NULL);
1849 assert(conflict != NULL);
1850 assert(
set != NULL);
1860 assert(num <= conflict->proofsetssize);
1873 assert(conflict != NULL);
1874 assert(
set != NULL);
1885 assert(num <= conflict->conflictsetssize);
1898 assert(conflict != NULL);
1899 assert(proofset != NULL);
1924 assert(conflict != NULL);
1925 assert(
set != NULL);
1926 assert(conflictset != NULL);
1927 assert(*conflictset != NULL);
1928 assert((*conflictset)->validdepth <= (*conflictset)->insertdepth);
1929 assert(set->conf_allowlocal || (*conflictset)->validdepth == 0);
1935 if( set->conf_repropagate )
1936 (*conflictset)->insertdepth = MIN((*conflictset)->insertdepth, (*conflictset)->repropdepth);
1938 (*conflictset)->repropdepth = INT_MAX;
1939 assert((*conflictset)->insertdepth <= (*conflictset)->repropdepth);
1941 SCIPsetDebugMsg(
set,
"inserting conflict set (valid: %d, insert: %d, conf: %d, reprop: %d):\n",
1942 (*conflictset)->validdepth, (*conflictset)->insertdepth, (*conflictset)->conflictdepth, (*conflictset)->repropdepth);
1943 SCIPdebug(conflictsetPrint(*conflictset));
1977 for( i = pos+1, j = pos+1; i < conflict->
nconflictsets; ++i )
1993 assert(j <= conflict->nconflictsets);
1996 #ifdef SCIP_CONFGRAPH 1997 confgraphMarkConflictset(*conflictset);
2000 *conflictset = NULL;
2014 assert(
set != NULL);
2015 assert(prob != NULL);
2017 maxsize = (int)(set->conf_maxvarsfac * (prob->
nvars - prob->
ncontvars));
2018 maxsize =
MAX(maxsize, set->conf_minmaxvars);
2037 assert(var != NULL);
2038 assert(stat != NULL);
2065 if( insertdepth > 0 )
2076 for( i = 0; i < conflictlength; i++ )
2083 assert(stat != NULL);
2096 SCIP_CALL(
incVSIDS(var, blkmem,
set, stat, boundtype, bound, set->conf_conflictweight) );
2121 assert(
set != NULL);
2122 assert(conflictset != NULL);
2126 assert(bdchginfos != NULL);
2127 assert(relaxedbds != NULL);
2130 for( v = conflictset->
nbdchginfos - 1; v >= 0; --v )
2133 assert(var != NULL);
2140 bound = relaxedbds[v];
2193 int ntrivialredvars;
2198 assert(
set != NULL);
2199 assert(prob != NULL);
2201 assert(conflictset != NULL);
2202 assert(nbdchgs != NULL);
2203 assert(nredvars != NULL);
2221 assert(bdchginfos != NULL);
2222 assert(relaxedbds != NULL);
2223 assert(sortvals != NULL);
2229 ntrivialredvars = 0;
2234 for( v = nbdchginfos - 1; v >= 0; --v )
2237 bound = relaxedbds[v];
2242 bound += (isupper ? -1.0 : +1.0);
2250 bdchginfos[v] = bdchginfos[nbdchginfos - 1];
2251 relaxedbds[v] = relaxedbds[nbdchginfos - 1];
2252 sortvals[v] = sortvals[nbdchginfos - 1];
2258 assert(ntrivialredvars + nbdchginfos == conflictset->
nbdchginfos);
2260 SCIPsetDebugMsg(
set,
"trivially removed %d redundant of %d variables from conflictset (%p)\n", ntrivialredvars, conflictset->
nbdchginfos, (
void*)conflictset);
2261 conflictset->nbdchginfos = nbdchginfos;
2264 if( conflictset->nbdchginfos == 0 )
2268 if( conflictset->nbdchginfos > set->conf_maxvarsdetectimpliedbounds || conflictset->nbdchginfos == 1 )
2270 *nredvars = ntrivialredvars;
2283 for( v = 0; v < nbdchginfos; ++v )
2287 bounds[v] = relaxedbds[v];
2298 if( !boundtypes[v] )
2315 bounds[v] += ((!boundtypes[v]) ? +1.0 : -1.0);
2331 if( nbinimpls[v] == 0 )
2336 if( v == nbdchginfos && ((!set->conf_fullshortenconflict && nzeroimpls < 2) || (set->conf_fullshortenconflict && nzeroimpls < nbdchginfos)) )
2347 for( v = 0; v < nbdchginfos; ++v )
2350 if( v < nbdchginfos - 1 )
2359 for( v = 0; v < nbdchginfos; ++v )
2363 nbdchgs, redundant, &glbinfeas, set->conf_fullshortenconflict) );
2367 SCIPsetDebugMsg(
set,
"conflict set (%p) led to global infeasibility\n", (
void*) conflictset);
2374 SCIPsetDebugMsg(
set,
"conflict set (%p) led to %d global bound reductions\n", (
void*) conflictset, *nbdchgs);
2381 SCIPsetDebugMsg(
set,
"conflict set (%p) is redundant because at least one global reduction, fulfills the conflict constraint\n", (
void*)conflictset);
2385 else if( *nredvars > 0 )
2387 assert(bdchginfos == conflictset->bdchginfos);
2388 assert(relaxedbds == conflictset->relaxedbds);
2389 assert(sortvals == conflictset->sortvals);
2391 for( v = nbdchginfos - 1; v >= 0; --v )
2398 bdchginfos[v] = bdchginfos[nbdchginfos - 1];
2399 relaxedbds[v] = relaxedbds[nbdchginfos - 1];
2400 sortvals[v] = sortvals[nbdchginfos - 1];
2408 assert((*nredvars) + nbdchginfos == conflictset->nbdchginfos);
2410 SCIPsetDebugMsg(
set,
"removed %d redundant of %d variables from conflictset (%p)\n", (*nredvars), conflictset->nbdchginfos, (
void*)conflictset);
2411 conflictset->nbdchginfos = nbdchginfos;
2424 *nredvars += ntrivialredvars;
2458 assert(tree != NULL);
2485 SCIPsetDebugMsg(
set,
"detect global infeasibility at var <%s>: locdom=[%g,%g] glbdom=[%g,%g] new %s bound=%g\n",
2527 SCIP_CALL(
SCIPnodeAddBoundchg(tree->
root, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, \
2528 eventqueue, cliquetable, var, newbound, boundtype,
FALSE) );
2571 assert(vars != NULL);
2576 for( i = 0; i < nnz; i++ )
2610 assert(coefs != NULL);
2611 assert(inds != NULL);
2614 assert(vars != NULL);
2616 for( i = 0; i < nnz; i++ )
2650 assert(coefs != NULL);
2651 assert(inds != NULL);
2654 assert(vars != NULL);
2656 for( i = 0; i < nnz; i++ )
2700 assert(coefs != NULL);
2701 assert(inds != NULL);
2705 minact =
getMinActivity(transprob, coefs, inds, nnz, NULL, NULL);
2707 for( i = 0; i < nnz; i++ )
2731 resminact -= (val * lb);
2732 newub = (rhs - resminact)/val;
2741 SCIP_CALL(
tightenSingleVar(conflict,
set, stat, tree, blkmem, origprob, transprob, reopt, lp, branchcand, \
2742 eventqueue, cliquetable, var, val, rhs-resminact, conflicttype) );
2749 resminact -= (val * ub);
2750 newlb = (rhs - resminact)/val;
2759 SCIP_CALL(
tightenSingleVar(conflict,
set, stat, tree, blkmem, origprob, transprob, reopt, lp, branchcand, \
2760 eventqueue, cliquetable, var, val, rhs-resminact, conflicttype) );
2806 assert(conflict != NULL);
2807 assert(conflictstore != NULL);
2808 assert(proofset != NULL);
2821 assert(coefs != NULL);
2824 assert(inds != NULL);
2838 globalminactivity =
getMinActivity(transprob, coefs, inds, nnz, NULL, NULL);
2841 SCIPsetDebugMsg(
set,
"detect global infeasibility: minactivity=%g, rhs=%g\n", globalminactivity, rhs);
2845 goto UPDATESTATISTICS;
2848 if( set->conf_minmaxvars >= nnz )
2855 maxnnz = 0.85 * transprob->
nvars;
2864 toolong = (fillin > MIN(2.0 * stat->
avgnnz, maxnnz));
2872 toolong = (fillin > MIN(1.5 * stat->
avgnnz, maxnnz));
2875 toolong = (toolong && (nnz >
set->conf_maxvarsfac * transprob->
nvars));
2881 SCIP_CALL(
propagateLongProof(conflict,
set, stat, reopt, tree, blkmem, origprob, transprob, lp, branchcand,
2882 eventqueue, cliquetable, coefs, inds, nnz, rhs, conflicttype) );
2896 for( i = 0; i < nnz; i++ )
2908 if( upgdcons != NULL )
2945 assert(conshdlr != NULL);
2987 SCIPsetDebugMsg(
set,
"added proof-constraint to node %p in depth 0 (nproofconss %d)\n", (
void*)tree->
path[0],
3029 assert(conflict != NULL);
3048 branchcand, eventqueue, cliquetable, vars[inds[0]], coefs[0], rhs, conflict->
proofset->
conflicttype) );
3066 skipinitialproof =
TRUE;
3072 if( !skipinitialproof )
3076 tree, reopt, lp, branchcand, eventqueue, cliquetable, blkmem) );
3108 branchcand, eventqueue, cliquetable, vars[inds[0]], coefs[0], rhs,
3115 transprob, tree, reopt, lp, branchcand, eventqueue, cliquetable, blkmem) );
3152 assert(conflict != NULL);
3153 assert(tree != NULL);
3154 assert(tree->
path != NULL);
3155 assert(conflictset != NULL);
3156 assert(conflictset->
validdepth <= insertdepth);
3157 assert(success != NULL);
3191 SCIPsetDebugMsg(
set,
" -> conflict set removed %d redundant variables (old nvars %d, new nvars = %d)\n", nredvars, oldnbdchginfos, conflictset->
nbdchginfos);
3192 SCIPsetDebugMsg(
set,
" -> conflict set led to %d global bound changes %s(cdpt:%d, fdpt:%d, confdpt:%d, len:%d):\n",
3195 conflictsetPrint(conflictset);
3224 assert(var != NULL);
3240 reopt, lp, branchcand, eventqueue, cliquetable, var, bound, boundtype,
FALSE) );
3251 for( h = 0; h <
set->nconflicthdlrs; ++h )
3266 SCIPsetDebugMsg(
set,
" -> call conflict handler <%s> (prio=%d) to create conflict set with %d bounds returned result %d\n",
3294 assert(conflict != NULL);
3295 assert(
set != NULL);
3296 assert(stat != NULL);
3297 assert(transprob != NULL);
3298 assert(tree != NULL);
3304 int nconflictsetsused;
3311 int maxconflictsets;
3316 maxconflictsets = (
set->conf_maxconss == -1 ? INT_MAX :
set->conf_maxconss);
3322 assert(focusdepth <= currentdepth);
3323 assert(currentdepth == tree->
pathlen-1);
3326 SCIPsetDebugMsg(
set,
"flushing %d conflict sets at focus depth %d (maxconflictsets: %d, maxsize: %d)\n",
3327 conflict->
nconflictsets, focusdepth, maxconflictsets, maxsize);
3333 nconflictsetsused = 0;
3334 cutoffdepth = INT_MAX;
3335 repropdepth = INT_MAX;
3336 repropconflictset = NULL;
3337 for( i = 0; i < conflict->
nconflictsets && nconflictsetsused < maxconflictsets; ++i )
3342 assert(conflictset != NULL);
3353 SCIPsetDebugMsg(
set,
" -> ignoring conflict set with insertdepth %d >= cutoffdepth %d\n",
3363 SCIPsetDebugMsg(
set,
" -> empty conflict set in depth %d cuts off sub tree at depth %d\n",
3378 repropconflictset = conflictset;
3387 branchcand, eventqueue, cliquetable, conflictset, conflictset->
insertdepth, &success) );
3396 SCIPsetDebugMsg(
set,
" -> empty conflict set in depth %d cuts off sub tree at depth %d\n",
3400 reopt, lp, blkmem) );
3407 SCIPsetDebugMsg(
set,
" -> conflict set %d/%d added (cdpt:%d, fdpt:%d, insert:%d, valid:%d, conf:%d, reprop:%d, len:%d):\n",
3411 SCIPdebug(conflictsetPrint(conflictset));
3416 repropconflictset = NULL;
3418 nconflictsetsused++;
3424 if( set->conf_repropagate && repropdepth < cutoffdepth && repropdepth < tree->pathlen )
3426 assert(0 <= repropdepth && repropdepth < tree->pathlen);
3427 assert((
int) tree->
path[repropdepth]->
depth == repropdepth);
3430 if( repropconflictset != NULL )
3435 assert(repropconflictset->
repropdepth == repropdepth);
3438 branchcand, eventqueue, cliquetable, repropconflictset, repropdepth, &success) );
3447 SCIPsetDebugMsg(
set,
" -> empty reprop conflict set in depth %d cuts off sub tree at depth %d\n",
3451 origprob, reopt, lp, blkmem) );
3457 SCIPsetDebugMsg(
set,
" -> additional reprop conflict set added (cdpt:%d, fdpt:%d, insert:%d, valid:%d, conf:%d, reprop:%d, len:%d):\n",
3461 SCIPdebug(conflictsetPrint(repropconflictset));
3469 SCIPsetDebugMsg(
set,
"marked node %p in depth %d to be repropagated due to conflicts found in depth %d\n",
3470 (
void*)tree->
path[repropdepth], repropdepth, focusdepth);
3492 assert(conflict != NULL);
3502 assert(conflict != NULL);
3512 assert(conflict != NULL);
3522 assert(conflict != NULL);
3532 assert(conflict != NULL);
3542 assert(conflict != NULL);
3552 assert(conflict != NULL);
3562 assert(conflict != NULL);
3572 assert(conflict != NULL);
3590 assert(bdchginfo != NULL);
3609 assert(bdchginfo1 != NULL);
3610 assert(bdchginfo2 != NULL);
3628 if( !set->conf_enable || !set->conf_useprop )
3632 if( set->nconflicthdlrs == 0 )
3645 assert(conflict != NULL);
3660 conflictBdchginfoComp) );
3662 conflictBdchginfoComp) );
3664 (*conflict)->conflictsets = NULL;
3665 (*conflict)->conflictsetscores = NULL;
3666 (*conflict)->tmpbdchginfos = NULL;
3667 (*conflict)->conflictsetssize = 0;
3668 (*conflict)->nconflictsets = 0;
3669 (*conflict)->proofsets = NULL;
3670 (*conflict)->proofsetssize = 0;
3671 (*conflict)->nproofsets = 0;
3672 (*conflict)->tmpbdchginfossize = 0;
3673 (*conflict)->ntmpbdchginfos = 0;
3674 (*conflict)->count = 0;
3675 (*conflict)->nglbchgbds = 0;
3676 (*conflict)->nappliedglbconss = 0;
3677 (*conflict)->nappliedglbliterals = 0;
3678 (*conflict)->nlocchgbds = 0;
3679 (*conflict)->nappliedlocconss = 0;
3680 (*conflict)->nappliedlocliterals = 0;
3681 (*conflict)->npropcalls = 0;
3682 (*conflict)->npropsuccess = 0;
3683 (*conflict)->npropconfconss = 0;
3684 (*conflict)->npropconfliterals = 0;
3685 (*conflict)->npropreconvconss = 0;
3686 (*conflict)->npropreconvliterals = 0;
3687 (*conflict)->ninflpcalls = 0;
3688 (*conflict)->ninflpsuccess = 0;
3689 (*conflict)->ninflpconfconss = 0;
3690 (*conflict)->ninflpconfliterals = 0;
3691 (*conflict)->ninflpreconvconss = 0;
3692 (*conflict)->ninflpreconvliterals = 0;
3693 (*conflict)->ninflpiterations = 0;
3694 (*conflict)->nboundlpcalls = 0;
3695 (*conflict)->nboundlpsuccess = 0;
3696 (*conflict)->nboundlpconfconss = 0;
3697 (*conflict)->nboundlpconfliterals = 0;
3698 (*conflict)->nboundlpreconvconss = 0;
3699 (*conflict)->nboundlpreconvliterals = 0;
3700 (*conflict)->nboundlpiterations = 0;
3701 (*conflict)->nsbcalls = 0;
3702 (*conflict)->nsbsuccess = 0;
3703 (*conflict)->nsbconfconss = 0;
3704 (*conflict)->nsbconfliterals = 0;
3705 (*conflict)->nsbreconvconss = 0;
3706 (*conflict)->nsbreconvliterals = 0;
3707 (*conflict)->nsbiterations = 0;
3708 (*conflict)->npseudocalls = 0;
3709 (*conflict)->npseudosuccess = 0;
3710 (*conflict)->npseudoconfconss = 0;
3711 (*conflict)->npseudoconfliterals = 0;
3712 (*conflict)->npseudoreconvconss = 0;
3713 (*conflict)->npseudoreconvliterals = 0;
3714 (*conflict)->ndualrayinfglobal = 0;
3715 (*conflict)->ndualrayinfsuccess = 0;
3716 (*conflict)->dualrayinfnnonzeros = 0;
3717 (*conflict)->ndualraybndglobal = 0;
3718 (*conflict)->ndualraybndsuccess = 0;
3719 (*conflict)->dualraybndnnonzeros = 0;
3732 assert(conflict != NULL);
3733 assert(*conflict != NULL);
3734 assert((*conflict)->nconflictsets == 0);
3735 assert((*conflict)->ntmpbdchginfos == 0);
3737 #ifdef SCIP_CONFGRAPH 3767 assert(conflict != NULL);
3784 assert(conflict != NULL);
3785 assert(
set != NULL);
3786 assert(stat != NULL);
3787 assert(prob != NULL);
3806 if( conflict->
count == 0 )
3807 conflict->
count = 1;
3812 assert(0.0 < set->conf_scorefac && set->conf_scorefac <= 1.0);
3821 for( v = 0; v < prob->
nvars; ++v )
3832 #ifdef SCIP_CONFGRAPH 3834 SCIP_CALL( confgraphCreate(
set, conflict) );
3854 assert(conflict != NULL);
3858 assert(var != NULL);
3869 SCIPsetDebugMsg(
set,
"ignoring redundant bound change <%s> >= %g since a stronger lower bound exist <%s> >= %g\n",
3875 SCIPsetDebugMsg(
set,
"ignoring redundant bound change <%s> >= %g since this lower bound is already present\n",
SCIPvarGetName(var), newbound);
3900 SCIPsetDebugMsg(
set,
"ignoring redundant bound change <%s> <= %g since a stronger upper bound exist <%s> <= %g\n",
3906 SCIPsetDebugMsg(
set,
"ignoring redundant bound change <%s> <= %g since this upper bound is already present\n",
SCIPvarGetName(var), newbound);
3941 assert(conflict != NULL);
3948 SCIPsetDebugMsg(
set,
"putting bound change <%s> %s %g(%g) at depth %d to current conflict set\n",
3961 #ifdef SCIP_CONFGRAPH 3962 if( bdchginfo != confgraphcurrentbdchginfo )
3963 confgraphAddBdchg(bdchginfo);
3966 #ifdef SCIP_CONFGRAPH 3968 confgraphLinkBdchg(bdchginfo);
4003 assert(conflict != NULL);
4004 assert(
set != NULL);
4005 assert(bdchginfo != NULL);
4028 #ifdef SCIP_CONFGRAPH 4029 confgraphAddBdchg(bdchginfo);
4032 #ifdef SCIP_CONFGRAPH 4034 confgraphLinkBdchg(bdchginfo);
4068 (*bound) -= constant;
4089 assert(bdchginfo != NULL);
4092 SCIPsetDebugMsg(
set,
" -> adding bound <%s> %s %.15g(%.15g) [status:%d, type:%d, depth:%d, pos:%d, reason:<%s>, info:%d] to candidates\n",
4127 SCIP_CALL(
incVSIDS(var, blkmem,
set, stat, boundtype, relaxedbd, set->conf_conflictgraphweight) );
4145 assert(conflict != NULL);
4146 assert(stat != NULL);
4147 assert(var != NULL);
4167 for( i = 0; i < nvars; ++i )
4183 if( bdchginfo == NULL )
4208 assert(conflict != NULL);
4209 assert(stat != NULL);
4210 assert(var != NULL);
4239 if( bdchginfo == NULL )
4246 nbdchgs = (int) bdchginfo->
pos;
4247 assert(nbdchgs >= 0);
4252 if( set->conf_ignorerelaxedbd )
4267 relaxedbd = MIN(relaxedbd, newbound);
4275 while( nbdchgs > 0 )
4287 SCIPsetDebugMsg(
set,
"lower bound change %d oldbd=%.15g, newbd=%.15g, depth=%d, pos=%d, redundant=%u\n",
4313 relaxedbd =
MAX(relaxedbd, newbound);
4321 while( nbdchgs > 0 )
4333 SCIPsetDebugMsg(
set,
"upper bound change %d oldbd=%.15g, newbd=%.15g, depth=%d, pos=%d, redundant=%u\n",
4377 assert(var != NULL);
4458 assert(conflict != NULL);
4486 #ifdef SCIP_CONFGRAPH 4487 confgraphSetCurrentBdchg(bdchginfo);
4501 assert(conflict != NULL);
4568 assert(conflict != NULL);
4570 assert(
set != NULL);
4571 assert(stat != NULL);
4572 assert(tree != NULL);
4573 assert(success != NULL);
4574 assert(nliterals != NULL);
4582 if( !set->conf_allowlocal && validdepth > 0 )
4587 assert(currentdepth == tree->
pathlen-1);
4588 assert(focusdepth <= currentdepth);
4590 assert(0 <= validdepth && validdepth <= currentdepth);
4602 SCIPsetDebugMsg(
set,
"adding %d variables from the queue as temporary conflict variables\n", nbdchginfos);
4608 SCIPsetDebugMsg(
set,
" -> conflict with %d literals found at depth %d is active in depth %d and valid in depth %d\n",
4617 if( !set->conf_settlelocal )
4621 SCIPsetDebugMsg(
set,
" -> final conflict set has %d literals\n", *nliterals);
4663 int nforcedbdchgqueue;
4667 assert(conflict != NULL);
4671 assert(conflict != NULL);
4674 assert(resolved != NULL);
4680 assert(actvar != NULL);
4686 SCIPsetDebugMsg(
set,
"processing next conflicting bound (depth: %d, valid depth: %d, bdchgtype: %s [%s], vartype: %d): [<%s> %s %g(%g)]\n",
4740 assert(infercons != NULL);
4756 assert(infervar != NULL);
4758 SCIPsetDebugMsg(
set,
"resolving bound <%s> %s %g(%g) [status:%d, type:%d, depth:%d, pos:%d]: <%s> %s %g [cons:<%s>(%s), info:%d]\n",
4772 if( actvar != infervar )
4789 assert(var == actvar);
4791 relaxedbd *= scalar;
4792 relaxedbd += constant;
4802 if( inferprop != NULL )
4816 assert(infervar != NULL);
4818 SCIPsetDebugMsg(
set,
"resolving bound <%s> %s %g(%g) [status:%d, depth:%d, pos:%d]: <%s> %s %g [prop:<%s>, info:%d]\n",
4834 assert(!(*resolved));
4850 assert((*resolved) || (nforcedbdchgqueue == 0 && nbdchgqueue == 0));
4872 int* nreconvliterals
4883 assert(conflict != NULL);
4884 assert(firstuip != NULL);
4885 assert(nreconvconss != NULL);
4886 assert(nreconvliterals != NULL);
4891 assert(currentdepth == tree->
pathlen-1);
4892 assert(focusdepth <= currentdepth);
4897 maxvaliddepth = (
set->conf_allowlocal ? MIN(currentdepth-1, focusdepth) : 0);
4898 if( validdepth > maxvaliddepth )
4920 SCIPsetDebugMsg(
set,
"creating reconvergence constraint for UIP <%s> %s %g in depth %d pos %d\n",
4957 while( bdchginfo != NULL && validdepth <= maxvaliddepth )
4976 assert(bdchginfo != NULL);
4980 assert(bdchgdepth <= firstuipdepth);
4985 if( bdchgdepth > validdepth && bdchginfo != nextbdchginfo )
4991 assert(actvar != NULL);
5001 if( bdchginfo == uip
5002 || (bdchgdepth == firstuipdepth
5003 && nextbdchginfo != NULL
5012 else if( forceresolve )
5017 assert(bdchgdepth >= validdepth);
5018 validdepth = bdchgdepth;
5020 SCIPsetDebugMsg(
set,
"couldn't resolve forced bound change on <%s> -> new valid depth: %d\n",
5023 else if( bdchginfo != uip )
5033 assert(nextuip == NULL);
5034 nextuip = bdchginfo;
5051 assert(nextuip != uip);
5056 if( nextuip != NULL && nresolutions >= 2 && bdchginfo == NULL && validdepth <= maxvaliddepth )
5068 SCIPsetDebugMsg(
set,
"creating reconvergence constraint from UIP <%s> to UIP <%s> in depth %d with %d literals after %d resolutions\n",
5077 (*nreconvliterals) += nlits;
5112 int* nreconvliterals
5123 int lastconsnresolutions;
5124 int lastconsresoldepth;
5126 assert(conflict != NULL);
5129 assert(
set != NULL);
5130 assert(stat != NULL);
5132 assert(nconss != NULL);
5133 assert(nliterals != NULL);
5134 assert(nreconvconss != NULL);
5135 assert(nreconvliterals != NULL);
5139 assert(currentdepth == tree->
pathlen-1);
5140 assert(focusdepth <= currentdepth);
5142 resolvedepth = ((
set->conf_fuiplevels >= 0 &&
set->conf_fuiplevels <= currentdepth)
5143 ? currentdepth - set->conf_fuiplevels + 1 : 0);
5144 assert(0 <= resolvedepth && resolvedepth <= currentdepth + 1);
5148 resolvedepth = MIN(resolvedepth, currentdepth);
5150 SCIPsetDebugMsg(
set,
"analyzing conflict with %d+%d conflict candidates and starting conflict set of size %d in depth %d (resolvedepth=%d)\n",
5157 *nreconvliterals = 0;
5162 maxvaliddepth = (
set->conf_allowlocal ? MIN(currentdepth-1, focusdepth) : 0);
5163 if( validdepth > maxvaliddepth )
5173 lastconsnresolutions = (mustresolve ? 0 : -1);
5174 lastconsresoldepth = (mustresolve ? currentdepth : INT_MAX);
5183 while( bdchginfo != NULL && validdepth <= maxvaliddepth )
5197 assert(0 <= bdchgdepth && bdchgdepth <= currentdepth);
5199 assert(bdchgdepth < tree->pathlen);
5200 assert(tree->
path[bdchgdepth] != NULL);
5201 assert(tree->
path[bdchgdepth]->
domchg != NULL);
5214 assert(nresolutions >= lastconsnresolutions);
5217 if( nresolutions == lastconsnresolutions )
5218 lastconsresoldepth = bdchgdepth;
5219 else if( bdchgdepth < lastconsresoldepth && (set->conf_interconss == -1 || *nconss < set->conf_interconss) )
5225 SCIPsetDebugMsg(
set,
"creating intermediate conflictset after %d resolutions up to depth %d (valid at depth %d): %d conflict bounds, %d bounds in queue\n",
5230 lastconsnresolutions = nresolutions;
5231 lastconsresoldepth = bdchgdepth;
5235 (*nliterals) += nlits;
5248 assert(bdchginfo != NULL);
5261 if( bdchgdepth > validdepth && bdchginfo != nextbdchginfo )
5267 assert(actvar != NULL);
5278 if( (mustresolve && nresolutions == 0)
5279 || (bdchgdepth >= resolvedepth
5280 && nextbdchginfo != NULL
5289 else if( forceresolve )
5294 assert(bdchgdepth >= validdepth);
5295 validdepth = bdchgdepth;
5297 SCIPsetDebugMsg(
set,
"couldn't resolve forced bound change on <%s> -> new valid depth: %d\n",
5307 assert(nfirstuips < 2*(currentdepth+1));
5308 firstuips[nfirstuips] = bdchginfo;
5330 if( bdchginfo == NULL
5331 && nresolutions > lastconsnresolutions
5332 && validdepth <= maxvaliddepth
5344 (*nliterals) += nlits;
5349 if( set->conf_reconvlevels != 0 && validdepth <= maxvaliddepth )
5354 reconvlevels = (
set->conf_reconvlevels == -1 ? INT_MAX :
set->conf_reconvlevels);
5355 for( i = 0; i < nfirstuips; ++i )
5361 validdepth, firstuips[i], nreconvconss, nreconvliterals) );
5393 int nreconvliterals;
5395 assert(conflict != NULL);
5397 assert(
set != NULL);
5398 assert(prob != NULL);
5400 if( success != NULL )
5420 SCIP_CALL(
conflictAnalyze(conflict, blkmem,
set, stat, prob, tree,
FALSE, validdepth,
TRUE, &nconss, &nliterals, \
5421 &nreconvconss, &nreconvliterals) );
5427 if( success != NULL )
5428 *success = (nconss > 0);
5441 assert(conflict != NULL);
5451 assert(conflict != NULL);
5461 assert(conflict != NULL);
5471 assert(conflict != NULL);
5481 assert(conflict != NULL);
5491 assert(conflict != NULL);
5501 assert(conflict != NULL);
5511 assert(conflict != NULL);
5536 assert(sidechginds != NULL);
5537 assert(sidechgoldlhss != NULL);
5538 assert(sidechgoldrhss != NULL);
5539 assert(sidechgnewlhss != NULL);
5540 assert(sidechgnewrhss != NULL);
5541 assert(sidechgssize != NULL);
5543 if( num > *sidechgssize )
5553 *sidechgssize = newsize;
5555 assert(num <= *sidechgssize);
5581 assert(sidechginds != NULL);
5582 assert(sidechgoldlhss != NULL);
5583 assert(sidechgoldrhss != NULL);
5584 assert(sidechgnewlhss != NULL);
5585 assert(sidechgnewrhss != NULL);
5586 assert(sidechgssize != NULL);
5587 assert(nsidechgs != NULL);
5596 sidechgssize, (*nsidechgs)+1) );
5597 assert(*nsidechgs < *sidechgssize);
5598 assert(*sidechginds != NULL);
5599 assert(*sidechgoldlhss != NULL);
5600 assert(*sidechgoldrhss != NULL);
5601 assert(*sidechgnewlhss != NULL);
5602 assert(*sidechgnewrhss != NULL);
5608 (*sidechgoldlhss)[*nsidechgs] = -lpiinfinity;
5609 (*sidechgnewlhss)[*nsidechgs] = -lpiinfinity;
5613 (*sidechgoldlhss)[*nsidechgs] = lhs - constant;
5614 (*sidechgnewlhss)[*nsidechgs] = -lpiinfinity;
5618 (*sidechgoldrhss)[*nsidechgs] = lpiinfinity;
5619 (*sidechgnewrhss)[*nsidechgs] = lpiinfinity;
5623 (*sidechgoldrhss)[*nsidechgs] = rhs - constant;
5624 (*sidechgnewrhss)[*nsidechgs] = lpiinfinity;
5643 assert(newlb <= newub);
5644 assert(oldlpbdchgs != NULL);
5645 assert(relaxedlpbdchgs != NULL);
5677 if( !relaxedlpbdchgs->
usedcols[c] )
5679 idx = relaxedlpbdchgs->
nbdchgs;
5690 assert(relaxedlpbdchgs->
bdchginds[idx] == c);
5693 assert(relaxedlpbdchgs->
bdchglbs[idx] >= newlb ||
5695 assert(relaxedlpbdchgs->
bdchgubs[idx] <= newub ||
5724 assert(cands != NULL);
5725 assert(candssize != NULL);
5727 if( num > *candssize )
5736 *candssize = newsize;
5738 assert(num <= *candssize);
5777 assert(
set != NULL);
5778 assert(var != NULL);
5779 assert(-1 <= lbchginfopos && lbchginfopos <= var->nlbchginfos);
5780 assert(-1 <= ubchginfopos && ubchginfopos <= var->nubchginfos);
5783 assert(cands != NULL);
5784 assert(candscores != NULL);
5785 assert(newbounds != NULL);
5786 assert(proofactdeltas != NULL);
5787 assert(candssize != NULL);
5788 assert(ncands != NULL);
5789 assert(*ncands <= *candssize);
5790 assert(0 <= firstcand && firstcand <= *ncands);
5793 if( proofcoef > 0.0 )
5795 assert(ubchginfopos >= 0);
5803 depth = currentdepth+1;
5817 assert(lbchginfopos >= 0);
5825 depth = currentdepth+1;
5839 proofactdelta = (newbound - oldbound)*proofcoef;
5840 assert(proofactdelta > 0.0);
5844 score =
calcBdchgScore(prooflhs, proofact, proofactdelta, proofcoef, depth, currentdepth, var,
set);
5855 assert(*cands != NULL);
5856 assert(*candscores != NULL);
5857 assert(*newbounds != NULL);
5858 assert(*proofactdeltas != NULL);
5860 SCIPsetDebugMsg(
set,
" -> local <%s> %s %g, relax <%s> %s %g, proofcoef=%g, dpt=%d, resolve=%u, delta=%g, score=%g\n",
5863 proofcoef, depth, resolvable, proofactdelta, score);
5866 for( i = *ncands; i > firstcand && score > (*candscores)[i-1]; --i )
5868 (*cands)[i] = (*cands)[i-1];
5869 (*candscores)[i] = (*candscores)[i-1];
5870 (*newbounds)[i] = (*newbounds)[i-1];
5871 (*proofactdeltas)[i] = (*proofactdeltas)[i-1];
5874 (*candscores)[i] = score;
5875 (*newbounds)[i] = newbound;
5876 (*proofactdeltas)[i] = proofactdelta;
5893 assert(var != NULL);
5894 assert(lbchginfopos != NULL);
5895 assert(ubchginfopos != NULL);
5896 assert(-1 <= *lbchginfopos && *lbchginfopos <= var->nlbchginfos);
5897 assert(-1 <= *ubchginfopos && *ubchginfopos <= var->nubchginfos);
5898 assert(*lbchginfopos == -1 || *lbchginfopos == var->
nlbchginfos 5901 assert(*ubchginfopos == -1 || *ubchginfopos == var->
nubchginfos 5905 if( *lbchginfopos >= 0 && *lbchginfopos < var->nlbchginfos && var->
lbchginfos[*lbchginfopos].
redundant )
5910 if( *ubchginfopos >= 0 && *ubchginfopos < var->nubchginfos && var->
ubchginfos[*ubchginfopos].
redundant )
5947 assert(prob != NULL);
5948 assert(proofcoefs != NULL);
5950 assert(curvarlbs != NULL);
5951 assert(curvarubs != NULL);
5952 assert(lbchginfoposs != NULL);
5953 assert(ubchginfoposs != NULL);
5955 if( resolve != NULL )
5959 nvars = prob->
nvars;
5960 assert(nvars == 0 || vars != NULL);
5971 for( v = 0; v < nvars; ++v )
5985 if( (lbchginfoposs[v] == -1 && ubchginfoposs[v] == -1) )
5987 proofcoefs[v] = 0.0;
5996 if( lbchginfoposs[v] >= 0 )
5998 SCIPsetDebugMsg(
set,
" -> relaxing variable <%s>[%g,%g] to [%g,%g]: proofcoef=%g, %g <= %g\n",
6000 proofcoefs[v], prooflhs, (*proofact));
6002 lbchginfoposs[v] = -1;
6009 if( ubchginfoposs[v] >= 0 )
6011 SCIPsetDebugMsg(
set,
" -> relaxing variable <%s>[%g,%g] to [%g,%g]: proofcoef=%g, %g <= %g\n",
6013 proofcoefs[v], prooflhs, (*proofact));
6015 ubchginfoposs[v] = -1;
6019 if( relaxed && oldlpbdchgs != NULL )
6021 SCIP_CALL(
addBdchg(
set, var, curvarlbs[v], curvarubs[v], oldlpbdchgs, relaxedlpbdchgs, lpi) );
6025 if( lbchginfoposs[v] >= 0 || ubchginfoposs[v] >= 0 )
6027 SCIP_CALL(
addCand(
set, currentdepth, var, lbchginfoposs[v], ubchginfoposs[v], proofcoefs[v],
6028 prooflhs, (*proofact), &cands, &candscores, &newbounds, &proofactdeltas, &candssize, &ncands, 0) );
6032 proofcoefs[v] = 0.0;
6039 for( i = 0; i < ncands; ++i )
6041 assert(proofactdeltas[i] > 0.0);
6051 assert(0 <= v && v < nvars);
6052 assert((lbchginfoposs[v] >= 0) != (ubchginfoposs[v] >= 0));
6054 SCIPsetDebugMsg(
set,
" -> relaxing variable <%s>[%g,%g] to [%g,%g]: proofcoef=%g, %g <= %g + %g\n",
6056 proofcoefs[v] > 0.0 ? curvarlbs[v] : newbounds[i],
6057 proofcoefs[v] > 0.0 ? newbounds[i] : curvarubs[v],
6058 proofcoefs[v], prooflhs, (*proofact), proofactdeltas[i]);
6063 &&
SCIPsetIsEQ(
set, proofactdeltas[i], (newbounds[i] - curvarubs[v])*proofcoefs[v]))
6065 &&
SCIPsetIsEQ(
set, proofactdeltas[i], (newbounds[i] - curvarlbs[v])*proofcoefs[v])));
6068 if( proofcoefs[v] > 0.0 )
6070 assert(ubchginfoposs[v] >= 0);
6071 assert(lbchginfoposs[v] == -1);
6072 curvarubs[v] = newbounds[i];
6077 assert(lbchginfoposs[v] >= 0);
6078 assert(ubchginfoposs[v] == -1);
6079 curvarlbs[v] = newbounds[i];
6082 if( oldlpbdchgs != NULL )
6084 SCIP_CALL(
addBdchg(
set, cands[i], curvarlbs[v], curvarubs[v], oldlpbdchgs, relaxedlpbdchgs, lpi) );
6086 (*proofact) += proofactdeltas[i];
6097 if( lbchginfoposs[v] >= 0 || ubchginfoposs[v] >= 0 )
6099 SCIP_CALL(
addCand(
set, currentdepth, cands[i], lbchginfoposs[v], ubchginfoposs[v], proofcoefs[v],
6100 prooflhs, (*proofact), &cands, &candscores, &newbounds, &proofactdeltas, &candssize, &ncands, i+1) );
6103 proofcoefs[v] = 0.0;
6119 #define NUMSTOP 9007199254740992.0 6143 assert(prob != NULL);
6147 assert(curvarlbs != NULL);
6148 assert(curvarubs != NULL);
6149 assert(lbchginfoposs != NULL);
6150 assert(ubchginfoposs != NULL);
6151 assert(valid != NULL);
6152 assert(resolve != NULL);
6166 curvarlbs, curvarubs, lbchginfoposs, ubchginfoposs, oldlpbdchgs, relaxedlpbdchgs, resolve, lpi) );
6201 assert(
set != NULL);
6202 assert(prob != NULL);
6206 assert(curvarlbs != NULL);
6207 assert(curvarubs != NULL);
6208 assert(lbchginfoposs != NULL);
6209 assert(ubchginfoposs != NULL);
6210 assert(valid != NULL);
6211 assert(resolve != NULL);
6226 lbchginfoposs, ubchginfoposs, oldlpbdchgs, relaxedlpbdchgs, resolve, lpi) );
6251 int* nreconvliterals
6263 assert(prob != NULL);
6264 assert(lbchginfoposs != NULL);
6265 assert(ubchginfoposs != NULL);
6266 assert(nconss != NULL);
6267 assert(nliterals != NULL);
6268 assert(nreconvconss != NULL);
6269 assert(nreconvliterals != NULL);
6274 *nreconvliterals = 0;
6277 nvars = prob->
nvars;
6278 assert(nvars == 0 || vars != NULL);
6292 SCIPsetDebugMsg(
set,
"initial conflict set after undoing bound changes:\n");
6295 for( v = 0; v < nvars && nbdchgs < maxsize; ++v )
6298 assert(var != NULL);
6301 assert(-1 <= lbchginfoposs[v] && lbchginfoposs[v] <= var->
nlbchginfos);
6302 assert(-1 <= ubchginfoposs[v] && ubchginfoposs[v] <= var->
nubchginfos);
6333 SCIPsetDebugMsg(
set,
" force: <%s> %s %g [status: %d, type: %d, dive/strong]\n",
6349 if( lbchginfoposs[v] >= 0 )
6355 if( ubchginfoposs[v] >= 0 )
6368 SCIP_CALL(
conflictAnalyze(conflict, blkmem,
set, stat, prob, tree, diving, 0,
FALSE, nconss, nliterals, \
6369 nreconvconss, nreconvliterals) );
6401 assert(nrows == 0 || rows != NULL);
6413 assert(farkasrow != NULL);
6424 for( r = 0; r < nrows; ++r )
6427 assert(row != NULL);
6428 assert(row->
len == 0 || row->
cols != NULL);
6429 assert(row->
len == 0 || row->
vals != NULL);
6430 assert(row == lp->
lpirows[r]);
6449 if( dualfarkas[r] > 0.0 )
6492 SCIPsetDebugMsg(
set,
" -> ignoring %s row <%s> with dual Farkas value %.10f (lhs=%g, rhs=%g)\n",
6550 assert(
set != NULL);
6551 assert(prob != NULL);
6555 assert(curvarlbs != NULL);
6556 assert(curvarubs != NULL);
6557 assert(valid != NULL);
6565 assert(nrows == 0 || rows != NULL);
6574 retcode =
SCIPlpiGetSol(lpi, NULL, primsols, dualsols, NULL, redcosts);
6591 for( r = 0; r < nrows; r++ )
6595 if( absdualsol > maxabsdualsol )
6596 maxabsdualsol = absdualsol;
6600 if( maxabsdualsol > 1e+07 )
6635 for( r = 0; r < nrows; ++r )
6638 assert(row != NULL);
6639 assert(row->
len == 0 || row->
cols != NULL);
6640 assert(row->
len == 0 || row->
vals != NULL);
6641 assert(row == lp->
lpirows[r]);
6650 SCIPsetDebugMsg(
set,
" -> infeasible dual solution %g in row <%s>: lhs=%g, rhs=%g\n",
6663 for( i = 0; i < row->
len; ++i )
6666 assert(0 <= v && v < prob->nvars);
6667 dualcoefs[v] -= dualsols[r] * row->
vals[i];
6675 if( dualsols[r] > 0.0 )
6685 SCIPsetDebugMsg(
set,
" -> global row <%s>[%g,%g]: dual=%g -> dualrhs=%g\n",
6722 SCIPsetDebugMsg(
set,
"-> %sminact=%.15g rhs=%.15g violation=%.15g\n",infostr != NULL ? infostr :
"" , minact, rhs, minact - rhs);
6725 #define debugPrintViolationInfo(...) 6742 for( i = 0; i < proofset->
nnz; i++ )
6756 for( i = 0; i < proofset->
nnz; i++ )
6759 newabsmin = MIN(newabsmin,
REALABS(proofset->
vals[i]));
6762 SCIPsetDebugMsg(
set,
"coefficient tightening: [%.15g,%.15g] -> [%.15g,%.15g] (nnz: %d, nchg: %d rhs: %.15g)\n",
6764 printf(
"coefficient tightening: [%.15g,%.15g] -> [%.15g,%.15g] (nnz: %d, nchg: %d rhs: %.15g)\n",
6811 proofefficiacy /=
MAX(1e-6, efficiacynorm);
6817 for( i = 0; i < nvars; i++ )
6823 for( i = 0; i < nnz; i++ )
6845 cutcoefs, &cutrhs, cutinds, &cutnnz, &cutefficacy, NULL, &islocal, &cutsuccess) );
6846 success = cutsuccess;
6850 NULL, NULL,
MINFRAC,
MAXFRAC, proofrow, cutcoefs, &cutrhs, cutinds, &cutnnz, &cutefficacy, NULL, \
6851 &islocal, &cutsuccess) );
6852 success = (success || cutsuccess);
6855 if( success && !islocal &&
SCIPsetIsPositive(
set, cutefficacy) && cutefficacy * nnz > proofefficiacy * cutnnz )
6923 assert(conflict->
proofset != NULL);
6934 for( i = 0; i < nnz; i++ )
6947 SCIPsetDebugMsg(
set,
"-> tighten dual ray: nvars=%d (bin=%d, int=%d, cont=%d)\n",
6948 nnz, nbinvars, nintvars, ncontvars);
6952 if( set->conf_sepaaltproofs )
6986 for( i = 0; i < nnz && nnz > 1; )
6991 assert(vars[idx] != NULL);
7009 locbd = (val < 0.0 ? curvarubs[idx] : curvarlbs[idx]);
7017 SCIPsetDebugMsg(
set,
"-> remove continuous variable <%s>: glb=[%g,%g], loc=[%g,%g], val=%g\n",
7043 else if( nchgcoefs > 0 )
7082 assert(
set != NULL);
7083 assert(transprob != NULL);
7089 *globalinfeasible =
FALSE;
7106 *globalinfeasible =
TRUE;
7115 SCIP_CALL(
tightenDualproof(conflict,
set, stat, blkmem, transprob, tree, proofrow, curvarlbs, curvarubs, initialproof) );
7117 if( *globalinfeasible )
7173 assert(
set != NULL);
7192 ubchginfoposs, oldlpbdchgs, relaxedlpbdchgs, valid, &resolve, proofcoefs, *prooflhs, proofactivity) );
7198 oldlpbdchgs, relaxedlpbdchgs, valid, &resolve, proofcoefs, *prooflhs, proofactivity) );
7204 solvelp = (
set->conf_maxlploops != 0 &&
set->conf_lpiterations != 0);
7206 if( (*valid) && resolve && solvelp )
7229 maxlploops = (
set->conf_maxlploops >= 0 ?
set->conf_maxlploops : INT_MAX);
7230 lpiterations = (
set->conf_lpiterations >= 0 ?
set->conf_lpiterations : INT_MAX);
7237 assert(nrows == 0 || rows != NULL);
7245 sidechgssize = nrows;
7252 for( r = 0; r < nrows; ++r )
7261 &sidechgnewlhss, &sidechgnewrhss, &sidechgssize, &nsidechgs) );
7275 globalinfeasible =
FALSE;
7276 while( (*valid) && resolve && nloops < maxlploops )
7280 assert(!globalinfeasible);
7285 SCIPsetDebugMsg(
set,
"infeasible LP conflict analysis loop %d (changed col bounds: %d)\n", nloops, relaxedlpbdchgs->
nbdchgs);
7288 assert(relaxedlpbdchgs->
nbdchgs >= 0);
7289 if( relaxedlpbdchgs->
nbdchgs > 0 )
7318 (*iterations) += iter;
7321 SCIPsetDebugMsg(
set,
" -> resolved LP in %d iterations (total: %" SCIP_LONGINT_FORMAT
") (infeasible:%u)\n",
7365 if( set->conf_useinflp ==
'd' || set->conf_useinflp ==
'b' )
7373 farkasrow, curvarlbs, curvarubs,
FALSE, &globalinfeasible, dualraysuccess) );
7378 if( globalinfeasible )
7386 (*proofactivity) = -(*proofactivity);
7391 for( v = 0; v < nnz; v++ )
7404 ubchginfoposs, oldlpbdchgs, relaxedlpbdchgs, valid, &resolve, proofcoefs, (*prooflhs), proofactivity) );
7421 SCIP_CALL(
getDualProof(
set, transprob, lp, lpi, proofrow, proofactivity, curvarlbs, curvarubs, valid) );
7433 (*proofactivity) = -(*proofactivity);
7438 for( v = 0; v < nnz; v++ )
7451 ubchginfoposs, oldlpbdchgs, relaxedlpbdchgs, valid, &resolve, proofcoefs, *prooflhs, proofactivity) );
7454 assert(!resolve || (*valid));
7455 assert(!resolve || relaxedlpbdchgs->
nbdchgs > 0);
7456 SCIPsetDebugMsg(
set,
" -> finished infeasible LP conflict analysis loop %d (iter: %d, nbdchgs: %d)\n",
7457 nloops, iter, relaxedlpbdchgs->
nbdchgs);
7460 SCIPsetDebugMsg(
set,
"finished undoing bound changes after %d loops (valid=%u, nbdchgs: %d)\n",
7461 nloops, (*valid), oldlpbdchgs->
nbdchgs);
7465 if( oldlpbdchgs->
nbdchgs > 0 )
7477 if( oldlpbdchgs->
nbdchgs > 0 || nsidechgs > 0 )
7482 if ( marklpunsolved )
7535 int* nreconvliterals,
7552 assert(conflict != NULL);
7554 assert(
set != NULL);
7556 assert(stat != NULL);
7557 assert(transprob != NULL);
7561 assert(iterations != NULL);
7562 assert(nconss != NULL);
7563 assert(nliterals != NULL);
7564 assert(nreconvconss != NULL);
7565 assert(nreconvliterals != NULL);
7571 *nreconvliterals = 0;
7573 vars = transprob->
vars;
7574 nvars = transprob->
nvars;
7596 if( objval < lp->lpiobjlim )
7623 (*iterations) += iter;
7626 SCIPsetDebugMsg(
set,
" -> resolved objlim exceeding LP in %d iterations (total: %" SCIP_LONGINT_FORMAT
") (infeasible:%u, objlim: %u, optimal:%u)\n",
7649 if( objval < lp->lpiobjlim )
7666 farkasactivity = 0.0;
7677 for( v = 0; v < nvars && valid; ++v )
7723 SCIP_CALL(
getFarkasProof(
set, transprob, lp, lpi, farkasrow, &farkasactivity, curvarlbs, curvarubs, &valid) );
7729 SCIP_CALL(
getDualProof(
set, transprob, lp, lpi, farkasrow, &farkasactivity, curvarlbs, curvarubs, &valid) );
7735 globalinfeasible =
FALSE;
7742 SCIP_CALL(
conflictAnalyzeDualProof(conflict,
set, stat, blkmem, origprob, transprob, tree, reopt, lp, farkasrow, \
7743 curvarlbs, curvarubs,
TRUE, &globalinfeasible, dualraysuccess) );
7759 SCIPsetDebugMsg(
set,
"analyzing conflict on infeasible LP (infeasible: %u, objlimexc: %u, optimal:%u) in depth %d (diving: %u)\n",
7771 farkasactivity = -farkasactivity;
7776 for( v = 0; v < nnz; v++ )
7785 SCIP_CALL(
runBoundHeuristic(conflict,
set, stat, origprob, transprob, tree, reopt, lp, lpi, blkmem, farkascoefs,
7786 &farkaslhs, &farkasactivity, curvarlbs, curvarubs, lbchginfoposs, ubchginfoposs, iterations, marklpunsolved,
7787 dualraysuccess, &valid) );
7792 goto FLUSHPROOFSETS;
7796 lbchginfoposs, ubchginfoposs, nconss, nliterals, nreconvconss, nreconvliterals) );
7799 SCIP_CALL(
SCIPconflictFlushConss(conflict, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, \
7800 eventqueue, cliquetable) );
7807 SCIP_CALL(
conflictFlushProofset(conflict, conflictstore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, \
7808 branchcand, eventqueue, cliquetable) );
7850 int nreconvliterals;
7852 assert(conflict != NULL);
7853 assert(
set != NULL);
7857 assert(success == NULL || *success ==
FALSE);
7860 if( !set->conf_enable || set->conf_useinflp ==
'o' )
7864 if( set->nconflicthdlrs == 0 )
7867 SCIPsetDebugMsg(
set,
"analyzing conflict on infeasible LP in depth %d (solstat: %d, objchanged: %u)\n",
7879 SCIP_CALL(
conflictAnalyzeLP(conflict, conflictstore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, \
7880 cliquetable,
SCIPlpDiving(lp), &dualraysuccess, &iterations, &nconss, &nliterals, &nreconvconss, &nreconvliterals,
TRUE) );
7887 if( success != NULL )
7926 int nreconvliterals;
7928 assert(conflict != NULL);
7929 assert(
set != NULL);
7934 assert(success == NULL || *success ==
FALSE);
7937 if( !set->conf_enable || set->conf_useboundlp ==
'o')
7941 if( set->nconflicthdlrs == 0 )
7944 SCIPsetDebugMsg(
set,
"analyzing conflict on bound exceeding LP in depth %d (solstat: %d)\n",
7958 SCIP_CALL(
conflictAnalyzeLP(conflict, conflictstore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, \
7959 cliquetable,
SCIPlpDiving(lp), &dualraysuccess, &iterations, &nconss, &nliterals, &nreconvconss, &nreconvliterals,
TRUE) );
7966 if( success != NULL )
8005 if( success != NULL )
8009 if( !set->conf_enable || (set->conf_useinflp ==
'o' && set->conf_useboundlp ==
'o') )
8039 for (c = 0; c < lp->
ncols; ++c)
8044 assert( col != NULL );
8050 for (r = 0; r < lp->
nrows; ++r)
8055 assert( row != NULL );
8073 reopt, lp, branchcand, eventqueue, cliquetable, success) );
8078 reopt, lp, branchcand, eventqueue, cliquetable, success) );
8094 for (c = 0; c < lp->
ncols; ++c)
8099 assert( col != NULL );
8104 for (r = 0; r < lp->
nrows; ++r)
8109 assert( row != NULL );
8133 assert(conflict != NULL);
8143 assert(conflict != NULL);
8153 assert(conflict != NULL);
8163 assert(conflict != NULL);
8173 assert(conflict != NULL);
8183 assert(conflict != NULL);
8193 assert(conflict != NULL);
8203 assert(conflict != NULL);
8213 assert(conflict != NULL);
8223 assert(conflict != NULL);
8233 assert(conflict != NULL);
8243 assert(conflict != NULL);
8253 assert(conflict != NULL);
8263 assert(conflict != NULL);
8273 assert(conflict != NULL);
8283 assert(conflict != NULL);
8330 int nreconvliterals;
8332 assert(stat != NULL);
8337 assert(col != NULL);
8344 if( downconflict != NULL )
8345 *downconflict =
FALSE;
8346 if( upconflict != NULL )
8347 *upconflict =
FALSE;
8350 if( !set->conf_enable || !set->conf_usesb )
8354 if( set->nconflicthdlrs == 0 )
8380 if( newub >= col->
lb - 0.5 )
8382 SCIPsetDebugMsg(
set,
"analyzing conflict on infeasible downwards strongbranch for variable <%s>[%g,%g] in depth %d\n",
8412 SCIPsetDebugMsg(
set,
" -> resolved downwards strong branching LP in %d iterations\n", iter);
8416 lp, branchcand, eventqueue, cliquetable,
TRUE, &dualraysuccess, &iter, &nconss, &nliterals, \
8417 &nreconvconss, &nreconvliterals,
FALSE) );
8418 conflict->
nsbsuccess += ((nconss > 0 || dualraysuccess) ? 1 : 0);
8424 if( downconflict != NULL )
8425 *downconflict = (nconss > 0);
8444 if( newlb <= col->ub + 0.5 )
8446 SCIPsetDebugMsg(
set,
"analyzing conflict on infeasible upwards strongbranch for variable <%s>[%g,%g] in depth %d\n",
8476 SCIPsetDebugMsg(
set,
" -> resolved upwards strong branching LP in %d iterations\n", iter);
8480 lp, branchcand, eventqueue, cliquetable,
TRUE, &dualraysuccess, &iter, &nconss, &nliterals, \
8481 &nreconvconss, &nreconvliterals,
FALSE) );
8482 conflict->
nsbsuccess += ((nconss > 0 || dualraysuccess) ? 1 : 0);
8488 if( upconflict != NULL )
8489 *upconflict = (nconss > 0);
8537 assert(conflict != NULL);
8547 assert(conflict != NULL);
8557 assert(conflict != NULL);
8567 assert(conflict != NULL);
8577 assert(conflict != NULL);
8587 assert(conflict != NULL);
8597 assert(conflict != NULL);
8607 assert(conflict != NULL);
8617 assert(conflict != NULL);
8627 assert(conflict != NULL);
8637 assert(conflict != NULL);
8647 assert(conflict != NULL);
8657 assert(conflict != NULL);
8667 assert(conflict != NULL);
8713 assert(conflict != NULL);
8715 assert(
set != NULL);
8716 assert(stat != NULL);
8717 assert(transprob != NULL);
8722 if( success != NULL )
8726 if( !set->conf_enable || !set->conf_usepseudo )
8730 if( set->nconflicthdlrs == 0 )
8733 SCIPsetDebugMsg(
set,
"analyzing pseudo solution (obj: %g) that exceeds objective limit (%g)\n",
8743 vars = transprob->
vars;
8744 nvars = transprob->
nvars;
8745 assert(nvars == 0 || vars != NULL);
8773 for( v = 0; v < nvars; ++v )
8779 if( pseudocoefs[v] > 0.0 )
8780 pseudoact += pseudocoefs[v] * curvarubs[v];
8782 pseudoact += pseudocoefs[v] * curvarlbs[v];
8787 SCIPsetDebugMsg(
set,
" -> recalculated pseudo infeasibility proof: %g <= %g\n", pseudolhs, pseudoact);
8795 int nreconvliterals;
8799 curvarlbs, curvarubs, lbchginfoposs, ubchginfoposs, NULL, NULL, NULL, lp->
lpi) );
8803 lbchginfoposs, ubchginfoposs, &nconss, &nliterals, &nreconvconss, &nreconvliterals) );
8809 if( success != NULL )
8810 *success = (nconss > 0);
8821 SCIP_CALL(
SCIPconflictFlushConss(conflict, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, cliquetable) );
8834 assert(conflict != NULL);
8844 assert(conflict != NULL);
8854 assert(conflict != NULL);
8864 assert(conflict != NULL);
8874 assert(conflict != NULL);
8884 assert(conflict != NULL);
8894 assert(conflict != NULL);
8906 assert(conflict != NULL);
enum SCIP_Result SCIP_RESULT
void SCIPconflictEnableOrDisableClocks(SCIP_CONFLICT *conflict, SCIP_Bool enable)
SCIP_Longint SCIPconflictGetNStrongbranchSuccess(SCIP_CONFLICT *conflict)
static SCIP_Bool bdchginfoIsResolvable(SCIP_BDCHGINFO *bdchginfo)
static SCIP_RETCODE conflictInitProofset(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
enum SCIP_BoundType SCIP_BOUNDTYPE
static SCIP_RETCODE undoBdchgsDualsol(SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, int currentdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, SCIP_LPBDCHGS *oldlpbdchgs, SCIP_LPBDCHGS *relaxedlpbdchgs, SCIP_Bool *valid, SCIP_Bool *resolve, SCIP_Real *dualcoefs, SCIP_Real duallhs, SCIP_Real *dualactivity)
SCIP_CLOCK * propanalyzetime
SCIP_Real SCIPbdchginfoGetRelaxedBound(SCIP_BDCHGINFO *bdchginfo)
int SCIPpqueueNElems(SCIP_PQUEUE *pqueue)
SCIP_Bool SCIPconflicthdlrIsInitialized(SCIP_CONFLICTHDLR *conflicthdlr)
static SCIP_RETCODE addSideRemoval(SCIP_SET *set, SCIP_ROW *row, SCIP_Real lpiinfinity, int **sidechginds, SCIP_Real **sidechgoldlhss, SCIP_Real **sidechgoldrhss, SCIP_Real **sidechgnewlhss, SCIP_Real **sidechgnewrhss, int *sidechgssize, int *nsidechgs)
void SCIPconflicthdlrSetInit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
SCIP_Longint ninflpconfliterals
SCIP_Longint SCIPconflictGetNLocalChgBds(SCIP_CONFLICT *conflict)
void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
static SCIP_Real aggrRowGetMinActivity(SCIP_PROB *transprob, SCIP_AGGRROW *aggrrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs)
SCIP_RETCODE SCIPconflictAnalyzeLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
SCIP_Longint ninflpreconvconss
SCIP_Longint SCIPconflictGetNPropConflictConss(SCIP_CONFLICT *conflict)
const char * SCIPconflicthdlrGetDesc(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
static int conflictCalcMaxsize(SCIP_SET *set, SCIP_PROB *prob)
internal methods for storing primal CIP solutions
void SCIPhistoryIncVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
SCIP_RETCODE SCIPconflictAddBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPvarIncVSIDS(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real weight)
SCIP_PROP * SCIPbdchginfoGetInferProp(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Bool SCIPlpDiving(SCIP_LP *lp)
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoLb(SCIP_VAR *var, int pos)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
#define BMSfreeMemoryArrayNull(ptr)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
internal methods for branch and bound tree
static SCIP_BDCHGINFO * conflictRemoveCand(SCIP_CONFLICT *conflict)
static SCIP_Bool isBoundchgUseless(SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
SCIP_Longint SCIPconflictGetNPropSuccess(SCIP_CONFLICT *conflict)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Real SCIPbdchginfoGetOldbound(SCIP_BDCHGINFO *bdchginfo)
void SCIPconflicthdlrSetExit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
int SCIPconsGetValidDepth(SCIP_CONS *cons)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
static SCIP_Real calcBdchgScore(SCIP_Real prooflhs, SCIP_Real proofact, SCIP_Real proofactdelta, SCIP_Real proofcoef, int depth, int currentdepth, SCIP_VAR *var, SCIP_SET *set)
#define SCIPsetAllocBuffer(set, ptr)
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
int SCIPvarGetNVlbs(SCIP_VAR *var)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
void SCIPconflicthdlrSetInitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictConss(SCIP_CONFLICT *conflict)
static SCIP_RETCODE tightenDualproof(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_AGGRROW *proofrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool initialproof)
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
static SCIP_RETCODE propagateLongProof(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt, SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Real *coefs, int *inds, int nnz, SCIP_Real rhs, SCIP_CONFTYPE conflicttype)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNAppliedGlobalConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPIterations(SCIP_CONFLICT *conflict)
SCIP_CLOCK * conflictlptime
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_Real SCIPconflicthdlrGetSetupTime(SCIP_CONFLICTHDLR *conflicthdlr)
static void lpbdchgsReset(SCIP_LPBDCHGS *lpbdchgs, int ncols)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
static SCIP_RETCODE conflictCreateTmpBdchginfo(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound, SCIP_BDCHGINFO **bdchginfo)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceLiterals(SCIP_CONFLICT *conflict)
internal methods for clocks and timing issues
SCIP_Longint SCIPconflictGetNGlobalChgBds(SCIP_CONFLICT *conflict)
SCIP_BOUNDCHG * boundchgs
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
SCIP_Longint nappliedlocliterals
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
SCIP_CLOCK * inflpanalyzetime
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
struct SCIP_ParamData SCIP_PARAMDATA
SCIP_Longint SCIPconflictGetNPseudoConflictLiterals(SCIP_CONFLICT *conflict)
#define SCIPsetAllocCleanBufferArray(set, ptr, num)
SCIP_RETCODE SCIPbdchginfoCreate(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound)
void SCIPconflicthdlrSetCopy(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNInfeasibleLPSuccess(SCIP_CONFLICT *conflict)
static SCIP_RETCODE undoBdchgsProof(SCIP_SET *set, SCIP_PROB *prob, int currentdepth, SCIP_Real *proofcoefs, SCIP_Real prooflhs, SCIP_Real *proofact, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, SCIP_LPBDCHGS *oldlpbdchgs, SCIP_LPBDCHGS *relaxedlpbdchgs, SCIP_Bool *resolve, SCIP_LPI *lpi)
SCIP_Longint nappliedglbliterals
SCIP_Longint SCIPconflictGetNPropCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualrayInfSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint npseudoreconvliterals
static void proofsetCancelVarWithBound(SCIP_PROOFSET *proofset, SCIP_SET *set, SCIP_VAR *var, int pos, SCIP_Bool *valid)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
const char * SCIProwGetName(SCIP_ROW *row)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
static SCIP_RETCODE lpbdchgsCreate(SCIP_LPBDCHGS **lpbdchgs, SCIP_SET *set, int ncols)
SCIP_Longint SCIPconflictGetNStrongbranchIterations(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflicthdlrGetTime(SCIP_CONFLICTHDLR *conflicthdlr)
static SCIP_RETCODE conflictsetCalcInsertDepth(SCIP_CONFLICTSET *conflictset, SCIP_SET *set, SCIP_TREE *tree)
interface methods for specific LP solvers
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Longint npropconfliterals
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
static SCIP_RETCODE conflictAddConflictBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd)
int SCIPprobGetNVars(SCIP_PROB *prob)
SCIP_BDCHGINFO * ubchginfos
SCIP_Bool SCIPbdchgidxIsEarlier(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
void SCIPconsMarkConflict(SCIP_CONS *cons)
void SCIPgmlWriteClosing(FILE *file)
SCIP_Longint nappliedglbconss
SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
SCIP_RETCODE SCIPvarScaleVSIDS(SCIP_VAR *var, SCIP_Real scalar)
datastructures for conflict analysis
SCIP_Longint npseudoreconvconss
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
static void skipRedundantBdchginfos(SCIP_VAR *var, int *lbchginfopos, int *ubchginfopos)
methods for the aggregation rows
static SCIP_BDCHGINFO * conflictFirstCand(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictAnalyze(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, int validdepth, SCIP_Bool *success)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_RETCODE SCIPconflicthdlrExec(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set, SCIP_NODE *node, SCIP_NODE *validnode, SCIP_BDCHGINFO **bdchginfos, SCIP_Real *relaxedbds, int nbdchginfos, SCIP_CONFTYPE conftype, SCIP_Bool usescutoffbound, SCIP_Bool resolved, SCIP_RESULT *result)
static SCIP_RETCODE undoBdchgsDualfarkas(SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, int currentdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, SCIP_LPBDCHGS *oldlpbdchgs, SCIP_LPBDCHGS *relaxedlpbdchgs, SCIP_Bool *valid, SCIP_Bool *resolve, SCIP_Real *farkascoefs, SCIP_Real farkaslhs, SCIP_Real *farkasactivity)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Longint SCIPconflictGetNPropConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, int maxtestdelta, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
int SCIPvarGetNVubs(SCIP_VAR *var)
int SCIPbdchginfoGetInferInfo(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
void SCIPconflicthdlrSetPriority(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set, int priority)
#define SCIPsetAllocBufferArray(set, ptr, num)
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
int SCIPvarGetProbindex(SCIP_VAR *var)
void * SCIPpqueueFirst(SCIP_PQUEUE *pqueue)
SCIP_Longint dualrayinfnnonzeros
SCIP_RETCODE SCIPconflicthdlrExitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Longint npropsuccess
int SCIPaggrRowGetNNz(SCIP_AGGRROW *aggrrow)
SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
static void conflictsetClear(SCIP_CONFLICTSET *conflictset)
SCIP_ROW ** SCIPlpGetRows(SCIP_LP *lp)
SCIP_RETCODE SCIPconflictFree(SCIP_CONFLICT **conflict, BMS_BLKMEM *blkmem)
SCIP_Longint SCIPconflictGetNAppliedLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIPlpGetPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
static SCIP_RETCODE conflictAddBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd)
SCIP_RETCODE SCIPconflicthdlrCreate(SCIP_CONFLICTHDLR **conflicthdlr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTCOPY((*conflictcopy)), SCIP_DECL_CONFLICTFREE((*conflictfree)), SCIP_DECL_CONFLICTINIT((*conflictinit)), SCIP_DECL_CONFLICTEXIT((*conflictexit)), SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)), SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)), SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
int SCIPbdchgidxGetPos(SCIP_BDCHGIDX *bdchgidx)
static SCIP_RETCODE conflictQueueBound(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd)
internal methods for handling parameter settings
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
int SCIPnodeGetDepth(SCIP_NODE *node)
void SCIPconflicthdlrSetExitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
static SCIP_RETCODE conflictInsertProofset(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_PROOFSET *proofset)
methods for creating output for visualization tools (VBC, BAK)
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
SCIP_Real SCIPconflictGetGlobalApplTime(SCIP_CONFLICT *conflict)
#define SCIPsetFreeBufferArray(set, ptr)
#define BMSfreeMemory(ptr)
void SCIPvarAdjustLb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *lb)
static SCIP_RETCODE conflictFlushProofset(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetPseudoTime(SCIP_CONFLICT *conflict)
#define SCIP_DECL_CONFLICTEXIT(x)
SCIP_Longint nappliedlocconss
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
internal methods for LP management
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
static void proofsetClear(SCIP_PROOFSET *proofset)
SCIP_Longint npseudosuccess
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_Real SCIPconflictGetVarUb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
internal methods for branching and inference history
SCIP_Real SCIPconflictGetStrongbranchTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLocalLiterals(SCIP_CONFLICT *conflict)
SCIP_Bool strongbranching
SCIP_Longint SCIPconflictGetNDualrayBndNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint ninflpiterations
SCIP_Longint SCIPconflictGetNDualrayInfGlobal(SCIP_CONFLICT *conflict)
int SCIPconflictstoreGetNDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
int SCIPlpGetNCols(SCIP_LP *lp)
SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
static SCIP_RETCODE conflictEnsureProofsetsMem(SCIP_CONFLICT *conflict, SCIP_SET *set, int num)
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_HISTORY * glbhistorycrun
internal methods for propagators
SCIP_Longint npropreconvliterals
static SCIP_Bool conflictsetIsRedundant(SCIP_CONFLICTSET *conflictset1, SCIP_CONFLICTSET *conflictset2)
SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
int SCIPtreeGetFocusDepth(SCIP_TREE *tree)
#define SCIPdebugCheckConflict(blkmem, set, node, bdchginfos, relaxedbds, nliterals)
void SCIPhistoryScaleVSIDS(SCIP_HISTORY *history, SCIP_Real scalar)
SCIP_Longint npropconfconss
SCIP_Longint nboundlpcalls
SCIP_Real SCIPgetVarBdAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
enum SCIP_BranchDir SCIP_BRANCHDIR
SCIP_Real conflictrelaxedub
SCIP_Bool SCIPbdchginfoIsTighter(SCIP_BDCHGINFO *bdchginfo1, SCIP_BDCHGINFO *bdchginfo2)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPnodeCutoff(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_REOPT *reopt, SCIP_LP *lp, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictAnalyzePseudo(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
void SCIPconflicthdlrSetFree(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPconflicthdlrExit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set)
SCIP_CLOCK * pseudoanalyzetime
SCIP_RETCODE SCIPconflicthdlrInitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set)
static void proofsetFree(SCIP_PROOFSET **proofset, BMS_BLKMEM *blkmem)
SCIP_Real conflictrelaxedlb
static SCIP_RETCODE detectImpliedBounds(SCIP_SET *set, SCIP_PROB *prob, SCIP_CONFLICTSET *conflictset, int *nbdchgs, int *nredvars, SCIP_Bool *redundant)
static SCIP_RETCODE addCand(SCIP_SET *set, int currentdepth, SCIP_VAR *var, int lbchginfopos, int ubchginfopos, SCIP_Real proofcoef, SCIP_Real prooflhs, SCIP_Real proofact, SCIP_VAR ***cands, SCIP_Real **candscores, SCIP_Real **newbounds, SCIP_Real **proofactdeltas, int *candssize, int *ncands, int firstcand)
#define SCIP_DECL_CONFLICTINITSOL(x)
SCIP_CLOCK * boundlpanalyzetime
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint ninflpreconvliterals
#define SCIP_DECL_CONFLICTEXEC(x)
SCIP_BDCHGINFO ** tmpbdchginfos
SCIP_CLOCK * conflicttime
#define BMSfreeMemoryArray(ptr)
static SCIP_RETCODE separateAlternativeProofs(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_AGGRROW *proofrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_CONFTYPE conflicttype)
void SCIPhistoryIncNActiveConflicts(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real length)
SCIP_BOUNDTYPE SCIPboundtypeOpposite(SCIP_BOUNDTYPE boundtype)
internal methods for storing and manipulating the main problem
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_Longint ndualraybndglobal
static SCIP_RETCODE conflictsetAddBounds(SCIP_CONFLICT *conflict, SCIP_CONFLICTSET *conflictset, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BDCHGINFO **bdchginfos, int nbdchginfos)
static SCIP_RETCODE conflictsetEnsureBdchginfosMem(SCIP_CONFLICTSET *conflictset, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
SCIP_Bool SCIPbdchgidxIsEarlierNonNull(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceConss(SCIP_CONFLICT *conflict)
static SCIP_RETCODE tightenSingleVar(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Real val, SCIP_Real rhs, SCIP_CONFTYPE prooftype)
void SCIPclockReset(SCIP_CLOCK *clck)
SCIP_Longint SCIPconflictGetNDualrayBndGlobal(SCIP_CONFLICT *conflict)
SCIP_Longint nconflictlpiterations
SCIP_RETCODE SCIPupgradeConsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons)
static SCIP_Bool conflictMarkBoundCheckPresence(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd)
SCIP_Bool SCIPsetIsRelEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_CONFLICTHDLRDATA * conflicthdlrdata
static SCIP_RETCODE createAndAddProofcons(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_PROOFSET *proofset, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, BMS_BLKMEM *blkmem)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPsolSetVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real val)
SCIP_Longint SCIPconflictGetNAppliedLocalConss(SCIP_CONFLICT *conflict)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
const char * SCIPconsGetName(SCIP_CONS *cons)
static SCIP_RETCODE conflictEnsureConflictsetsMem(SCIP_CONFLICT *conflict, SCIP_SET *set, int num)
static SCIP_RETCODE convertToActiveVar(SCIP_VAR **var, SCIP_SET *set, SCIP_BOUNDTYPE *boundtype, SCIP_Real *bound)
SCIP_Longint npropreconvconss
static SCIP_Real conflictsetCalcScore(SCIP_CONFLICTSET *conflictset, SCIP_SET *set)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPconflictGetBoundexceedingLPTime(SCIP_CONFLICT *conflict)
static SCIP_RETCODE conflictsetCreate(SCIP_CONFLICTSET **conflictset, BMS_BLKMEM *blkmem)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
SCIP_Real SCIPsetFeasCeil(SCIP_SET *set, SCIP_Real val)
#define SCIPsetReallocBufferArray(set, ptr, num)
SCIP_PROOFSET ** proofsets
static SCIP_RETCODE proofsetCreate(SCIP_PROOFSET **proofset, BMS_BLKMEM *blkmem)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceConss(SCIP_CONFLICT *conflict)
int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
SCIP_HISTORY * glbhistory
static SCIP_Real getMaxActivity(SCIP_PROB *transprob, SCIP_Real *coefs, int *inds, int nnz, SCIP_Real *curvarlbs, SCIP_Real *curvarubs)
void SCIPsortedvecInsertIntPtrReal(int *intarray, void **ptrarray, SCIP_Real *realarray, int keyval, void *field1val, SCIP_Real field2val, int *len, int *pos)
SCIP_Longint nconflictlps
void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool *valid)
void SCIPgmlWriteEdge(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
SCIP_RETCODE SCIPconflicthdlrFree(SCIP_CONFLICTHDLR **conflicthdlr, SCIP_SET *set)
SCIP_Longint SCIPconflictGetNStrongbranchConflictLiterals(SCIP_CONFLICT *conflict)
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
SCIP_DECL_SORTPTRCOMP(SCIPconflicthdlrComp)
internal methods for global SCIP settings
static SCIP_Real * proofsetGetVals(SCIP_PROOFSET *proofset)
SCIP_Bool SCIPbdchginfoHasInferenceReason(SCIP_BDCHGINFO *bdchginfo)
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
int SCIPlpGetNRows(SCIP_LP *lp)
#define SCIP_DECL_CONFLICTCOPY(x)
SCIP_Longint SCIPconflictGetNPseudoSuccess(SCIP_CONFLICT *conflict)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_Bool SCIPbdchginfoIsRedundant(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_LPI * SCIPlpGetLPI(SCIP_LP *lp)
static SCIP_RETCODE conflictsetAddBound(SCIP_CONFLICTSET *conflictset, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd)
SCIP_Longint SCIPconflictGetNInfeasibleLPCalls(SCIP_CONFLICT *conflict)
SCIP_BDCHGIDX * SCIPbdchginfoGetIdx(SCIP_BDCHGINFO *bdchginfo)
static SCIP_RETCODE conflictAddConflictset(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, int validdepth, SCIP_Bool diving, SCIP_Bool repropagate, SCIP_Bool *success, int *nliterals)
static SCIP_CONFTYPE proofsetGetConftype(SCIP_PROOFSET *proofset)
void * SCIPpqueueRemove(SCIP_PQUEUE *pqueue)
SCIP_CLOCK * sbanalyzetime
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
#define BMSduplicateMemoryArray(ptr, source, num)
static SCIP_RETCODE conflictAnalyzeRemainingBdchgs(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool diving, int *lbchginfoposs, int *ubchginfoposs, int *nconss, int *nliterals, int *nreconvconss, int *nreconvliterals)
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
methods commonly used for presolving
SCIP_Longint nboundlpsuccess
SCIP_RETCODE SCIPconflicthdlrInit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set)
void SCIPvarAdjustBd(SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_Real *bd)
static SCIP_RETCODE conflictAnalyzeBoundexceedingLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_CONFLICTSET * conflictset
#define BMSfreeBlockMemory(mem, ptr)
SCIP_Longint nboundlpreconvconss
internal methods for problem variables
static SCIP_RETCODE conflictAnalyzeDualProof(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_AGGRROW *proofrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool initialproof, SCIP_Bool *globalinfeasible, SCIP_Bool *success)
void SCIPsortedvecDelPosIntPtrReal(int *intarray, void **ptrarray, SCIP_Real *realarray, int pos, int *len)
SCIP_Bool SCIPsetIsIntegral(SCIP_SET *set, SCIP_Real val)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
public data structures and miscellaneous methods
void SCIPnodePropagateAgain(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree)
#define SCIPsetFreeBuffer(set, ptr)
SCIP_Real SCIPsetSumepsilon(SCIP_SET *set)
SCIP_Real SCIPaggrRowCalcEfficacyNorm(SCIP *scip, SCIP_AGGRROW *aggrrow)
#define BMSallocBlockMemoryArray(mem, ptr, num)
int SCIPconflicthdlrGetPriority(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPpropResolvePropagation(SCIP_PROP *prop, SCIP_SET *set, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE inferboundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
SCIP_Bool SCIPcutsTightenCoefficients(SCIP *scip, SCIP_Bool cutislocal, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, int *nchgcoefs)
int SCIPbdchginfoGetPos(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Longint SCIPconflictGetNDualrayInfNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint dualraybndnnonzeros
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_Bool SCIPconflictApplicable(SCIP_SET *set)
SCIP_Bool SCIPvarIsInLP(SCIP_VAR *var)
SCIP_RETCODE SCIPconsRelease(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_RETCODE SCIPcalcFlowCover(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool allowlocal, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
static SCIP_RETCODE proofsetAddAggrrow(SCIP_PROOFSET *proofset, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_AGGRROW *aggrrow)
void SCIPclockFree(SCIP_CLOCK **clck)
SCIP_Bool SCIPlpDivingObjChanged(SCIP_LP *lp)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_RETCODE SCIPconflictAnalyzeStrongbranch(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_COL *col, SCIP_Bool *downconflict, SCIP_Bool *upconflict)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
#define SCIPdebugCheckConflictFrontier(blkmem, set, node, bdchginfo, bdchginfos, relaxedbds, nliterals, bdchgqueue, forcedbdchgqueue)
SCIP_Real SCIPconflictstoreGetAvgNnzDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_CONFTYPE conflicttype
static SCIP_RETCODE incVSIDS(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BOUNDTYPE boundtype, SCIP_Real value, SCIP_Real weight)
SCIP_PQUEUE * forcedbdchgqueue
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPconflictstoreAddDualraycons(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt)
SCIP_Longint SCIPconflictGetNStrongbranchConflictConss(SCIP_CONFLICT *conflict)
static void conflictsetCalcConflictDepth(SCIP_CONFLICTSET *conflictset)
static SCIP_DECL_PARAMCHGD(paramChgdConflicthdlrPriority)
void SCIPsortLongPtrRealRealBool(SCIP_Longint *longarray, void **ptrarray, SCIP_Real *realarray, SCIP_Real *realarray2, SCIP_Bool *boolarray, int len)
void ** SCIPpqueueElems(SCIP_PQUEUE *pqueue)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_Longint ndualrayinfglobal
static SCIP_RETCODE updateStatistics(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONFLICTSET *conflictset, int insertdepth)
#define BMScopyMemoryArray(ptr, source, num)
int SCIPconflictGetNConflicts(SCIP_CONFLICT *conflict)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNBoundexceedingLPCalls(SCIP_CONFLICT *conflict)
void SCIPsortIntPtrReal(int *intarray, void **ptrarray, SCIP_Real *realarray, int len)
Constraint handler for linear constraints in their most general form, .
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Longint nboundlpreconvliterals
SCIP_Longint nsbconfconss
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Longint nsbconfliterals
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPvarIncNActiveConflicts(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real length)
SCIP_Longint nboundlpiterations
#define debugPrintViolationInfo(...)
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
SCIP_BOUNDTYPE SCIPbdchginfoGetInferBoundtype(SCIP_BDCHGINFO *bdchginfo)
const char * SCIPpropGetName(SCIP_PROP *prop)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoUb(SCIP_VAR *var, int pos)
SCIP_Longint npseudoconfliterals
SCIP_Longint ninflpconfconss
SCIP_BDCHGINFO * SCIPvarGetBdchgInfo(SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
static SCIP_RETCODE conflictsetCopy(SCIP_CONFLICTSET **targetconflictset, BMS_BLKMEM *blkmem, SCIP_CONFLICTSET *sourceconflictset, int nadditionalelems)
int SCIPparamGetInt(SCIP_PARAM *param)
SCIP_Longint SCIPconflictGetNPseudoCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualrayBndSuccess(SCIP_CONFLICT *conflict)
static void lpbdchgsFree(SCIP_LPBDCHGS **lpbdchgs, SCIP_SET *set)
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_Real SCIPsetFeasFloor(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_CONFTYPE conflicttype
static SCIP_RETCODE ensureSidechgsSize(SCIP_SET *set, int **sidechginds, SCIP_Real **sidechgoldlhss, SCIP_Real **sidechgoldrhss, SCIP_Real **sidechgnewlhss, SCIP_Real **sidechgnewrhss, int *sidechgssize, int num)
SCIP_DOMCHGBOUND domchgbound
void SCIPconflicthdlrSetData(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
SCIP_Real SCIPconflictGetInfeasibleLPTime(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictCreate(SCIP_CONFLICT **conflict, BMS_BLKMEM *blkmem, SCIP_SET *set)
int SCIPcolGetNNonz(SCIP_COL *col)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
void SCIPvisualFoundConflict(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
SCIP_Longint SCIPconflictGetNBoundexceedingLPSuccess(SCIP_CONFLICT *conflict)
static SCIP_RETCODE conflictAnalyzeLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool diving, SCIP_Bool *dualraysuccess, int *iterations, int *nconss, int *nliterals, int *nreconvconss, int *nreconvliterals, SCIP_Bool marklpunsolved)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Longint lastconflictnode
internal methods for conflict analysis
#define SCIPsetFreeCleanBufferArray(set, ptr)
static SCIP_RETCODE conflictAddConflictCons(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_CONFLICTSET *conflictset, int insertdepth, SCIP_Bool *success)
SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem)
static const SCIP_Real scalars[]
static SCIP_RETCODE getDualProof(SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_LPI *lpi, SCIP_AGGRROW *farkasrow, SCIP_Real *farkasact, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *valid)
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
static int * proofsetGetInds(SCIP_PROOFSET *proofset)
void SCIPsetSortConflicthdlrs(SCIP_SET *set)
SCIP_RETCODE SCIPnodeAddBoundchg(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype, SCIP_Bool probingchange)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
int SCIPbdchginfoGetDepth(SCIP_BDCHGINFO *bdchginfo)
static SCIP_RETCODE conflictAnalyzeInfeasibleLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
static SCIP_RETCODE ensureCandsSize(SCIP_SET *set, SCIP_VAR ***cands, SCIP_Real **candscores, SCIP_Real **newbounds, SCIP_Real **proofactdeltas, int *candssize, int num)
SCIP_Longint nsbreconvliterals
static void conflictsetFree(SCIP_CONFLICTSET **conflictset, BMS_BLKMEM *blkmem)
SCIP_Longint nboundlpconfliterals
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
static SCIP_RETCODE conflictInsertConflictset(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONFLICTSET **conflictset)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
public methods for message output
SCIP_RETCODE SCIPconflictInit(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_CONFTYPE conftype, SCIP_Bool usescutoffbound)
SCIP_Real * conflictsetscores
SCIP_RETCODE SCIPconflictAddRelaxedBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
int SCIProwGetLPPos(SCIP_ROW *row)
static SCIP_RETCODE addBdchg(SCIP_SET *set, SCIP_VAR *var, SCIP_Real newlb, SCIP_Real newub, SCIP_LPBDCHGS *oldlpbdchgs, SCIP_LPBDCHGS *relaxedlpbdchgs, SCIP_LPI *lpi)
internal methods for problem statistics
enum SCIP_ConflictType SCIP_CONFTYPE
SCIP_VAR * SCIPbdchginfoGetInferVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_Longint npseudocalls
SCIP_Longint SCIPconflictGetNStrongbranchCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPIterations(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetVarLb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
#define SCIPsetDebugMsgPrint
SCIP_RETCODE SCIPconflictFlushConss(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
SCIP_Longint ndualraybndsuccess
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
SCIP_RETCODE SCIPconflictIsVarUsed(SCIP_CONFLICT *conflict, SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
SCIP_RETCODE SCIPconflictstoreAddDualsolcons(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real scale, SCIP_Bool updateside)
#define SCIP_DECL_CONFLICTINIT(x)
internal methods for constraints and constraint handlers
SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
static SCIP_Bool checkRedundancy(SCIP_SET *set, SCIP_CONFLICTSET *conflictset)
SCIP_Longint nsbiterations
SCIP_Longint SCIPconflictGetNAppliedGlobalLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint nboundlpconfconss
static SCIP_RETCODE conflictAnalyze(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool diving, int validdepth, SCIP_Bool mustresolve, int *nconss, int *nliterals, int *nreconvconss, int *nreconvliterals)
static SCIP_Real getMinActivity(SCIP_PROB *transprob, SCIP_Real *coefs, int *inds, int nnz, SCIP_Real *curvarlbs, SCIP_Real *curvarubs)
int SCIPconflictstoreGetNDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_CONS * SCIPbdchginfoGetInferCons(SCIP_BDCHGINFO *bdchginfo)
SCIP_Bool SCIPsetIsDualfeasZero(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIPvarGetAvgSol(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
void SCIPconflicthdlrEnableOrDisableClocks(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_Bool enable)
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Longint npseudoconfconss
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_Real SCIPconflictstoreGetAvgNnzDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
static SCIP_RETCODE getFarkasProof(SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_LPI *lpi, SCIP_AGGRROW *farkasrow, SCIP_Real *farkasact, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *valid)
static void conflictFreeTmpBdchginfos(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
SCIP_Longint SCIPconflictGetNAppliedConss(SCIP_CONFLICT *conflict)
static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictLiterals(SCIP_CONFLICT *conflict)
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
void SCIPbdchginfoFree(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem)
SCIP_BDCHGINFO ** bdchginfos
void SCIPvarAdjustUb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *ub)
#define BMSallocBlockMemory(mem, ptr)
static int proofsetGetNVars(SCIP_PROOFSET *proofset)
SCIP_Longint SCIPconflictGetNPropReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
unsigned int usescutoffbound
static void tightenCoefficients(SCIP_SET *set, SCIP_PROOFSET *proofset, int *nchgcoefs, SCIP_Bool *redundant)
SCIP_CONFLICTSET ** conflictsets
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPconflictGetPropTime(SCIP_CONFLICT *conflict)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPvarGetProbvarSum(SCIP_VAR **var, SCIP_SET *set, SCIP_Real *scalar, SCIP_Real *constant)
#define SCIP_DECL_CONFLICTFREE(x)
void SCIPaggrRowClear(SCIP_AGGRROW *aggrrow)
static SCIP_RETCODE conflictResolveBound(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_BDCHGINFO *bdchginfo, SCIP_Real relaxedbd, int validdepth, SCIP_Bool *resolved)
SCIP_CONFLICTHDLRDATA * SCIPconflicthdlrGetData(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPconflicthdlrCopyInclude(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set)
static SCIP_RETCODE conflictEnsureTmpbdchginfosMem(SCIP_CONFLICT *conflict, SCIP_SET *set, int num)
static SCIP_RETCODE conflictCreateReconvergenceConss(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool diving, int validdepth, SCIP_BDCHGINFO *firstuip, int *nreconvconss, int *nreconvliterals)
SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
void SCIPpqueueClear(SCIP_PQUEUE *pqueue)
int SCIPcolGetLPPos(SCIP_COL *col)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
const char * SCIPprobGetName(SCIP_PROB *prob)
SCIP_Longint ndualrayinfsuccess
static void conflictClear(SCIP_CONFLICT *conflict)
static SCIP_Bool bdchginfoIsInvalid(SCIP_CONFLICT *conflict, SCIP_BDCHGINFO *bdchginfo)
SCIP_Longint nsbreconvconss
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
static SCIP_RETCODE runBoundHeuristic(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_Real *proofcoefs, SCIP_Real *prooflhs, SCIP_Real *proofactivity, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, int *iterations, SCIP_Bool marklpunsolved, SCIP_Bool *dualraysuccess, SCIP_Bool *valid)
static SCIP_RETCODE proofsetAddSparseData(SCIP_PROOFSET *proofset, BMS_BLKMEM *blkmem, SCIP_Real *vals, int *inds, int nnz, SCIP_Real rhs)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_BDCHGINFO * lbchginfos
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_Longint ninflpsuccess
#define SCIP_DECL_CONFLICTEXITSOL(x)
SCIP_RETCODE SCIPconsResolvePropagation(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE inferboundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
SCIP_BOUNDCHGTYPE SCIPbdchginfoGetChgtype(SCIP_BDCHGINFO *bdchginfo)
static SCIP_Real proofsetGetRhs(SCIP_PROOFSET *proofset)