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;
1164 SCIP_Bool* auxiliary
1172 (*auxiliary) =
TRUE;
1176 for( v = 0; v < consdata->nvars; ++v )
1185 binvars[*nfixedones] = consdata->binvars[v];
1186 vars[*nfixedones] = consdata->vars[v];
1187 durations[*nfixedones] = consdata->durations[v];
1188 demands[*nfixedones] = consdata->demands[v];
1198 (*auxiliary) =
FALSE;
1205 assert(consdata->nfixedzeros == *nfixedzeros);
1206 assert(consdata->nfixedones == *nfixedones);
1222 SCIP_Bool* auxiliary
1232 (*auxiliary) =
TRUE;
1235 for( v = 0; v < consdata->nvars; ++v )
1240 binvars[*
nvars] = consdata->binvars[v];
1242 durations[*
nvars] = consdata->durations[v];
1243 demands[*
nvars] = consdata->demands[v];
1250 (*auxiliary) =
FALSE;
1281 SCIP_Longint maxnodes,
1283 SCIP_Bool* infeasible,
1284 SCIP_Bool* unbounded,
1289 SCIP_Real timelimit;
1290 SCIP_Real memorylimit;
1295 for( v = 0; v <
nvars; ++v )
1330 capacity, hmin, hmax, timelimit, memorylimit, maxnodes,
1331 solved, infeasible, unbounded, error) );
1358 for( v = 0; v <
nvars; ++v )
1381 SCIP_Bool* redundant
1386 SCIP_Bool infeasible;
1387 SCIP_Bool unbounded;
1397 (*redundant) =
FALSE;
1401 assert(consdata->nglbfixedzeros == 0);
1403 if( consdata->triedredundant )
1406 consdata->triedredundant =
TRUE;
1408 nvars = consdata->nvars;
1411 for( v = 0; v <
nvars; ++v )
1424 consdata->capacity, consdata->hmin, consdata->hmax,
FALSE,
1425 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1444 for( v = 0; v <
nvars; ++v )
1450 var = consdata->vars[v];
1456 if( consdata->demands[v] == 0.0 || consdata->durations[v] == 0.0 )
1459 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1461 binvars[v] = consdata->binvars[v];
1463 durations[v] = consdata->durations[v];
1464 demands[v] = consdata->demands[v];
1471 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1489 for( v = 0; v <
nvars; ++v )
1494 assert(lbs[v] + 0.5 > ubs[v]);
1496 var = consdata->vars[v];
1512 (*redundant) =
TRUE;
1527 SCIP_Bool conflictanalysis,
1540 SCIP_Bool unbounded;
1550 if( consdata->triedsolving )
1553 consdata->triedsolving =
TRUE;
1563 lbs, ubs, 2000LL, &solved,
cutoff, &unbounded, &error) );
1568 if( *
cutoff && conflictanalysis )
1571 SCIP_Bool infeasible;
1576 for( v = 0; v <
nvars; ++v )
1584 if( demands[v] == 0.0 || durations[v] == 0.0 )
1587 weights[v] = (lst - est) / (demands[v] * durations[v]);
1596 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1607 for( v = 0; v <
nvars; ++v )
1621 SCIP_Bool infeasible;
1622 SCIP_Bool tightened;
1628 for( v = 0; v <
nvars; ++v )
1631 if( lbs[v] + 0.5 > ubs[v] )
1639 consdata->triedsolving =
FALSE;
1650 consdata->triedsolving =
FALSE;
1659 consdata->triedsolving =
FALSE;
1689 SCIP_Bool* violated,
1690 SCIP_Bool printreason
1696 SCIP_Bool auxiliary;
1718 collectSolActivities(
scip, consdata,
sol, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1724 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons, printreason) );
1744 SCIP_Bool* violated,
1745 SCIP_Bool* consadded,
1746 SCIP_Bool* solfeasible
1752 SCIP_Bool auxiliary;
1774 collectSolActivities(
scip, consdata,
NULL, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1776 (*violated) =
FALSE;
1782 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons,
FALSE) );
1784 if( *violated && auxiliary && !consdata->triedsolving )
1788 SCIP_Bool infeasible;
1789 SCIP_Bool unbounded;
1793 if( nfixedones ==
nvars )
1794 consdata->triedsolving =
TRUE;
1801 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1809#ifdef SCIP_DISABLED_CODE
1815 for( v = 0; v <
nvars; ++v )
1822 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1831 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1843 (*solfeasible) =
FALSE;
1844 (*consadded) =
TRUE;
1846 else if( solved && *solfeasible && trysol !=
NULL )
1850 for(v = 0; v <
nvars; ++v )
1856 (*solfeasible) =
FALSE;
1880 SCIP_Bool* mustpropagate
1889 nvars = consdata->nvars;
1894 if(
nvars == 0 && consdata->nfixedzeros ==
nvars )
1899 (*mustpropagate) =
FALSE;
1901 else if(
nvars == 1 )
1905 if( consdata->capacity < consdata->demands[0] )
1907 SCIP_Bool infeasible;
1908 SCIP_Bool tightened;
1917 (*mustpropagate) =
FALSE;
1919 else if( consdata->nglbfixedones ==
nvars )
1940 (*mustpropagate) =
FALSE;
1942 else if( consdata->nfixedones + consdata->nfixedzeros ==
nvars && consdata->nfixedones > 0 )
1953 SCIP_Bool auxiliary;
1967 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
1987 (*mustpropagate) =
FALSE;
1990 assert(consdata->nvars > 1);
2009 SCIP_Bool infeasible;
2010 SCIP_Bool tightened;
2084 consdata->vars[pos], consdata->downlocks[pos], consdata->uplocks[pos]) );
2086 consdata->downlocks[pos] =
FALSE;
2087 consdata->uplocks[pos] =
FALSE;
2098 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
2099 assert(conshdlrdata->eventhdlrintvars !=
NULL);
2106 SCIPdebugMessage(
"remove variable <%s> from optcumulative constraint <%s>\n",
2109 if( pos != consdata->nvars - 1 )
2111 consdata->binvars[pos] = consdata->binvars[consdata->nvars-1];
2112 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
2113 consdata->demands[pos] = consdata->demands[consdata->nvars-1];
2114 consdata->durations[pos] = consdata->durations[consdata->nvars-1];
2115 consdata->downlocks[pos] = consdata->downlocks[consdata->nvars-1];
2116 consdata->uplocks[pos] = consdata->uplocks[consdata->nvars-1];
2124 consdata->relaxadded =
FALSE;
2125 consdata->normalized =
FALSE;
2145 for( v = consdata->nvars-1; v >= 0 && consdata->nglbfixedzeros > 0; --v )
2163 consdata->triedredundant =
TRUE;
2171 assert(consdata->nglbfixedzeros == 0);
2201 hmin = consdata->hmin;
2202 hmax = consdata->hmax;
2204 SCIPdebugMessage(
"check for irrelevant jobs within cumulative constraint <%s>[%d,%d)\n",
2207 for( j = consdata->nvars-1; j >= 0; --j )
2209 var = consdata->vars[j];
2210 demand = consdata->demands[j];
2211 duration = consdata->durations[j];
2217 if( demand == 0 || duration == 0 )
2226 else if( est >= hmax || lct <= hmin )
2251 SCIP_Bool* irrelevants;
2258 nvars = consdata->nvars;
2266 consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
2267 irrelevants, nfixedvars, nchgsides,
cutoff) );
2272 for( v =
nvars-1; v >= 0; --v )
2278 if( !irrelevants[v] )
2281 var = consdata->vars[v];
2288 if( lst <= consdata->hmin && ect >= consdata->hmax )
2290 assert(!consdata->downlocks[v]);
2291 assert(!consdata->uplocks[v]);
2293 if( consdata->capacity < consdata->demands[v] )
2295 SCIP_Bool infeasible;
2296 SCIP_Bool tightened;
2303 consdata->capacity -= consdata->demands[v];
2317 consdata->hmin, consdata->hmax, consdata->capacity,
nvars);
2449 vars = consdata->vars;
2450 binvars = consdata->binvars;
2451 durations = consdata->durations;
2453 hmin = consdata->hmin;
2454 hmax = consdata->hmax;
2460 for( v = consdata->nvars-1; v >= 0; --v )
2474 if( consdata->demands[v] < consdata->capacity )
2480 end = start + durations[v];
2485 if( start <= hmin && end >= hmax )
2490 for( j = 0; j < consdata->nvars; ++j )
2504 ect = est + durations[j];
2512 if( ect > hmin && lst < hmax )
2517 else if( lst < hmax )
2522 else if( ect > hmin )
2534 else if( start <= hmin )
2541 for( j = 0; j < consdata->nvars; ++j )
2555 ect = est + durations[j];
2560 if( lst < ect && hmin < ect && lst < end )
2568 else if( end > lst )
2573 else if( est < end )
2580 else if( end >= hmax )
2589 for( j = 0; j < consdata->nvars; ++j )
2604 lct = lst + durations[j];
2606 SCIPdebugMessage(
"variable <%s>[%d,%d] (duration %d, demand %d)\n",
SCIPvarGetName(implvar), ect - durations[j], lst, durations[j], consdata->demands[j]);
2608 if( lst < ect && start < ect && lst < hmax )
2616 else if( start < ect )
2621 else if( lct > start )
2646 SCIP_Bool conflictanalysis,
2656 SCIP_Bool auxiliary;
2668 assert(consdata->nvars > 1);
2673 if( consdata->propagated && (consdata->nfixedones + consdata->nfixedzeros < consdata->nvars || consdata->triedsolving) )
2682 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
2685 if( !consdata->propagated && nfixedones > 1 )
2687 SCIP_Bool* explanation;
2688 SCIP_Bool initialized;
2690 initialized =
FALSE;
2697 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, cons, nchgbds, &initialized, explanation,
cutoff) );
2700 if( initialized && conflictanalysis )
2704 for( v = 0; v < nfixedones; ++v )
2706 if( explanation[v] )
2718 assert(consdata->nvars > 1);
2725 if( nfixedzeros + nfixedones == consdata->nvars )
2735 nfixedones, nfixedvars, nchgbds, ndelconss,
cutoff) );
2738 else if( !consdata->propagated && nfixedones < consdata->
nvars )
2754 if( hmin < INT_MAX )
2762 binvar = consdata->binvars[v];
2765 var = consdata->vars[v];
2773 SCIP_Bool infeasible;
2789 if( hmin == INT_MAX )
2815 SCIP_Bool tightened;
2828 else if( tightened )
2843 SCIP_Bool tightened;
2894 consdata->propagated =
TRUE;
2944#define consInitOptcumulative NULL
2948#define consExitOptcumulative NULL
2965 for(
c = 0;
c < nconss; ++
c )
2974 if( conshdlrdata->heurtrysol ==
NULL )
2983#define consExitpreOptcumulative NULL
2987#define consInitsolOptcumulative NULL
2990#define consEnforelaxOptcomulative NULL
3001 for(
c = 0;
c < nconss; ++
c )
3008 if( consdata->row !=
NULL )
3032 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3033 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3063 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3064 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3074 sourcedata->durations, sourcedata->demands, sourcedata->capacity,
SCIPconsIsChecked(sourcecons)) );
3083 assert(targetdata->nglbfixedones == 0);
3084 assert(targetdata->nglbfixedzeros == 0);
3085 assert(targetdata->nfixedones == 0);
3086 assert(targetdata->nfixedzeros == 0);
3101 SCIP_Bool consadded;
3111 for(
c = 0;
c < nconss; ++
c )
3128 SCIP_Bool consadded;
3139 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3146 else if( consadded )
3158#define consSepasolOptcumulative NULL
3168 SCIP_Bool consviolated;
3169 SCIP_Bool consadded;
3170 SCIP_Bool solfeasible;
3184 consviolated =
FALSE;
3190 if( conshdlrdata->heurtrysol !=
NULL )
3196 for(
c = 0;
c < nconss && (!violated || solfeasible); ++
c )
3199 violated = violated || consviolated;
3203 if( solfeasible && violated && trysol !=
NULL )
3207 file = fopen(
"build.sol",
"w");
3239 SCIP_Bool consadded;
3240 SCIP_Bool solfeasible;
3259 if( conshdlrdata->heurtrysol !=
NULL )
3264 for(
c = 0;
c < nconss && !violated; ++
c )
3270 if( solfeasible && violated && trysol !=
NULL )
3302 for(
c = 0;
c < nconss && !violated; ++
c )
3346 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
3348 SCIP_Bool mustpropagate;
3353 mustpropagate =
TRUE;
3354 oldnchgcoefs = nchgcoefs;
3355 oldnchgbds = nchgbds;
3369 SCIP_Bool redundant;
3388 if( oldnchgbds < nchgbds || oldnchgcoefs < nchgcoefs )
3403 else if( nfixedvars > 0 || nchgbds > 0 || nupgdconss > 0 )
3421 SCIP_Bool mustpropagate;
3432 oldnchgbds = *nchgbds;
3433 oldndelconss = *ndelconss;
3434 oldnupgdconss = *nupgdconss;
3435 oldnfixedvars = *nfixedvars;
3440 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3445 mustpropagate =
TRUE;
3465 nvars = consdata->nvars;
3468 if( !consdata->normalized )
3472 consdata->demands, &consdata->capacity, nchgcoefs, nchgsides) );
3473 consdata->normalized =
TRUE;
3485 consdata->demands, consdata->capacity, &hmin, &hmax, &split) );
3488 if( consdata->hmin < hmin )
3492 consdata->hmin = hmin;
3497 if( consdata->hmax > hmax )
3500 consdata->hmax = hmax;
3505 if( consdata->hmax <= consdata->hmin )
3507 SCIPdebugMessage(
"constraint <%s> is redundant since hmax(%d) <= hmin(%d)\n",
3517 if( consdata->hmin < split && split < consdata->hmax )
3525 SCIPdebugMessage(
"split optcumulative constraint <%s>[%d,%d) with %d jobs at time point %d\n",
3529 consdata->durations, consdata->demands, consdata->capacity,
3537 splitconsdata->hmin = split;
3538 splitconsdata->hmax = consdata->hmax;
3540 assert(split < consdata->hmax);
3547 consdata->hmax = split;
3549 assert(consdata->hmin < consdata->hmax);
3573 else if( oldnfixedvars < *nfixedvars || oldnchgbds < *nchgbds || oldnupgdconss < *nupgdconss || oldndelconss < *ndelconss )
3575 SCIPdebugMessage(
"presolving detected %d bound changes\n", *nchgbds - oldnchgbds);
3595 SCIP_Bool choicevar;
3603 if( !conshdlrdata->conflictanalysis )
3623 for( v = 0; v < consdata->nvars; ++v )
3628 binvars[
nvars] = consdata->binvars[v];
3629 durations[
nvars] = consdata->durations[v];
3630 demands[
nvars] = consdata->demands[v];
3633 else if( consdata->binvars[v] == infervar )
3641 for( v = 0; v < consdata->nvars; ++v )
3650 else if( consdata->binvars[v] == infervar )
3661 SCIP_Bool* explanation;
3668 infervar, inferinfo, boundtype, bdchgidx, relaxedbd, explanation,
result) );
3675 for( v = 0; v <
nvars; ++v )
3677 if( explanation[v] )
3711 vars = consdata->vars;
3714 for( v = 0; v < consdata->nvars; ++v )
3717 if( consdata->downlocks[v] && consdata->uplocks[v] )
3722 else if( consdata->downlocks[v] )
3726 else if( consdata->uplocks[v] )
3741#define consActiveOptcumulative NULL
3745#define consDeactiveOptcumulative NULL
3749#define consEnableOptcumulative NULL
3753#define consDisableOptcumulative NULL
3756#define consDelvarsOptcumulative NULL
3781 const char* consname;
3790 sourcebinvars = sourceconsdata->binvars;
3791 sourcevars = sourceconsdata->vars;
3792 nvars = sourceconsdata->nvars;
3805 for( v = 0; v <
nvars && success; ++v )
3820 sourceconsdata->durations, sourceconsdata->demands, sourceconsdata->capacity,
3821 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3879 duration = atoi(strvalue);
3883 demand = atoi(strvalue);
3893 binvars[
nvars] = binvar;
3894 demands[
nvars] = demand;
3895 durations[
nvars] = duration;
3903 hmin = atoi(strvalue);
3908 hmax = (int)(value);
3916 capacity = (int)value;
3920 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3962 consdata->nglbfixedones++;
3965 consdata->nglbfixedzeros++;
3968 consdata->nfixedones++;
3969 consdata->propagated =
FALSE;
3972 consdata->nfixedzeros++;
3975 consdata->nfixedones--;
3976 consdata->triedsolving =
FALSE;
3979 consdata->nfixedzeros--;
3980 consdata->triedsolving =
FALSE;
3983 consdata->propagated =
FALSE;
4010 if( consdata->nfixedzeros + consdata->nfixedones < consdata->nvars )
4011 consdata->relaxadded =
FALSE;
4014 consdata->propagated =
FALSE;
4035 eventExecOptcumulativeBinvars,
NULL) );
4039 eventExecOptcumulativeIntvars,
NULL) );
4047 consEnfolpOptcumulative, consEnfopsOptcumulative, consCheckOptcumulative,
4048 consLockOptcumulative, conshdlrdata) );
4081 "add linear relaxation as LP row (otherwise a knapsack constraint is created)?",
4086 "participate in conflict analysis?",
4091 "create a relaxation for each start and end time point interval",
4120 SCIP_Bool modifiable,
4126 SCIP_Bool removable,
4128 SCIP_Bool stickingatnode
4140 if( conshdlr ==
NULL )
4153 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
4154 local, modifiable, dynamic, removable, stickingatnode) );
4163 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
4164 assert(conshdlrdata->eventhdlrintvars !=
NULL);
4166 assert(consdata->nglbfixedones == 0);
4167 assert(consdata->nglbfixedzeros == 0);
4186 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4193 assert(hmin <= consdata->hmax);
4195 consdata->hmin = hmin;
4209 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4217 return consdata->hmin;
4230 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4236 assert(hmax >= consdata->hmin);
4238 consdata->hmax = hmax;
4252 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4260 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_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