75#define CONSHDLR_NAME "optcumulative"
76#define CONSHDLR_DESC "constraint handler for cumulative constraints with optional activities"
77#define CONSHDLR_SEPAPRIORITY 0
78#define CONSHDLR_ENFOPRIORITY -2060000
79#define CONSHDLR_CHECKPRIORITY -3100000
80#define CONSHDLR_SEPAFREQ 1
81#define CONSHDLR_PROPFREQ 1
82#define CONSHDLR_EAGERFREQ 100
84#define CONSHDLR_MAXPREROUNDS -1
85#define CONSHDLR_DELAYSEPA FALSE
86#define CONSHDLR_DELAYPROP FALSE
87#define CONSHDLR_NEEDSCONS TRUE
89#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
90#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM
99#define EVENTHDLR_BINVARS_NAME "optcumulativebinvars"
100#define EVENTHDLR_BINVARS_DESC "bound change event handler for binary variables of optcumulative constraints"
102#define EVENTHDLR_INTVARS_NAME "optcumulativeintvars"
103#define EVENTHDLR_INTVARS_DESC "bound change event handler for integer variables of optcumulative constraints"
112#define DEFAULT_ROWRELAX FALSE
113#define DEFAULT_CONFLICTANALYSIS TRUE
114#define DEFAULT_INTERVALRELAX TRUE
147 unsigned int propagated:1;
148 unsigned int relaxadded:1;
149 unsigned int triedsolving:1;
150 unsigned int normalized:1;
151 unsigned int triedredundant:1;
155struct SCIP_ConshdlrData
188 for( v = 0; v < consdata->nvars; ++v )
203 assert(nglbfixedones == consdata->nglbfixedones);
204 assert(nglbfixedzeors == consdata->nglbfixedzeros);
205 assert(nfixedones == consdata->nfixedones);
206 assert(nfixedzeors == consdata->nfixedzeros);
209#define checkCounters(x)
232 return (
int)(
bound + 0.5);
235#define convertBoundToInt(x, y) ((int)((y) + 0.5))
270 (*consdata)->capacity = capacity;
271 (*consdata)->nvars =
nvars;
272 (*consdata)->varssize =
nvars;
273 (*consdata)->hmin = 0;
274 (*consdata)->hmax = INT_MAX;
275 (*consdata)->nglbfixedzeros = 0;
276 (*consdata)->est = -1;
277 (*consdata)->lct = INT_MAX;
278 (*consdata)->row =
NULL;
279 (*consdata)->cons =
NULL;
280 (*consdata)->nglbfixedzeros = 0;
281 (*consdata)->nglbfixedones = 0;
282 (*consdata)->nfixedzeros = 0;
283 (*consdata)->nfixedones = 0;
284 (*consdata)->propagated =
FALSE;
285 (*consdata)->relaxadded =
FALSE;
286 (*consdata)->triedsolving =
FALSE;
287 (*consdata)->normalized =
FALSE;
288 (*consdata)->triedredundant =
FALSE;
305 for( v = 0; v <
nvars; ++v )
308 (*consdata)->downlocks[v] = check;
309 (*consdata)->uplocks[v] = check;
321 for( v = 0; v <
nvars; ++v )
330 (*consdata)->vars =
NULL;
331 (*consdata)->binvars =
NULL;
332 (*consdata)->downlocks =
NULL;
333 (*consdata)->uplocks =
NULL;
334 (*consdata)->demands =
NULL;
335 (*consdata)->durations =
NULL;
355 if( (*consdata)->row !=
NULL )
361 if( (*consdata)->cons !=
NULL )
366 varssize = (*consdata)->varssize;
399 for( v = 0; v < consdata->nvars; ++v )
408 SCIPvarGetUbLocal(consdata->vars[v]), consdata->durations[v], consdata->demands[v]);
413 SCIPinfoMessage(
scip, file,
")[%d,%d)<= %d", consdata->hmin, consdata->hmax, consdata->capacity);
444 (*conshdlrdata)->eventhdlrbinvars = eventhdlrbinvars;
445 (*conshdlrdata)->eventhdlrintvars = eventhdlrintvars;
446 (*conshdlrdata)->heurtrysol =
NULL;
507 binvar = consdata->binvars[pos];
523 assert(consdata->nglbfixedzeros >= 0);
524 assert(consdata->nglbfixedones >= 0);
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);
608 var = consdata->vars[pos];
643 var = consdata->vars[pos];
670 assert(consdata->nglbfixedzeros == 0);
671 assert(consdata->nglbfixedones == 0);
674 for( v = 0; v < consdata->nvars; ++v )
703 for( v = 0; v < consdata->nvars; ++v )
711 assert(consdata->nglbfixedzeros == 0);
712 assert(consdata->nglbfixedones == 0);
733 nvars = consdata->nvars;
736 for ( j = 0; j <
nvars; ++j )
738 var = consdata->vars[j];
776 assert(starttime < endtime);
779 for( v = 0; v < consdata->nvars; ++v )
781 var = consdata->vars[v];
787 maxenergy += (
SCIP_Longint)(consdata->durations[v] * consdata->demands[v]);
809 assert(starttime < endtime);
812 for( v = 0; v < consdata->nvars; ++v )
814 var = consdata->vars[v];
846 for( j = 0; j < nrows; ++j )
848 rowtightness[keptrows] = rowtightness[j];
849 startidxs[keptrows] = startidxs[j];
852 if( rowtightness[j] > tightness )
892 for( v = 0; v <
nvars; ++v )
952 if( consdata->relaxadded )
957 if( conshdlrdata->intervalrelax )
980 for( j = 0; j < consdata->nvars; ++j )
988 starttime = -INT_MAX;
991 for( j = 0; j < consdata->nvars; ++j )
995 assert(starttime <= starttimes[j]);
998 if( starttime == starttimes[j])
1001 starttime = starttimes[j];
1003 besttightness = 0LL;
1005 for(
i = 0;
i < consdata->nvars; ++
i )
1011 assert(endtime <= endtimes[
i]);
1014 if( endtime == endtimes[
i] )
1017 endtime = endtimes[
i];
1020 if( endtime <= starttime )
1025 energy = (endtime - starttime) * consdata->capacity;
1026 tightness = maxenergy - energy;
1029 if( tightness > besttightness )
1031 besttightness = tightness;
1036 rowtightness[
i][nrows[
i]] = tightness;
1037 startidxs[
i][nrows[
i]] = j;
1043 for( j = consdata->nvars-1; j >= 0 && ! (*
cutoff); --j )
1045 for(
i = 0;
i < nrows[j] && ! (*cutoff); ++
i )
1056 starttime = starttimes[startidxs[j][
i]];
1057 endtime = endtimes[j];
1059 energy = (endtime - starttime) * consdata->capacity;
1067 SCIP_CALL(
createRow(
scip, conshdlr, name,
vars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1075 for( j = consdata->nvars-1; j >= 0; --j )
1102 nvars = consdata->nvars;
1103 vars = consdata->vars;
1104 durations = consdata->durations;
1105 demands = consdata->demands;
1113 for( v = 0; v <
nvars; ++v )
1115 weights[v] = (
SCIP_Longint)(durations[v] * demands[v]);
1116 maxenergy += weights[v];
1125 energy = (lct - est) * consdata->capacity;
1127 if( maxenergy > energy )
1136 SCIP_CALL(
createRow(
scip, conshdlr, name, consdata->binvars, weights,
nvars, energy,
TRUE, rowadded, consadded,
cutoff) );
1143 consdata->relaxadded =
TRUE;
1168 (*auxiliary) =
TRUE;
1172 for( v = 0; v < consdata->nvars; ++v )
1181 binvars[*nfixedones] = consdata->binvars[v];
1182 vars[*nfixedones] = consdata->vars[v];
1183 durations[*nfixedones] = consdata->durations[v];
1184 demands[*nfixedones] = consdata->demands[v];
1194 (*auxiliary) =
FALSE;
1201 assert(consdata->nfixedzeros == *nfixedzeros);
1202 assert(consdata->nfixedones == *nfixedones);
1228 (*auxiliary) =
TRUE;
1231 for( v = 0; v < consdata->nvars; ++v )
1236 binvars[*
nvars] = consdata->binvars[v];
1238 durations[*
nvars] = consdata->durations[v];
1239 demands[*
nvars] = consdata->demands[v];
1246 (*auxiliary) =
FALSE;
1291 for( v = 0; v <
nvars; ++v )
1326 capacity, hmin, hmax, timelimit, memorylimit, maxnodes,
1327 solved, infeasible, unbounded, error) );
1354 for( v = 0; v <
nvars; ++v )
1393 (*redundant) =
FALSE;
1397 assert(consdata->nglbfixedzeros == 0);
1399 if( consdata->triedredundant )
1402 consdata->triedredundant =
TRUE;
1404 nvars = consdata->nvars;
1407 for( v = 0; v <
nvars; ++v )
1420 consdata->capacity, consdata->hmin, consdata->hmax,
FALSE,
1421 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1440 for( v = 0; v <
nvars; ++v )
1446 var = consdata->vars[v];
1452 if( consdata->demands[v] == 0.0 || consdata->durations[v] == 0.0 )
1455 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1457 binvars[v] = consdata->binvars[v];
1459 durations[v] = consdata->durations[v];
1460 demands[v] = consdata->demands[v];
1467 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1485 for( v = 0; v <
nvars; ++v )
1490 assert(lbs[v] + 0.5 > ubs[v]);
1492 var = consdata->vars[v];
1508 (*redundant) =
TRUE;
1546 if( consdata->triedsolving )
1549 consdata->triedsolving =
TRUE;
1559 lbs, ubs, 2000LL, &solved,
cutoff, &unbounded, &error) );
1564 if( *
cutoff && conflictanalysis )
1572 for( v = 0; v <
nvars; ++v )
1580 if( demands[v] == 0.0 || durations[v] == 0.0 )
1583 weights[v] = (lst - est) / (demands[v] * durations[v]);
1592 lbs, ubs, 2000LL, &solved, &infeasible, &unbounded, &error) );
1603 for( v = 0; v <
nvars; ++v )
1624 for( v = 0; v <
nvars; ++v )
1627 if( lbs[v] + 0.5 > ubs[v] )
1635 consdata->triedsolving =
FALSE;
1646 consdata->triedsolving =
FALSE;
1655 consdata->triedsolving =
FALSE;
1714 collectSolActivities(
scip, consdata,
sol, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1720 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons, printreason) );
1770 collectSolActivities(
scip, consdata,
NULL, binvars,
vars, durations, demands, &
nvars, &nfixedones, &nfixedzeros, &auxiliary);
1772 (*violated) =
FALSE;
1778 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, violated, cons,
FALSE) );
1780 if( *violated && auxiliary && !consdata->triedsolving )
1789 if( nfixedones ==
nvars )
1790 consdata->triedsolving =
TRUE;
1797 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1805#ifdef SCIP_DISABLED_CODE
1811 for( v = 0; v <
nvars; ++v )
1818 weights[v] = (lst - est) / (consdata->demands[v] * consdata->durations[v]);
1827 FALSE, lbs, ubs, 1000LL, &solved, &infeasible, &unbounded, &error) );
1839 (*solfeasible) =
FALSE;
1840 (*consadded) =
TRUE;
1842 else if( solved && *solfeasible && trysol !=
NULL )
1846 for(v = 0; v <
nvars; ++v )
1852 (*solfeasible) =
FALSE;
1885 nvars = consdata->nvars;
1890 if(
nvars == 0 && consdata->nfixedzeros ==
nvars )
1895 (*mustpropagate) =
FALSE;
1897 else if(
nvars == 1 )
1901 if( consdata->capacity < consdata->demands[0] )
1913 (*mustpropagate) =
FALSE;
1915 else if( consdata->nglbfixedones ==
nvars )
1936 (*mustpropagate) =
FALSE;
1938 else if( consdata->nfixedones + consdata->nfixedzeros ==
nvars && consdata->nfixedones > 0 )
1963 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
1983 (*mustpropagate) =
FALSE;
1986 assert(consdata->nvars > 1);
2080 consdata->vars[pos], consdata->downlocks[pos], consdata->uplocks[pos]) );
2082 consdata->downlocks[pos] =
FALSE;
2083 consdata->uplocks[pos] =
FALSE;
2094 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
2095 assert(conshdlrdata->eventhdlrintvars !=
NULL);
2102 assert(consdata->nglbfixedzeros >= 0);
2103 assert(consdata->nglbfixedones >= 0);
2104 assert(consdata->nfixedzeros >= 0);
2105 assert(consdata->nfixedones >= 0);
2107 SCIPdebugMessage(
"remove variable <%s> from optcumulative constraint <%s>\n",
2110 if( pos != consdata->nvars - 1 )
2112 consdata->binvars[pos] = consdata->binvars[consdata->nvars-1];
2113 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
2114 consdata->demands[pos] = consdata->demands[consdata->nvars-1];
2115 consdata->durations[pos] = consdata->durations[consdata->nvars-1];
2116 consdata->downlocks[pos] = consdata->downlocks[consdata->nvars-1];
2117 consdata->uplocks[pos] = consdata->uplocks[consdata->nvars-1];
2125 consdata->relaxadded =
FALSE;
2126 consdata->normalized =
FALSE;
2146 for( v = consdata->nvars-1; v >= 0 && consdata->nglbfixedzeros > 0; --v )
2164 consdata->triedredundant =
TRUE;
2172 assert(consdata->nglbfixedzeros == 0);
2202 hmin = consdata->hmin;
2203 hmax = consdata->hmax;
2205 SCIPdebugMessage(
"check for irrelevant jobs within cumulative constraint <%s>[%d,%d)\n",
2208 for( j = consdata->nvars-1; j >= 0; --j )
2210 var = consdata->vars[j];
2211 demand = consdata->demands[j];
2212 duration = consdata->durations[j];
2218 if( demand == 0 || duration == 0 )
2227 else if( est >= hmax || lct <= hmin )
2259 nvars = consdata->nvars;
2267 consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
2268 irrelevants, nfixedvars, nchgsides,
cutoff) );
2273 for( v =
nvars-1; v >= 0; --v )
2279 if( !irrelevants[v] )
2282 var = consdata->vars[v];
2289 if( lst <= consdata->hmin && ect >= consdata->hmax )
2291 assert(!consdata->downlocks[v]);
2292 assert(!consdata->uplocks[v]);
2294 if( consdata->capacity < consdata->demands[v] )
2304 consdata->capacity -= consdata->demands[v];
2318 consdata->hmin, consdata->hmax, consdata->capacity,
nvars);
2450 vars = consdata->vars;
2451 binvars = consdata->binvars;
2452 durations = consdata->durations;
2454 hmin = consdata->hmin;
2455 hmax = consdata->hmax;
2461 for( v = consdata->nvars-1; v >= 0; --v )
2475 if( consdata->demands[v] < consdata->capacity )
2481 end = start + durations[v];
2486 if( start <= hmin && end >= hmax )
2491 for( j = 0; j < consdata->nvars; ++j )
2505 ect = est + durations[j];
2513 if( ect > hmin && lst < hmax )
2518 else if( lst < hmax )
2523 else if( ect > hmin )
2535 else if( start <= hmin )
2542 for( j = 0; j < consdata->nvars; ++j )
2556 ect = est + durations[j];
2561 if( lst < ect && hmin < ect && lst < end )
2569 else if( end > lst )
2574 else if( est < end )
2581 else if( end >= hmax )
2590 for( j = 0; j < consdata->nvars; ++j )
2605 lct = lst + durations[j];
2607 SCIPdebugMessage(
"variable <%s>[%d,%d] (duration %d, demand %d)\n",
SCIPvarGetName(implvar), ect - durations[j], lst, durations[j], consdata->demands[j]);
2609 if( lst < ect && start < ect && lst < hmax )
2617 else if( start < ect )
2622 else if( lct > start )
2669 assert(consdata->nvars > 1);
2674 if( consdata->propagated && (consdata->nfixedones + consdata->nfixedzeros < consdata->nvars || consdata->triedsolving) )
2683 collectActivities(consdata, binvars,
vars, durations, demands, &nfixedones, &nfixedzeros, &auxiliary);
2686 if( !consdata->propagated && nfixedones > 1 )
2691 initialized =
FALSE;
2698 durations, demands, consdata->capacity, consdata->hmin, consdata->hmax, cons, nchgbds, &initialized, explanation,
cutoff) );
2701 if( initialized && conflictanalysis )
2705 for( v = 0; v < nfixedones; ++v )
2707 if( explanation[v] )
2719 assert(consdata->nvars > 1);
2726 if( nfixedzeros + nfixedones == consdata->nvars )
2736 nfixedones, nfixedvars, nchgbds, ndelconss,
cutoff) );
2739 else if( !consdata->propagated && nfixedones < consdata->
nvars )
2755 if( hmin < INT_MAX )
2763 binvar = consdata->binvars[v];
2766 var = consdata->vars[v];
2790 if( hmin == INT_MAX )
2829 else if( tightened )
2895 consdata->propagated =
TRUE;
2946#define consInitOptcumulative NULL
2950#define consExitOptcumulative NULL
2968 for(
c = 0;
c < nconss; ++
c )
2977 if( conshdlrdata->heurtrysol ==
NULL )
2986#define consExitpreOptcumulative NULL
2990#define consInitsolOptcumulative NULL
2993#define consEnforelaxOptcomulative NULL
3004 for(
c = 0;
c < nconss; ++
c )
3011 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
3189 consviolated =
FALSE;
3195 if( conshdlrdata->heurtrysol !=
NULL )
3201 for(
c = 0;
c < nconss && (!violated || solfeasible); ++
c )
3204 violated = violated || consviolated;
3208 if( solfeasible && violated && trysol !=
NULL )
3212 file = fopen(
"build.sol",
"w");
3265 if( conshdlrdata->heurtrysol !=
NULL )
3270 for(
c = 0;
c < nconss && !violated; ++
c )
3276 if( solfeasible && violated && trysol !=
NULL )
3309 for(
c = 0;
c < nconss && !violated; ++
c )
3353 for(
c = 0;
c < nusefulconss && !
cutoff; ++
c )
3360 mustpropagate =
TRUE;
3361 oldnchgcoefs = nchgcoefs;
3362 oldnchgbds = nchgbds;
3395 if( oldnchgbds < nchgbds || oldnchgcoefs < nchgcoefs )
3410 else if( nfixedvars > 0 || nchgbds > 0 || nupgdconss > 0 )
3439 oldnchgbds = *nchgbds;
3440 oldndelconss = *ndelconss;
3441 oldnupgdconss = *nupgdconss;
3442 oldnfixedvars = *nfixedvars;
3447 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3452 mustpropagate =
TRUE;
3472 nvars = consdata->nvars;
3475 if( !consdata->normalized )
3479 consdata->demands, &consdata->capacity, nchgcoefs, nchgsides) );
3480 consdata->normalized =
TRUE;
3492 consdata->demands, consdata->capacity, &hmin, &hmax, &split) );
3495 if( consdata->hmin < hmin )
3499 consdata->hmin = hmin;
3504 if( consdata->hmax > hmax )
3507 consdata->hmax = hmax;
3512 if( consdata->hmax <= consdata->hmin )
3514 SCIPdebugMessage(
"constraint <%s> is redundant since hmax(%d) <= hmin(%d)\n",
3524 if( consdata->hmin < split && split < consdata->hmax )
3532 SCIPdebugMessage(
"split optcumulative constraint <%s>[%d,%d) with %d jobs at time point %d\n",
3536 consdata->durations, consdata->demands, consdata->capacity,
3544 splitconsdata->hmin = split;
3545 splitconsdata->hmax = consdata->hmax;
3547 assert(split < consdata->hmax);
3554 consdata->hmax = split;
3556 assert(consdata->hmin < consdata->hmax);
3580 else if( oldnfixedvars < *nfixedvars || oldnchgbds < *nchgbds || oldnupgdconss < *nupgdconss || oldndelconss < *ndelconss )
3582 SCIPdebugMessage(
"presolving detected %d bound changes\n", *nchgbds - oldnchgbds);
3610 if( !conshdlrdata->conflictanalysis )
3630 for( v = 0; v < consdata->nvars; ++v )
3635 binvars[
nvars] = consdata->binvars[v];
3636 durations[
nvars] = consdata->durations[v];
3637 demands[
nvars] = consdata->demands[v];
3640 else if( consdata->binvars[v] == infervar )
3648 for( v = 0; v < consdata->nvars; ++v )
3657 else if( consdata->binvars[v] == infervar )
3675 infervar, inferinfo, boundtype, bdchgidx, relaxedbd, explanation,
result) );
3682 for( v = 0; v <
nvars; ++v )
3684 if( explanation[v] )
3718 vars = consdata->vars;
3721 for( v = 0; v < consdata->nvars; ++v )
3724 if( consdata->downlocks[v] && consdata->uplocks[v] )
3729 else if( consdata->downlocks[v] )
3733 else if( consdata->uplocks[v] )
3748#define consActiveOptcumulative NULL
3752#define consDeactiveOptcumulative NULL
3756#define consEnableOptcumulative NULL
3760#define consDisableOptcumulative NULL
3763#define consDelvarsOptcumulative NULL
3788 const char* consname;
3797 sourcebinvars = sourceconsdata->binvars;
3798 sourcevars = sourceconsdata->vars;
3799 nvars = sourceconsdata->nvars;
3812 for( v = 0; v <
nvars && success; ++v )
3827 sourceconsdata->durations, sourceconsdata->demands, sourceconsdata->capacity,
3828 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3886 duration = atoi(strvalue);
3890 demand = atoi(strvalue);
3900 binvars[
nvars] = binvar;
3901 demands[
nvars] = demand;
3902 durations[
nvars] = duration;
3910 hmin = atoi(strvalue);
3915 hmax = (int)(value);
3923 capacity = (int)value;
3927 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3970 consdata->nglbfixedones++;
3973 consdata->nglbfixedzeros++;
3976 consdata->nfixedones++;
3977 consdata->propagated =
FALSE;
3980 consdata->nfixedzeros++;
3983 consdata->nfixedones--;
3984 consdata->triedsolving =
FALSE;
3987 consdata->nfixedzeros--;
3988 consdata->triedsolving =
FALSE;
3991 consdata->propagated =
FALSE;
3994 SCIPerrorMessage(
"invalid event type %llx\n", (
unsigned long long)eventtype);
4019 if( consdata->nfixedzeros + consdata->nfixedones < consdata->nvars )
4020 consdata->relaxadded =
FALSE;
4023 consdata->propagated =
FALSE;
4044 eventExecOptcumulativeBinvars,
NULL) );
4048 eventExecOptcumulativeIntvars,
NULL) );
4056 consEnfolpOptcumulative, consEnfopsOptcumulative, consCheckOptcumulative,
4057 consLockOptcumulative, conshdlrdata) );
4090 "add linear relaxation as LP row (otherwise a knapsack constraint is created)?",
4095 "participate in conflict analysis?",
4100 "create a relaxation for each start and end time point interval",
4149 if( conshdlr ==
NULL )
4162 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
4163 local, modifiable, dynamic, removable, stickingatnode) );
4172 assert(conshdlrdata->eventhdlrbinvars !=
NULL);
4173 assert(conshdlrdata->eventhdlrintvars !=
NULL);
4174 assert(consdata->nglbfixedzeros == 0);
4175 assert(consdata->nglbfixedones == 0);
4176 assert(consdata->nfixedzeros == 0);
4177 assert(consdata->nfixedones == 0);
4200 assert(hmin <= consdata->hmax);
4202 consdata->hmin = hmin;
4220 return consdata->hmin;
4236 assert(hmax >= consdata->hmin);
4238 consdata->hmax = hmax;
4256 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_STRINGEQ(name, reference, retcode)
#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 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 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 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 SCIPgetVarLbAtIndex(SCIP *scip, 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)
SCIP_RETCODE SCIPprofileInsertCore(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
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)
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)
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
@ 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