32 #define PROP_NAME "probing" 33 #define PROP_DESC "probing propagator on binary variables" 34 #define PROP_TIMING SCIP_PROPTIMING_AFTERLPLOOP 35 #define PROP_PRIORITY -100000 37 #define PROP_DELAY TRUE 39 #define PROP_PRESOL_PRIORITY -100000 40 #define PROP_PRESOLTIMING SCIP_PRESOLTIMING_EXHAUSTIVE 41 #define PROP_PRESOL_MAXROUNDS -1 43 #define MAXDNOM 10000LL 56 #define DEFAULT_MAXRUNS 1 57 #define DEFAULT_PROPROUNDS -1 58 #define DEFAULT_MAXFIXINGS 25 60 #define DEFAULT_MAXUSELESS 1000 62 #define DEFAULT_MAXTOTALUSELESS 50 64 #define DEFAULT_MAXSUMUSELESS 0 66 #define DEFAULT_MAXDEPTH -1 67 #define DEFAULT_RANDSEED 59 116 assert(propdata !=
NULL);
118 propdata->sortedvars =
NULL;
119 propdata->nprobed =
NULL;
120 propdata->noldtotalvars = 0;
121 propdata->nsortedvars = 0;
122 propdata->nsortedbinvars = 0;
123 propdata->startidx = 0;
124 propdata->lastsortstartidx = -1;
125 propdata->nfixings = 0;
126 propdata->naggregations = 0;
127 propdata->nimplications = 0;
128 propdata->nbdchgs = 0;
129 propdata->nuseless = 0;
130 propdata->ntotaluseless = 0;
131 propdata->nsumuseless = 0;
132 propdata->lastnode = -2;
133 propdata->randnumgen =
NULL;
145 assert(propdata !=
NULL);
147 if( propdata->sortedvars !=
NULL )
152 for( i = 0; i < propdata->nsortedvars; ++i )
157 propdata->nsortedvars = 0;
158 propdata->nsortedbinvars = 0;
162 propdata->noldtotalvars = 0;
190 assert(propdata !=
NULL);
191 assert(propdata->nprobed !=
NULL);
193 assert(vars !=
NULL || nvars == 0);
195 nsortedvars = nvars - firstidx;
196 if( nsortedvars <= 0 )
199 assert(vars !=
NULL);
201 sortedvars = &(vars[firstidx]);
203 SCIPdebugMsg(scip,
"resorting probing variables %d to %d\n", firstidx, nvars-1);
209 minnprobings = INT_MAX;
212 for( i = 0; i < nvars; ++i )
233 tmp = -
MAX(nlocksdown, nlocksup)
234 + 10.0 *
MIN(nimplzero, nimplone)
235 + 100.0 *
MIN(nclqzero, nclqone);
237 tmp = - ABS(nlocksdown - nlocksup)
238 +
MIN(nlocksdown, nlocksup)
239 + 500.0 * nimplzero + 50.0 * nimplone
240 + 50000.0 * nclqzero + 5000.0 * nclqone;
251 if( minnprobings > 0 )
253 for( i = 0; i < nvars; ++i )
264 for( i = 0; i < nsortedvars; ++i )
290 -
MAX(nlocksdown, nlocksup)
291 + 10.0 *
MIN(nimplzero, nimplone)
292 + 100.0 *
MIN(nclqzero, nclqone)
296 - ABS(nlocksdown - nlocksup)
297 +
MIN(nlocksdown, nlocksup)
298 + 500.0 * nimplzero + 50.0 * nimplone
299 + 50000.0 * nclqzero + 5000.0 * nclqone
343 int localnimplications;
353 assert(vars !=
NULL);
354 assert(nbinvars > 0);
356 maxfixings = (propdata->maxfixings > 0 ? propdata->maxfixings : INT_MAX);
357 maxuseless = (propdata->maxuseless > 0 ? propdata->maxuseless : INT_MAX);
358 maxtotaluseless = (propdata->maxtotaluseless > 0 ? propdata->maxtotaluseless : INT_MAX);
359 maxsumuseless = (propdata->maxsumuseless > 0 ? propdata->maxsumuseless : INT_MAX);
362 oldstartidx = *startidx;
380 for( ; i < nbinvars && !(*cutoff); ++i )
387 if( propdata->nuseless >= maxuseless || propdata->ntotaluseless >= maxtotaluseless || propdata->nsumuseless >= maxsumuseless ||
SCIPisStopped(scip) )
390 " (%.1fs) probing: %d/%d (%.1f%%) - %d fixings, %d aggregations, %d implications, %d bound changes\n",
392 propdata->nfixings, propdata->naggregations, propdata->nimplications, propdata->nbdchgs);
396 if( propdata->nuseless >= maxuseless )
399 " (%.1fs) probing aborted: %d/%d successive useless probings\n",
SCIPgetSolvingTime(scip),
400 propdata->nuseless, maxuseless);
402 else if( propdata->ntotaluseless >= maxtotaluseless )
405 " (%.1fs) probing aborted: %d/%d successive totally useless probings\n",
SCIPgetSolvingTime(scip),
406 propdata->ntotaluseless, maxtotaluseless);
408 else if( propdata->nsumuseless >= maxsumuseless )
411 " (%.1fs) probing aborted: %d/%d useless probings in total\n",
SCIPgetSolvingTime(scip),
412 propdata->nsumuseless, maxsumuseless);
424 if( *nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars >= maxfixings || (looped && oldstartidx == i) )
426 if( *nfixedvars - oldnfixedvars + *naggrvars - oldnaggrvars > 0 )
440 " (%.1fs) probing: %d/%d (%.1f%%) - %d fixings, %d aggregations, %d implications, %d bound changes\n",
442 propdata->nfixings, propdata->naggregations, propdata->nimplications, propdata->nbdchgs);
450 if( propdata->nuseless > 0 )
451 propdata->nsumuseless++;
453 propdata->nsumuseless =
MAX(propdata->nsumuseless-1, 0);
454 propdata->nuseless++;
455 propdata->ntotaluseless++;
466 oneimpllbs, oneimplubs, oneproplbs, onepropubs, &localcutoff) );
485 SCIPdebugMsg(scip,
"fixed probing variable <%s> to 0.0, nlocks=(%d/%d)\n",
488 propdata->nfixings++;
489 propdata->nuseless = 0;
490 propdata->ntotaluseless = 0;
494 SCIPdebugMsg(scip,
"tightening upper bound of probing variable <%s> to 0.0 led to a cutoff\n",
517 zeroimpllbs, zeroimplubs, zeroproplbs, zeropropubs, &localcutoff) );
535 SCIPdebugMsg(scip,
"fixed probing variable <%s> to 1.0, nlocks=(%d/%d)\n",
538 propdata->nfixings++;
539 propdata->nuseless = 0;
540 propdata->ntotaluseless = 0;
544 SCIPdebugMsg(scip,
"tightening lower bound of probing variable <%s> to 1.0 led to a cutoff\n",
552 if( !probingzero || !probingone )
563 localnimplications = 0;
566 nvars, vars, zeroimpllbs, zeroimplubs, zeroproplbs, zeropropubs, oneimpllbs, oneimplubs, oneproplbs, onepropubs,
567 &localnfixedvars, &localnaggrvars, &localnimplications, &localnchgbds, cutoff) );
569 *nfixedvars += localnfixedvars;
570 *naggrvars += localnaggrvars;
571 *nchgbds += localnchgbds;
572 propdata->nfixings += localnfixedvars;
573 propdata->naggregations += localnaggrvars;
574 propdata->nbdchgs += localnchgbds;
575 propdata->nimplications += localnimplications;
577 if( localnfixedvars > 0 || localnaggrvars > 0 )
579 SCIPdebugMsg(scip,
"probing on <%s> led to %d fixed and %d aggregated variables\n",
SCIPvarGetName(vars[i]), localnfixedvars, localnaggrvars);
580 propdata->nuseless = 0;
581 propdata->ntotaluseless = 0;
583 if( localnimplications > 0 || localnchgbds > 0 )
584 propdata->ntotaluseless = 0;
590 if( i == nbinvars && !(*cutoff) && !(*delay) && !aborted )
605 assert(vars == propdata->sortedvars);
606 assert(nbinvars == propdata->nsortedbinvars);
609 for( v = propdata->nsortedvars - 1; v >= 0; --v )
614 propdata->nsortedvars = 0;
615 propdata->nsortedbinvars = 0;
620 propdata->nsortedvars = nnewvars;
627 lastidx = nnewbinvars + nnewintvars + nnewimplvars;
628 for( v = nnewbinvars; v < lastidx; ++v )
632 SCIPswapPointers((
void**) &(propdata->sortedvars[nnewbinvars]), (
void**) &(propdata->sortedvars[v]));
636 propdata->nsortedbinvars = nnewbinvars;
638 nbinvars = nnewbinvars;
639 vars = propdata->sortedvars;
640 nvars = propdata->nsortedvars;
652 if( oldstartidx >= nbinvars )
653 oldstartidx = nbinvars - 1;
656 for( v = propdata->nsortedvars - 1; v >= 0; --v )
661 if( nnewbinvars == 0 )
664 propdata->lastsortstartidx = -1;
665 propdata->nuseless = 0;
666 propdata->ntotaluseless = 0;
673 propdata->lastsortstartidx = 0;
678 while( i == 0 && !(*cutoff) && !(*delay) && !aborted );
705 assert(scip !=
NULL);
706 assert(prop !=
NULL);
725 assert(propdata->sortedvars ==
NULL);
726 assert(propdata->nsortedvars == 0);
727 assert(propdata->nsortedbinvars == 0);
744 assert(propdata !=
NULL);
764 assert(propdata !=
NULL);
767 assert(propdata->sortedvars ==
NULL);
768 assert(propdata->nsortedvars == 0);
769 assert(propdata->nsortedbinvars == 0);
784 assert(propdata !=
NULL);
786 propdata->lastnode = -2;
799 assert(propdata !=
NULL);
802 if( propdata->maxruns >= 0 &&
SCIPgetNRuns(scip) >= propdata->maxruns )
805 assert(propdata->sortedvars ==
NULL);
806 assert(propdata->nsortedvars == 0);
807 assert(propdata->nsortedbinvars == 0);
825 propdata->nuseless = 0;
826 propdata->ntotaluseless = 0;
827 propdata->nsumuseless = 0;
845 int oldnimplications;
850 assert(result !=
NULL);
859 if( nbinvars + nintvars + nimplvars == 0 )
864 assert(propdata !=
NULL);
867 if( propdata->maxruns >= 0 &&
SCIPgetNRuns(scip) > propdata->maxruns )
871 if( propdata->lastnode == -1 && nnewfixedvars == 0 && nnewaggrvars == 0 && nnewchgbds == 0 && nnewholes == 0 )
879 propdata->nuseless -= propdata->nuseless/10;
880 propdata->ntotaluseless -= propdata->ntotaluseless/10;
883 if( propdata->sortedvars ==
NULL )
888 assert(propdata->startidx == 0);
893 propdata->nsortedvars = nvars;
896 lastidx = nbinvars + nintvars + nimplvars;
897 for( v = nbinvars; v < lastidx; ++v )
901 SCIPswapPointers((
void**) &(propdata->sortedvars[nbinvars]), (
void**) &(propdata->sortedvars[v]));
905 propdata->nsortedbinvars = nbinvars;
908 for( v = propdata->nsortedvars - 1; v >= 0 ; --v )
914 if( propdata->nsortedbinvars == 0 )
921 if( propdata->noldtotalvars < ntotalvars )
924 BMSclearMemoryArray(&(propdata->nprobed[propdata->noldtotalvars]), ntotalvars - propdata->noldtotalvars);
925 propdata->noldtotalvars = ntotalvars;
928 propdata->lastnode = -1;
931 if( propdata->lastsortstartidx < 0 || propdata->startidx - propdata->lastsortstartidx >= 100 )
933 SCIP_CALL(
sortVariables(scip, propdata, propdata->sortedvars, propdata->nsortedbinvars, propdata->startidx) );
934 propdata->lastsortstartidx = propdata->startidx;
937 oldnfixedvars = *nfixedvars;
938 oldnaggrvars = *naggrvars;
939 oldnchgbds = *nchgbds;
940 oldnimplications = propdata->nimplications;
943 SCIP_CALL(
applyProbing(scip, propdata, propdata->sortedvars, propdata->nsortedvars, propdata->nsortedbinvars,
944 &(propdata->startidx), nfixedvars, naggrvars, nchgbds, oldnfixedvars, oldnaggrvars, &delay, &cutoff) );
954 propdata->lastnode = -2;
957 if( *nfixedvars > oldnfixedvars || *naggrvars > oldnaggrvars || *nchgbds > oldnchgbds
958 || propdata->nimplications > oldnimplications )
982 int oldnimplications;
988 assert(result !=
NULL);
1002 assert(propdata !=
NULL);
1009 if( propdata->maxdepth >= 0 && propdata->maxdepth <
SCIPgetDepth(scip) )
1023 for( i = 0; i < nvars; ++i )
1028 assert(var !=
NULL);
1034 binvars[nbinvars] = var;
1050 if( propdata->noldtotalvars < ntotalvars )
1053 BMSclearMemoryArray(&(propdata->nprobed[propdata->noldtotalvars]), ntotalvars - propdata->noldtotalvars);
1054 propdata->noldtotalvars = ntotalvars;
1067 SCIPdebug( oldnimplications = propdata->nimplications; )
1070 SCIP_CALL(
applyProbing(scip, propdata, binvars, nbinvars, nbinvars, &startidx, &nfixedvars, &naggrvars, &nchgbds, oldnfixedvars, oldnaggrvars, &delay, &cutoff) );
1071 SCIPdebugMsg(scip, "probing propagation found %d fixings, %d
aggregation, %d nchgbds, and %d implications\n", nfixedvars, naggrvars, nchgbds, (propdata->nimplications) - oldnimplications);
1076 propdata->lastnode = -2;
1082 else if( nfixedvars > oldnfixedvars || naggrvars > oldnaggrvars || nchgbds > oldnchgbds )
1120 propExecProbing, propdata) );
1122 assert(prop !=
NULL);
1139 "maximal number of runs, probing participates in (-1: no limit)",
1143 "maximal number of propagation rounds in probing subproblems (-1: no limit, 0: auto)",
1147 "maximal number of fixings found, until probing is interrupted (0: don't iterrupt)",
1151 "maximal number of successive probings without fixings, until probing is aborted (0: don't abort)",
1154 "propagating/" PROP_NAME "/maxtotaluseless",
1155 "maximal number of successive probings without fixings, bound changes, and implications, until probing is aborted (0: don't abort)",
1158 "propagating/" PROP_NAME "/maxsumuseless",
1159 "maximal number of probings without fixings, until probing is aborted (0: don't abort)",
1163 "maximal depth until propagation is executed(-1: no limit)",
1186 assert(impllbs !=
NULL);
1187 assert(implubs !=
NULL);
1188 assert(proplbs !=
NULL);
1189 assert(propubs !=
NULL);
1190 assert(cutoff !=
NULL);
1191 assert(0 <= probingpos && probingpos < nvars);
1195 SCIPdebugMsg(scip,
"applying probing on variable <%s> %s %g (nlocks=%d/%d, impls=%d/%d, clqs=%d/%d)\n",
1207 SCIPdebugMsg(scip,
" -> trivial infeasibility detected\n");
1239 for( i = 0; i < nvars; ++i )
1250 SCIPdebugMsg(scip,
"propagating probing implications after <%s> to %g led to a cutoff\n",
1259 for( i = 0; i < nvars; ++i )
1323 assert(scip !=
NULL);
1324 assert(probingvar !=
NULL);
1327 assert(vars !=
NULL || nvars == 0);
1328 assert(leftproplbs !=
NULL);
1329 assert(leftpropubs !=
NULL);
1330 assert(rightproplbs !=
NULL);
1331 assert(rightpropubs !=
NULL);
1332 assert(nfixedvars !=
NULL);
1333 assert(naggrvars !=
NULL);
1334 assert(nimplications !=
NULL);
1335 assert(nchgbds !=
NULL);
1336 assert(cutoff !=
NULL);
1345 probingvarisinteger =
TRUE;
1351 assert(
SCIPisGE(scip, leftub, rightlb));
1352 probingvarisbinary =
FALSE;
1353 probingvarisinteger =
FALSE;
1362 for( j = 0; j < nvars && !*cutoff; ++j )
1369 assert(vars !=
NULL);
1372 assert(var !=
NULL);
1381 if( var == probingvar && probingvarisbinary )
1385 newlb =
MIN(leftproplbs[j], rightproplbs[j]);
1386 newub =
MAX(leftpropubs[j], rightpropubs[j]);
1423 SCIPdebugMsg(scip,
"fixed variable <%s> to %g due to probing on <%s> with nlocks=(%d/%d)\n",
1430 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible fixing of variable <%s> to %g\n",
1452 tightenlb = (newlb > oldlb + 0.5);
1453 tightenub = (newub < oldub - 0.5);
1468 SCIPdebugMsg(scip,
"tightened lower bound of variable <%s>[%g,%g] to %g due to probing on <%s> with nlocks=(%d/%d)\n",
1475 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible new lower bound of variable <%s> to %g\n",
1480 if( tightenub && !*cutoff )
1486 SCIPdebugMsg(scip,
"tightened upper bound of variable <%s>[%g,%g] to %g due to probing on <%s> with nlocks=(%d/%d)\n",
1493 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible new lower bound of variable <%s> to %g\n",
1504 if( var == probingvar )
1508 if( fixedleft && fixedright &&
1509 SCIPisEQ(scip, leftproplbs[j], leftpropubs[j]) &&
SCIPisEQ(scip, rightproplbs[j], rightpropubs[j]) )
1529 rightlb - leftub, -(rightproplbs[j] - leftproplbs[j]), leftproplbs[j] * rightlb - rightproplbs[j] * leftub,
1530 cutoff, &redundant, &aggregated) );
1534 SCIPdebugMsg(scip,
"aggregated variables %g<%s> - %g<%s> == %g, nlocks=(%d/%d)\n",
1537 leftproplbs[j] * rightlb - rightproplbs[j] * leftub,
1543 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible aggregation: %g<%s> - %g<%s> == %g\n",
1546 leftproplbs[j] * rightlb - rightproplbs[j] * leftub);
1557 assert(!
SCIPisEQ(scip, leftub, rightlb));
1559 SCIP_CALL(
SCIPaddVarVlb(scip, var, probingvar, (rightproplbs[j] - leftproplbs[j]) / (rightlb - leftub), (leftproplbs[j] * rightlb - rightproplbs[j] * leftub) / (rightlb - leftub), cutoff, &nboundchanges) );
1560 (*nchgbds) += nboundchanges;
1564 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible vlb: %g<%s> - %g<%s> == %g\n",
1567 leftproplbs[j] * rightlb - rightproplbs[j] * leftub);
1571 SCIP_CALL(
SCIPaddVarVub(scip, var, probingvar, (rightproplbs[j] - leftproplbs[j]) / (rightlb - leftub), (leftproplbs[j] * rightlb - rightproplbs[j] * leftub) / (rightlb - leftub), cutoff, &nboundchanges) );
1572 (*nchgbds) += nboundchanges;
1576 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible vub: %g<%s> - %g<%s> == %g\n",
1579 leftproplbs[j] * rightlb - rightproplbs[j] * leftub);
1600 assert(
SCIPisEQ(scip, rightlb, 1.0));
1602 if(
SCIPisEQ(scip, newlb, leftpropubs[j]) && (leftimplubs ==
NULL || leftimplubs[j] > leftpropubs[j]) )
1611 cutoff, &nboundchanges) );
1613 (*nchgbds) += nboundchanges;
1617 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 0 => <%s> == %g\n",
1621 else if(
SCIPisEQ(scip, newub, leftproplbs[j]) && (leftimpllbs ==
NULL || leftimpllbs[j] < leftproplbs[j]) )
1630 cutoff, &nboundchanges) );
1632 (*nchgbds) += nboundchanges;
1636 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 0 => <%s> == %g\n",
1641 else if(
SCIPisEQ(scip, newlb, rightpropubs[j]) && (rightimplubs ==
NULL || rightimplubs[j] > rightpropubs[j]) )
1650 cutoff, &nboundchanges) );
1652 (*nchgbds) += nboundchanges;
1656 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 1 => <%s> == %g\n",
1660 else if(
SCIPisEQ(scip, newub, rightproplbs[j]) && (rightimpllbs ==
NULL || rightimpllbs[j] < rightproplbs[j]) )
1669 cutoff, &nboundchanges) );
1671 (*nchgbds) += nboundchanges;
1675 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 1 => <%s> == %g\n",
1684 if( leftpropubs[j] < newub - 0.5 && (leftimplubs ==
NULL || leftpropubs[j] < leftimplubs[j]) )
1690 cutoff, &nboundchanges) );
1692 (*nchgbds) += nboundchanges;
1696 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 0 => <%s> <= %g\n",
1700 if( leftproplbs[j] > newlb + 0.5 && (leftimpllbs ==
NULL || leftproplbs[j] > leftimpllbs[j]) && !*cutoff )
1706 cutoff, &nboundchanges) );
1708 (*nchgbds) += nboundchanges;
1712 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 0 => <%s> >= %g\n",
1716 if( rightpropubs[j] < newub - 0.5 && (rightimplubs ==
NULL || rightpropubs[j] < rightimplubs[j]) && !*cutoff )
1722 cutoff, &nboundchanges) );
1724 (*nchgbds) += nboundchanges;
1728 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 1 => <%s> <= %g\n",
1732 if( rightproplbs[j] > newlb + 0.5 && (rightimpllbs ==
NULL || rightproplbs[j] > rightimpllbs[j]) && !*cutoff )
1738 cutoff, &nboundchanges) );
1740 (*nchgbds) += nboundchanges;
1744 SCIPdebugMsg(scip,
"analyzing probing deduction of <%s> led to an infeasible implication <%s> == 1 => <%s> <= %g\n",
SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
static SCIP_RETCODE sortVariables(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR **vars, int nvars, int firstidx)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
#define DEFAULT_MAXSUMUSELESS
enum SCIP_BoundType SCIP_BOUNDTYPE
int SCIPgetNIntVars(SCIP *scip)
SCIP_RETCODE SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
static SCIP_DECL_PROPEXITPRE(propExitpreProbing)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
#define PROP_PRESOLTIMING
static SCIP_DECL_PROPCOPY(propCopyProbing)
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
static SCIP_DECL_PROPINITSOL(propInitsolProbing)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIPsortDownRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
void SCIPswapPointers(void **pointer1, void **pointer2)
#define DEFAULT_MAXUSELESS
SCIP_RETCODE SCIPpropagateProbingImplications(SCIP *scip, SCIP_Bool *cutoff)
SCIP_Real SCIPinfinity(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
enum SCIP_VerbLevel SCIP_VERBLEVEL
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
static SCIP_RETCODE applyProbing(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR **vars, int nvars, int nbinvars, int *startidx, int *nfixedvars, int *naggrvars, int *nchgbds, int oldnfixedvars, int oldnaggrvars, SCIP_Bool *delay, SCIP_Bool *cutoff)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddVarVlb(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool *infeasible, int *nbdchgs)
int SCIPnodeGetDepth(SCIP_NODE *node)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPaddVarVub(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vubvar, SCIP_Real vubcoef, SCIP_Real vubconstant, SCIP_Bool *infeasible, int *nbdchgs)
static SCIP_RETCODE freeSortedvars(SCIP *scip, SCIP_PROPDATA *propdata)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPepsilon(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen)
SCIP_RETCODE SCIPsetPropExitpre(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXITPRE((*propexitpre)))
static SCIP_DECL_PROPINIT(propInitProbing)
#define DEFAULT_PROPROUNDS
static SCIP_DECL_PROPEXIT(propExitProbing)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
#define DEFAULT_MAXFIXINGS
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPendProbing(SCIP *scip)
const char * SCIPvarGetName(SCIP_VAR *var)
int SCIPgetNTotalVars(SCIP *scip)
static SCIP_RETCODE initPropdata(SCIP *scip, SCIP_PROPDATA *propdata)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
static SCIP_DECL_PROPEXEC(propExecProbing)
static SCIP_DECL_PROPRESPROP(propRespropProbing)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetPropInit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINIT((*propinit)))
public data structures and miscellaneous methods
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
#define SCIPduplicateMemoryArray(scip, ptr, source, num)
#define PROP_PRESOL_MAXROUNDS
int SCIPgetDepth(SCIP *scip)
int SCIPvarGetNImpls(SCIP_VAR *var, SCIP_Bool varfixing)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
static SCIP_RETCODE aggregation(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_Real *varsolvals, SCIP_Real *bestcontlbs, SCIP_Real *bestcontubs, SCIP_Real *contvarscorebounds, SCIP_Real *rowlhsscores, SCIP_Real *rowrhsscores, int startrow, int maxaggrs, SCIP_Real maxslack, int maxconts, SCIP_Bool *wastried, SCIP_Bool *cutoff, int *ncuts)
unsigned int SCIPinitializeRandomSeed(SCIP *scip, int initialseedvalue)
void SCIPenableVarHistory(SCIP *scip)
SCIP_RETCODE SCIPanalyzeDeductionsProbing(SCIP *scip, SCIP_VAR *probingvar, SCIP_Real leftub, SCIP_Real rightlb, int nvars, SCIP_VAR **vars, SCIP_Real *leftimpllbs, SCIP_Real *leftimplubs, SCIP_Real *leftproplbs, SCIP_Real *leftpropubs, SCIP_Real *rightimpllbs, SCIP_Real *rightimplubs, SCIP_Real *rightproplbs, SCIP_Real *rightpropubs, int *nfixedvars, int *naggrvars, int *nimplications, int *nchgbds, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPCOPY((*propcopy)))
#define SCIPfreeMemoryArray(scip, ptr)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
#define SCIPreallocMemoryArray(scip, ptr, newnum)
int SCIPgetNRuns(SCIP *scip)
#define DEFAULT_MAXTOTALUSELESS
int SCIPgetNBinVars(SCIP *scip)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_Bool SCIPinProbing(SCIP *scip)
const char * SCIPpropGetName(SCIP_PROP *prop)
int SCIPgetNVars(SCIP *scip)
#define PROP_PRESOL_PRIORITY
SCIP_RETCODE SCIPapplyProbingVar(SCIP *scip, SCIP_VAR **vars, int nvars, int probingpos, SCIP_BOUNDTYPE boundtype, SCIP_Real bound, int maxproprounds, SCIP_Real *impllbs, SCIP_Real *implubs, SCIP_Real *proplbs, SCIP_Real *propubs, SCIP_Bool *cutoff)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_RETCODE SCIPsetPropResprop(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPRESPROP((*propresprop)))
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_PROPFREE(propFreeProbing)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITSOL((*propinitsol)))
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
struct SCIP_PropData SCIP_PROPDATA
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPincludePropProbing(SCIP *scip)
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPsetPropInitpre(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITPRE((*propinitpre)))
SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXIT((*propexit)))
#define SCIPfreeMemoryArrayNull(scip, ptr)
static SCIP_DECL_PROPPRESOL(propPresolProbing)
SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
static SCIP_DECL_PROPINITPRE(propInitpreProbing)
SCIP_Real SCIPpropGetTime(SCIP_PROP *prop)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
#define SCIPreallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)