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
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
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];
526 assert(consdata->nglbfixedzeros >= 0);
527 assert(consdata->nglbfixedones >= 0);
531 consdata->nglbfixedzeros++;
533 consdata->nglbfixedones++;
537 consdata->nfixedzeros++;
539 consdata->nfixedones++;
541 assert(consdata->nglbfixedzeros + consdata->nglbfixedones <= consdata->nvars);
542 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nvars);
566 binvar = consdata->binvars[pos];
576 consdata->nglbfixedzeros--;
578 consdata->nglbfixedones--;
582 consdata->nfixedzeros--;
584 consdata->nfixedones--;
586 assert(consdata->nglbfixedzeros >= 0);
587 assert(consdata->nglbfixedones >= 0);
611 var = consdata->vars[pos];
646 var = consdata->vars[pos];
673 assert(consdata->nglbfixedzeros == 0);
674 assert(consdata->nglbfixedones == 0);
677 for( v = 0; v < consdata->nvars; ++v )
706 for( v = 0; v < consdata->nvars; ++v )
714 assert(consdata->nglbfixedzeros == 0);
715 assert(consdata->nglbfixedones == 0);
736 nvars = consdata->nvars;
739 for ( j = 0; j <
nvars; ++j )
741 var = consdata->vars[j];
779 assert(starttime < endtime);
782 for( v = 0; v < consdata->nvars; ++v )
784 var = consdata->vars[v];
790 maxenergy += (
SCIP_Longint)(consdata->durations[v] * consdata->demands[v]);
812 assert(starttime < endtime);
815 for( v = 0; v < consdata->nvars; ++v )
817 var = consdata->vars[v];
849 for( j = 0; j < nrows; ++j )
851 rowtightness[keptrows] = rowtightness[j];
852 startidxs[keptrows] = startidxs[j];
855 if( rowtightness[j] > tightness )
895 for( v = 0; v <
nvars; ++v )
955 if( consdata->relaxadded )
960 if( conshdlrdata->intervalrelax )
983 for( j = 0; j < consdata->nvars; ++j )
991 starttime = -INT_MAX;
994 for( j = 0; j < consdata->nvars; ++j )
998 assert(starttime <= starttimes[j]);
1001 if( starttime == starttimes[j])
1004 starttime = starttimes[j];
1006 besttightness = 0LL;
1008 for(
i = 0;
i < consdata->nvars; ++
i )
1014 assert(endtime <= endtimes[
i]);
1017 if( endtime == endtimes[
i] )
1020 endtime = endtimes[
i];
1023 if( endtime <= starttime )
1028 energy = (endtime - starttime) * consdata->capacity;
1029 tightness = maxenergy - energy;
1032 if( tightness > besttightness )
1034 besttightness = tightness;
1039 rowtightness[
i][nrows[
i]] = tightness;
1040 startidxs[
i][nrows[
i]] = j;
1046 for( j = consdata->nvars-1; j >= 0 && ! (*
cutoff); --j )
1048 for(
i = 0;
i < nrows[j] && ! (*cutoff); ++
i )
1059 starttime = starttimes[startidxs[j][
i]];
1060 endtime = endtimes[j];
1062 energy = (endtime - starttime) * consdata->capacity;
1070 SCIP_CALL(
createRow(
scip, conshdlr, name,
vars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1078 for( j = consdata->nvars-1; j >= 0; --j )
1105 nvars = consdata->nvars;
1106 vars = consdata->vars;
1107 durations = consdata->durations;
1108 demands = consdata->demands;
1116 for( v = 0; v <
nvars; ++v )
1118 weights[v] = (
SCIP_Longint)(durations[v] * demands[v]);
1119 maxenergy += weights[v];
1128 energy = (lct - est) * consdata->capacity;
1130 if( maxenergy > energy )
1139 SCIP_CALL(
createRow(
scip, conshdlr, name, consdata->binvars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1146 consdata->relaxadded =
TRUE;
1171 (*auxiliary) =
TRUE;
1175 for( v = 0; v < consdata->nvars; ++v )
1184 binvars[*nfixedones] = consdata->binvars[v];
1185 vars[*nfixedones] = consdata->vars[v];
1186 durations[*nfixedones] = consdata->durations[v];
1187 demands[*nfixedones] = consdata->demands[v];
1197 (*auxiliary) =
FALSE;
1204 assert(consdata->nfixedzeros == *nfixedzeros);
1205 assert(consdata->nfixedones == *nfixedones);
1231 (*auxiliary) =
TRUE;
1234 for( v = 0; v < consdata->nvars; ++v )
1239 binvars[*
nvars] = consdata->binvars[v];
1241 durations[*
nvars] = consdata->durations[v];
1242 demands[*
nvars] = consdata->demands[v];
1249 (*auxiliary) =
FALSE;
1294 for( v = 0; v <
nvars; ++v )
1329 capacity, hmin, hmax, timelimit, memorylimit, maxnodes,
1330 solved, infeasible, unbounded, error) );
1357 for( v = 0; v <
nvars; ++v )
1396 (*redundant) =
FALSE;
1400 assert(consdata->nglbfixedzeros == 0);
1402 if( consdata->triedredundant )
1405 consdata->triedredundant =
TRUE;
1407 nvars = consdata->nvars;
1410 for( v = 0; v <
nvars; ++v )
1423 consdata->capacity, consdata->hmin, consdata->hmax,
FALSE,
1424 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1443 for( v = 0; v <
nvars; ++v )
1449 var = consdata->vars[v];
1455 if( consdata->demands[v] == 0.0 || consdata->durations[v] == 0.0 )
1458 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1460 binvars[v] = consdata->binvars[v];
1462 durations[v] = consdata->durations[v];
1463 demands[v] = consdata->demands[v];
1470 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1488 for( v = 0; v <
nvars; ++v )
1493 assert(lbs[v] + 0.5 > ubs[v]);
1495 var = consdata->vars[v];
1511 (*redundant) =
TRUE;
1549 if( consdata->triedsolving )
1552 consdata->triedsolving =
TRUE;
1562 lbs, ubs, 2000LL, &solved,
cutoff, &unbounded, &error) );
1567 if( *
cutoff && conflictanalysis )
1575 for( v = 0; v <
nvars; ++v )
1583 if( demands[v] == 0.0 || durations[v] == 0.0 )
1586 weights[v] = (lst - est) / (demands[v] * durations[v]);
1595 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1606 for( v = 0; v <
nvars; ++v )
1627 for( v = 0; v <
nvars; ++v )
1630 if( lbs[v] + 0.5 > ubs[v] )
1638 consdata->triedsolving =
FALSE;
1649 consdata->triedsolving =
FALSE;
1658 consdata->triedsolving =
FALSE;
1717 collectSolActivities(
scip, consdata,
sol, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1723 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons, printreason) );
1773 collectSolActivities(
scip, consdata,
NULL, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1775 (*violated) =
FALSE;
1781 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons,
FALSE) );
1783 if( *violated && auxiliary && !consdata->triedsolving )
1792 if( nfixedones ==
nvars )
1793 consdata->triedsolving =
TRUE;
1800 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1808#ifdef SCIP_DISABLED_CODE
1814 for( v = 0; v <
nvars; ++v )
1821 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1830 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1842 (*solfeasible) =
FALSE;
1843 (*consadded) =
TRUE;
1845 else if( solved && *solfeasible && trysol !=
NULL )
1849 for(v = 0; v <
nvars; ++v )
1855 (*solfeasible) =
FALSE;
1888 nvars = consdata->nvars;
1893 if(
nvars == 0 && consdata->nfixedzeros ==
nvars )
1898 (*mustpropagate) =
FALSE;
1900 else if(
nvars == 1 )
1904 if( consdata->capacity < consdata->demands[0] )
1916 (*mustpropagate) =
FALSE;
1918 else if( consdata->nglbfixedones ==
nvars )
1939 (*mustpropagate) =
FALSE;
1941 else if( consdata->nfixedones + consdata->nfixedzeros ==
nvars && consdata->nfixedones > 0 )
1966 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
1986 (*mustpropagate) =
FALSE;
1989 assert(consdata->nvars > 1);
2083 consdata->vars[pos], consdata->downlocks[pos], consdata->uplocks[pos]) );
2085 consdata->downlocks[pos] =
FALSE;
2086 consdata->uplocks[pos] =
FALSE;
2097 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
2098 assert(conshdlrdata->eventhdlrintvars !=
NULL);
2105 assert(consdata->nglbfixedzeros >= 0);
2106 assert(consdata->nglbfixedones >= 0);
2107 assert(consdata->nfixedzeros >= 0);
2108 assert(consdata->nfixedones >= 0);
2110 SCIPdebugMessage(
"remove variable <%s> from optcumulative constraint <%s>\n",
2113 if( pos != consdata->nvars - 1 )
2115 consdata->binvars[pos] = consdata->binvars[consdata->nvars-1];
2116 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
2117 consdata->demands[pos] = consdata->demands[consdata->nvars-1];
2118 consdata->durations[pos] = consdata->durations[consdata->nvars-1];
2119 consdata->downlocks[pos] = consdata->downlocks[consdata->nvars-1];
2120 consdata->uplocks[pos] = consdata->uplocks[consdata->nvars-1];
2128 consdata->relaxadded =
FALSE;
2129 consdata->normalized =
FALSE;
2149 for( v = consdata->nvars-1; v >= 0 && consdata->nglbfixedzeros > 0; --v )
2167 consdata->triedredundant =
TRUE;
2175 assert(consdata->nglbfixedzeros == 0);
2205 hmin = consdata->hmin;
2206 hmax = consdata->hmax;
2208 SCIPdebugMessage(
"check for irrelevant jobs within cumulative constraint <%s>[%d,%d)\n",
2211 for( j = consdata->nvars-1; j >= 0; --j )
2213 var = consdata->vars[j];
2214 demand = consdata->demands[j];
2215 duration = consdata->durations[j];
2221 if( demand == 0 || duration == 0 )
2230 else if( est >= hmax || lct <= hmin )
2262 nvars = consdata->nvars;
2270 consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
2271 irrelevants, nfixedvars, nchgsides,
cutoff) );
2276 for( v =
nvars-1; v >= 0; --v )
2282 if( !irrelevants[v] )
2285 var = consdata->vars[v];
2292 if( lst <= consdata->hmin && ect >= consdata->hmax )
2294 assert(!consdata->downlocks[v]);
2295 assert(!consdata->uplocks[v]);
2297 if( consdata->capacity < consdata->demands[v] )
2307 consdata->capacity -= consdata->demands[v];
2321 consdata->hmin, consdata->hmax, consdata->capacity,
nvars);
2453 vars = consdata->vars;
2454 binvars = consdata->binvars;
2455 durations = consdata->durations;
2457 hmin = consdata->hmin;
2458 hmax = consdata->hmax;
2464 for( v = consdata->nvars-1; v >= 0; --v )
2478 if( consdata->demands[v] < consdata->capacity )
2484 end = start + durations[v];
2489 if( start <= hmin && end >= hmax )
2494 for( j = 0; j < consdata->nvars; ++j )
2508 ect = est + durations[j];
2516 if( ect > hmin && lst < hmax )
2521 else if( lst < hmax )
2526 else if( ect > hmin )
2538 else if( start <= hmin )
2545 for( j = 0; j < consdata->nvars; ++j )
2559 ect = est + durations[j];
2564 if( lst < ect && hmin < ect && lst < end )
2572 else if( end > lst )
2577 else if( est < end )
2584 else if( end >= hmax )
2593 for( j = 0; j < consdata->nvars; ++j )
2608 lct = lst + durations[j];
2610 SCIPdebugMessage(
"variable <%s>[%d,%d] (duration %d, demand %d)\n",
SCIPvarGetName(implvar), ect - durations[j], lst, durations[j], consdata->demands[j]);
2612 if( lst < ect && start < ect && lst < hmax )
2620 else if( start < ect )
2625 else if( lct > start )
2672 assert(consdata->nvars > 1);
2677 if( consdata->propagated && (consdata->nfixedones + consdata->nfixedzeros < consdata->nvars || consdata->triedsolving) )
2686 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
2689 if( !consdata->propagated && nfixedones > 1 )
2694 initialized =
FALSE;
2701 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, cons, nchgbds, &initialized, explanation,
cutoff) );
2704 if( initialized && conflictanalysis )
2708 for( v = 0; v < nfixedones; ++v )
2710 if( explanation[v] )
2722 assert(consdata->nvars > 1);
2729 if( nfixedzeros + nfixedones == consdata->nvars )
2739 nfixedones, nfixedvars, nchgbds, ndelconss,
cutoff) );
2742 else if( !consdata->propagated && nfixedones < consdata->
nvars )
2758 if( hmin < INT_MAX )
2766 binvar = consdata->binvars[v];
2769 var = consdata->vars[v];
2793 if( hmin == INT_MAX )
2832 else if( tightened )
2898 consdata->propagated =
TRUE;
2948#define consInitOptcumulative NULL
2952#define consExitOptcumulative NULL
2969 for(
c = 0;
c < nconss; ++
c )
2978 if( conshdlrdata->heurtrysol ==
NULL )
2987#define consExitpreOptcumulative NULL
2991#define consInitsolOptcumulative NULL
2994#define consEnforelaxOptcomulative NULL
3005 for(
c = 0;
c < nconss; ++
c )
3012 if( consdata->row !=
NULL )
3036 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3037 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3067 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
3068 assert(conshdlrdata->eventhdlrintvars !=
NULL);
3078 sourcedata->durations, sourcedata->demands, sourcedata->capacity,
SCIPconsIsChecked(sourcecons)) );
3087 assert(targetdata->nglbfixedones == 0);
3088 assert(targetdata->nglbfixedzeros == 0);
3089 assert(targetdata->nfixedones == 0);
3090 assert(targetdata->nfixedzeros == 0);
3115 for(
c = 0;
c < nconss; ++
c )
3143 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3150 else if( consadded )
3162#define consSepasolOptcumulative NULL
3188 consviolated =
FALSE;
3194 if( conshdlrdata->heurtrysol !=
NULL )
3200 for(
c = 0;
c < nconss && (!violated || solfeasible); ++
c )
3203 violated = violated || consviolated;
3207 if( solfeasible && violated && trysol !=
NULL )
3211 file = fopen(
"build.sol",
"w");
3263 if( conshdlrdata->heurtrysol !=
NULL )
3268 for(
c = 0;
c < nconss && !violated; ++
c )
3274 if( solfeasible && violated && trysol !=
NULL )
3306 for(
c = 0;
c < nconss && !violated; ++
c )
3350 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
3357 mustpropagate =
TRUE;
3358 oldnchgcoefs = nchgcoefs;
3359 oldnchgbds = nchgbds;
3392 if( oldnchgbds < nchgbds || oldnchgcoefs < nchgcoefs )
3407 else if( nfixedvars > 0 || nchgbds > 0 || nupgdconss > 0 )
3436 oldnchgbds = *nchgbds;
3437 oldndelconss = *ndelconss;
3438 oldnupgdconss = *nupgdconss;
3439 oldnfixedvars = *nfixedvars;
3444 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3449 mustpropagate =
TRUE;
3469 nvars = consdata->nvars;
3472 if( !consdata->normalized )
3476 consdata->demands, &consdata->capacity, nchgcoefs, nchgsides) );
3477 consdata->normalized =
TRUE;
3489 consdata->demands, consdata->capacity, &hmin, &hmax, &split) );
3492 if( consdata->hmin < hmin )
3496 consdata->hmin = hmin;
3501 if( consdata->hmax > hmax )
3504 consdata->hmax = hmax;
3509 if( consdata->hmax <= consdata->hmin )
3511 SCIPdebugMessage(
"constraint <%s> is redundant since hmax(%d) <= hmin(%d)\n",
3521 if( consdata->hmin < split && split < consdata->hmax )
3529 SCIPdebugMessage(
"split optcumulative constraint <%s>[%d,%d) with %d jobs at time point %d\n",
3533 consdata->durations, consdata->demands, consdata->capacity,
3541 splitconsdata->hmin = split;
3542 splitconsdata->hmax = consdata->hmax;
3544 assert(split < consdata->hmax);
3551 consdata->hmax = split;
3553 assert(consdata->hmin < consdata->hmax);
3577 else if( oldnfixedvars < *nfixedvars || oldnchgbds < *nchgbds || oldnupgdconss < *nupgdconss || oldndelconss < *ndelconss )
3579 SCIPdebugMessage(
"presolving detected %d bound changes\n", *nchgbds - oldnchgbds);
3607 if( !conshdlrdata->conflictanalysis )
3627 for( v = 0; v < consdata->nvars; ++v )
3632 binvars[
nvars] = consdata->binvars[v];
3633 durations[
nvars] = consdata->durations[v];
3634 demands[
nvars] = consdata->demands[v];
3637 else if( consdata->binvars[v] == infervar )
3645 for( v = 0; v < consdata->nvars; ++v )
3654 else if( consdata->binvars[v] == infervar )
3672 infervar, inferinfo, boundtype, bdchgidx, relaxedbd, explanation,
result) );
3679 for( v = 0; v <
nvars; ++v )
3681 if( explanation[v] )
3715 vars = consdata->vars;
3718 for( v = 0; v < consdata->nvars; ++v )
3721 if( consdata->downlocks[v] && consdata->uplocks[v] )
3726 else if( consdata->downlocks[v] )
3730 else if( consdata->uplocks[v] )
3745#define consActiveOptcumulative NULL
3749#define consDeactiveOptcumulative NULL
3753#define consEnableOptcumulative NULL
3757#define consDisableOptcumulative NULL
3760#define consDelvarsOptcumulative NULL
3785 const char* consname;
3794 sourcebinvars = sourceconsdata->binvars;
3795 sourcevars = sourceconsdata->vars;
3796 nvars = sourceconsdata->nvars;
3809 for( v = 0; v <
nvars && success; ++v )
3824 sourceconsdata->durations, sourceconsdata->demands, sourceconsdata->capacity,
3825 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3883 duration = atoi(strvalue);
3887 demand = atoi(strvalue);
3897 binvars[
nvars] = binvar;
3898 demands[
nvars] = demand;
3899 durations[
nvars] = duration;
3907 hmin = atoi(strvalue);
3912 hmax = (int)(value);
3920 capacity = (int)value;
3924 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3966 consdata->nglbfixedones++;
3969 consdata->nglbfixedzeros++;
3972 consdata->nfixedones++;
3973 consdata->propagated =
FALSE;
3976 consdata->nfixedzeros++;
3979 consdata->nfixedones--;
3980 consdata->triedsolving =
FALSE;
3983 consdata->nfixedzeros--;
3984 consdata->triedsolving =
FALSE;
3987 consdata->propagated =
FALSE;
4014 if( consdata->nfixedzeros + consdata->nfixedones < consdata->nvars )
4015 consdata->relaxadded =
FALSE;
4018 consdata->propagated =
FALSE;
4039 eventExecOptcumulativeBinvars,
NULL) );
4043 eventExecOptcumulativeIntvars,
NULL) );
4051 consEnfolpOptcumulative, consEnfopsOptcumulative, consCheckOptcumulative,
4052 consLockOptcumulative, conshdlrdata) );
4085 "add linear relaxation as LP row (otherwise a knapsack constraint is created)?",
4090 "participate in conflict analysis?",
4095 "create a relaxation for each start and end time point interval",
4144 if( conshdlr ==
NULL )
4157 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
4158 local, modifiable, dynamic, removable, stickingatnode) );
4167 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
4168 assert(conshdlrdata->eventhdlrintvars !=
NULL);
4169 assert(consdata->nglbfixedzeros == 0);
4170 assert(consdata->nglbfixedones == 0);
4171 assert(consdata->nfixedzeros == 0);
4172 assert(consdata->nfixedones == 0);
4191 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4198 assert(hmin <= consdata->hmax);
4200 consdata->hmin = hmin;
4214 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4222 return consdata->hmin;
4235 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4241 assert(hmax >= consdata->hmin);
4243 consdata->hmax = hmax;
4257 SCIPerrorMessage(
"constraint is not a cumulative constraint with optional activities\n");
4265 return consdata->hmax;
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_SEPAPRIORITY
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
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)
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)
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 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)
static SCIP_RETCODE createSetPackingCons(SCIP *scip, SCIP_VAR *var1, SCIP_VAR *var2)
#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 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)
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)
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 consEnableOptcumulative
#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)
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)
struct SCIP_Cons SCIP_CONS
#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)
struct SCIP_Conshdlr SCIP_CONSHDLR
#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)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#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
struct SCIP_Heur SCIP_HEUR
enum SCIP_BoundType SCIP_BOUNDTYPE
struct SCIP_Profile SCIP_PROFILE
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
#define SCIP_PRESOLTIMING_ALWAYS