78#define CONSHDLR_NAME "optcumulative"
79#define CONSHDLR_DESC "constraint handler for cumulative constraints with optional activities"
80#define CONSHDLR_SEPAPRIORITY 0
81#define CONSHDLR_ENFOPRIORITY -2060000
82#define CONSHDLR_CHECKPRIORITY -3100000
83#define CONSHDLR_SEPAFREQ 1
84#define CONSHDLR_PROPFREQ 1
85#define CONSHDLR_EAGERFREQ 100
87#define CONSHDLR_MAXPREROUNDS -1
88#define CONSHDLR_DELAYSEPA FALSE
89#define CONSHDLR_DELAYPROP FALSE
90#define CONSHDLR_NEEDSCONS TRUE
92#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
93#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM
102#define EVENTHDLR_BINVARS_NAME "optcumulativebinvars"
103#define EVENTHDLR_BINVARS_DESC "bound change event handler for binary variables of optcumulative constraints"
105#define EVENTHDLR_INTVARS_NAME "optcumulativeintvars"
106#define EVENTHDLR_INTVARS_DESC "bound change event handler for integer variables of optcumulative constraints"
115#define DEFAULT_ROWRELAX FALSE
116#define DEFAULT_CONFLICTANALYSIS TRUE
117#define DEFAULT_INTERVALRELAX TRUE
131 SCIP_Bool* downlocks;
150 unsigned int propagated:1;
151 unsigned int relaxadded:1;
152 unsigned int triedsolving:1;
153 unsigned int normalized:1;
154 unsigned int triedredundant:1;
158struct SCIP_ConshdlrData
164 SCIP_Bool conflictanalysis;
165 SCIP_Bool intervalrelax;
191 for( v = 0; v < consdata->nvars; ++v )
206 assert(nglbfixedones == consdata->nglbfixedones);
207 assert(nglbfixedzeors == consdata->nglbfixedzeros);
208 assert(nfixedones == consdata->nfixedones);
209 assert(nfixedzeors == consdata->nfixedzeros);
212#define checkCounters(x)
235 return (
int)(
bound + 0.5);
238#define convertBoundToInt(x, y) ((int)((y) + 0.5))
273 (*consdata)->capacity = capacity;
274 (*consdata)->nvars =
nvars;
275 (*consdata)->varssize =
nvars;
276 (*consdata)->hmin = 0;
277 (*consdata)->hmax = INT_MAX;
278 (*consdata)->nglbfixedzeros = 0;
279 (*consdata)->est = -1;
280 (*consdata)->lct = INT_MAX;
281 (*consdata)->row =
NULL;
282 (*consdata)->cons =
NULL;
283 (*consdata)->nglbfixedzeros = 0;
284 (*consdata)->nglbfixedones = 0;
285 (*consdata)->nfixedzeros = 0;
286 (*consdata)->nfixedones = 0;
287 (*consdata)->propagated =
FALSE;
288 (*consdata)->relaxadded =
FALSE;
289 (*consdata)->triedsolving =
FALSE;
290 (*consdata)->normalized =
FALSE;
291 (*consdata)->triedredundant =
FALSE;
308 for( v = 0; v <
nvars; ++v )
311 (*consdata)->downlocks[v] = check;
312 (*consdata)->uplocks[v] = check;
324 for( v = 0; v <
nvars; ++v )
333 (*consdata)->vars =
NULL;
334 (*consdata)->binvars =
NULL;
335 (*consdata)->downlocks =
NULL;
336 (*consdata)->uplocks =
NULL;
337 (*consdata)->demands =
NULL;
338 (*consdata)->durations =
NULL;
358 if( (*consdata)->row !=
NULL )
364 if( (*consdata)->cons !=
NULL )
369 varssize = (*consdata)->varssize;
402 for( v = 0; v < consdata->nvars; ++v )
411 SCIPvarGetUbLocal(consdata->vars[v]), consdata->durations[v], consdata->demands[v]);
416 SCIPinfoMessage(
scip, file,
")[%d,%d)<= %d", consdata->hmin, consdata->hmax, consdata->capacity);
447 (*conshdlrdata)->eventhdlrbinvars = eventhdlrbinvars;
448 (*conshdlrdata)->eventhdlrintvars = eventhdlrintvars;
449 (*conshdlrdata)->heurtrysol =
NULL;
510 binvar = consdata->binvars[pos];
528 consdata->nglbfixedzeros++;
530 consdata->nglbfixedones++;
534 consdata->nfixedzeros++;
536 consdata->nfixedones++;
538 assert(consdata->nglbfixedzeros + consdata->nglbfixedones <= consdata->nvars);
539 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
563 binvar = consdata->binvars[pos];
573 consdata->nglbfixedzeros--;
575 consdata->nglbfixedones--;
579 consdata->nfixedzeros--;
581 consdata->nfixedones--;
583 assert(consdata->nglbfixedzeros >= 0);
584 assert(consdata->nglbfixedones >= 0);
585 assert(consdata->nfixedzeros >= 0);
586 assert(consdata->nfixedones >= 0);
610 var = consdata->vars[pos];
645 var = consdata->vars[pos];
670 assert(consdata->nglbfixedones == 0);
671 assert(consdata->nglbfixedzeros == 0);
672 assert(consdata->nfixedones == 0);
673 assert(consdata->nfixedzeros == 0);
676 for( v = 0; v < consdata->nvars; ++v )
705 for( v = 0; v < consdata->nvars; ++v )
713 assert(consdata->nglbfixedones == 0);
714 assert(consdata->nglbfixedzeros == 0);
715 assert(consdata->nfixedones == 0);
716 assert(consdata->nfixedzeros == 0);
737 nvars = consdata->nvars;
740 for ( j = 0; j <
nvars; ++j )
742 var = consdata->vars[j];
777 SCIP_Longint maxenergy;
780 assert(starttime < endtime);
783 for( v = 0; v < consdata->nvars; ++v )
785 var = consdata->vars[v];
791 maxenergy += (
SCIP_Longint)(consdata->durations[v] * consdata->demands[v]);
804 SCIP_Longint* weights,
813 assert(starttime < endtime);
816 for( v = 0; v < consdata->nvars; ++v )
818 var = consdata->vars[v];
839 SCIP_Longint* rowtightness,
842 SCIP_Longint tightness
850 for( j = 0; j < nrows; ++j )
852 rowtightness[keptrows] = rowtightness[j];
853 startidxs[keptrows] = startidxs[j];
856 if( rowtightness[j] > tightness )
870 SCIP_Longint* weights,
872 SCIP_Longint capacity,
875 SCIP_Bool* consadded,
896 for( v = 0; v <
nvars; ++v )
942 SCIP_Bool* consadded,
956 if( consdata->relaxadded )
961 if( conshdlrdata->intervalrelax )
963 SCIP_Longint** rowtightness;
984 for( j = 0; j < consdata->nvars; ++j )
992 starttime = -INT_MAX;
995 for( j = 0; j < consdata->nvars; ++j )
997 SCIP_Longint besttightness;
999 assert(starttime <= starttimes[j]);
1002 if( starttime == starttimes[j])
1005 starttime = starttimes[j];
1007 besttightness = 0LL;
1009 for(
i = 0;
i < consdata->nvars; ++
i )
1011 SCIP_Longint energy;
1012 SCIP_Longint maxenergy;
1013 SCIP_Longint tightness;
1015 assert(endtime <= endtimes[
i]);
1018 if( endtime == endtimes[
i] )
1021 endtime = endtimes[
i];
1024 if( endtime <= starttime )
1029 energy = (endtime - starttime) * consdata->capacity;
1030 tightness = maxenergy - energy;
1033 if( tightness > besttightness )
1035 besttightness = tightness;
1040 rowtightness[
i][nrows[
i]] = tightness;
1041 startidxs[
i][nrows[
i]] = j;
1047 for( j = consdata->nvars-1; j >= 0 && ! (*cutoff); --j )
1049 for(
i = 0;
i < nrows[j] && ! (*cutoff); ++
i )
1052 SCIP_Longint* weights;
1053 SCIP_Longint energy;
1060 starttime = starttimes[startidxs[j][
i]];
1061 endtime = endtimes[j];
1063 energy = (endtime - starttime) * consdata->capacity;
1071 SCIP_CALL(
createRow(
scip, conshdlr, name,
vars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1079 for( j = consdata->nvars-1; j >= 0; --j )
1096 SCIP_Longint* weights;
1097 SCIP_Longint maxenergy;
1098 SCIP_Longint energy;
1106 nvars = consdata->nvars;
1107 vars = consdata->vars;
1108 durations = consdata->durations;
1109 demands = consdata->demands;
1117 for( v = 0; v <
nvars; ++v )
1119 weights[v] = (
SCIP_Longint)(durations[v] * demands[v]);
1120 maxenergy += weights[v];
1129 energy = (lct - est) * consdata->capacity;
1131 if( maxenergy > energy )
1140 SCIP_CALL(
createRow(
scip, conshdlr, name, consdata->binvars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1147 consdata->relaxadded =
TRUE;
1150 if( !conshdlrdata->rowrelax )
1171 SCIP_Bool* auxiliary
1179 (*auxiliary) =
TRUE;
1183 for( v = 0; v < consdata->nvars; ++v )
1192 binvars[*nfixedones] = consdata->binvars[v];
1193 vars[*nfixedones] = consdata->vars[v];
1194 durations[*nfixedones] = consdata->durations[v];
1195 demands[*nfixedones] = consdata->demands[v];
1205 (*auxiliary) =
FALSE;
1212 assert(consdata->nfixedzeros == *nfixedzeros);
1213 assert(consdata->nfixedones == *nfixedones);
1229 SCIP_Bool* auxiliary
1239 (*auxiliary) =
TRUE;
1242 for( v = 0; v < consdata->nvars; ++v )
1247 binvars[*
nvars] = consdata->binvars[v];
1249 durations[*
nvars] = consdata->durations[v];
1250 demands[*
nvars] = consdata->demands[v];
1257 (*auxiliary) =
FALSE;
1288 SCIP_Longint maxnodes,
1290 SCIP_Bool* infeasible,
1291 SCIP_Bool* unbounded,
1296 SCIP_Real timelimit;
1297 SCIP_Real memorylimit;
1302 for( v = 0; v <
nvars; ++v )
1337 capacity, hmin, hmax, timelimit, memorylimit, maxnodes,
1338 solved, infeasible, unbounded, error) );
1365 for( v = 0; v <
nvars; ++v )
1388 SCIP_Bool* redundant
1393 SCIP_Bool infeasible;
1394 SCIP_Bool unbounded;
1404 (*redundant) =
FALSE;
1408 assert(consdata->nglbfixedzeros == 0);
1410 if( consdata->triedredundant )
1413 consdata->triedredundant =
TRUE;
1415 nvars = consdata->nvars;
1418 for( v = 0; v <
nvars; ++v )
1431 consdata->capacity, consdata->hmin, consdata->hmax,
FALSE,
1432 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1451 for( v = 0; v <
nvars; ++v )
1457 var = consdata->vars[v];
1463 if( consdata->demands[v] == 0.0 || consdata->durations[v] == 0.0 )
1466 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1468 binvars[v] = consdata->binvars[v];
1470 durations[v] = consdata->durations[v];
1471 demands[v] = consdata->demands[v];
1478 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1496 for( v = 0; v <
nvars; ++v )
1501 assert(lbs[v] + 0.5 > ubs[v]);
1503 var = consdata->vars[v];
1519 (*redundant) =
TRUE;
1534 SCIP_Bool conflictanalysis,
1547 SCIP_Bool unbounded;
1557 if( consdata->triedsolving )
1560 consdata->triedsolving =
TRUE;
1570 lbs, ubs, 2000LL, &solved,
cutoff, &unbounded, &error) );
1575 if( *
cutoff && conflictanalysis )
1578 SCIP_Bool infeasible;
1583 for( v = 0; v <
nvars; ++v )
1591 if( demands[v] == 0.0 || durations[v] == 0.0 )
1594 weights[v] = (lst - est) / (demands[v] * durations[v]);
1603 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1614 for( v = 0; v <
nvars; ++v )
1628 SCIP_Bool infeasible;
1629 SCIP_Bool tightened;
1635 for( v = 0; v <
nvars; ++v )
1638 if( lbs[v] + 0.5 > ubs[v] )
1646 consdata->triedsolving =
FALSE;
1657 consdata->triedsolving =
FALSE;
1666 consdata->triedsolving =
FALSE;
1696 SCIP_Bool* violated,
1697 SCIP_Bool printreason
1703 SCIP_Bool auxiliary;
1725 collectSolActivities(
scip, consdata,
sol, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1731 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons, printreason) );
1751 SCIP_Bool* violated,
1752 SCIP_Bool* consadded,
1753 SCIP_Bool* solfeasible
1759 SCIP_Bool auxiliary;
1781 collectSolActivities(
scip, consdata,
NULL, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1783 (*violated) =
FALSE;
1789 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons,
FALSE) );
1791 if( *violated && auxiliary && !consdata->triedsolving )
1795 SCIP_Bool infeasible;
1796 SCIP_Bool unbounded;
1800 if( nfixedones ==
nvars )
1801 consdata->triedsolving =
TRUE;
1808 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1816#ifdef SCIP_DISABLED_CODE
1822 for( v = 0; v <
nvars; ++v )
1829 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1838 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1850 (*solfeasible) =
FALSE;
1851 (*consadded) =
TRUE;
1853 else if( solved && *solfeasible && trysol !=
NULL )
1857 for(v = 0; v <
nvars; ++v )
1863 (*solfeasible) =
FALSE;
1886 SCIP_Bool* violated,
1895 SCIP_Bool auxiliary;
1920 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons,
FALSE) );
1956 SCIP_Bool* mustpropagate
1965 nvars = consdata->nvars;
1970 if(
nvars == 0 && consdata->nfixedzeros ==
nvars )
1975 (*mustpropagate) =
FALSE;
1977 else if(
nvars == 1 )
1981 if( consdata->capacity < consdata->demands[0] )
1983 SCIP_Bool infeasible;
1984 SCIP_Bool tightened;
1993 (*mustpropagate) =
FALSE;
1995 else if( consdata->nglbfixedones ==
nvars )
2016 (*mustpropagate) =
FALSE;
2018 else if( consdata->nfixedones + consdata->nfixedzeros ==
nvars && consdata->nfixedones > 0 )
2029 SCIP_Bool auxiliary;
2043 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
2063 (*mustpropagate) =
FALSE;
2066 assert(consdata->nvars > 1);
2085 SCIP_Bool infeasible;
2086 SCIP_Bool tightened;
2160 consdata->vars[pos], consdata->downlocks[pos], consdata->uplocks[pos]) );
2162 consdata->downlocks[pos] =
FALSE;
2163 consdata->uplocks[pos] =
FALSE;
2174 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
2175 assert(conshdlrdata->eventhdlrintvars !=
NULL);
2182 SCIPdebugMessage(
"remove variable <%s> from optcumulative constraint <%s>\n",
2185 if( pos != consdata->nvars - 1 )
2187 consdata->binvars[pos] = consdata->binvars[consdata->nvars-1];
2188 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
2189 consdata->demands[pos] = consdata->demands[consdata->nvars-1];
2190 consdata->durations[pos] = consdata->durations[consdata->nvars-1];
2191 consdata->downlocks[pos] = consdata->downlocks[consdata->nvars-1];
2192 consdata->uplocks[pos] = consdata->uplocks[consdata->nvars-1];
2200 consdata->relaxadded =
FALSE;
2201 consdata->normalized =
FALSE;
2221 for( v = consdata->nvars-1; v >= 0 && consdata->nglbfixedzeros > 0; --v )
2239 consdata->triedredundant =
TRUE;
2247 assert(consdata->nglbfixedzeros == 0);
2277 hmin = consdata->hmin;
2278 hmax = consdata->hmax;
2280 SCIPdebugMessage(
"check for irrelevant jobs within cumulative constraint <%s>[%d,%d)\n",
2283 for( j = consdata->nvars-1; j >= 0; --j )
2285 var = consdata->vars[j];
2286 demand = consdata->demands[j];
2287 duration = consdata->durations[j];
2293 if( demand == 0 || duration == 0 )
2302 else if( est >= hmax || lct <= hmin )
2327 SCIP_Bool* irrelevants;
2334 nvars = consdata->nvars;
2342 consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
2343 irrelevants, nfixedvars, nchgsides,
cutoff) );
2348 for( v =
nvars-1; v >= 0; --v )
2354 if( !irrelevants[v] )
2357 var = consdata->vars[v];
2364 if( lst <= consdata->hmin && ect >= consdata->hmax )
2366 assert(!consdata->downlocks[v]);
2367 assert(!consdata->uplocks[v]);
2369 if( consdata->capacity < consdata->demands[v] )
2371 SCIP_Bool infeasible;
2372 SCIP_Bool tightened;
2379 consdata->capacity -= consdata->demands[v];
2393 consdata->hmin, consdata->hmax, consdata->capacity,
nvars);
2525 vars = consdata->vars;
2526 binvars = consdata->binvars;
2527 durations = consdata->durations;
2529 hmin = consdata->hmin;
2530 hmax = consdata->hmax;
2536 for( v = consdata->nvars-1; v >= 0; --v )
2550 if( consdata->demands[v] < consdata->capacity )
2556 end = start + durations[v];
2561 if( start <= hmin && end >= hmax )
2566 for( j = 0; j < consdata->nvars; ++j )
2580 ect = est + durations[j];
2588 if( ect > hmin && lst < hmax )
2593 else if( lst < hmax )
2598 else if( ect > hmin )
2610 else if( start <= hmin )
2617 for( j = 0; j < consdata->nvars; ++j )
2631 ect = est + durations[j];
2636 if( lst < ect && hmin < ect && lst < end )
2644 else if( end > lst )
2649 else if( est < end )
2656 else if( end >= hmax )
2665 for( j = 0; j < consdata->nvars; ++j )
2680 lct = lst + durations[j];
2682 SCIPdebugMessage(
"variable <%s>[%d,%d] (duration %d, demand %d)\n",
SCIPvarGetName(implvar), ect - durations[j], lst, durations[j], consdata->demands[j]);
2684 if( lst < ect && start < ect && lst < hmax )
2692 else if( start < ect )
2697 else if( lct > start )
2722 SCIP_Bool conflictanalysis,
2732 SCIP_Bool auxiliary;
2744 assert(consdata->nvars > 1);
2749 if( consdata->propagated && (consdata->nfixedones + consdata->nfixedzeros < consdata->nvars || consdata->triedsolving) )
2758 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
2761 if( !consdata->propagated && nfixedones > 1 )
2763 SCIP_Bool* explanation;
2764 SCIP_Bool initialized;
2766 initialized =
FALSE;
2773 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, cons, nchgbds, &initialized, explanation,
cutoff) );
2776 if( initialized && conflictanalysis )
2780 for( v = 0; v < nfixedones; ++v )
2782 if( explanation[v] )
2794 assert(consdata->nvars > 1);
2801 if( nfixedzeros + nfixedones == consdata->nvars )
2811 nfixedones, nfixedvars, nchgbds, ndelconss,
cutoff) );
2814 else if( !consdata->propagated && nfixedones < consdata->
nvars )
2830 if( hmin < INT_MAX )
2838 binvar = consdata->binvars[v];
2841 var = consdata->vars[v];
2849 SCIP_Bool infeasible;
2865 if( hmin == INT_MAX )
2891 SCIP_Bool tightened;
2904 else if( tightened )
2919 SCIP_Bool tightened;
2970 consdata->propagated =
TRUE;
3020#define consInitOptcumulative NULL
3024#define consExitOptcumulative NULL
3041 for(
c = 0;
c < nconss; ++
c )
3050 if( conshdlrdata->heurtrysol ==
NULL )
3059#define consExitpreOptcumulative NULL
3063#define consInitsolOptcumulative NULL
3066#define consEnforelaxOptcomulative NULL
3077 for(
c = 0;
c < nconss; ++
c )
3084 if( consdata->row !=
NULL )
3108 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3109 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3139 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3140 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3150 sourcedata->durations, sourcedata->demands, sourcedata->capacity,
SCIPconsIsChecked(sourcecons)) );
3159 assert(targetdata->nglbfixedones == 0);
3160 assert(targetdata->nglbfixedzeros == 0);
3161 assert(targetdata->nfixedones == 0);
3162 assert(targetdata->nfixedzeros == 0);
3177 SCIP_Bool consadded;
3187 for(
c = 0;
c < nconss; ++
c )
3204 SCIP_Bool consadded;
3215 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3222 else if( consadded )
3234#define consSepasolOptcumulative NULL
3244 SCIP_Bool consviolated;
3245 SCIP_Bool consadded;
3246 SCIP_Bool solfeasible;
3260 consviolated =
FALSE;
3266 if( conshdlrdata->heurtrysol !=
NULL )
3272 for(
c = 0;
c < nconss && (!violated || solfeasible); ++
c )
3275 violated = violated || consviolated;
3279 if( solfeasible && violated && trysol !=
NULL )
3283 file = fopen(
"build.sol",
"w");
3315 SCIP_Bool consadded;
3316 SCIP_Bool solfeasible;
3335 if( conshdlrdata->heurtrysol !=
NULL )
3340 for(
c = 0;
c < nconss && !violated; ++
c )
3346 if( solfeasible && violated && trysol !=
NULL )
3378 for(
c = 0;
c < nconss && !violated; ++
c )
3422 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
3424 SCIP_Bool mustpropagate;
3429 mustpropagate =
TRUE;
3430 oldnchgcoefs = nchgcoefs;
3431 oldnchgbds = nchgbds;
3445 SCIP_Bool redundant;
3464 if( oldnchgbds < nchgbds || oldnchgcoefs < nchgcoefs )
3479 else if( nfixedvars > 0 || nchgbds > 0 || nupgdconss > 0 )
3497 SCIP_Bool mustpropagate;
3508 oldnchgbds = *nchgbds;
3509 oldndelconss = *ndelconss;
3510 oldnupgdconss = *nupgdconss;
3511 oldnfixedvars = *nfixedvars;
3516 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3521 mustpropagate =
TRUE;
3541 nvars = consdata->nvars;
3544 if( !consdata->normalized )
3548 consdata->demands, &consdata->capacity, nchgcoefs, nchgsides) );
3549 consdata->normalized =
TRUE;
3561 consdata->demands, consdata->capacity, &hmin, &hmax, &split) );
3564 if( consdata->hmin < hmin )
3568 consdata->hmin = hmin;
3573 if( consdata->hmax > hmax )
3576 consdata->hmax = hmax;
3581 if( consdata->hmax <= consdata->hmin )
3583 SCIPdebugMessage(
"constraint <%s> is redundant since hmax(%d) <= hmin(%d)\n",
3593 if( consdata->hmin < split && split < consdata->hmax )
3601 SCIPdebugMessage(
"split optcumulative constraint <%s>[%d,%d) with %d jobs at time point %d\n",
3605 consdata->durations, consdata->demands, consdata->capacity,
3613 splitconsdata->hmin = split;
3614 splitconsdata->hmax = consdata->hmax;
3616 assert(split < consdata->hmax);
3623 consdata->hmax = split;
3625 assert(consdata->hmin < consdata->hmax);
3649 else if( oldnfixedvars < *nfixedvars || oldnchgbds < *nchgbds || oldnupgdconss < *nupgdconss || oldndelconss < *ndelconss )
3651 SCIPdebugMessage(
"presolving detected %d bound changes\n", *nchgbds - oldnchgbds);
3671 SCIP_Bool choicevar;
3679 if( !conshdlrdata->conflictanalysis )
3699 for( v = 0; v < consdata->nvars; ++v )
3704 binvars[
nvars] = consdata->binvars[v];
3705 durations[
nvars] = consdata->durations[v];
3706 demands[
nvars] = consdata->demands[v];
3709 else if( consdata->binvars[v] == infervar )
3717 for( v = 0; v < consdata->nvars; ++v )
3726 else if( consdata->binvars[v] == infervar )
3737 SCIP_Bool* explanation;
3744 infervar, inferinfo, boundtype, bdchgidx, relaxedbd, explanation,
result) );
3751 for( v = 0; v <
nvars; ++v )
3753 if( explanation[v] )
3787 vars = consdata->vars;
3790 for( v = 0; v < consdata->nvars; ++v )
3793 if( consdata->downlocks[v] && consdata->uplocks[v] )
3798 else if( consdata->downlocks[v] )
3802 else if( consdata->uplocks[v] )
3817#define consActiveOptcumulative NULL
3821#define consDeactiveOptcumulative NULL
3825#define consEnableOptcumulative NULL
3829#define consDisableOptcumulative NULL
3832#define consDelvarsOptcumulative NULL
3857 const char* consname;
3866 sourcebinvars = sourceconsdata->binvars;
3867 sourcevars = sourceconsdata->vars;
3868 nvars = sourceconsdata->nvars;
3881 for( v = 0; v <
nvars && success; ++v )
3896 sourceconsdata->durations, sourceconsdata->demands, sourceconsdata->capacity,
3897 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3955 duration = atoi(strvalue);
3959 demand = atoi(strvalue);
3969 binvars[
nvars] = binvar;
3970 demands[
nvars] = demand;
3971 durations[
nvars] = duration;
3979 hmin = atoi(strvalue);
3984 hmax = (int)(value);
3992 capacity = (int)value;
3996 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
4038 consdata->nglbfixedones++;
4041 consdata->nglbfixedzeros++;
4044 consdata->nfixedones++;
4045 consdata->propagated =
FALSE;
4048 consdata->nfixedzeros++;
4051 consdata->nfixedones--;
4052 consdata->triedsolving =
FALSE;
4055 consdata->nfixedzeros--;
4056 consdata->triedsolving =
FALSE;
4059 consdata->propagated =
FALSE;
4086 if( consdata->nfixedzeros + consdata->nfixedones < consdata->nvars )
4087 consdata->relaxadded =
FALSE;
4090 consdata->propagated =
FALSE;
4111 eventExecOptcumulativeBinvars,
NULL) );
4115 eventExecOptcumulativeIntvars,
NULL) );
4123 consEnfolpOptcumulative, consEnfopsOptcumulative, consCheckOptcumulative,
4124 consLockOptcumulative, conshdlrdata) );
4157 "add linear relaxation as LP row (otherwise a knapsack constraint is created)?",
4162 "participate in conflict analysis?",
4167 "create a relaxation for each start and end time point interval",
4196 SCIP_Bool modifiable,
4202 SCIP_Bool removable,
4204 SCIP_Bool stickingatnode
4216 if( conshdlr ==
NULL )
4229 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
4230 local, modifiable, dynamic, removable, stickingatnode) );
4239 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
4240 assert(conshdlrdata->eventhdlrintvars !=
NULL);
4242 assert(consdata->nglbfixedones == 0);
4243 assert(consdata->nglbfixedzeros == 0);
4262 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4269 assert(hmin <= consdata->hmax);
4271 consdata->hmin = hmin;
4285 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4293 return consdata->hmin;
4306 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4312 assert(hmax >= consdata->hmin);
4314 consdata->hmax = hmax;
4328 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4336 return consdata->hmax;
constraint handler for cumulative constraints
Constraint handler for knapsack constraints of the form , x binary and .
#define consInitsolOptcumulative
static SCIP_RETCODE conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
#define consExitpreOptcumulative
static SCIP_RETCODE createVarboundCons(SCIP *scip, SCIP_VAR *binvar, SCIP_VAR *intvar, int bound, SCIP_Bool lower)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
static SCIP_RETCODE detectImplications(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *naddconss)
#define consActiveOptcumulative
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_Bool *rowadded, SCIP_Bool *consadded, SCIP_Bool *cutoff)
#define EVENTHDLR_BINVARS_NAME
static int removeRedundantRows(SCIP_Longint *rowtightness, int *startidxs, int nrows, SCIP_Longint tightness)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE checkRedundancy(SCIP *scip, SCIP_CONS *cons, int *ndelconss, SCIP_Bool *redundant)
#define EVENTHDLR_INTVARS_DESC
static void collectActivities(SCIP_CONSDATA *consdata, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int *nfixedones, int *nfixedzeros, SCIP_Bool *auxiliary)
int SCIPgetHmaxOptcumulative(SCIP *scip, SCIP_CONS *cons)
static void createSortedEventpoints(SCIP *scip, SCIP_CONSDATA *consdata, int *starttimes, int *endtimes, int *startindices, int *endindices, SCIP_Bool local)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_VAR **binvars, int *durations, int *demands, int capacity, SCIP_Bool check)
static SCIP_RETCODE dropAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars)
#define CONSHDLR_PROP_TIMING
#define EVENTHDLR_INTVARS_NAME
static SCIP_RETCODE applyZeroFixings(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgbds)
static SCIP_RETCODE solveSubproblem(SCIP *scip, SCIP_CONS *cons, SCIP_Bool conflictanalysis, SCIP_CONSDATA *consdata, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int nvars, int *nfixedvars, int *nchgbds, int *ndelconss, SCIP_Bool *cutoff)
static SCIP_RETCODE catchEventIntvar(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
SCIP_RETCODE SCIPincludeConshdlrOptcumulative(SCIP *scip)
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool conflictanalysis, int *nfixedvars, int *nchgbds, int *ndelconss, SCIP_Bool *cutoff)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE createSetPackingCons(SCIP *scip, SCIP_VAR *var1, SCIP_VAR *var2)
#define CONSHDLR_SEPAPRIORITY
#define consDeactiveOptcumulative
static SCIP_RETCODE createBounddisjunctionCons(SCIP *scip, SCIP_VAR *binvar, SCIP_VAR *intvar, int lb, int ub)
static SCIP_RETCODE dropEventIntvar(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE dropEventBinvar(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE enfopsCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *trysol, SCIP_Bool *violated, SCIP_Bool *consadded, SCIP_Bool *solfeasible)
static SCIP_RETCODE createRow(SCIP *scip, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_VAR **vars, SCIP_Longint *weights, int nvars, SCIP_Longint capacity, SCIP_Bool local, SCIP_Bool *rowadded, SCIP_Bool *consadded, SCIP_Bool *cutoff)
#define consEnforelaxOptcomulative
#define consExitOptcumulative
static SCIP_RETCODE catchAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars)
#define DEFAULT_CONFLICTANALYSIS
static SCIP_RETCODE removeIrrelevantJobs(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE createConflictCons(SCIP *scip, const char *name, SCIP_VAR **binvars, int nvars)
static SCIP_RETCODE solveCumulative(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool local, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Longint maxnodes, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *error)
#define DEFAULT_INTERVALRELAX
static SCIP_Longint computeMaxEnergy(SCIP *scip, SCIP_CONSDATA *consdata, int starttime, int endtime)
static void collectSolActivities(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int *nvars, int *nfixedones, int *nfixedzeros, SCIP_Bool *auxiliary)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars)
static SCIP_RETCODE upgradeCons(SCIP *scip, SCIP_CONS *cons, int *ndelconss, int *nupgdconss, SCIP_Bool *mustpropagate)
static SCIP_RETCODE consdataDeletePos(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_CONS *cons, int pos)
static SCIP_RETCODE fixIntegerVariable(SCIP *scip, SCIP_VAR *var, SCIP_Bool downlock, SCIP_Bool uplock, int *nchgbds)
#define CONSHDLR_PROPFREQ
#define consInitOptcumulative
#define consSepasolOptcumulative
static SCIP_RETCODE collectVars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR **vars, SCIP_Longint *weights, int *nvars, int starttime, int endtime)
int SCIPgetHminOptcumulative(SCIP *scip, SCIP_CONS *cons)
static int convertBoundToInt(SCIP *scip, SCIP_Real bound)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
SCIP_RETCODE SCIPsetHminOptcumulative(SCIP *scip, SCIP_CONS *cons, int hmin)
SCIP_RETCODE SCIPsetHmaxOptcumulative(SCIP *scip, SCIP_CONS *cons, int hmax)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE presolveCumulativeCondition(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *nchgcoefs, int *nchgsides, SCIP_Bool *cutoff)
#define consDisableOptcumulative
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *violated, SCIP_Bool printreason)
static SCIP_RETCODE catchEventBinvar(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
#define CONSHDLR_ENFOPRIORITY
#define consEnableOptcumulative
#define CONSHDLR_DELAYSEPA
#define EVENTHDLR_BINVARS_DESC
#define consDelvarsOptcumulative
static void checkCounters(SCIP_CONSDATA *consdata)
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar, SCIP_VAR *var, SCIP_Bool downlock, SCIP_Bool uplock)
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPcreateConsOptcumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_VAR **binvars, int *durations, int *demands, int capacity, 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)
constraint handler for cumulative constraints with optional activities
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPpropCumulativeCondition(SCIP *scip, SCIP_PRESOLTIMING presoltiming, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, int *nchgbds, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPsplitCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split)
SCIP_RETCODE SCIPcreateConsBasicVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsBasicBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds)
SCIP_RETCODE SCIPpresolveCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int hmin, int hmax, SCIP_Bool *downlocks, SCIP_Bool *uplocks, SCIP_CONS *cons, SCIP_Bool *irrelevants, int *nfixedvars, int *nchgsides, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPcheckCumulativeCondition(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool *violated, SCIP_CONS *cons, SCIP_Bool printreason)
SCIP_RETCODE SCIPsolveCumulative(SCIP *scip, int njobs, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Real *objvals, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Longint maxnodes, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *error)
SCIP_RETCODE SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsKnapsack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPrespropCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_Bool *explanation, SCIP_RESULT *result)
SCIP_RETCODE SCIPnormalizeCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int *capacity, int *nchgcoefs, int *nchgsides)
SCIP_RETCODE SCIPcreateWorstCaseProfile(SCIP *scip, SCIP_PROFILE *profile, int nvars, SCIP_VAR **vars, int *durations, int *demands)
SCIP_RETCODE SCIPcreateConsLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPsetHminCumulative(SCIP *scip, SCIP_CONS *cons, int hmin)
SCIP_RETCODE SCIPcreateConsBasicSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPsetHmaxCumulative(SCIP *scip, SCIP_CONS *cons, int hmax)
SCIP_RETCODE SCIPaddCoefLogicor(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsCumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, 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)
int SCIPcomputeHmin(SCIP *scip, SCIP_PROFILE *profile, int capacity)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPnewProbingNode(SCIP *scip)
SCIP_RETCODE SCIPfixVarProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
SCIP_RETCODE SCIPcreateCurrentSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPrestartSolve(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Real SCIPvarGetLbAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
void SCIPprofileFree(SCIP_PROFILE **profile)
SCIP_RETCODE SCIPprofileCreate(SCIP_PROFILE **profile, int capacity)
SCIP_RETCODE SCIPprofileDeleteCore(SCIP_PROFILE *profile, int left, int right, int demand)
SCIP_RETCODE SCIPprofileInsertCore(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortRealPtrPtrIntInt(SCIP_Real *realarray, void **ptrarray1, void **ptrarray2, int *intarray1, int *intarray2, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
void SCIPstrCopySection(const char *str, char startchar, char endchar, char *token, int size, char **endptr)
SCIPfreeSol(scip, &heurdata->sol))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
#define BMSclearMemoryArray(ptr, num)
#define SCIPdebugPrintCons(x, y, z)
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_EVENTTYPE_GUBCHANGED
#define SCIP_EVENTTYPE_GBDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_BOUNDRELAXED
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
enum SCIP_BoundType SCIP_BOUNDTYPE
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
#define SCIP_PRESOLTIMING_ALWAYS