signature;
174 unsigned intvalidsignature:1;
175 unsigned intnormalized:1;
176 unsigned intcovercuts:1;
177 unsigned intpropagated:1;
178 unsigned intvarbounds:1;
179 unsigned inttriedsolving:1;
187structSCIP_ConshdlrData
238 intnallconsdualfixs;
240 intnaddeddisjunctives;
276 unsigned intproprule:2;
277 unsigned intdata1:15;
278 unsigned intdata2:15;
293inferinfo.val.asint = i;
304 returninferinfo.val.asint;
313 return(
PROPRULE) inferinfo.val.asbits.proprule;
322 return(
int) inferinfo.val.asbits.data1;
331 return(
int) inferinfo.val.asbits.data2;
340 return(inferinfo.val.asint != 0);
355 if( proprule ==
PROPRULE_0_INVALID|| data1 < 0 || data1 >= (1<<15) || data2 < 0 || data2 >= (1<<15) )
357inferinfo.val.asint = 0;
363inferinfo.val.asbits.proprule = proprule;
364inferinfo.val.asbits.data1 = (
unsignedint) data1;
365inferinfo.val.asbits.data2 = (
unsignedint) data2;
396core =
MAX(0,
MIN(end, ect) -
MAX(lst, begin));
401#define computeCoreWithInterval(begin, end, ect, lst) (MAX(0, MIN((end), (ect)) - MAX((lst), (begin)))) 413#ifdef SCIP_DISABLED_CODE 426#ifdef SCIP_DISABLED_CODE 434 for( v = 0; v < nvbdvars; ++v )
437assert(vbdvar !=
NULL);
446duration = (int)(
size_t)image;
449 SCIPdebugMsg(
scip,
"check implication <%s>[%g,%g] >= <%s>[%g,%g] + <%g>\n",
453 if( duration >= vbdconst )
459 if( (*est) < impliedest )
483#ifdef SCIP_DISABLED_CODE 495#ifdef SCIP_DISABLED_CODE 503 for( v = 0; v < nvbdvars; ++v )
506assert(vbdvar !=
NULL);
514 SCIPdebugMsg(
scip,
"check implication <%s>[%g,%g] <= <%s>[%g,%g] + <%g>\n",
518 if( duration >= -vbdconst )
524 if( (*lct) > impliedlct )
558startindex = nstarted - 1;
564 while( nstarted - nfinished > nrowvars )
573varidx = startindices[startindex];
574assert(varidx >= 0 && varidx < consdata->nvars);
576var = consdata->vars[varidx];
577duration = consdata->durations[varidx];
578demand = consdata->demands[varidx];
579assert(var !=
NULL);
584 if( endtime > curtime )
602start = curtime - duration + 1;
603end =
MIN(curtime, endtime - duration);
605 for(
b= 0;
b< nbinvars; ++
b)
607 if( vals[
b] < start )
610 if( vals[
b] > end )
613assert(binvars[
b] !=
NULL);
616 if( size == *nvars )
623(*vars)[*nvars] = binvars[
b];
624(*coefs)[*nvars] = demand;
661assert(curtime >= consdata->hmin);
662assert(curtime < consdata->hmax);
669startindex = nstarted - 1;
672 while( nstarted - nfinished > counter )
674assert(startindex >= 0);
677varidx = startindices[startindex];
678assert(varidx >= 0 && varidx < consdata->nvars);
680var = consdata->vars[varidx];
681duration = consdata->durations[varidx];
682assert(duration > 0);
683assert(var !=
NULL);
690endtime =
MIN(starttime + duration, consdata->hmax);
693 if( endtime > curtime )
695(*activevars)[counter] = var;
696sumofstarts += starttime;
697mindelta =
MIN(mindelta, endtime - curtime);
704assert(mindelta > 0);
705*lhs = lower ? sumofstarts + mindelta : sumofstarts - mindelta;
727assert(vars !=
NULL|| nvars == 0);
730 for( j = 0; j < nvars; ++j )
732assert(vars !=
NULL);
735assert(var !=
NULL);
774assert(vars !=
NULL|| nvars == 0);
777 for( j = 0; j < nvars; ++j )
779assert(vars !=
NULL);
782assert(var !=
NULL);
817tmpnvars = consdata->nvars;
821 for( j = 0; j < tmpnvars; ++j )
823var = consdata->vars[j];
824assert(var !=
NULL);
825assert(consdata->durations[j] > 0);
826assert(consdata->demands[j] > 0);
836startindices[*nvars] = j;
838endtimes[*nvars] = starttimes[*nvars] + consdata->durations[j];
839endindices[*nvars] = j;
841 SCIPdebugMsg(
scip,
"%d: variable <%s>[%g,%g] (sol %g, duration %d) starttime %d, endtime = %d, demand = %d\n",
843consdata->durations[j],
844starttimes[*nvars], starttimes[*nvars] + consdata->durations[startindices[*nvars]],
845consdata->demands[startindices[*nvars]]);
856startindices[*nvars] = j;
858endtimes[*nvars] = starttimes[*nvars] + consdata->durations[j];
859endindices[*nvars] = j;
861 SCIPdebugMsg(
scip,
"%d: variable <%s>[%g,%g] (sol %g, duration %d) starttime %d, endtime = %d, demand = %d\n",
863consdata->durations[j],
864starttimes[*nvars], starttimes[*nvars] + consdata->durations[startindices[*nvars]],
865consdata->demands[startindices[*nvars]]);
878 for( j = 0; j < *nvars; ++j )
880 SCIPdebugMsg(
scip,
"%d: job[%d] starttime %d, endtime = %d, demand = %d\n", j,
881startindices[j], starttimes[j], starttimes[j] + consdata->durations[startindices[j]],
882consdata->demands[startindices[j]]);
885 for( j = 0; j < *nvars; ++j )
887 SCIPdebugMsg(
scip,
"%d: job[%d] endtime %d, demand = %d\n", j, endindices[j], endtimes[j],
888consdata->demands[endindices[j]]);
924assert(durations !=
NULL);
925assert(demands !=
NULL);
926assert(capacity >= 0);
932assert(vars !=
NULL);
946(*timepoints)[0] = starttimes[0];
947(*cumulativedemands)[0] = 0;
951 for( j = 0; j < nvars; ++j )
956curtime = starttimes[j];
958 if( curtime >= hmax )
962 while( endindex < nvars && endtimes[endindex] <= curtime )
966 if( (*timepoints)[*ntimepoints] < endtimes[endindex] )
969(*timepoints)[*ntimepoints] = endtimes[endindex];
970(*cumulativedemands)[*ntimepoints] = 0;
973idx = endindices[endindex];
975totaldemand -= (
SCIP_Real) demands[idx] * durations[idx] / (endtimes[endindex] - est);
978(*cumulativedemands)[*ntimepoints] = totaldemand;
981idx = startindices[j];
983totaldemand += (
SCIP_Real) demands[idx] * durations[idx] / (lct - starttimes[j]);
985 if( (*timepoints)[*ntimepoints] < curtime )
988(*timepoints)[*ntimepoints] = curtime;
989(*cumulativedemands)[*ntimepoints] = 0;
992(*cumulativedemands)[*ntimepoints] = totaldemand;
995 while( j+1 < nvars && starttimes[j+1] == curtime )
998idx = startindices[j];
1000totaldemand += (
SCIP_Real) demands[idx] * durations[idx] / (lct - starttimes[j]);
1002(*cumulativedemands)[*ntimepoints] = totaldemand;
1007 while( endindex < nvars
)
1012 if( (*timepoints)[*ntimepoints] < endtimes[endindex] )
1015(*timepoints)[*ntimepoints] = endtimes[endindex];
1016(*cumulativedemands)[*ntimepoints] = 0;
1019idx = endindices[endindex];
1021totaldemand -= (
SCIP_Real) demands[idx] * durations[idx] / (endtimes[endindex] - est);
1022(*cumulativedemands)[*ntimepoints] = totaldemand;
1029(*minfreecapacity) = INT_MAX;
1030 for( j = 0; j < *ntimepoints; ++j )
1032 if( (*timepoints)[j] >= hmin && (*timepoints)[j] < hmax )
1033*minfreecapacity =
MIN( *minfreecapacity, (
SCIP_Real)capacity - (*cumulativedemands)[j] );
1069assert(consdata !=
NULL);
1071nvars = consdata->nvars;
1072capacity = consdata->capacity;
1074globalmaxdemand = 0.0;
1081 for( v = 0; v < nvars; ++v )
1092peak = consdata->demands[v];
1097 if( consdata->demands[v] > capacity / 3 )
1100 for( j = 0; j < nvars; ++j )
1110 if( lb <= timepoint && lb + consdata->durations[j] > timepoint )
1112peak += consdata->demands[j];
1115 if( consdata->demands[j] > consdata->capacity / 3 )
1121globalpeak =
MAX(globalpeak, peak);
1122globalmaxdemand =
MAX(globalmaxdemand, maxdemand);
1124 if( peak > capacity )
1126disjfactor2 =
MAX( disjfactor2, (peak-(
SCIP_Real)capacity)/peak * (nlarge/(
SCIP_Real)ndemands) );
1127cumfactor1 =
MAX( cumfactor1, (peak-capacity)/peak * (capacity-deltademand)/(
SCIP_Real)capacity );
1128resstrength2 =
MAX(resstrength2, (capacity-maxdemand)/(peak-maxdemand) );
1132resstrength1 = (capacity-globalmaxdemand) / (globalpeak-globalmaxdemand);
1135consdata->disjfactor2 = disjfactor2;
1136consdata->cumfactor1 = cumfactor1;
1137consdata->resstrength2 = resstrength2;
1138consdata->resstrength1 = resstrength1;
1152minfreecapacity = INT_MAX;
1154 SCIP_CALL( computeRelevantEnergyIntervals(
scip, nvars, consdata->vars,
1155consdata->durations, consdata->demands,
1156capacity, consdata->hmin, consdata->hmax, &timepoints, &estimateddemands,
1157&ntimepoints, &maxdemand, &minfreecapacity) );
1163consdata->estimatedstrength = (
SCIP_Real)(capacity - minfreecapacity) / (
SCIP_Real) capacity;
1166 SCIPstatisticPrintf(
"cumulative constraint<%s>: DISJ1=%g, DISJ2=%g, CUM=%g, RS1 = %g, RS2 = %g, EST = %g\n",
1167 SCIPconsGetName(cons), consdata->disjfactor1, disjfactor2, cumfactor1, resstrength1, resstrength2,
1168consdata->estimatedstrength);
1198 if( realconstant < 0.0 )
1203 if( realscalar < 0.0 )
1214assert(*scalar != 0);
1232 for( j = 0; j < njobs; ++j )
1274assert(subscip !=
NULL);
1285 for( v = 0; v < njobs; ++v )
1292 if( objvals ==
NULL)
1295objval = objvals[v];
1303njobs, subvars, durations, demands, capacity) );
1348(*infeasible) =
TRUE;
1352(*unbounded) =
TRUE;
1361assert(sol !=
NULL);
1363 for( v = 0; v < njobs; ++v )
1380 for( v = 0; v < njobs; ++v )
1402 for( v = 0; v < njobs; ++v )
1423(*infeasible) =
FALSE;
1424(*unbounded) =
FALSE;
1427 SCIPdebugMessage(
"solve independent cumulative condition with %d variables\n", njobs);
1434njobs, capacity, hmin, hmax,
1435maxnodes, timelimit, memorylimit,
1437infeasible, unbounded, solved, error);
1447#ifdef SCIP_DISABLED_CODE 1466(*infeasible) =
FALSE;
1467(*unbounded) =
FALSE;
1470 SCIPdebugMsg(
scip,
"solve independent cumulative condition with %d variables\n", njobs);
1489 for( v = 0; v < njobs; ++v )
1497 if( objvals ==
NULL)
1500objval = objvals[v];
1506timeinterval = lst - est + 1;
1507assert(timeinterval > 0);
1510minest =
MIN(minest, est);
1511maxlct =
MAX(maxlct, lst + durations[v]);
1520 for( t = 0; t < timeinterval; ++t )
1533binvars[v][t] = binvar;
1542hmin =
MAX(hmin, minest);
1543hmax =
MIN(hmax, maxlct);
1544assert(hmin > INT_MIN);
1545assert(hmax < INT_MAX);
1546assert(hmin < hmax);
1549 for( t = hmin; t < hmax; ++t )
1560 for( v = 0; v < njobs; ++v )
1573duration = durations[v];
1574assert(duration > 0);
1577 if( t < est || t >= lst + duration )
1580demand = demands[v];
1581assert(demand >= 0);
1583start =
MAX(t - duration + 1, est);
1586assert(start <= end);
1588 for( k = start; k <= end; ++k )
1590assert(binvars[v][k] !=
NULL);
1625(*infeasible) =
TRUE;
1629(*unbounded) =
TRUE;
1637assert(sol !=
NULL);
1639 for( v = 0; v < njobs; ++v )
1649timeinterval = lst - est + 1;
1652 for( t = 0; t < timeinterval; ++t )
1672 for( v = 0; v < njobs; ++v )
1682timeinterval = lst - est + 1;
1685 for( t = 0; t < timeinterval; ++t )
1695 for( t = timeinterval - 1; t >= 0; --t )
1718 for( v = 0; v < njobs; ++v )
1728timeinterval = lst - est + 1;
1730 for( t = 0; t < timeinterval; ++t )
1765assert(conshdlrdata !=
NULL);
1766assert(eventhdlr !=
NULL);
1771(*conshdlrdata)->eventhdlr = eventhdlr;
1774(*conshdlrdata)->solveCumulative = solveCumulativeViaScipCp;
1776#ifdef SCIP_STATISTIC 1777(*conshdlrdata)->nlbtimetable = 0;
1778(*conshdlrdata)->nubtimetable = 0;
1779(*conshdlrdata)->ncutofftimetable = 0;
1780(*conshdlrdata)->nlbedgefinder = 0;
1781(*conshdlrdata)->nubedgefinder = 0;
1782(*conshdlrdata)->ncutoffedgefinder = 0;
1783(*conshdlrdata)->ncutoffoverload = 0;
1784(*conshdlrdata)->ncutoffoverloadTTEF = 0;
1786(*conshdlrdata)->nirrelevantjobs = 0;
1787(*conshdlrdata)->nalwaysruns = 0;
1788(*conshdlrdata)->nremovedlocks = 0;
1789(*conshdlrdata)->ndualfixs = 0;
1790(*conshdlrdata)->ndecomps = 0;
1791(*conshdlrdata)->ndualbranchs = 0;
1792(*conshdlrdata)->nallconsdualfixs = 0;
1793(*conshdlrdata)->naddedvarbounds = 0;
1794(*conshdlrdata)->naddeddisjunctives = 0;
1807assert(conshdlrdata !=
NULL);
1808assert(*conshdlrdata !=
NULL);
1832assert(consdata !=
NULL);
1833assert(eventhdlr !=
NULL);
1836 for( v = 0; v < consdata->nvars; ++v )
1855assert(consdata !=
NULL);
1856assert(eventhdlr !=
NULL);
1857assert(0 <= pos && pos < consdata->nvars);
1858assert(consdata->vars[pos] !=
NULL);
1877assert(consdata !=
NULL);
1880 for( v = 0; v < consdata->nvars; ++v )
1898nvars = consdata->nvars;
1901 for( v = 0; v < nvars; ++v )
1903consdata->downlocks[v] = locked;
1904consdata->uplocks[v] = locked;
1927assert(consdata !=
NULL);
1928assert(vars !=
NULL|| nvars > 0);
1929assert(demands !=
NULL);
1930assert(durations !=
NULL);
1931assert(capacity >= 0);
1933assert(hmin < hmax);
1938(*consdata)->hmin = hmin;
1939(*consdata)->hmax = hmax;
1941(*consdata)->capacity = capacity;
1942(*consdata)->demandrows =
NULL;
1943(*consdata)->demandrowssize = 0;
1944(*consdata)->ndemandrows = 0;
1945(*consdata)->scoverrows =
NULL;
1946(*consdata)->nscoverrows = 0;
1947(*consdata)->scoverrowssize = 0;
1948(*consdata)->bcoverrows =
NULL;
1949(*consdata)->nbcoverrows = 0;
1950(*consdata)->bcoverrowssize = 0;
1951(*consdata)->nvars = nvars;
1952(*consdata)->varssize = nvars;
1953(*consdata)->signature = 0;
1954(*consdata)->validsignature =
FALSE;
1955(*consdata)->normalized =
FALSE;
1956(*consdata)->covercuts =
FALSE;
1957(*consdata)->propagated =
FALSE;
1958(*consdata)->varbounds =
FALSE;
1959(*consdata)->triedsolving =
FALSE;
1963assert(vars !=
NULL);
1968(*consdata)->linkingconss =
NULL;
1976 if( linkingconss !=
NULL)
1992 for( v = 0; v < nvars; ++v )
1997 if( linkingconss !=
NULL)
2002 for( v = 0; v < nvars; ++v )
2011 for( v = 0; v < (*consdata)->nvars; ++v )
2017(*consdata)->vars =
NULL;
2018(*consdata)->downlocks =
NULL;
2019(*consdata)->uplocks =
NULL;
2020(*consdata)->demands =
NULL;
2021(*consdata)->durations =
NULL;
2022(*consdata)->linkingconss =
NULL;
2026(*consdata)->resstrength1 = -1.0;
2027(*consdata)->resstrength2 = -1.0;
2028(*consdata)->cumfactor1 = -1.0;
2029(*consdata)->disjfactor1 = -1.0;
2030(*consdata)->disjfactor2 = -1.0;
2031(*consdata)->estimatedstrength = -1.0;
2047assert(consdata !=
NULL);
2048assert(*consdata !=
NULL);
2050 for(
r= 0;
r< (*consdata)->ndemandrows; ++
r)
2052assert((*consdata)->demandrows[
r] !=
NULL);
2058(*consdata)->ndemandrows = 0;
2059(*consdata)->demandrowssize = 0;
2062 for(
r= 0;
r< (*consdata)->nscoverrows; ++
r)
2064assert((*consdata)->scoverrows[
r] !=
NULL);
2070(*consdata)->nscoverrows = 0;
2071(*consdata)->scoverrowssize = 0;
2073 for(
r= 0;
r< (*consdata)->nbcoverrows; ++
r)
2075assert((*consdata)->bcoverrows[
r] !=
NULL);
2081(*consdata)->nbcoverrows = 0;
2082(*consdata)->bcoverrowssize = 0;
2084(*consdata)->covercuts =
FALSE;
2099assert(consdata !=
NULL);
2100assert(*consdata !=
NULL);
2102nvars = (*consdata)->nvars;
2103varssize = (*consdata)->varssize;
2113 if( (*consdata)->linkingconss !=
NULL)
2115 for( v = nvars-1; v >= 0; --v )
2117assert((*consdata)->linkingconss[v] !=
NULL);
2148assert(consdata !=
NULL);
2153 for( v = 0; v < consdata->nvars; ++v )
2155assert(consdata->vars[v] !=
NULL);
2160consdata->durations[v], consdata->demands[v]);
2162 SCIPinfoMessage(
scip, file,
")[%d,%d) <= %d", consdata->hmin, consdata->hmax, consdata->capacity);
2178assert(consdata !=
NULL);
2179assert(cons !=
NULL);
2183 SCIPdebugMsg(
scip,
"cumulative constraint <%s>: remove variable <%s>\n",
2189consdata->downlocks[pos] =
FALSE;
2190consdata->uplocks[pos] =
FALSE;
2192 if( consdata->linkingconss !=
NULL)
2199assert(conshdlr !=
NULL);
2201assert(conshdlrdata !=
NULL);
2202assert(conshdlrdata->eventhdlr !=
NULL);
2207 SCIPdebugMsg(
scip,
"remove variable <%s>[%g,%g] from cumulative constraint <%s>\n",
2213 if( pos != consdata->nvars - 1 )
2215consdata->vars[pos] = consdata->vars[consdata->nvars-1];
2216consdata->downlocks[pos] = consdata->downlocks[consdata->nvars-1];
2217consdata->uplocks[pos] = consdata->uplocks[consdata->nvars-1];
2218consdata->demands[pos] = consdata->demands[consdata->nvars-1];
2219consdata->durations[pos] = consdata->durations[consdata->nvars-1];
2221 if( consdata->linkingconss !=
NULL)
2223consdata->linkingconss[pos]= consdata->linkingconss[consdata->nvars-1];
2228consdata->validsignature =
FALSE;
2229consdata->normalized =
FALSE;
2245assert(consdata !=
NULL);
2247nvars = consdata->nvars;
2249assert(consdata->linkingconss ==
NULL);
2253 for( v = 0; v < nvars; ++v )
2258var = consdata->vars[v];
2259assert(var !=
NULL);
2274consdata->linkingconss[v] = cons;
2283assert(consdata->linkingconss[v] !=
NULL);
2318 int* startsolvalues;
2332assert(violated !=
NULL);
2334(*violated) =
FALSE;
2339assert(vars !=
NULL);
2340assert(demands !=
NULL);
2341assert(durations !=
NULL);
2350 for( j = 0; j < nvars; ++j )
2362startsolvalues[j] =
MAX(solvalue, hmin);
2363startindices[j] = j;
2365endsolvalues[j] =
MAX(solvalue + durations[j], hmin);
2376freecapacity = capacity;
2381 for( j = 0; j < nvars; ++j )
2384curtime = startsolvalues[j];
2386 if( curtime >= hmax )
2390freecapacity -= demands[startindices[j]];
2391 while( j+1 < nvars && startsolvalues[j+1] == curtime )
2394freecapacity -= demands[startindices[j]];
2398 while( endindex < nvars && curtime >= endsolvalues[endindex] )
2400freecapacity += demands[endindices[endindex]];
2403assert(freecapacity <= capacity);
2406 if( absviol < (
SCIP_Real) (-freecapacity) )
2408absviol = -freecapacity;
2413 if( freecapacity < 0 && curtime >= hmin )
2416(*violated) =
TRUE;
2427 ";\nviolation: at time point %d available capacity = %d, needed capacity = %d\n",
2428curtime, capacity, capacity - freecapacity);
2430 for( i = 0; i <= j; ++i )
2432 if( startsolvalues[i] + durations[startindices[i]] > curtime )
2435 SCIPvarGetName(vars[startindices[i]]), startsolvalues[i], durations[startindices[i]],
2436demands[startindices[i]]);
2472assert(cons !=
NULL);
2473assert(violated !=
NULL);
2478assert(consdata !=
NULL);
2482consdata->durations, consdata->demands, consdata->capacity, consdata->hmin, consdata->hmax,
2483violated, cons, printreason) );
2527 SCIPdebugMsg(
scip,
"variable <%s>: (demand %d) resolve propagation of core time algorithm (peak %d)\n",
2532capacity -= inferdemand;
2542 for( j = 0; j < nvars && capacity >= 0; ++j )
2545assert(var !=
NULL);
2548 if( var == infervar )
2551duration = durations[j];
2552assert(duration > 0);
2560 SCIPdebugMsg(
scip,
"variable <%s>: glb=[%g,%g] conflict=[%g,%g] (duration %d, demand %d)\n",
2570 if( inferpeak < ect && lst <= inferpeak )
2572capacity -= demands[j];
2573reported[j] =
TRUE;
2575maxlst =
MAX(maxlst, lst);
2576minect =
MIN(minect, ect);
2577assert(maxlst < minect);
2579 if( explanation !=
NULL)
2580explanation[j] =
TRUE;
2597 if( inferpeak < ect && lst <= inferpeak )
2599capacity -= demands[j];
2600reported[j] =
TRUE;
2602maxlst =
MAX(maxlst, lst);
2603minect =
MIN(minect, ect);
2604assert(maxlst < minect);
2606 if( explanation !=
NULL)
2607explanation[j] =
TRUE;
2611 if( capacity >= 0 )
2623 for( j = 0; j < nvars; ++j )
2626assert(var !=
NULL);
2629 if( var == infervar || reported[j] )
2632duration = durations[j];
2633assert(duration > 0);
2645 SCIPdebugMsg(
scip,
"variable <%s>: loc=[%g,%g] glb=[%g,%g] (duration %d, demand %d)\n",
2650 if( inferpeak < ect && lst <= inferpeak )
2653canddemands[ncands] = demands[j];
2656capacity -= demands[j];
2663assert(capacity < 0);
2667 while( capacity + canddemands[ncands-1] < 0 )
2670capacity += canddemands[ncands];
2675 for( c = 0; c < ncands; ++c )
2677var = vars[cands[c]];
2678assert(var !=
NULL);
2680duration = durations[cands[c]];
2685maxlst =
MAX(maxlst, lst);
2686minect =
MIN(minect, ect);
2687assert(maxlst < minect);
2690 SCIPdebugMsg(
scip,
"infer peak %d, relaxed peak %d, lst %d, ect %d\n", inferpeak, relaxedpeak, maxlst, minect);
2691assert(inferpeak >= maxlst);
2692assert(inferpeak < minect);
2695 if( relaxedpeak < inferpeak )
2697inferpeak =
MAX(maxlst, relaxedpeak);
2699 else if( relaxedpeak > inferpeak )
2701inferpeak =
MIN(minect-1, relaxedpeak);
2703assert(inferpeak >= hmin);
2704assert(inferpeak < hmax);
2705assert(inferpeak >= maxlst);
2706assert(inferpeak < minect);
2709 for( c = 0; c < ncands; ++c )
2711var = vars[cands[c]];
2712assert(var !=
NULL);
2714 if( usebdwidening )
2716duration = durations[cands[c]];
2727 if( explanation !=
NULL)
2728explanation[cands[c]] =
TRUE;
2737 if( provedpeak !=
NULL)
2738*provedpeak = inferpeak;
2758ect = est + duration;
2759lct = lst + duration;
2762 if( lct <= end && est >= begin )
2765assert(lst <= end && ect >= begin);
2773 return MIN3(left, right, end - begin);
2811requiredenergy = ((
SCIP_Longint) end - begin) * capacity;
2818 for( v = 0; v < nvars; ++v )
2828assert(var !=
NULL);
2834demand = demands[v];
2837duration = durations[v];
2838assert(duration > 0);
2841 if( infervar == var )
2849 SCIPdebugMsg(
scip,
"inference variable <%s>[%g,%g] %s %g (duration %d, demand %d)\n",
2872right =
MIN3(end - lst, end - begin, duration);
2878assert(begin <= lct);
2882left =
MIN(lct - begin + 1, end - begin);
2886overlap =
MIN(left, right);
2887assert(overlap > 0);
2888assert(overlap <= end - begin);
2889assert(overlap <= duration);
2891 if( usebdwidening )
2914assert(ect > begin);
2919left =
MIN3(ect - begin, end - begin, duration);
2929right =
MIN(end - est + 1, end - begin);
2933overlap =
MIN(left, right);
2934assert(overlap > 0);
2935assert(overlap <= end - begin);
2936assert(overlap <= duration);
2938 if( usebdwidening )
2952 if( explanation !=
NULL)
2953explanation[v] =
TRUE;
2967 if( est + duration > begin && lst < end )
2970glbenergy =
computeOverlap(begin, end, est, lst, duration) * demand;
2973requiredenergy -= glbenergy;
2975 if( explanation !=
NULL)
2976explanation[v] =
TRUE;
2986 if( est + duration > begin && lst < end )
2991locenergies[v] = overlaps[v] * demand - glbenergy;
2992assert(locenergies[v] >= 0);
3000 for( v = 0; v < nvars && requiredenergy >= 0; ++v )
3010assert(idx >= 0 && idx < nvars);
3013assert(var !=
NULL);
3014assert(var != infervar);
3016duration = durations[idx];
3017assert(duration > 0);
3019overlap = overlaps[v];
3020assert(overlap > 0);
3022requiredenergy -= locenergies[v];
3024 if( requiredenergy < -1 )
3028demand = demands[idx];
3031overlap += (int)((requiredenergy + 1) / demand);
3034requiredenergy += locenergies[v];
3036assert(requiredenergy < 0);
3039assert(overlap > 0);
3041relaxlb = begin - duration + overlap;
3042relaxub = end - overlap;
3044 SCIPdebugMsg(
scip,
"variable <%s> glb=[%g,%g] loc=[%g,%g], conf=[%g,%g], added=[%d,%d] (demand %d, duration %d)\n",
3049relaxlb, relaxub, demands[idx], duration);
3054 if( explanation !=
NULL)
3055explanation[idx] =
TRUE;
3058assert(requiredenergy < 0);
3101 if( inferpos >= nvars || vars[inferpos] != infervar )
3104 for( inferpos = 0; inferpos < nvars && vars[inferpos] != infervar; ++inferpos )
3107assert(inferpos < nvars);
3108assert(vars[inferpos] == infervar);
3110inferdemand = demands[inferpos];
3111inferduration = durations[inferpos];
3120 SCIPdebugMsg(
scip,
"variable <%s>: upper bound changed from %g to %g (relaxed %g)\n",
3133relaxedpeak =
MIN(relaxedpeak, hmax-1);
3139relaxedpeak =
MAX(relaxedpeak, inferpeak);
3140assert(relaxedpeak >= inferpeak);
3141assert(relaxedpeak >= hmin);
3147 SCIPdebugMsg(
scip,
"variable <%s>: lower bound changed from %g to %g (relaxed %g)\n",
3160relaxedpeak =
MAX(relaxedpeak, hmin);
3166relaxedpeak =
MIN(relaxedpeak, inferpeak);
3167assert(relaxedpeak < hmax);
3172infervar, inferdemand, inferpeak, relaxedpeak, bdchgidx, usebdwidening, &provedpeak, explanation) );
3176 if( usebdwidening )
3190 if( usebdwidening )
3201 if( explanation !=
NULL)
3202explanation[inferpos] =
TRUE;
3214assert(begin < end);
3216begin =
MAX(begin, hmin);
3217end =
MIN(end, hmax);
3220begin, end, infervar, boundtype, bdchgidx, relaxedbd, usebdwidening, explanation) );
3251 int* alternativelbs,
3252 int* alternativeubs,
3260 for( v = 0; v < nvars; ++v )
3266assert(var !=
NULL);
3276 if( alternativelbs[v] <= ub )
3279(*branched) =
TRUE;
3294 if( alternativeubs[v] >= lb )
3297(*branched) =
TRUE;
3322#if defined SCIP_DEBUG && !defined NDEBUG 3325assert(idx !=
NULL);
3328assert(idx !=
NULL);
3331assert(starttimes !=
NULL);
3332assert(starttimes !=
NULL);
3333assert(freecapacity !=
NULL);
3334assert(starttimes[*idx] == curtime);
3335assert(consdata->demands !=
NULL);
3336assert(freecapacity != idx);
3339(*freecapacity) -= consdata->demands[startindices[*idx]];
3341 while( (*idx)+1 < nvars && starttimes[(*idx)+1] == curtime )
3344(*freecapacity) -= consdata->demands[startindices[(*idx)]];
3345assert(freecapacity != idx);
3348assert(oldidx <= *idx);
3364#if defined SCIP_DEBUG && !defined NDEBUG 3370 while( endtimes[*idx] <= curtime && *idx < nvars)
3372(*freecapacity) += consdata->demands[endindices[*idx]];
3377assert(oldidx <= *idx);
3405assert(consdata !=
NULL);
3407nvars = consdata->nvars;
3410*timepoint = consdata->hmax;
3412assert(consdata->vars !=
NULL);
3421starttimes, endtimes, startindices, endindices);
3424freecapacity = consdata->capacity;
3425hmin = consdata->hmin;
3426hmax = consdata->hmax;
3429 for( j = 0; j < nvars; ++j )
3431curtime = starttimes[j];
3434 if( curtime >= hmax )
3441 addEndingJobDemands(consdata, curtime, endtimes, endindices, &freecapacity, &endindex, nvars);
3443assert(freecapacity <= consdata->capacity);
3444assert(endindex <= nvars);
3450 if( freecapacity < 0 && curtime >= hmin )
3452*timepoint = curtime;
3480assert(conss !=
NULL);
3484SCIPvarGetHashkey, SCIPvarIsHashkeyEq, SCIPvarGetHashkeyVal,
NULL) );
3487assert(conss !=
NULL);
3489 for( c = 0; c < nconss; ++c )
3498assert(cons !=
NULL);
3504assert(consdata !=
NULL);
3509 if( curtime < consdata->hmin || curtime >= consdata->hmax )
3513 for( j = 0; j < consdata->nvars; ++j )
3519var = consdata->vars[j];
3520assert(var !=
NULL);
3529 if( lb <= curtime && ub + consdata->durations[j] > curtime && lb < ub )
3535score =
MIN(solval - lb, ub - solval) / ((
SCIP_Real)ub-lb);
3571 if( nbranchcands > 0 )
3582 for( c = 0; c < nconss && !violated; ++c )
3587assert(cons !=
NULL);
3620assert(consdata !=
NULL);
3622nvars = consdata->nvars;
3623vars = consdata->vars;
3624downlocks = consdata->downlocks;
3625uplocks = consdata->uplocks;
3628 for( v = 0; v < nvars; ++v )
3633assert(var !=
NULL);
3693 if( ncheckconss == 1 )
3738assert(consdata !=
NULL);
3743 if( consdata->triedsolving )
3753consdata->triedsolving =
TRUE;
3755 SCIPdebugMsg(
scip,
"the cumulative constraint <%s> is independent from rest of the problem (%d variables, %d constraints)\n",
3759nvars = consdata->nvars;
3760vars = consdata->vars;
3766 for( v = 0; v < nvars; ++v )
3774assert(var !=
NULL);
3797consdata->hmin, consdata->hmax, timelimit, memorylimit, maxnodes, &solved, cutoff, unbounded, &error) );
3799 if( !(*cutoff) && !(*unbounded) && !error )
3807 for( v = 0; v < nvars; ++v )
3810 if( lbs[v] + 0.5 > ubs[v] )
3813assert(!infeasible);
3818consdata->triedsolving =
FALSE;
3824assert(!infeasible);
3829consdata->triedsolving =
FALSE;
3833assert(!infeasible);
3838consdata->triedsolving =
FALSE;
3880 SCIPdebugMsg(
scip,
"detected infeasibility due to adding a core to the core resource profile\n");
3890infervar, inferdemand, inferpeak, inferpeak,
NULL, usebdwidening,
NULL, explanation) );
3895 if( usebdwidening )
3906*initialized =
TRUE;
3948assert(var !=
NULL);
3950duration = durations[idx];
3951assert(duration > 0);
3953demand = demands[idx];
3965 SCIPdebugMsg(
scip,
"propagate earliest start time (lower bound) (pos %d)\n", pos);
3980assert(pos == tmppos);
3983ect = est + duration;
4011newlb =
MIN(newlb, ect);
4020var, duration, demand, newlb-1, usebdwidening, initialized, explanation) );
4022 if( explanation !=
NULL)
4023explanation[idx] =
TRUE;
4025*infeasible =
TRUE;
4045assert(!(*infeasible));
4060assert(est >= newlb);
4068 while( est < lst );
4099assert(var !=
NULL);
4100assert(duration > 0);
4112lct = lst + duration;
4141assert(pos == tmppos);
4170newub =
MAX(newub, lst) - duration;
4171assert(newub >= est);
4188assert(!infeasible);
4203assert(lst <= newub);
4204lct = lst + duration;
4212 while( est < lst );
4226 int* coreEnergyAfterEst,
4227 int* coreEnergyAfterLct
4236t = ntimepoints - 1;
4240 for( v = nvars-1; v >= 0; --v )
4258coreEnergyAfterEst[v] = energy;
4261t = ntimepoints - 1;
4265 for( v = nvars-1; v >= 0; --v )
4283coreEnergyAfterLct[v] = energy;
4308 for( v = 0; v < nvars; ++ v)
4319duration = durations[v];
4320assert(duration > 0);
4324ect = est + duration;
4325lct = lst + duration;
4336leftadjust =
MAX(0, hmin - est);
4339rightadjust =
MAX(0, lct - hmax);
4342flexenergies[v] = duration - leftadjust - rightadjust - core;
4343flexenergies[v] =
MAX(0, flexenergies[v]);
4344flexenergies[v] *= demands[v];
4345assert(flexenergies[v] >= 0);
4348ects[v] =
MIN(ect, lst);
4351lsts[v] =
MAX(ect, lst);
4385assert(begin >= hmin);
4386assert(end <= hmax);
4389 if( !conshdlrdata->ttefinfer )
4393 if( est >= end || ect <= begin )
4399 if( est >= begin && ect <= end )
4420newlb = end - (int) (energy / demand);
4425 if( newlb > lct - duration )
4447(*initialized) =
TRUE;
4452 else if( newlb > (*bestlb) )
4456assert(newlb > begin);
4498assert(begin >= hmin);
4499assert(end <= hmax);
4500assert(est < begin);
4503 if( !conshdlrdata->ttefinfer )
4507 if( lst >= end || lct <= begin )
4513 if( lst >= begin && lct <= end )
4527assert(energy >= 0);
4534newub = begin - duration + (int) (energy / demand);
4561(*initialized) =
TRUE;
4566 else if( newub < (*bestub) )
4570assert(newub < begin);
4603 int* coreEnergyAfterEst,
4604 int* coreEnergyAfterLct,
4610 intcoreEnergyAfterEnd;
4625 for( v = 0; v < nvars; ++v )
4630est =
MIN(est, start);
4631lct =
MAX(lct, end);
4635hmin =
MAX(hmin, est);
4636hmax =
MIN(hmax, lct);
4639coreEnergyAfterEnd = -1;
4641maxavailable = ((
SCIP_Longint) hmax - hmin) * capacity;
4642minavailable = maxavailable;
4646 if( ((
SCIP_Longint) lcts[0] - ests[nvars-1]) * capacity >= totalenergy )
4654 for( v = nvars-1; v >= 0 && !(*cutoff); --v )
4673assert(v == 0 || lcts[v-1] <= lcts[v]);
4689 if( !conshdlrdata->ttefinfer && end <= hmax && minavailable < maxavailable )
4693assert(coreEnergyAfterLct[v] >= coreEnergyAfterEnd);
4694assert(coreEnergyAfterEnd >= 0);
4697freeenergy = capacity * ((
SCIP_Longint) end - lct) - coreEnergyAfterLct[v] + coreEnergyAfterEnd;
4699 if( freeenergy <= minavailable )
4709coreEnergyAfterEnd = coreEnergyAfterLct[v];
4712minavailable = maxavailable;
4721 for( i = nests-1; i >= 0; --i )
4733assert(idx < nvars);
4751 if( ((
SCIP_Longint) end - est) * capacity >= totalenergy )
4755assert(var !=
NULL);
4757duration = durations[idx];
4758assert(duration > 0);
4760demand = demands[idx];
4771assert(est <= minbegin);
4772 if( minavailable < maxavailable && est < minbegin )
4778var, duration, demand, est, lst, lct, minbegin, end, minavailable, &(newubs[idx]), &(ubinferinfos[idx]),
4779initialized, explanation, cutoff) );
4785 SCIPdebugMsg(
scip,
"check variable <%s>[%g,%g] (duration %d, demands %d, est <%d>, lst of free part <%d>\n",
4801assert(lst >= begin);
4802assert(flexenergies[idx] >= 0);
4803flexenergy += flexenergies[idx];
4816energy =
MIN(flexenergies[idx], demands[idx] *
MAX(0, (end - lst)));
4817assert(end - lst < duration);
4818assert(energy >= 0);
4821flexenergy += energy;
4824candenergy =
MIN(flexenergies[idx], demands[idx] * (end - begin)) - energy;
4825assert(candenergy >= 0);
4828 if( candenergy > lbenergy )
4830lbenergy = candenergy;
4835 SCIPdebugMsg(
scip,
"time window [%d,%d) flexible energy <%d>\n", begin, end, flexenergy);
4836assert(coreEnergyAfterEst[i] >= coreEnergyAfterEnd);
4839freeenergy = capacity * ((
SCIP_Longint) end - begin) - flexenergy - coreEnergyAfterEst[i] + coreEnergyAfterEnd;
4842 if( freeenergy < 0 )
4844 SCIPdebugMsg(
scip,
"analyze overload within time window [%d,%d) capacity %d\n", begin, end, capacity);
4854conshdlrdata->usebdwidening, explanation) );
4856(*initialized) =
TRUE;
4868 if( lbenergy > 0 && freeenergy < lbenergy )
4880newlb = end - (int)(energy / demands[lbcand]);
4892relaxedbd = lst + 1.0;
4899conshdlrdata->usebdwidening, explanation) );
4901(*initialized) =
TRUE;
4907 else if( newlb > newlbs[lbcand] )
4916newlbs[lbcand] = newlb;
4921 if( minavailable > freeenergy )
4923minavailable = freeenergy;
4926assert(minavailable >= 0);
4954 int* coreEnergyAfterEst,
4955 int* coreEnergyAfterLct,
4961 intcoreEnergyAfterStart;
4982 for( v = 0; v < nvars; ++v )
4987minest =
MIN(minest, start);
4988maxlct =
MAX(maxlct, end);
4992hmin =
MAX(hmin, minest);
4993hmax =
MIN(hmax, maxlct);
4995maxavailable = ((
SCIP_Longint) hmax - hmin) * capacity;
4999 if( ((
SCIP_Longint) lcts[0] - ests[nvars-1]) * capacity >= totalenergy )
5007 for( v = 0; v < nvars; ++v )
5034assert(est > begin);
5039coreEnergyAfterStart = coreEnergyAfterEst[v];
5042minavailable = maxavailable;
5050 for( i = nlcts; i < nvars; ++i )
5062assert(idx < nvars);
5080 if( ((
SCIP_Longint) lct - begin) * capacity >= totalenergy )
5084assert(var !=
NULL);
5086duration = durations[idx];
5087assert(duration > 0);
5089demand = demands[idx];
5100assert(lct >= minend);
5101 if( minavailable < maxavailable && lct > minend )
5107var, duration, demand, est, ect, lct, begin, minend, minavailable, &(newlbs[idx]), &(lbinferinfos[idx]),
5108initialized, explanation, cutoff) );
5114 SCIPdebugMsg(
scip,
"check variable <%s>[%g,%g] (duration %d, demands %d, est <%d>, ect of free part <%d>\n",
5131assert(flexenergies[idx] >= 0);
5132flexenergy += flexenergies[idx];
5145energy =
MIN(flexenergies[idx], demands[idx] *
MAX(0, (ect - begin)));
5146assert(ect - begin < duration);
5147assert(energy >= 0);
5150flexenergy += energy;
5153candenergy =
MIN(flexenergies[idx], demands[idx] * (end - begin)) - energy;
5154assert(candenergy >= 0);
5157 if( candenergy > ubenergy )
5159ubenergy = candenergy;
5164 SCIPdebugMsg(
scip,
"time window [%d,%d) flexible energy <%d>\n", begin, end, flexenergy);
5165assert(coreEnergyAfterLct[i] <= coreEnergyAfterStart);
5168freeenergy = capacity * ((
SCIP_Longint) end - begin) - flexenergy - coreEnergyAfterStart + coreEnergyAfterLct[i];
5171 if( freeenergy < 0 )
5173 SCIPdebugMsg(
scip,
"analyze overload within time window [%d,%d) capacity %d\n", begin, end, capacity);
5183conshdlrdata->usebdwidening, explanation) );
5185(*initialized) =
TRUE;
5197 if( ubenergy > 0 && freeenergy < ubenergy )
5203duration = durations[ubcand];
5204assert(duration > 0);
5212newub = begin - duration + (int)(energy / demands[ubcand]);
5214 if( newub < ect - duration )
5223relaxedbd = ect - duration - 1.0;
5230conshdlrdata->usebdwidening, explanation) );
5232(*initialized) =
TRUE;
5238 else if( newub < newubs[ubcand] )
5247newubs[ubcand] = newub;
5252 if( minavailable > freeenergy )
5254minavailable = freeenergy;
5257assert(minavailable >= 0);
5293 int* coreEnergyAfterEst;
5294 int* coreEnergyAfterLct;
5315 if( !conshdlrdata->ttefcheck )
5336 for( v = 0; v < nvars; ++v )
5340lbinferinfos[v] = 0;
5341ubinferinfos[v] = 0;
5345 collectDataTTEF(
scip, nvars, vars, durations, demands, hmin, hmax, permests, ests, permlcts, lcts, ects, lsts, flexenergies);
5358newlbs, newubs, lbinferinfos, ubinferinfos, lsts, flexenergies,
5359permests, ests, lcts, coreEnergyAfterEst, coreEnergyAfterLct, initialized, explanation, cutoff) );
5363newlbs, newubs, lbinferinfos, ubinferinfos, ects, flexenergies,
5364permlcts, ests, lcts, coreEnergyAfterEst, coreEnergyAfterLct, initialized, explanation, cutoff) );
5367 for( v = 0; v < nvars && !(*cutoff); ++v )
5375 TRUE, &infeasible, &tightened) );
5383assert(!infeasible);
5396 TRUE, &infeasible, &tightened) );
5420assert(var !=
NULL);
5431assert(begin < end);
5439conshdlrdata->usebdwidening, explanation) );
5441(*initialized) =
TRUE;
5507assert(cons !=
NULL);
5508assert(cutoff !=
NULL);
5515 if( !conshdlrdata->ttinfer )
5518assert(*initialized ==
FALSE);
5520 SCIPdebugMsg(
scip,
"propagate cores of cumulative condition of constraint <%s>[%d,%d) <= %d\n",
5523infeasible =
FALSE;
5530 for( v = 0; v < nvars; ++v )
5541assert(var !=
NULL);
5543duration = durations[v];
5544assert(duration > 0);
5555 if( lst + duration <= hmin || est >= hmax )
5559begin =
MAX(hmin, lst);
5560end =
MIN(hmax, est + duration);
5562demand = demands[v];
5568 SCIPdebugMsg(
scip,
"variable <%s>[%g,%g] (duration %d, demand %d): remove core [%d,%d)\n",
5576profile, v, nchgbds, conshdlrdata->usebdwidening, initialized, explanation, cutoff) );
5583profile, v, nchgbds) );
5593begin =
MAX(hmin, lst);
5594end =
MIN(hmax, est + duration);
5601 SCIPdebugMsg(
scip,
"variable <%s>[%d,%d] (duration %d, demand %d): add core [%d,%d)\n",
5610var, duration, demand,
SCIPprofileGetTime(profile, pos), conshdlrdata->usebdwidening, initialized, explanation) );
5612 if( explanation !=
NULL)
5613explanation[v] =
TRUE;
5663 SCIPdebugMsg(
scip,
"update envelop starting from node <%p>\n", (
void*)node);
5668 while( node !=
NULL)
5676assert(left !=
NULL);
5678assert(leftdata !=
NULL);
5682assert(right !=
NULL);
5684assert(rightdata !=
NULL);
5687 if( leftdata->enveloptheta >= 0 )
5689assert(rightdata->energytheta != -1);
5690 nodedata->enveloptheta =
MAX(leftdata->enveloptheta + rightdata->energytheta, rightdata->enveloptheta);
5693 nodedata->enveloptheta = rightdata->enveloptheta;
5695assert(leftdata->energytheta != -1);
5696assert(rightdata->energytheta != -1);
5697 nodedata->energytheta = leftdata->energytheta + rightdata->energytheta;
5699 if( leftdata->enveloplambda >= 0 )
5701assert(rightdata->energytheta != -1);
5702 nodedata->enveloplambda =
MAX(leftdata->enveloplambda + rightdata->energytheta, rightdata->enveloplambda);
5705 nodedata->enveloplambda = rightdata->enveloplambda;
5707 if( leftdata->enveloptheta >= 0 && rightdata->energylambda >= 0 )
5708 nodedata->enveloplambda =
MAX(
nodedata->enveloplambda, leftdata->enveloptheta + rightdata->energylambda);
5712 if( leftdata->energylambda >= 0 && rightdata->energylambda >= 0 )
5714assert(rightdata->energytheta != -1);
5715assert(leftdata->energytheta != -1);
5716 nodedata->energylambda =
MAX(leftdata->energylambda + rightdata->energytheta, leftdata->energytheta + rightdata->energylambda);
5718 else if( rightdata->energylambda >= 0 )
5720assert(leftdata->energytheta != -1);
5721 nodedata->energylambda = leftdata->energytheta + rightdata->energylambda;
5723 else if( leftdata->energylambda >= 0 )
5725assert(rightdata->energytheta != -1);
5726 nodedata->energylambda = leftdata->energylambda + rightdata->energytheta;
5745assert(node !=
NULL);
5752assert(parent !=
NULL);
5783assert(tree !=
NULL);
5784assert(node !=
NULL);
5792assert(parent !=
NULL);
5803assert(sibling !=
NULL);
5807 if( grandparent !=
NULL)
5854assert(tree !=
NULL);
5855assert(node !=
NULL);
5862assert(
nodedata->enveloptheta != -1);
5863assert(
nodedata->energytheta != -1);
5864assert(
nodedata->enveloplambda == -1);
5865assert(
nodedata->energylambda == -1);
5905assert(leaf !=
NULL);
5908assert(leafdata !=
NULL);
5917 if(
nodedata->key < leafdata->key )
5923assert(leafdata !=
NULL);
5926assert(leaf !=
NULL);
5927assert(leaf != node);
5930newnodedata = &nodedatas[*nnodedatas];
5931nodedataidx[*nnodedatas] = *nnodedatas;
5935newnodedata->var =
NULL;
5937newnodedata->est = INT_MIN;
5938newnodedata->lct = INT_MAX;
5939newnodedata->duration = 0;
5940newnodedata->demand = 0;
5941newnodedata->enveloptheta = -1;
5942newnodedata->energytheta = 0;
5943newnodedata->enveloplambda = -1;
5944newnodedata->energylambda = -1;
5945newnodedata->idx = -1;
5946newnodedata->intheta =
TRUE;
5950assert(newnode !=
NULL);
5954 if( parent !=
NULL)
5971 if(
nodedata->key < leafdata->key )
5983newnodedata->key = leafdata->key;
6008assert(node !=
NULL);
6021assert(left !=
NULL);
6024assert(leftdata !=
NULL);
6027assert(right !=
NULL);
6030assert(rightdata !=
NULL);
6032assert(
nodedata->energylambda != -1);
6033assert(rightdata->energytheta != -1);
6035 if( leftdata->energylambda >= 0 &&
nodedata->energylambda == leftdata->energylambda + rightdata->energytheta )
6038assert(leftdata->energytheta != -1);
6039assert(rightdata->energylambda != -1);
6040assert(
nodedata->energylambda == leftdata->energytheta + rightdata->energylambda);
6057assert(node !=
NULL);
6070assert(left !=
NULL);
6073assert(leftdata !=
NULL);
6076assert(right !=
NULL);
6079assert(rightdata !=
NULL);
6081assert(
nodedata->enveloplambda != -1);
6082assert(rightdata->energytheta != -1);
6085 if( leftdata->enveloplambda >= 0 &&
nodedata->enveloplambda == leftdata->enveloplambda + rightdata->energytheta )
6087 else if( leftdata->enveloptheta >= 0 && rightdata->energylambda >= 0
6088&&
nodedata->enveloplambda == leftdata->enveloptheta + rightdata->energylambda )
6091assert(rightdata->enveloplambda != -1);
6092assert(
nodedata->enveloplambda == rightdata->enveloplambda);
6124omegaset[*nelements] = node;
6144assert(node !=
NULL);
6162assert(left !=
NULL);
6165assert(leftdata !=
NULL);
6168assert(right !=
NULL);
6171assert(rightdata !=
NULL);
6176assert(
nodedata->enveloptheta != -1);
6177assert(rightdata->energytheta != -1);
6179 if( leftdata->enveloptheta >= 0 &&
nodedata->enveloptheta == leftdata->enveloptheta + rightdata->energytheta )
6186assert(rightdata->enveloptheta != -1);
6187assert(
nodedata->enveloptheta == rightdata->enveloptheta);
6210assert(node !=
NULL);
6220assert(left !=
NULL);
6223assert(leftdata !=
NULL);
6226assert(right !=
NULL);
6229assert(rightdata !=
NULL);
6231assert(
nodedata->energylambda != -1);
6232assert(rightdata->energytheta != -1);
6234 if( leftdata->energylambda >= 0 &&
nodedata->energylambda == leftdata->energylambda + rightdata->energytheta )
6241assert(leftdata->energytheta != -1);
6242assert(rightdata->energylambda != -1);
6243assert(
nodedata->energylambda == leftdata->energytheta + rightdata->energylambda);
6267assert(node !=
NULL);
6280assert(left !=
NULL);
6283assert(leftdata !=
NULL);
6286assert(right !=
NULL);
6289assert(rightdata !=
NULL);
6291assert(
nodedata->enveloplambda != -1);
6292assert(rightdata->energytheta != -1);
6294 if( leftdata->enveloplambda >= 0 &&
nodedata->enveloplambda == leftdata->enveloplambda + rightdata->energytheta )
6301 if( leftdata->enveloptheta >= 0 && rightdata->energylambda >= 0
6302&&
nodedata->enveloplambda == leftdata->enveloptheta + rightdata->energylambda )
6309assert(rightdata->enveloplambda != -1);
6310assert(
nodedata->enveloplambda == rightdata->enveloplambda);
6330assert(duration > 0);
6332 SCIPdebugMessage(
"variable <%s>: loc=[%g,%g] glb=[%g,%g] (duration %d, demand %d)\n",
6337 return nodedata->demand * duration;
6350 return(est1 - est2);
6360 return(nodedatas[ind1].lct - nodedatas[ind2].lct);
6391 SCIPdebugMsg(
scip,
"est=%d, lct=%d, propest %u, reportedenergy %d, shift %d\n", est, lct, propest, reportedenergy, shift);
6402 for( j = 0; j < nleaves && reportedenergy <= energy; ++j )
6418assert(reportedenergy > energy);
6446 for( j = nleaves-1; j >= 0; --j )
6455 if( usebdwidening )
6466 if( explanation !=
NULL)
6470(*initialized) =
TRUE;
6535assert(rootdata !=
NULL);
6538 for( j = ncands-1; j >= 0 && !(*cutoff); --j )
6564assert(leaf !=
NULL);
6568assert(leafdata !=
NULL);
6569assert(!leafdata->intheta);
6570assert(leafdata->duration > 0);
6571assert(leafdata->est >= 0);
6574 if( leafdata->est + leafdata->duration >=
nodedata->lct )
6580assert(rootdata !=
NULL);
6595assert(nelements > 0);
6596assert(nelements < ncands);
6603 SCIPdebugMsg(
scip,
"an overload was detected duration edge-finder propagattion\n");
6607conshdlrdata->usebdwidening, initialized, explanation) );
6613 else if( newest > 0 )
6635 TRUE, &infeasible, &tightened) );
6657 TRUE, &infeasible, &tightened) );
6667leafdata->est = newest;
6686 if( explanation !=
NULL)
6687explanation[leafdata->idx] =
TRUE;
6690 for( i = 0; i < nelements; ++i )
6698 if( explanation !=
NULL)
6702(*initialized) =
TRUE;
6720assert(rootdata !=
NULL);
6770assert(cons !=
NULL);
6771assert(initialized !=
NULL);
6772assert(cutoff !=
NULL);
6773assert(*cutoff ==
FALSE);
6796 for( j = 0; j < nvars; ++j )
6801shift =
MAX(shift, lct);
6808 for( j = 0; j < nvars; ++j )
6820assert(var !=
NULL);
6822duration = durations[j];
6823assert(duration > 0);
6834 if( conshdlrdata->useadjustedjobs )
6838leftadjust = (hmin - est);
6843rightadjust = (lct - hmax);
6850 if( duration - leftadjust - rightadjust <= 0 )
6853 else if( est < hmin || lct > hmax )
6856energy = demands[j] * (duration - leftadjust - rightadjust);
6859totalenergy += energy;
6882nodedataidx[ncands] = ncands;
6887 nodedata->key = est + j / (2.0 * nvars);
6893 nodedata->leftadjust = leftadjust;
6894 nodedata->rightadjust = rightadjust;
6909nnodedatas = ncands;
6912 SCIPsortInd(nodedataidx, compNodedataLct, (
void*)nodedatas, ncands);
6919 for( j = 0; j < ncands; ++j )
6924idx = nodedataidx[j];
6929 if( ((
SCIP_Longint) nodedatas[idx].lct - nodedatas[idx].est) * capacity >= totalenergy )
6932nodedatas[idx].est = -1;
6941assert(nnodedatas <= 2*nvars);
6944leaves[ninsertcands] = leaf;
6949assert(rootdata !=
NULL);
6952 if( rootdata->enveloptheta > (
SCIP_Longint) capacity * nodedatas[idx].lct )
6954 SCIPdebugMsg(
scip,
"detects cutoff due to overload in time window [?,%d) (ncands %d)\n", nodedatas[idx].lct, j);
6973est = nodedatas[idx].est;
6974lct = nodedatas[idx].lct;
6979 for( j = j+1; j < ncands; ++j )
6986idx = nodedataidx[j];
6998duration -= (est - glbest);
7001duration -= (glblct - lct);
7005glbenery +=
nodedata->demand * duration;
7007 if( explanation !=
NULL)
7014conshdlrdata->usebdwidening, initialized, explanation) );
7016 else if( ninsertcands > 1 && conshdlrdata->efinfer )
7020propest, shift, initialized, explanation, nchgbds, cutoff) );
7063 if( !conshdlrdata->efcheck )
7068cons,
TRUE, initialized, explanation, nchgbds, cutoff) );
7075 if( !conshdlrdata->efinfer )
7080cons,
FALSE, initialized, explanation, nchgbds, cutoff) );
7117assert(redundant !=
NULL);
7119(*redundant) =
TRUE;
7125assert(vars !=
NULL);
7135 for( j = 0; j < nvars; ++j )
7137assert(durations[j] > 0);
7138assert(demands[j] > 0);
7141assert(var !=
NULL);
7147 if( lb >= hmax || ub + durations[j] <= hmin )
7150starttimes[njobs] =
MAX(lb, hmin);
7151startindices[njobs] = j;
7153endtimes[njobs] =
MIN(ub + durations[j], hmax);
7154endindices[njobs] = j;
7155assert(starttimes[njobs] <= endtimes[njobs]);
7164freecapacity = capacity;
7167 for( j = 0; j < njobs; ++j )
7169curtime = starttimes[j];
7172 if( curtime >= hmax )
7176freecapacity -= demands[startindices[j]];
7177 while( j+1 < njobs && starttimes[j+1] == curtime )
7180freecapacity -= demands[startindices[j]];
7184 while( endtimes[endindex] <= curtime )
7186freecapacity += demands[endindices[endindex]];
7189assert(freecapacity <= capacity);
7192 if( freecapacity < 0 && curtime >= hmin )
7194(*redundant) =
FALSE;
7231 for( v = 0; v < nvars; ++v )
7244assert(var !=
NULL);
7248duration = durations[v];
7249assert(duration > 0);
7251demand = demands[v];
7259 if( lst + duration <= hmin || est >= hmax )
7263begin =
MAX(hmin, lst);
7264end =
MIN(hmax, est + duration);
7270 SCIPdebugMsg(
scip,
"variable <%s>[%d,%d] (duration %d, demand %d): add core [%d,%d)\n",
7284var, duration, demand,
SCIPprofileGetTime(profile, pos), conshdlrdata->usebdwidening, initialized, explanation) );
7286 if( explanation !=
NULL)
7287explanation[v] =
TRUE;
7326assert(nchgbds !=
NULL);
7327assert(initialized !=
NULL);
7328assert(cutoff !=
NULL);
7343 SCIP_CALL_TERMINATE( retcode,
createCoreProfile(
scip, conshdlrdata, profile, nvars, vars, durations, demands, capacity, hmin, hmax,
7344initialized, explanation, cutoff), TERMINATE );
7349 SCIP_CALL_TERMINATE( retcode,
propagateTimetable(
scip, conshdlrdata, profile, nvars, vars, durations, demands, capacity, hmin, hmax, cons,
7350nchgbds, initialized, explanation, cutoff), TERMINATE );
7356 SCIP_CALL_TERMINATE( retcode,
propagateEdgeFinding(
scip, conshdlrdata, nvars, vars, durations, demands, capacity, hmin, hmax,
7357cons, initialized, explanation, nchgbds, cutoff), TERMINATE );
7363 SCIP_CALL_TERMINATE( retcode,
propagateTTEF(
scip, conshdlrdata, profile, nvars, vars, durations, demands, capacity, hmin, hmax, cons,
7364nchgbds, initialized, explanation, cutoff), TERMINATE );
7391assert(cons !=
NULL);
7394assert(consdata !=
NULL);
7396oldnchgbds = *nchgbds;
7397initialized =
FALSE;
7411consdata->nvars, consdata->vars, consdata->durations, consdata->demands, consdata->capacity,
7412consdata->hmin, consdata->hmax, cons,
7413nchgbds, &redundant, &initialized,
NULL, cutoff) );
7417 SCIPdebugMsg(
scip,
"%s deletes cumulative constraint <%s> since it is redundant\n",
7431assert(*cutoff ==
TRUE);
7437 if( *cutoff || *nchgbds > oldnchgbds )
7444consdata->propagated =
TRUE;
7479assert(probingpos >= 0);
7480assert(probingpos < nvars);
7481assert(success !=
NULL);
7482assert(cutoff !=
NULL);
7484var = vars[probingpos];
7485assert(var !=
NULL);
7491(*success) =
FALSE;
7498leftimpllbs, leftimplubs, leftproplbs, leftpropubs, cutoff) );
7533rightimpllbs, rightimplubs, rightproplbs, rightpropubs, cutoff) );
7563assert(roundable !=
NULL);
7580assert(scalar != 0);
7596*roundable =
FALSE;
7612assert(roundable !=
NULL);
7629assert(scalar != 0);
7645*roundable =
FALSE;
7661 int* alternativelbs,
7662 int* alternativeubs,
7671 for( c = 0; c < nconss; ++c )
7680assert(cons !=
NULL);
7687assert(consdata !=
NULL);
7688assert(consdata->nvars > 1);
7713hmin = consdata->hmin;
7714hmax = consdata->hmax;
7718assert(consdata !=
NULL);
7720nvars = consdata->nvars;
7722 for( v = 0; v < nvars; ++v )
7728var = consdata->vars[v];
7729assert(var !=
NULL);
7743 if( consdata->downlocks[v] )
7750ect = est + consdata->durations[v];
7752 if( ect <= hmin || hmin >= hmax )
7754 else if( est < hmin && alternativelbs[idx] >= (hmin + 1 - constant) / scalar )
7756alternativelbs[idx] = (hmin + 1 - constant) / scalar;
7762 if( consdata->uplocks[v] )
7768duration = consdata->durations[v];
7772lct = lst + duration;
7774 if( lst >= hmax || hmin >= hmax )
7776 else if( lct > hmax && alternativeubs[idx] <= ((hmax - 1 - constant) / scalar) - duration )
7778alternativeubs[idx] = ((hmax - 1 - constant) / scalar) - duration;
7794 int* alternativelbs,
7795 int* alternativeubs,
7822 for( v = 0; v < nvars; ++v )
7832assert(var !=
NULL);
7835 if( alternativelbs[v] == INT_MAX && alternativeubs[v] == INT_MIN )
7851 if( alternativelbs[v] > ub )
7854assert(!infeasible);
7873downimpllbs, downimplubs, downproplbs, downpropubs, upimpllbs, upimplubs, upproplbs, uppropubs,
7874nfixedvars, &success, cutoff) );
7897 if( alternativeubs[v] < lb )
7900assert(!infeasible);
7919downimpllbs, downimplubs, downproplbs, downpropubs, upimpllbs, upimplubs, upproplbs, uppropubs,
7920nfixedvars, &success, cutoff) );
7959 int* alternativelbs;
7960 int* alternativeubs;
7969oldnfixedvars = *nfixedvars;
7978 for( v = 0; v < nvars; ++v )
7982alternativelbs[v] = INT_MAX;
7983alternativeubs[v] = INT_MIN;
7991nfixedvars, cutoff) );
7993 if( !(*cutoff) && oldnfixedvars == *nfixedvars && branched !=
NULL)
8040assert(cons !=
NULL);
8044assert(consdata !=
NULL);
8046nvars = consdata->nvars;
8053remainingcap = consdata->capacity;
8056 for( j = 0; j < nvars; ++j )
8063 if( startvalues[j] <= time && ub + consdata->durations[j] > time )
8066 if( startvalues[j] == ub )
8068remainingcap -= consdata->demands[j];
8072demands[nflexible] = consdata->demands[j];
8073flexibleids[nflexible] = j;
8078assert(remainingcap >= 0);
8094 while( j < nflexible && sumdemand <= remainingcap )
8096sumdemand += demands[j];
8102assert(sumdemand > remainingcap);
8103assert(bigcoversize < nflexible);
8115 for( j = 0; j < nflexible; ++j )
8127idx = flexibleids[j];
8131assert(nbinvars != 0);
8134assert(vals !=
NULL);
8140start = time - consdata->durations[idx] + 1;
8141end =
MIN(time, ub);
8144 for(
b= 0;
b< nbinvars; ++
b)
8146 if( vals[
b] < start || vals[
b] < lb )
8149 if( vals[
b] > end )
8152assert(binvars[
b] !=
NULL);
8160 if( consdata->bcoverrowssize == 0 )
8162consdata->bcoverrowssize = 10;
8165 if( consdata->nbcoverrows == consdata->bcoverrowssize )
8167consdata->bcoverrowssize *= 2;
8171consdata->bcoverrows[consdata->nbcoverrows] = row;
8172consdata->nbcoverrows++;
8182 while( sumdemand <= remainingcap )
8185sumdemand += demands[j];
8189smallcoversize = nflexible - (j + 1) - 1;
8190 while( j > 0 && demands[j] == demands[nflexible-1] )
8193assert(smallcoversize < nflexible);
8195 if( smallcoversize != 1 || smallcoversize != nflexible - (j + 1) - 1 )
8204 for( j = j + 1; j < nflexible; ++j )
8216idx = flexibleids[j];
8220assert(nbinvars != 0);
8223assert(vals !=
NULL);
8229start = time - consdata->durations[idx] + 1;
8230end =
MIN(time, ub);
8233 for(
b= 0;
b< nbinvars; ++
b)
8235 if( vals[
b] < start || vals[
b] < lb )
8238 if( vals[
b] > end )
8241assert(binvars[
b] !=
NULL);
8248 if( consdata->scoverrowssize == 0 )
8250consdata->scoverrowssize = 10;
8253 if( consdata->nscoverrows == consdata->scoverrowssize )
8255consdata->scoverrowssize *= 2;
8259consdata->scoverrows[consdata->nscoverrows] = row;
8260consdata->nscoverrows++;
8281 int* startvaluessorted;
8282 int* endvaluessorted;
8298assert(cons !=
NULL);
8301assert(consdata !=
NULL);
8304 if( consdata->vars ==
NULL)
8307nvars = consdata->nvars;
8308hmin = consdata->hmin;
8309hmax = consdata->hmax;
8319 for( j = 0; j < nvars; ++j )
8322startvaluessorted[j] = startvalues[j];
8325endvaluessorted[j] = endvalues[j];
8327startindices[j] = j;
8337freecapacity = consdata->capacity;
8340 for( j = 0; j < nvars; ++j )
8342curtime = startvaluessorted[j];
8343 if( curtime >= hmax )
8347freecapacity -= consdata->demands[startindices[j]];
8349 while( j+1 < nvars && startvaluessorted[j+1] == curtime )
8352freecapacity -= consdata->demands[startindices[j]];
8356 while( endidx < nvars && curtime >= endvaluessorted[endidx] )
8358freecapacity += consdata->demands[endindices[endidx]];
8362assert(freecapacity <= consdata->capacity);
8363assert(endidx <= nvars);
8372 if( freecapacity < 0 && curtime >= hmin )
8374 intnextprofilechange;
8378nextprofilechange =
MIN( startvaluessorted[j+1], endvaluessorted[endidx] );
8380nextprofilechange = endvaluessorted[endidx];
8382nextprofilechange =
MIN(nextprofilechange, hmax);
8384 for( t = curtime; t < nextprofilechange; ++t )
8394consdata->covercuts =
TRUE;
8429assert(nstarted > nfinished);
8432assert(consdata !=
NULL);
8433assert(consdata->nvars > 0);
8435capacity = consdata->capacity;
8436assert(capacity > 0);
8452 for(
b= 0;
b< nbinvars; ++
b)
8468 for(
b= 0;
b< nbinvars; ++
b)
8476 if( consdata->demandrowssize == 0 )
8478consdata->demandrowssize = 10;
8481 if( consdata->ndemandrows == consdata->demandrowssize )
8483consdata->demandrowssize *= 2;
8487consdata->demandrows[consdata->ndemandrows] = row;
8488consdata->ndemandrows++;
8525assert(cons !=
NULL);
8528assert(consdata !=
NULL);
8530nvars = consdata->nvars;
8536assert(consdata->vars !=
NULL);
8543 SCIPdebugMsg(
scip,
"create sorted event points for cumulative constraint <%s> with %d jobs\n",
8548starttimes, endtimes, startindices, endindices,
FALSE);
8551freecapacity = consdata->capacity;
8552hmin = consdata->hmin;
8553hmax = consdata->hmax;
8556 for( j = 0; j < nvars; ++j )
8558curtime = starttimes[j];
8561 if( curtime >= hmax )
8568 addEndingJobDemands(consdata, curtime, endtimes, endindices, &freecapacity, &endindex, nvars);
8570assert(freecapacity <= consdata->capacity);
8571assert(endindex <= nvars);
8577 if( freecapacity < 0 && curtime >= hmin )
8584nextstarttime = starttimes[j+1];
8586nextstarttime = endtimes[nvars-1];
8588nextstarttime =
MIN(nextstarttime, hmax);
8595 for( t = curtime+1 ; t < nextstarttime; ++t )
8600 if( freecapacity < 0 )
8641assert(consdata !=
NULL);
8642assert(consdata->demandrows ==
NULL);
8643assert(consdata->ndemandrows == 0);
8646 if( consdata->linkingconss ==
NULL)
8686assert(consdata !=
NULL);
8688 if( consdata->demandrows ==
NULL)
8690assert(consdata->ndemandrows == 0);
8697 for(
r= 0;
r< consdata->ndemandrows && !(*infeasible); ++
r)
8701assert(consdata->demandrows[
r] !=
NULL);
8724assert(cons !=
NULL);
8725assert(separated !=
NULL);
8726assert(cutoff !=
NULL);
8728*separated =
FALSE;
8732assert(consdata !=
NULL);
8736 if( consdata->demandrows ==
NULL)
8738assert(consdata->ndemandrows == 0);
8748 for(
r= 0;
r< consdata->ndemandrows; ++
r)
8779(*separated) =
TRUE;
8801assert(cons !=
NULL);
8802assert(separated !=
NULL);
8803assert(cutoff !=
NULL);
8805*separated =
FALSE;
8809assert(consdata !=
NULL);
8814 if( consdata->linkingconss ==
NULL)
8819 if( !consdata->covercuts )
8828 for(
r= 0;
r< consdata->nscoverrows; ++
r)
8834assert(consdata->scoverrows[
r] !=
NULL);
8840 if( minfeasibility > feasibility )
8842minfeasibility = feasibility;
8843row = consdata->scoverrows[
r];
8852 SCIPdebugMsg(
scip,
"cumulative constraint <%s> separated 1 cover cut with feasibility %g\n",
8859(*separated) =
TRUE;
8866 for(
r= 0;
r< consdata->nbcoverrows; ++
r)
8872assert(consdata->bcoverrows[
r] !=
NULL);
8878 if( minfeasibility > feasibility )
8880minfeasibility = feasibility;
8881row = consdata->bcoverrows[
r];
8890 SCIPdebugMsg(
scip,
"cumulative constraint <%s> separated 1 cover cut with feasibility %g\n",
8893assert(row !=
NULL);
8898(*separated) =
TRUE;
8926assert(nstarted > nfinished);
8929assert(consdata !=
NULL);
8930assert(consdata->nvars > 0);
8952 for( v = 0; v < nstarted - nfinished; ++v )
8998assert(cons !=
NULL);
9001assert(consdata !=
NULL);
9003nvars = consdata->nvars;
9009assert(consdata->vars !=
NULL);
9016 SCIPdebugMsg(
scip,
"create sorted event points for cumulative constraint <%s> with %d jobs\n",
9025freecapacity = consdata->capacity;
9026hmin = consdata->hmin;
9027hmax = consdata->hmax;
9030 for( j = 0; j < nvars && !(*cutoff); ++j )
9032curtime = starttimes[j];
9034 if( curtime >= hmax )
9041 addEndingJobDemands(consdata, curtime, endtimes, endindices, &freecapacity, &endindex, nvars);
9043assert(freecapacity <= consdata->capacity);
9044assert(endindex <= nvars);
9050 if( freecapacity < 0 && curtime >= hmin)
9091assert(cons !=
NULL);
9094assert(consdata !=
NULL);
9096nvars = consdata->nvars;
9102assert(consdata->vars !=
NULL);
9103capacity = consdata->capacity;
9106 for( j = 0; j < nvars; ++j )
9108 if( consdata->demands[j] > capacity )
9131assert(cons !=
NULL);
9134assert(consdata !=
NULL);
9136 if( consdata->nvars == 0 )
9143 else if( consdata->nvars == 1 )
9145 if( consdata->demands[0] > consdata->capacity )
9179assert(cons !=
NULL);
9182assert(consdata !=
NULL);
9184hmin = consdata->hmin;
9185hmax = consdata->hmax;
9187 SCIPdebugMsg(
scip,
"check for irrelevant jobs within cumulative constraint <%s>[%d,%d)\n",
9190 for( j = consdata->nvars-1; j >= 0; --j )
9192var = consdata->vars[j];
9193demand = consdata->demands[j];
9194duration = consdata->durations[j];
9200 if( demand == 0 || duration == 0 )
9209 else if( est >= hmax || lct <= hmin )
9211 SCIPdebugMsg(
scip,
" remove variable <%s>[%d,%d] with duration <%d>\n",
9245assert(consdata->durations[pos] > 0);
9246assert(consdata->demands[pos] > 0);
9248var = consdata->vars[pos];
9249assert(var !=
NULL);
9250duration = consdata->durations[pos];
9253 SCIPdebugMsg(
scip,
" variable <%s>: demand <%d> is larger than the capacity <%d>\n",
9254 SCIPvarGetName(var), consdata->demands[pos], consdata->capacity);
9261 if( ect - duration >= consdata->hmax || lst + duration <= consdata->hmin)
9264 if( ect > consdata->hmin && lst < consdata->hmax )
9269 else if( lst < consdata->hmax )
9277 else if( ect > consdata->hmin )
9302leftbound = consdata->hmin - duration;
9303rightbound = consdata->hmax;
9309boundtuple[1] = (
SCIP_Real)rightbound;
9347assert(consdata !=
NULL);
9353capacity = consdata->capacity;
9355 for( j = consdata->nvars-1; j >= 0 && !(*cutoff); --j )
9357 if( consdata->demands[j] > capacity )
9394assert(uplock ==
TRUE|| uplock ==
FALSE);
9395assert((
int)
TRUE== 1);
9396assert((
int)
FALSE== 0);
9413assert(!infeasible);
9446assert(downlock ==
TRUE|| downlock ==
FALSE);
9447assert((
int)
TRUE== 1);
9448assert((
int)
FALSE== 0);
9460assert(!infeasible);
9487 if( *capacity == 1 || nvars <= 1 )
9490assert(demands[nvars-1] <= *capacity);
9491assert(demands[nvars-2] <= *capacity);
9494mindemand1 =
MIN(demands[nvars-1], demands[nvars-2]);
9495mindemand2 =
MAX(demands[nvars-1], demands[nvars-2]);
9497 for( v = nvars-2; v >= 0 && (gcd >= 2 || mindemand1 + mindemand2 > *capacity); --v )
9499assert(mindemand1 <= mindemand2);
9500assert(demands[v] <= *capacity);
9504 if( mindemand1 > demands[v] )
9506mindemand2 = mindemand1;
9507mindemand1 = demands[v];
9509 else if( mindemand2 > demands[v] )
9510mindemand2 = demands[v];
9513 if( mindemand1 + mindemand2 > *capacity )
9515 SCIPdebugMsg(
scip,
"update cumulative condition (%d + %d > %d) to unary cumulative condition\n", mindemand1, mindemand2, *capacity);
9517 for( v = 0; v < nvars; ++v )
9522(*nchgcoefs) += nvars;
9525 else if( gcd >= 2 )
9529 for( v = 0; v < nvars; ++v )
9530demands[v] /= (
int) gcd;
9532(*capacity) /= (int) gcd;
9534(*nchgcoefs) += nvars;
9554assert(nchgcoefs !=
NULL);
9555assert(nchgsides !=
NULL);
9559assert(consdata !=
NULL);
9561 if( consdata->normalized )
9564capacity = consdata->capacity;
9570consdata->normalized =
TRUE;
9572 if( capacity > consdata->capacity )
9573consdata->varbounds =
FALSE;
9629 for( t = 0; t < ntimepoints; ++t )
9632 if( timepoints[t] <= *hmin )
9636 if( timepoints[t] >= *hmax )
9642 if( loads[t] <= capacity )
9644(*split) = timepoints[t];
9697initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
9726assert(consdata !=
NULL);
9728 if( consdata->nvars <= 1 )
9732consdata->durations, consdata->demands, consdata->capacity, &hmin, &hmax, &split) );
9735 if( consdata->hmin < hmin )
9739consdata->hmin = hmin;
9744 if( consdata->hmax > hmax )
9747consdata->hmax = hmax;
9752 if( consdata->hmax <= consdata->hmin )
9754 SCIPdebugMsg(
scip,
"constraint <%s> is redundant since hmax(%d) <= hmin(%d)\n",
9760 else if( consdata->hmin < split && split < consdata->hmax )
9765 SCIPdebugMsg(
scip,
"split cumulative constraint <%s>[%d,%d) with %d jobs at time point %d\n",
9766 SCIPconsGetName(cons), consdata->hmin, consdata->hmax, consdata->nvars, split);
9768assert(split < consdata->hmax);
9772consdata->durations, consdata->demands, consdata->capacity, split, consdata->hmax,
9777consdata->hmax = split;
9779assert(consdata->hmin < consdata->hmax);
9857assert(cons !=
NULL);
9859 SCIPdebugMsg(
scip,
"check for irrelevant variable for cumulative condition (hmin %d) w.r.t. earlier start time\n", hmin);
9861firstminect = INT_MAX;
9862secondminect = INT_MAX;
9865 for( v = 0; v < nvars; ++v )
9871 if( ect < firstminect )
9873secondminect = firstminect;
9876 else if( ect < secondminect )
9881 for( v = 0; v < nvars; ++v )
9894assert(var !=
NULL);
9896duration = durations[v];
9897assert(duration > 0);
9903ect = est + duration;
9905lct = lst + duration;
9908 if( ect == firstminect )
9909minect = secondminect;
9911minect = firstminect;
9914alternativelb =
MAX(hmin+1, minect);
9915alternativelb =
MIN(alternativelb, hmax);
9922 SCIPdebugMsg(
scip,
" variable <%s>[%g,%g] with duration <%d> is irrelevant\n",
9926irrelevants[v] =
TRUE;
9937assert(downlocks !=
NULL);
9938assert(uplocks !=
NULL);
9949 SCIPdebugMsg(
scip,
" variables <%s>[%d,%d] (duration <%d>) is irrelevant due to no up lock\n",
9953irrelevants[v] =
TRUE;
9961 SCIPdebugMsg(
scip,
" remove down lock of variable <%s>[%g,%g] with duration <%d>\n",
9965downlocks[v] =
FALSE;
9972 else if( ect <= hmin )
9990 SCIPdebugMsg(
scip,
" variable <%s>[%d,%d] with duration <%d> is irrelevant due to dual fixing wrt EST\n",
9997irrelevants[v] =
TRUE;
10005assert(downlocks !=
NULL);
10020 if( alternativelb > lst )
10026assert(!infeasible);
10045downimpllbs, downimplubs, downproplbs, downpropubs, upimpllbs, upimplubs, upproplbs, uppropubs,
10046nfixedvars, &success, cutoff) );
10057 SCIPdebugMsg(
scip,
"********* check variable <%s>[%g,%g] with duration <%d> (hmin %d)\n",
10142assert(cons !=
NULL);
10144 SCIPdebugMsg(
scip,
"check for irrelevant variable for cumulative condition (hmax %d) w.r.t. latest completion time\n", hmax);
10146firstmaxlst = INT_MIN;
10147secondmaxlst = INT_MIN;
10150 for( v = 0; v < nvars; ++v )
10156 if( lst > firstmaxlst )
10158secondmaxlst = firstmaxlst;
10161 else if( lst > secondmaxlst )
10162secondmaxlst = lst;
10166 for( v = 0; v < nvars; ++v )
10178assert(var !=
NULL);
10180duration = durations[v];
10181assert(duration > 0);
10187ect = est + duration;
10191 if( lst == firstmaxlst )
10192maxlst = secondmaxlst;
10194maxlst = firstmaxlst;
10197alternativeub =
MIN(hmax - 1, maxlst) - duration;
10198alternativeub =
MAX(alternativeub, hmin);
10205 SCIPdebugMsg(
scip,
" variable <%s>[%g,%g] with duration <%d> is irrelevant\n",
10209irrelevants[v] =
TRUE;
10216assert(downlocks !=
NULL);
10217assert(uplocks !=
NULL);
10223 if( !downlocks[v] )
10229 SCIPdebugMsg(
scip,
" variables <%s>[%d,%d] with duration <%d> is irrelevant due to no down lock\n",
10233irrelevants[v] =
TRUE;
10241 SCIPdebugMsg(
scip,
" remove up lock of variable <%s>[%g,%g] with duration <%d>\n",
10245uplocks[v] =
FALSE;
10252 else if( lst >= hmax )
10270 SCIPdebugMsg(
scip,
" variable <%s>[%d,%d] with duration <%d> is irrelevant due to dual fixing wrt LCT\n",
10277irrelevants[v] =
TRUE;
10285assert(uplocks !=
NULL);
10300 if( alternativeub < est )
10306assert(!infeasible);
10325downimpllbs, downimplubs, downproplbs, downpropubs, upimpllbs, upimplubs, upproplbs, uppropubs,
10326nfixedvars, &success, cutoff) );
10368assert(cons !=
NULL);
10369assert(!(*cutoff));
10372assert(consdata !=
NULL);
10374nvars = consdata->nvars;
10384consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
10385irrelevants, nfixedvars, nchgsides, cutoff) );
10389consdata->hmin, consdata->hmax, consdata->downlocks, consdata->uplocks, cons,
10390irrelevants, nfixedvars, nchgsides, cutoff) );
10395 for( v = nvars-1; v >= 0; --v )
10397 if( irrelevants[v] )
10403var = consdata->vars[v];
10404assert(var !=
NULL);
10410 if( lst <= consdata->hmin && ect >= consdata->hmax )
10412 if( consdata->capacity < consdata->demands[v] )
10418consdata->capacity -= consdata->demands[v];
10419consdata->varbounds =
FALSE;
10437 int* startindices,
10448assert(demands !=
NULL);
10449assert(ndemands !=
NULL);
10452startindex = nstarted - 1;
10457 while( nstarted - nfinished > ncountedvars )
10464varidx = startindices[startindex];
10465assert(varidx >= 0 && varidx < consdata->nvars);
10467var = consdata->vars[varidx];
10468assert(var !=
NULL);
10473 if( endtime > curtime )
10475 if( consdata->demands[varidx] < consdata->capacity )
10477(*demands)[*ndemands] = consdata->demands[varidx];
10494 int* startindices,
10509assert(nstarted > nfinished);
10512assert(consdata !=
NULL);
10513assert(consdata->nvars > 0);
10514assert(consdata->capacity > 0);
10520 collectDemands(
scip, consdata, startindices, curtime, nstarted, nfinished, &demands, &ndemands);
10525 for( j = 0; j < ndemands; ++j )
10562 int* startindices;
10575assert(cons !=
NULL);
10576assert(nchgsides !=
NULL);
10579assert(consdata !=
NULL);
10581nvars = consdata->nvars;
10584 if( nvars <= 1 || consdata->capacity <= 1 )
10587assert(consdata->vars !=
NULL);
10589 SCIPdebugMsg(
scip,
"try to tighten capacity for cumulative constraint <%s> with capacity %d\n",
10599starttimes, endtimes, startindices, endindices,
FALSE);
10603freecapacity = consdata->capacity;
10606 for( j = 0; j < nvars && bestcapacity < consdata->capacity; ++j )
10608curtime = starttimes[j];
10615 addEndingJobDemands(consdata, curtime, endtimes, endindices, &freecapacity, &endindex, nvars);
10617assert(freecapacity <= consdata->capacity);
10618assert(endindex <= nvars);
10624 if( freecapacity < 0 )
10634bestcapacity =
MAX(bestcapacity, newcapacity);
10635 SCIPdebugMsg(
scip,
"after highest cap usage: bestcapacity = %d\n", bestcapacity);
10639 if( freecapacity > 0 && freecapacity != consdata->capacity )
10641bestcapacity =
MAX(bestcapacity, consdata->capacity - freecapacity);
10642 SCIPdebugMsg(
scip,
"after peak < cap: bestcapacity = %d\n", bestcapacity);
10646 if( freecapacity == 0 && consdata->demands[startindices[j]] < consdata->capacity)
10649 SCIPdebugMsg(
scip,
"--> cannot decrease capacity since sum equals capacity\n");
10650bestcapacity = consdata->capacity;
10662 if( bestcapacity < consdata->capacity )
10664 SCIPdebug(
intoldnchgcoefs = *nchgcoefs; )
10666 SCIPdebugMsg(
scip,
"+-+-+-+-+-+ --> CHANGE capacity of cons<%s> from %d to %d\n",
10669 for( j = 0; j < nvars; ++j )
10671 if( consdata->demands[j] == consdata->capacity )
10673consdata->demands[j] = bestcapacity;
10678consdata->capacity = bestcapacity;
10683consdata->varbounds =
FALSE;
10707assert(cons !=
NULL);
10708assert(nchgcoefs !=
NULL);
10712assert(consdata !=
NULL);
10714nvars = consdata->nvars;
10715oldnchgcoefs = *nchgcoefs;
10724mindemand = consdata->demands[0];
10725 for( j = 0; j < nvars; ++j )
10727mindemand =
MIN(mindemand, consdata->demands[j]);
10731 for( j = 0; j < nvars; ++j )
10733 if( mindemand + consdata->demands[j] > consdata->capacity && consdata->demands[j] < consdata->capacity )
10736consdata->demands[j], consdata->capacity);
10737consdata->demands[j] = consdata->capacity;
10746 for( j = 0; j < nvars; ++j )
10753assert(consdata->demands[j] <= consdata->capacity);
10755 if( consdata->demands[j] == consdata->capacity )
10763 for( i = 0; i < nvars; ++i )
10774 if( est_i >= lct_j || est_j >= lct_i )
10777 if( consdata->demands[j] + consdata->demands[i] <= consdata->capacity )
10787consdata->demands[j], consdata->capacity);
10788consdata->demands[j] = consdata->capacity;
10793 if( (*nchgcoefs) > oldnchgcoefs )
10795 SCIPdebugMsg(
scip,
"+-+-+-+-+-+changed %d coefficients of variables of cumulative constraint<%s>\n",
10802#ifdef SCIP_DISABLED_CODE 10820assert(cons !=
NULL);
10822nvars = consdata->nvars;
10825hmin = consdata->hmin;
10826hmax = consdata->hmax;
10827assert(hmin < hmax);
10829 for( v = 0; v < nvars; ++v )
10838var = consdata->vars[v];
10839assert(var !=
NULL);
10841duration = consdata->durations[v];
10844ect = est + duration;
10846lct = lst + duration;
10849assert(lst > hmin || ect < hmax);
10851 if( lst <= hmin && est < hmin - lct +
MIN(hmin, ect) )
10860shift = est - (hmin - lct +
MIN(hmin, ect));
10863duration = hmin - lct;
10874assert(!infeasible);
10875assert(!redundant);
10876assert(aggregated);
10879consdata->durations[v] = duration;
10880consdata->vars[v] = aggrvar;
10915assert(consdata !=
NULL);
10917capacity = consdata->capacity;
10919 if( capacity == 1 )
10926halfcapacity = capacity / 2;
10927mindemand = consdata->capacity;
10931 for( v = 0; v < consdata->nvars; ++v )
10933 if( consdata->demands[v] > halfcapacity )
10935vars[nvars] = consdata->vars[v];
10936demands[nvars] = 1;
10937durations[nvars] = consdata->durations[v];
10940mindemand =
MIN(mindemand, consdata->demands[v]);
10949 for( v = 0; v < consdata->nvars; ++v )
10951 if( consdata->demands[v] > halfcapacity )
10954 if( mindemand + consdata->demands[v] > capacity )
10956demands[nvars] = 1;
10957durations[nvars] = consdata->durations[v];
10958vars[nvars] = consdata->vars[v];
11031 if( conshdlrdata->normalize )
11043 if( conshdlrdata->coeftightening )
11054#ifdef SCIP_DISABLED_CODE 11068structTCLIQUE_Graph
11086assert(tcliquegraph !=
NULL);
11088 returntcliquegraph->nnodes;
11095assert(tcliquegraph !=
NULL);
11097 returntcliquegraph->weights;
11104assert(tcliquegraph !=
NULL);
11105assert(0 <= node1 && node1 < tcliquegraph->
nnodes);
11106assert(0 <= node2 && node2 < tcliquegraph->
nnodes);
11109 if( tcliquegraph->precedencematrix[node1][node2] || tcliquegraph->precedencematrix[node2][node1] )
11113 if( tcliquegraph->demandmatrix[node1][node2] )
11128assert(tcliquegraph !=
NULL);
11129assert(0 <= node && node < tcliquegraph->
nnodes);
11131assert(adjnodes !=
NULL);
11135 for( i = 0; i <
nnodes; i++ )
11138assert(0 <= nodes[i] && nodes[i] < tcliquegraph->nnodes);
11139assert(i == 0 || nodes[i-1] < nodes[i]);
11142 if( tcliqueIsedgeClique(tcliquegraph, node, nodes[i]) )
11145adjnodes[nadjnodes] = nodes[i];
11191 bound= (duration - vlbcoef) / (vlbcoef - 1.0);
11238vlbcoef = 1.0 / vubcoef;
11239vlbconst = -vubconst / vubcoef;
11257 if( (*idx) == -1 )
11271 if( tcliquegraph->size == tcliquegraph->nnodes )
11276tcliquegraph->size = size;
11284 for( v = 0; v < tcliquegraph->nnodes; ++v )
11290assert(tcliquegraph->nnodes < tcliquegraph->size);
11292pos = tcliquegraph->nnodes;
11295tcliquegraph->durations[pos] = 0;
11296tcliquegraph->weights[pos] = 0;
11297tcliquegraph->vars[pos] = var;
11307tcliquegraph->nnodes++;
11309 for( v = 0; v < tcliquegraph->nnodes; ++v )
11311tcliquegraph->precedencematrix[v][pos] = 0;
11312tcliquegraph->demandmatrix[v][pos] = 0;
11315(*idx) = tcliquegraph->nnodes;
11352 for( v = 0; v < nvars; ++v )
11363assert(var !=
NULL);
11368 if( tcliquegraph->durations[idx1] == 0 )
11376 for(
b= 0;
b< nvbdvars; ++
b)
11383 if( tcliquegraph->durations[idx2] == 0 )
11387tcliquegraph->precedencematrix[idx2][idx1] =
TRUE;
11395 for(
b= 0;
b< nvbdvars; ++
b)
11402 if( tcliquegraph->durations[idx2] == 0 )
11406tcliquegraph->precedencematrix[idx1][idx2] =
TRUE;
11409 for(
b= v+1;
b< nvars; ++
b)
11416 if( tcliquegraph->durations[idx2] == 0 )
11421tcliquegraph->precedencematrix[idx1][idx2] =
TRUE;
11425tcliquegraph->precedencematrix[idx2][idx1] =
TRUE;
11445 for( i = 0; i <
nnodes; ++i )
11447 for( j = 0; j <
nnodes; ++j )
11449 if( adjmatrix[i][j] )
11454 for( k = 0; k <
nnodes; ++k )
11456 if( adjmatrix[j][k] )
11457adjmatrix[i][k] =
TRUE;
11476 for( c = 0; c < nconss; ++c )
11486assert(consdata !=
NULL);
11488vars = consdata->vars;
11489demands = consdata->demands;
11491nvars = consdata->nvars;
11492capacity = consdata->capacity;
11497 for( i = 0; i < nvars; ++i )
11505 if( tcliquegraph->durations[idx1] == 0 || tcliquegraph->durations[idx1] > consdata->durations[i] )
11508 for( j = i+1; j < nvars; ++j )
11510assert(consdata->durations[j] > 0);
11512 if( demands[i] + demands[j] > capacity )
11525 if( est1 < consdata->hmin && est2 < consdata->hmin )
11532 if( lct1 > consdata->hmax && lct2 > consdata->hmax )
11537assert(idx1 != idx2);
11539 if( tcliquegraph->durations[idx2] == 0 || tcliquegraph->durations[idx2] > consdata->durations[j] )
11544assert(tcliquegraph->durations[idx1] > 0);
11545assert(tcliquegraph->durations[idx2] > 0);
11547tcliquegraph->demandmatrix[idx1][idx2] =
TRUE;
11548tcliquegraph->demandmatrix[idx2][idx1] =
TRUE;
11569assert(tcliquegraph !=
NULL);
11575 transitiveClosure(tcliquegraph->precedencematrix, tcliquegraph->ninarcs, tcliquegraph->noutarcs, tcliquegraph->nnodes);
11606 for( v = 0; v < ncliquenodes; ++v )
11608durations[v] = tcliquegraph->durations[cliquenodes[v]];
11609assert(durations[v] > 0);
11611vars[v] = tcliquegraph->vars[cliquenodes[v]];
11651 nnodes= tcliquegraph->nnodes;
11655 for( v = 0; v <
nnodes; ++v )
11657tcliquegraph->weights[v] = tcliquegraph->durations[v];
11668SCIPvarGetHashkey, SCIPvarIsHashkeyEq, SCIPvarGetHashkeyVal,
NULL) );
11677 if( tcliquegraph->durations[v] == 0 )
11687 for( c = 0; c <
nnodes; ++c )
11689precedencerow[c] = tcliquegraph->precedencematrix[v][c];
11690precedencecol[c] = tcliquegraph->precedencematrix[c][v];
11692demandrow[c] = tcliquegraph->demandmatrix[v][c];
11693demandcol[c] = tcliquegraph->demandmatrix[c][v];
11695tcliquegraph->precedencematrix[c][v] =
FALSE;
11696tcliquegraph->precedencematrix[v][c] =
FALSE;
11700 tcliqueMaxClique(tcliqueGetnnodesClique, tcliqueGetweightsClique, tcliqueIsedgeClique, tcliqueSelectadjnodesClique,
11701tcliquegraph, tcliqueNewsolClique,
NULL,
11702cliquenodes, &ncliquenodes, &cliqueweight, 1, 1,
1170310000, 1000, 1000, v, &ntreenodes, &tcliquestatus);
11705 SCIPdebugMsg(
scip,
"tree nodes %d clique size %d (weight %d, status %d)\n", ntreenodes, ncliquenodes, cliqueweight, tcliquestatus);
11707 if( ncliquenodes == 1 )
11717 for( c = 0; c < ncliquenodes; ++c )
11723 for( c = 0; c <
nnodes; ++c )
11725tcliquegraph->precedencematrix[v][c] = precedencerow[c];
11726tcliquegraph->precedencematrix[c][v] = precedencecol[c];
11728tcliquegraph->demandmatrix[v][c] = demandrow[c];
11729tcliquegraph->demandmatrix[c][v] = demandcol[c];
11741(*naddconss) += nconss;
11797 if( !tcliquegraph->precedencematrix[source][sink] )
11800 nnodes= tcliquegraph->nnodes;
11801vars = tcliquegraph->vars;
11811 for( i = 0; i <
nnodes; ++i )
11817assert(var !=
NULL);
11819duration = tcliquegraph->durations[i];
11821 if( i == source || i == sink )
11824tcliquegraph->weights[i] = 0;
11826 else if( tcliquegraph->precedencematrix[source][i] && tcliquegraph->precedencematrix[i][sink] )
11829tcliquegraph->weights[i] = duration;
11835tcliquegraph->weights[i] = duration;
11838tcliquegraph->weights[i] = 0;
11844 tcliqueMaxClique(tcliqueGetnnodesClique, tcliqueGetweightsClique, tcliqueIsedgeClique, tcliqueSelectadjnodesClique,
11845tcliquegraph, tcliqueNewsolClique,
NULL,
11846cliquenodes, &ncliquenodes, &cliqueweight, 1, 1,
1184710000, 1000, 1000, -1, &ntreenodes, &tcliquestatus);
11849 if( ncliquenodes > 1 )
11860distance = cliqueweight + tcliquegraph->durations[source];
11891 nnodes= tcliquegraph->nnodes;
11901 for( i = 0; i <
nnodes; ++i )
11903 if( tcliquegraph->ninarcs[i] == 0 )
11905sources[nsources] = i;
11909 if( tcliquegraph->ninarcs[i] == 0 )
11932(*naddconss) += nconss;
11955 for( c = 0; c < nconss; ++c )
11963assert(consdata !=
NULL);
11965vars = consdata->vars;
11966nvars = consdata->nvars;
11968 for( v = 0; v < nvars; ++v )
11979tcliquegraph->durations[idx] =
MAX(tcliquegraph->durations[idx], consdata->durations[v]);
11980assert(tcliquegraph->durations[idx] > 0);
12037 for( v = 0; v < nvars; ++v )
12042assert(var !=
NULL);
12055(*tcliquegraph)->nnodes = nvars;
12056(*tcliquegraph)->varmap = varmap;
12057(*tcliquegraph)->precedencematrix = precedencematrix;
12058(*tcliquegraph)->demandmatrix = demandmatrix;
12059(*tcliquegraph)->weights = weights;
12060(*tcliquegraph)->ninarcs = ninarcs;
12061(*tcliquegraph)->noutarcs = noutarcs;
12062(*tcliquegraph)->durations = durations;
12063(*tcliquegraph)->size = nvars;
12077 for( v = (*tcliquegraph)->nnodes-1; v >= 0; --v )
12119 if( conshdlrdata->detectvarbounds )
12125 if( conshdlrdata->detectdisjunctive )
12146 if( consdata->validsignature )
12149vars = consdata->vars;
12150nvars = consdata->nvars;
12152 for( v = 0; v < nvars; ++v )
12154consdata->signature |= ((
unsignedint)1 << ((
unsigned int)
SCIPvarGetIndex(vars[v]) % (
sizeof(
unsignedint) * 8)));
12157consdata->validsignature =
TRUE;
12166assert(consdata !=
NULL);
12167assert(0 <= ind1 && ind1 < consdata->nvars);
12168assert(0 <= ind2 && ind2 < consdata->nvars);
12170 return SCIPvarCompare(consdata->vars[ind1], consdata->vars[ind2]);
12185 for( i = 0; i < nconss; ++i )
12191assert(cons0 !=
NULL);
12194assert(consdata0 !=
NULL);
12197assert(consdata0->validsignature);
12199 for( j = i+1; j < nconss; ++j )
12205assert(cons1 !=
NULL);
12208assert(consdata1 !=
NULL);
12210 if( consdata0->capacity != consdata1->capacity )
12214assert(consdata1->validsignature);
12216 if( (consdata1->signature & (~consdata0->signature)) == 0 )
12220assert((consdata0->signature & (~consdata1->signature)) == 0);
12223 if( (consdata0->signature & (~consdata1->signature)) == 0 )
12230 if( consdata0->nvars > consdata1->nvars )
12233 if( consdata0->hmin < consdata1->hmin )
12236 if( consdata0->hmax > consdata1->hmax )
12243 SCIPsort(perm0, consdataCompVar, (
void*)consdata0, consdata0->nvars);
12244 SCIPsort(perm1, consdataCompVar, (
void*)consdata1, consdata1->nvars);
12246 for( v0 = 0, v1 = 0; v0 < consdata0->nvars && v1 < consdata1->nvars; )
12257var0 = consdata0->vars[idx0];
12259var1 = consdata1->vars[idx1];
12270demand0 = consdata0->demands[idx0];
12271duration0 = consdata0->durations[idx0];
12273demand1 = consdata1->demands[idx1];
12274duration1 = consdata1->durations[idx1];
12276 if( demand0 != demand1 )
12279 if( duration0 != duration1 )
12285 else if( comp > 0 )
12291 if( v0 == consdata0->nvars )
12333assert(consdata !=
NULL);
12336 if( consdata->varbounds )
12339vars = consdata->vars;
12340durations = consdata->durations;
12341demands = consdata->demands;
12342capacity = consdata->capacity;
12343nvars = consdata->nvars;
12357var = consdata->vars[i];
12358assert(var !=
NULL);
12365 for(
b= 0;
b< nvbdvars; ++
b)
12371 for( j = 0; j < nvars; ++j )
12373 if( vars[j] == vbdvars[
b] )
12394assert(!infeasible);
12396(*nchgbds) += nlocalbdchgs;
12403(*naddconss) += nconss;
12405consdata->varbounds =
TRUE;
12425assert(conshdlr !=
NULL);
12427assert(nconss == 0 || conss !=
NULL);
12428assert(result !=
NULL);
12430 if( solinfeasible )
12436 SCIPdebugMsg(
scip,
"constraint enforcing %d useful cumulative constraints of %d constraints for %s solution\n", nusefulconss, nconss,
12437sol ==
NULL?
"LP":
"relaxation");
12440assert(conshdlrdata !=
NULL);
12444 if( conshdlrdata->usebinvars )
12450separated =
FALSE;
12453 for( c = 0; c < nusefulconss; ++c )
12459assert(cons !=
NULL);
12474 for( ; c < nconss && !separated; ++c )
12480assert(cons !=
NULL);
12519assert(conshdlr !=
NULL);
12538assert(conshdlr !=
NULL);
12542assert(conshdlrdata !=
NULL);
12544#ifdef SCIP_STATISTIC 12545 if( !conshdlrdata->iscopy )
12549conshdlrdata->nlbtimetable, conshdlrdata->nubtimetable, conshdlrdata->ncutofftimetable);
12551conshdlrdata->nlbedgefinder, conshdlrdata->nubedgefinder, conshdlrdata->ncutoffedgefinder);
12553conshdlrdata->ncutoffoverload, conshdlrdata->ncutoffoverloadTTEF);
12573assert(conshdlrdata !=
NULL);
12575conshdlrdata->detectedredundant =
FALSE;
12577 for( c = 0; c < nconss; ++c )
12590#ifdef SCIP_STATISTIC 12598assert(conshdlrdata !=
NULL);
12600 for( c = 0; c < nconss; ++c )
12604#ifdef SCIP_DISABLED_CODE 12609 if( !conshdlrdata->iscopy )
12611 SCIPstatisticPrintf(
"@11 added variables bounds constraints %d\n", conshdlrdata->naddedvarbounds);
12612 SCIPstatisticPrintf(
"@22 added disjunctive constraints %d\n", conshdlrdata->naddeddisjunctives);
12634assert(conshdlr !=
NULL);
12638 for( c = 0; c < nconss; ++c )
12641assert(consdata !=
NULL);
12654assert(conshdlr !=
NULL);
12656assert(consdata !=
NULL);
12657assert(*consdata !=
NULL);
12665assert(conshdlrdata !=
NULL);
12684assert(conshdlr !=
NULL);
12686assert(sourcecons !=
NULL);
12687assert(targetcons !=
NULL);
12690assert(sourcedata !=
NULL);
12691assert(sourcedata->demandrows ==
NULL);
12697assert(conshdlrdata !=
NULL);
12698assert(conshdlrdata->eventhdlr !=
NULL);
12702sourcedata->durations, sourcedata->demands, sourcedata->nvars, sourcedata->capacity,
12726assert(conshdlr !=
NULL);
12728assert(conshdlrdata !=
NULL);
12730*infeasible =
FALSE;
12732 SCIPdebugMsg(
scip,
"initialize LP relaxation for %d cumulative constraints\n", nconss);
12734 if( conshdlrdata->usebinvars )
12737 for( c = 0; c < nconss && !(*infeasible); ++c )
12742 if( conshdlrdata->cutsasconss )
12766assert(conshdlr !=
NULL);
12768assert(nconss == 0 || conss !=
NULL);
12769assert(result !=
NULL);
12771assert(conshdlrdata !=
NULL);
12773 SCIPdebugMsg(
scip,
"separating %d/%d cumulative constraints\n", nusefulconss, nconss);
12776separated =
FALSE;
12784 if( conshdlrdata->usebinvars )
12787 for( c = 0; c < nusefulconss && !cutoff; ++c )
12792 if( !cutoff && conshdlrdata->usecovercuts )
12794 for( c = 0; c < nusefulconss; ++c )
12801 if( conshdlrdata->sepaold )
12804 for( c = 0; c < nusefulconss; ++c )
12813 else if( separated )
12828assert(conshdlr !=
NULL);
12830assert(nconss == 0 || conss !=
NULL);
12831assert(result !=
NULL);
12834assert(conshdlrdata !=
NULL);
12839 SCIPdebugMsg(
scip,
"separating %d/%d cumulative constraints\n", nusefulconss, nconss);
12842separated =
FALSE;
12845 if( conshdlrdata->usebinvars )
12848 for( c = 0; c < nusefulconss && !cutoff; ++c )
12853 if( !cutoff && conshdlrdata->usecovercuts )
12855 for( c = 0; c < nusefulconss; ++c )
12861 if( conshdlrdata->sepaold )
12864 for( c = 0; c < nusefulconss; ++c )
12873 else if( separated )
12905assert(conshdlr !=
NULL);
12907assert(nconss == 0 || conss !=
NULL);
12908assert(result !=
NULL);
12910 if( objinfeasible )
12919assert(conshdlrdata !=
NULL);
12932assert(conshdlr !=
NULL);
12934assert(nconss == 0 || conss !=
NULL);
12935assert(result !=
NULL);
12941 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE|| completely); ++c )
12964 SCIPdebugMsg(
scip,
"propagate %d of %d useful cumulative constraints\n", nusefulconss, nconss);
12966assert(conshdlr !=
NULL);
12968assert(nconss == 0 || conss !=
NULL);
12969assert(result !=
NULL);
12972assert(conshdlrdata !=
NULL);
12980 for( c = 0; c < nusefulconss && !cutoff; ++c )
12985assert(cons !=
NULL);
12990&nchgbds, &nchgbds, &ndelconss, &nchgbds, &nchgbds, &nchgbds, &cutoff, &cutoff) );
13002 if( !cutoff && nchgbds == 0 )
13005 for( c = nusefulconss; c < nconss && !cutoff; ++c )
13016 else if( nchgbds > 0 )
13018 SCIPdebugMsg(
scip,
"delete (locally) %d constraints and changed %d variable bounds\n", ndelconss, nchgbds);
13044assert(conshdlr !=
NULL);
13047assert(result !=
NULL);
13052assert(conshdlrdata !=
NULL);
13056oldnfixedvars = *nfixedvars;
13057oldnchgbds = *nchgbds;
13058oldnchgsides = *nchgsides;
13059oldnchgcoefs = *nchgcoefs;
13060oldnupgdconss = *nupgdconss;
13061oldndelconss = *ndelconss;
13062oldnaddconss = *naddconss;
13064unbounded =
FALSE;
13067 for( c = 0; c < nconss && !cutoff; ++c )
13079nfixedvars, nchgbds, ndelconss, naddconss, nchgcoefs, nchgsides, &cutoff, &unbounded) );
13081 if( cutoff || unbounded )
13089 if( nrounds == 1 &&
SCIPgetNRuns(
scip) == 1 && conshdlrdata->disjunctive )
13111 if( !cutoff &&
SCIPgetNRuns(
scip) == 1 && !conshdlrdata->detectedredundant
13112&& (conshdlrdata->detectvarbounds || conshdlrdata->detectdisjunctive)
13119conshdlrdata->detectedredundant =
TRUE;
13127 SCIPdebugMsg(
scip,
"delete %d constraints and changed %d variable bounds (cutoff %u)\n",
13128*ndelconss - oldndelconss, *nchgbds - oldnchgbds, cutoff);
13132 else if( unbounded )
13134 else if( *nchgbds > oldnchgbds || *nfixedvars > oldnfixedvars || *nchgsides > oldnchgsides
13135|| *nchgcoefs > oldnchgcoefs || *nupgdconss > oldnupgdconss || *ndelconss > oldndelconss || *naddconss > oldnaddconss )
13150assert(conshdlr !=
NULL);
13153assert(result !=
NULL);
13154assert(infervar !=
NULL);
13155assert(bdchgidx !=
NULL);
13158assert(conshdlrdata !=
NULL);
13161assert(cons !=
NULL);
13164assert(consdata !=
NULL);
13166 SCIPdebugMsg(
scip,
"resolve propagation: variable <%s>, cumulative constraint <%s> (capacity %d, propagation %d, H=[%d,%d))\n",
13171consdata->durations, consdata->demands, consdata->capacity, consdata->hmin, consdata->hmax,
13172infervar,
intToInferInfo(inferinfo), boundtype, bdchgidx, relaxedbd, conshdlrdata->usebdwidening,
NULL, result) );
13188assert(cons !=
NULL);
13192assert(consdata !=
NULL);
13194vars = consdata->vars;
13195assert(vars !=
NULL);
13197 for( v = 0; v < consdata->nvars; ++v )
13199 if( consdata->downlocks[v] && consdata->uplocks[v] )
13204 else if( consdata->downlocks[v] )
13208 else if( consdata->uplocks[v] )
13223assert(conshdlr !=
NULL);
13224assert(cons !=
NULL);
13238 const char* consname;
13244assert(sourceconsdata !=
NULL);
13247nvars = sourceconsdata->nvars;
13248sourcevars = sourceconsdata->vars;
13258 for( v = 0; v < nvars && *valid; ++v )
13261assert(!(*valid) || vars[v] !=
NULL);
13267 if( name !=
NULL)
13274sourceconsdata->durations, sourceconsdata->demands, sourceconsdata->capacity,
13275initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
13278 if( sourceconsdata->hmin > 0 )
13284 if( sourceconsdata->hmax < INT_MAX )
13338endptr = strchr(endptr,
')');
13340 if( endptr ==
NULL)
13350duration = atoi(strvalue);
13354demand = atoi(strvalue);
13360demands[nvars] = demand;
13361durations[nvars] = duration;
13364 while( *str !=
')');
13370hmin = atoi(strvalue);
13375hmax = (int)(value);
13383capacity = (int)value;
13387initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
13411assert(consdata !=
NULL);
13413 if( varssize < consdata->nvars )
13414(*success) =
FALSE;
13417assert(vars !=
NULL);
13420(*success) =
TRUE;
13433assert(consdata !=
NULL);
13435(*nvars) = consdata->nvars;
13436(*success) =
TRUE;
13456assert(eventhdlr !=
NULL);
13457assert(eventdata !=
NULL);
13459assert(event !=
NULL);
13462assert(consdata !=
NULL);
13465consdata->propagated =
FALSE;
13494consEnfolpCumulative, consEnfopsCumulative, consCheckCumulative, consLockCumulative,
13497assert(conshdlr !=
NULL);
13502#ifdef SCIP_STATISTIC 13526 "should time-table (core-times) propagator be used to infer bounds?",
13530 "should edge-finding be used to detect an overload?",
13534 "should edge-finding be used to infer bounds?",
13537 "constraints/" CONSHDLR_NAME "/useadjustedjobs",
"should edge-finding be executed?",
13541 "should time-table edge-finding be used to detect an overload?",
13545 "should time-table edge-finding be used to infer bounds?",
13549 "constraints/" CONSHDLR_NAME "/usebinvars",
"should the binary representation be used?",
13552 "constraints/" CONSHDLR_NAME "/localcuts",
"should cuts be added only locally?",
13555 "constraints/" CONSHDLR_NAME "/usecovercuts",
"should covering cuts be added every node?",
13559 "should the cumulative constraint create cuts as knapsack constraints?",
13563 "shall old sepa algo be applied?",
13567 "constraints/" CONSHDLR_NAME "/fillbranchcands",
"should branching candidates be added to storage?",
13572 "constraints/" CONSHDLR_NAME "/dualpresolve",
"should dual presolving be applied?",
13575 "constraints/" CONSHDLR_NAME "/coeftightening",
"should coefficient tightening be applied?",
13578 "constraints/" CONSHDLR_NAME "/normalize",
"should demands and capacity be normalized?",
13582 "should pairwise constraint comparison be performed in presolving?",
13585 "constraints/" CONSHDLR_NAME "/disjunctive",
"extract disjunctive constraints?",
13590 "number of branch-and-bound nodes to solve an independent cumulative constraint (-1: no limit)?",
13593 "constraints/" CONSHDLR_NAME "/detectdisjunctive",
"search for conflict set via maximal cliques to detect disjunctive constraints",
13596 "constraints/" CONSHDLR_NAME "/detectvarbounds",
"search for conflict set via maximal cliques to detect variable bound constraints",
13601 "constraints/" CONSHDLR_NAME "/usebdwidening",
"should bound widening be used during the conflict analysis?",
13649 if( conshdlr ==
NULL)
13655 SCIPdebugMsg(
scip,
"create cumulative constraint <%s> with %d jobs\n", name, nvars);
13658 SCIP_CALL(
consdataCreate(
scip, &consdata, vars,
NULL, durations, demands, nvars, capacity, 0, INT_MAX, check) );
13662initial, separate, enforce, check, propagate,
13663local, modifiable, dynamic, removable, stickingatnode) );
13671assert(conshdlrdata !=
NULL);
13672assert(conshdlrdata->eventhdlr !=
NULL);
13723assert(consdata !=
NULL);
13725assert(hmin <= consdata->hmax);
13727consdata->hmin = hmin;
13747assert(consdata !=
NULL);
13749 returnconsdata->hmin;
13768assert(consdata !=
NULL);
13769assert(hmax >= consdata->hmin);
13771consdata->hmax = hmax;
13791assert(consdata !=
NULL);
13793 returnconsdata->hmax;
13812assert(consdata !=
NULL);
13814 returnconsdata->vars;
13833assert(consdata !=
NULL);
13835 returnconsdata->nvars;
13854assert(consdata !=
NULL);
13856 returnconsdata->capacity;
13875assert(consdata !=
NULL);
13877 returnconsdata->durations;
13896assert(consdata !=
NULL);
13898 returnconsdata->demands;
13920assert(violated !=
NULL);
13923violated, cons, printreason) );
13959hmin, hmax, split) );
13986irrelevants, nfixedvars, nchgsides, cutoff) );
13990irrelevants, nfixedvars, nchgsides, cutoff) );
14018assert(cons !=
NULL);
14019assert(initialized !=
NULL);
14020assert(*initialized ==
FALSE);
14021assert(cutoff !=
NULL);
14022assert(*cutoff ==
FALSE);
14026 if( conshdlr ==
NULL)
14033assert(conshdlrdata !=
NULL);
14035redundant =
FALSE;
14038nvars, vars, durations, demands, capacity, hmin, hmax, cons,
14039nchgbds, &redundant, initialized, explanation, cutoff) );
14064infervar,
intToInferInfo(inferinfo), boundtype, bdchgidx, relaxedbd,
TRUE, explanation, result) );
14087file = fopen(filename,
"w");
14090 if( file ==
NULL)
14098assert(consdata !=
NULL);
14100nvars = consdata->nvars;
14103SCIPvarGetHashkey, SCIPvarIsHashkeyEq, SCIPvarGetHashkeyVal,
NULL), TERMINATE );
14108 for( v = 0; v < nvars; ++v )
14112var = consdata->vars[v];
14113assert(var !=
NULL);
14119 else if( !consdata->downlocks[v] || !consdata->uplocks[v] )
14127 for( v = 0; v < nvars; ++v )
14133var = consdata->vars[v];
14134assert(var !=
NULL);
14139 for(
b= 0;
b< nvbdvars; ++
b)
14147#ifdef SCIP_MORE_OUTPUT 14152 for(
b= 0;
b< nvbdvars; ++
b)
14184 if( conshdlr ==
NULL)
14191assert(conshdlrdata !=
NULL);
14228(*infeasible) =
FALSE;
14229(*unbounded) =
FALSE;
14237 if( conshdlr ==
NULL)
14245assert(conshdlrdata !=
NULL);
14248 if( timelimit > 0.0 && memorylimit > 10 )
14250 SCIP_CALL( conshdlrdata->solveCumulative(njobs, ests, lsts, objvals, durations, demands, capacity,
14251hmin, hmax, timelimit, memorylimit, maxnodes, solved, infeasible, unbounded, error) );
14287 for( v = 0; v < nvars; ++v )
14289copydemands[v] = demands[v];
14295 for( v = 0; v < nvars; ++v )
14300assert(idx >= 0 && idx < nvars);
14303assert(var !=
NULL);
14305duration = durations[idx];
14306assert(duration > 0);
14314 if( impliedest < impliedlct )
14320assert(!infeasible);
14324 if( est == impliedest && lct == impliedlct )
14355 for( t = 0; t < ntimepoints - 1; ++t )
14358 if( loads[t] > capacity )
14360assert(t == 0 || loads[t-1] <= capacity);
14361 returntimepoints[t];
14385 for( t = ntimepoints - 1; t >= 0; --t )
14388 if( loads[t] > capacity )
14390assert(t == ntimepoints-1 || loads[t+1] <= capacity);
14391 returntimepoints[t+1];
static SCIP_RETCODE branch(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_RESULT *result)
static SCIP_RETCODE adjustOversizedJobBounds(SCIP *scip, SCIP_CONSDATA *consdata, int pos, int *nchgbds, int *naddconss, SCIP_Bool *cutoff)
static SCIP_DECL_CONSPROP(consPropCumulative)
static int inferInfoGetData1(INFERINFO inferinfo)
static SCIP_RETCODE createTcliqueGraph(SCIP *scip, TCLIQUE_GRAPH **tcliquegraph)
#define DEFAULT_USEBDWIDENING
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
static void createSortedEventpointsSol(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, int *durations, int *starttimes, int *endtimes, int *startindices, int *endindices)
static void createSortedEventpoints(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *starttimes, int *endtimes, int *startindices, int *endindices, SCIP_Bool local)
static void consdataCalcSignature(SCIP_CONSDATA *consdata)
static SCIP_RETCODE propagateUbTTEF(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, int *newlbs, int *newubs, int *lbinferinfos, int *ubinferinfos, int *lsts, int *flexenergies, int *perm, int *ests, int *lcts, int *coreEnergyAfterEst, int *coreEnergyAfterLct, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
#define DEFAULT_NORMALIZE
static PROPRULE inferInfoGetProprule(INFERINFO inferinfo)
static SCIP_RETCODE collectIntVars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR ***activevars, int *startindices, int curtime, int nstarted, int nfinished, SCIP_Bool lower, int *lhs)
static SCIP_RETCODE getActiveVar(SCIP *scip, SCIP_VAR **var, int *scalar, int *constant)
static SCIP_DECL_CONSINITPRE(consInitpreCumulative)
#define DEFAULT_DETECTVARBOUNDS
static SCIP_RETCODE createConsCumulative(SCIP *scip, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, 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)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE presolveConsEst(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)
#define DEFAULT_TTEFINFER
static void subtractStartingJobDemands(SCIP_CONSDATA *consdata, int curtime, int *starttimes, int *startindices, int *freecapacity, int *idx, int nvars)
static SCIP_RETCODE varMayRoundUp(SCIP *scip, SCIP_VAR *var, SCIP_Bool *roundable)
#define DEFAULT_USECOVERCUTS
static SCIP_DECL_EVENTEXEC(eventExecCumulative)
static SCIP_Longint computeCoreWithInterval(int begin, int end, int ect, int lst)
static SCIP_RETCODE applyAlternativeBoundsFixing(SCIP *scip, SCIP_VAR **vars, int nvars, int *alternativelbs, int *alternativeubs, int *downlocks, int *uplocks, int *nfixedvars, SCIP_Bool *cutoff)
#define DEFAULT_LOCALCUTS
static SCIP_DECL_CONSCOPY(consCopyCumulative)
static TCLIQUE_ISEDGE(tcliqueIsedgeClique)
static SCIP_RETCODE checkOverloadViaThetaTree(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, SCIP_Bool propest, SCIP_Bool *initialized, SCIP_Bool *explanation, int *nchgbds, SCIP_Bool *cutoff)
#define DEFAULT_COEFTIGHTENING
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_PRESOLTIMING presoltiming, int *nchgbds, int *ndelconss, SCIP_Bool *cutoff)
static SCIP_RETCODE createPrecedenceCons(SCIP *scip, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, int distance)
static SCIP_Bool isConsIndependently(SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
static SCIP_DECL_CONSENFOPS(consEnfopsCumulative)
static SCIP_RETCODE separateConsOnIntegerVariables(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool lower, SCIP_Bool *separated, SCIP_Bool *cutoff)
static SCIP_RETCODE analyzeConflictOverload(SCIP *scip, SCIP_BTNODE **leaves, int capacity, int nleaves, int est, int lct, int reportedenergy, SCIP_Bool propest, int shift, SCIP_Bool usebdwidening, SCIP_Bool *initialized, SCIP_Bool *explanation)
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static void freeTcliqueGraph(SCIP *scip, TCLIQUE_GRAPH **tcliquegraph)
static SCIP_Bool checkDemands(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE createCoverCuts(SCIP *scip, SCIP_CONS *cons)
static void consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE tightenUbTTEF(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *var, int duration, int demand, int est, int lst, int lct, int begin, int end, SCIP_Longint energy, int *bestub, int *inferinfos, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
static SCIP_DECL_CONSCHECK(consCheckCumulative)
static SCIP_RETCODE propagateTimetable(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_PROFILE *profile, 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)
static SCIP_RETCODE computeImpliedEst(SCIP *scip, SCIP_VAR *var, SCIP_HASHMAP *addedvars, int *est)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
static SCIP_RETCODE collectBranchingCands(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, int *nbranchcands)
static SCIP_RETCODE presolveCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_PRESOLTIMING presoltiming, int *nfixedvars, int *nchgbds, int *ndelconss, int *naddconss, int *nchgcoefs, int *nchgsides, SCIP_Bool *cutoff, SCIP_Bool *unbounded)
static int computeEnergyContribution(SCIP_BTNODE *node)
#define DEFAULT_PRESOLPAIRWISE
static SCIP_RETCODE inferboundsEdgeFinding(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_BT *tree, SCIP_BTNODE **leaves, int capacity, int ncands, SCIP_Bool propest, int shift, SCIP_Bool *initialized, SCIP_Bool *explanation, int *nchgbds, SCIP_Bool *cutoff)
static SCIP_DECL_CONSENFORELAX(consEnforelaxCumulative)
static SCIP_RETCODE presolveConsEffectiveHorizon(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *nchgcoefs, int *nchgsides, SCIP_Bool *cutoff)
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE constraintNonOverlappingGraph(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE createCoreProfile(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_PROFILE *profile, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
static SCIP_DECL_SOLVECUMULATIVE(solveCumulativeViaScipCp)
static SCIP_RETCODE consCheckRedundancy(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool *redundant)
static SCIP_RETCODE detectRedundantConss(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, int *naddconss)
static SCIP_DECL_SORTPTRCOMP(compNodeEst)
static SCIP_RETCODE getNodeIdx(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, SCIP_VAR *var, int *idx)
static SCIP_RETCODE computeAlternativeBounds(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool local, int *alternativelbs, int *alternativeubs, int *downlocks, int *uplocks)
static SCIP_RETCODE removeRedundantConss(SCIP *scip, SCIP_CONS **conss, int nconss, int *ndelconss)
static SCIP_RETCODE findPrecedenceConss(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, int *naddconss)
static SCIP_RETCODE fixIntegerVariableUb(SCIP *scip, SCIP_VAR *var, SCIP_Bool uplock, int *nfixedvars)
static SCIP_RETCODE createCapacityRestriction(SCIP *scip, SCIP_CONS *cons, int *startindices, int curtime, int nstarted, int nfinished, SCIP_Bool cutsasconss)
#define DEFAULT_DETECTDISJUNCTIVE
static void addEndingJobDemands(SCIP_CONSDATA *consdata, int curtime, int *endtimes, int *endindices, int *freecapacity, int *idx, int nvars)
static INFERINFO getInferInfo(PROPRULE proprule, int data1, int data2)
static SCIP_RETCODE setupAndSolveCumulativeSubscip(SCIP *subscip, SCIP_Real *objvals, int *durations, int *demands, int njobs, int capacity, int hmin, int hmax, SCIP_Longint maxnodes, SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *solved, SCIP_Bool *error)
static TCLIQUE_SELECTADJNODES(tcliqueSelectadjnodesClique)
static SCIP_DECL_CONSSEPALP(consSepalpCumulative)
static int computeOverlap(int begin, int end, int est, int lst, int duration)
static SCIP_Longint computeTotalEnergy(int *durations, int *demands, int njobs)
static SCIP_RETCODE strengthenVarbounds(SCIP *scip, SCIP_CONS *cons, int *nchgbds, int *naddconss)
static SCIP_RETCODE respropCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, INFERINFO inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_Bool usebdwidening, SCIP_Bool *explanation, SCIP_RESULT *result)
static SCIP_DECL_CONSRESPROP(consRespropCumulative)
static SCIP_RETCODE removeIrrelevantJobs(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSGETVARS(consGetVarsCumulative)
static INFERINFO intToInferInfo(int i)
static void createSelectedSortedEventpointsSol(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol, int *starttimes, int *endtimes, int *startindices, int *endindices, int *nvars, SCIP_Bool lower)
static void updateEnvelope(SCIP *scip, SCIP_BTNODE *node)
static SCIP_RETCODE propagateEdgeFinding(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, SCIP_Bool *initialized, SCIP_Bool *explanation, int *nchgbds, SCIP_Bool *cutoff)
static SCIP_DECL_SORTINDCOMP(compNodedataLct)
struct SCIP_NodeData SCIP_NODEDATA
#define DEFAULT_CUTSASCONSS
#define DEFAULT_DUALPRESOLVE
static SCIP_DECL_CONSGETNVARS(consGetNVarsCumulative)
static SCIP_RETCODE analyzeEnergyRequirement(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int begin, int end, SCIP_VAR *infervar, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_Bool usebdwidening, SCIP_Bool *explanation)
static SCIP_RETCODE applyAlternativeBoundsBranching(SCIP *scip, SCIP_VAR **vars, int nvars, int *alternativelbs, int *alternativeubs, int *downlocks, int *uplocks, SCIP_Bool *branched)
static SCIP_RETCODE applyProbingVar(SCIP *scip, SCIP_VAR **vars, int nvars, int probingpos, SCIP_Real leftub, SCIP_Real rightlb, SCIP_Real *leftimpllbs, SCIP_Real *leftimplubs, SCIP_Real *leftproplbs, SCIP_Real *leftpropubs, SCIP_Real *rightimpllbs, SCIP_Real *rightimplubs, SCIP_Real *rightproplbs, SCIP_Real *rightpropubs, int *nfixedvars, SCIP_Bool *success, SCIP_Bool *cutoff)
#define DEFAULT_TTEFCHECK
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyCumulative)
static void normalizeDemands(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides)
static SCIP_Bool inferInfoIsValid(INFERINFO inferinfo)
static void computeCoreEnergyAfter(SCIP_PROFILE *profile, int nvars, int *ests, int *lcts, int *coreEnergyAfterEst, int *coreEnergyAfterLct)
static SCIP_RETCODE consCapacityConstraintsFinder(SCIP *scip, SCIP_CONS *cons, SCIP_Bool cutsasconss)
static SCIP_DECL_CONSLOCK(consLockCumulative)
static SCIP_RETCODE createCumulativeCons(SCIP *scip, const char *name, TCLIQUE_GRAPH *tcliquegraph, int *cliquenodes, int ncliquenodes)
static void collectDataTTEF(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int hmin, int hmax, int *permests, int *ests, int *permlcts, int *lcts, int *ects, int *lsts, int *flexenergies)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_VAR **vars, SCIP_CONS **linkingconss, int *durations, int *demands, int nvars, int capacity, int hmin, int hmax, SCIP_Bool check)
static SCIP_RETCODE createCoverCutsTimepoint(SCIP *scip, SCIP_CONS *cons, int *startvalues, int time)
static SCIP_RETCODE tightenLbTTEF(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *var, int duration, int demand, int est, int ect, int lct, int begin, int end, SCIP_Longint energy, int *bestlb, int *inferinfos, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
static SCIP_RETCODE consdataDeletePos(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_CONS *cons, int pos)
static SCIP_RETCODE propagateAllConss(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool local, int *nfixedvars, SCIP_Bool *cutoff, SCIP_Bool *branched)
static SCIP_RETCODE presolveConsLct(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)
static int inferInfoGetData2(INFERINFO inferinfo)
static void traceThetaEnvelop(SCIP_BTNODE *node, SCIP_BTNODE **omegaset, int *nelements, int *est, int *lct, int *energy)
static SCIP_RETCODE propagateCumulativeCondition(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, 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 *redundant, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
static SCIP_RETCODE resolvePropagationCoretimes(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, int inferdemand, int inferpeak, int relaxedpeak, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool usebdwidening, int *provedpeak, SCIP_Bool *explanation)
static SCIP_RETCODE consdataDropAllEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
static TCLIQUE_GETWEIGHTS(tcliqueGetweightsClique)
static SCIP_RETCODE collectBinaryVars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR ***vars, int **coefs, int *nvars, int *startindices, int curtime, int nstarted, int nfinished)
#define DEFAULT_USEADJUSTEDJOBS
static SCIP_RETCODE projectVbd(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph)
static SCIP_DECL_CONSFREE(consFreeCumulative)
static SCIP_RETCODE createDisjuctiveCons(SCIP *scip, SCIP_CONS *cons, int *naddconss)
static SCIP_RETCODE deleteLambdaLeaf(SCIP *scip, SCIP_BT *tree, SCIP_BTNODE *node)
static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool cutsasconss)
static SCIP_RETCODE computeEffectiveHorizon(SCIP *scip, SCIP_CONS *cons, int *ndelconss, int *naddconss, int *nchgsides)
static SCIP_RETCODE enforceSolution(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool branch, SCIP_RESULT *result)
static SCIP_RETCODE deleteTrivilCons(SCIP *scip, SCIP_CONS *cons, int *ndelconss, SCIP_Bool *cutoff)
static SCIP_DECL_CONSPRINT(consPrintCumulative)
static SCIP_RETCODE computeMinDistance(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, int source, int sink, int *naddconss)
static SCIP_RETCODE varMayRoundDown(SCIP *scip, SCIP_VAR *var, SCIP_Bool *roundable)
static void collectDemands(SCIP *scip, SCIP_CONSDATA *consdata, int *startindices, int curtime, int nstarted, int nfinished, SCIP_Longint **demands, int *ndemands)
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE createCapacityRestrictionIntvars(SCIP *scip, SCIP_CONS *cons, int *startindices, int curtime, int nstarted, int nfinished, SCIP_Bool lower, SCIP_Bool *cutoff)
static SCIP_RETCODE computeImpliedLct(SCIP *scip, SCIP_VAR *var, int duration, SCIP_HASHMAP *addedvars, int *lct)
static SCIP_RETCODE findCumulativeConss(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, int *naddconss)
static SCIP_RETCODE tightenCoefs(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs)
static SCIP_RETCODE tightenCapacity(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides)
static SCIP_BTNODE * findResponsibleLambdaLeafTraceEnergy(SCIP_BTNODE *node)
static SCIP_RETCODE analyseInfeasibelCoreInsertion(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, int inferduration, int inferdemand, int inferpeak, SCIP_Bool usebdwidening, SCIP_Bool *initialized, SCIP_Bool *explanation)
static SCIP_RETCODE consdataFreeRows(SCIP *scip, SCIP_CONSDATA **consdata)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE initializeDurations(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, SCIP_CONS **conss, int nconss)
static SCIP_Bool impliesVlbPrecedenceCondition(SCIP *scip, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconst, int duration)
static SCIP_RETCODE separateCoverCutsCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *separated, SCIP_Bool *cutoff)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static TCLIQUE_GETNNODES(tcliqueGetnnodesClique)
static SCIP_DECL_CONSENFOLP(consEnfolpCumulative)
static SCIP_RETCODE coretimesUpdateLb(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, SCIP_PROFILE *profile, int idx, int *nchgbds, SCIP_Bool usebdwidening, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *infeasible)
static SCIP_RETCODE solveIndependentCons(SCIP *scip, SCIP_CONS *cons, SCIP_Longint maxnodes, int *nchgbds, int *nfixedvars, int *ndelconss, SCIP_Bool *cutoff, SCIP_Bool *unbounded)
static SCIP_DECL_CONSDELETE(consDeleteCumulative)
static void initializeLocks(SCIP_CONSDATA *consdata, SCIP_Bool locked)
static SCIP_BTNODE * findResponsibleLambdaLeafTraceEnvelop(SCIP_BTNODE *node)
static SCIP_RETCODE fixIntegerVariableLb(SCIP *scip, SCIP_VAR *var, SCIP_Bool downlock, int *nfixedvars)
#define CONSHDLR_EAGERFREQ
#define DEFAULT_USEBINVARS
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE coretimesUpdateUb(SCIP *scip, SCIP_VAR *var, int duration, int demand, int capacity, SCIP_CONS *cons, SCIP_PROFILE *profile, int idx, int *nchgbds)
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *violated, SCIP_Bool printreason)
static void collectThetaSubtree(SCIP_BTNODE *node, SCIP_BTNODE **omegaset, int *nelements, int *est, int *lct, int *energy)
static int computeEstOmegaset(SCIP *scip, int duration, int demand, int capacity, int est, int lct, int energy)
#define CONSHDLR_ENFOPRIORITY
struct InferInfo INFERINFO
static SCIP_RETCODE propagateTTEF(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_PROFILE *profile, 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)
static SCIP_RETCODE insertThetanode(SCIP *scip, SCIP_BT *tree, SCIP_BTNODE *node, SCIP_NODEDATA *nodedatas, int *nodedataidx, int *nnodedatas)
static SCIP_DECL_CONSPARSE(consParseCumulative)
static SCIP_DECL_CONSPRESOL(consPresolCumulative)
static void traceLambdaEnvelop(SCIP_BTNODE *node, SCIP_BTNODE **omegaset, int *nelements, int *est, int *lct, int *energy)
#define CONSHDLR_DELAYSEPA
static SCIP_RETCODE computePeak(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol, int *timepoint)
#define DEFAULT_FILLBRANCHCANDS
static SCIP_RETCODE consdataCollectLinkingCons(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE propagateLbTTEF(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, int *newlbs, int *newubs, int *lbinferinfos, int *ubinferinfos, int *ects, int *flexenergies, int *perm, int *ests, int *lcts, int *coreEnergyAfterEst, int *coreEnergyAfterLct, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
static void transitiveClosure(SCIP_Bool **adjmatrix, int *ninarcs, int *noutarcs, int nnodes)
static TCLIQUE_NEWSOL(tcliqueNewsolClique)
static SCIP_RETCODE getHighestCapacityUsage(SCIP *scip, SCIP_CONS *cons, int *startindices, int curtime, int nstarted, int nfinished, int *bestcapacity)
static SCIP_RETCODE constructIncompatibilityGraph(SCIP *scip, TCLIQUE_GRAPH *tcliquegraph, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE removeOversizedJobs(SCIP *scip, SCIP_CONS *cons, int *nchgbds, int *nchgcoefs, int *naddconss, SCIP_Bool *cutoff)
static SCIP_DECL_CONSINITLP(consInitlpCumulative)
static void updateKeyOnTrace(SCIP_BTNODE *node, SCIP_Real key)
static SCIP_DECL_CONSEXITSOL(consExitsolCumulative)
static int inferInfoToInt(INFERINFO inferinfo)
static SCIP_DECL_CONSSEPASOL(consSepasolCumulative)
static SCIP_RETCODE consdataDropEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static void traceLambdaEnergy(SCIP_BTNODE *node, SCIP_BTNODE **omegaset, int *nelements, int *est, int *lct, int *energy)
static SCIP_DECL_CONSTRANS(consTransCumulative)
static SCIP_RETCODE computeEffectiveHorizonCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split)
static SCIP_RETCODE separateConsBinaryRepresentation(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *separated, SCIP_Bool *cutoff)
static void normalizeCumulativeCondition(SCIP *scip, int nvars, int *demands, int *capacity, int *nchgcoefs, int *nchgsides)
static SCIP_Bool impliesVubPrecedenceCondition(SCIP *scip, SCIP_VAR *var, SCIP_Real vubcoef, SCIP_Real vubconst, int duration)
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE moveNodeToLambda(SCIP *scip, SCIP_BT *tree, SCIP_BTNODE *node)
#define DEFAULT_DISJUNCTIVE
static SCIP_RETCODE consdataCatchEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool cutsasconss, SCIP_Bool *infeasible)
static SCIP_RETCODE checkCumulativeCondition(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)
constraint handler for cumulative constraints
Constraint handler for knapsack constraints of the form , x binary and .
constraint handler for linking binary variables to a linking (continuous or integer) variable
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 SCIP_CALL_TERMINATE(retcode, x, TERM)
#define SCIP_LONGINT_FORMAT
#define SCIP_CALL_FINALLY(x, y)
static const NodeData nodedata[]
void SCIPbtnodeSetRightchild(SCIP_BTNODE *node, SCIP_BTNODE *right)
SCIP_BTNODE * SCIPbtnodeGetRightchild(SCIP_BTNODE *node)
SCIP_Bool SCIPbtIsEmpty(SCIP_BT *tree)
SCIP_RETCODE SCIPbtCreate(SCIP_BT **tree, BMS_BLKMEM *blkmem)
void SCIPbtnodeFree(SCIP_BT *tree, SCIP_BTNODE **node)
SCIP_Bool SCIPbtnodeIsLeaf(SCIP_BTNODE *node)
void * SCIPbtnodeGetData(SCIP_BTNODE *node)
SCIP_RETCODE SCIPbtnodeCreate(SCIP_BT *tree, SCIP_BTNODE **node, void *dataptr)
SCIP_Bool SCIPbtnodeIsRightchild(SCIP_BTNODE *node)
void SCIPbtnodeSetParent(SCIP_BTNODE *node, SCIP_BTNODE *parent)
SCIP_Bool SCIPbtnodeIsLeftchild(SCIP_BTNODE *node)
void SCIPbtnodeSetLeftchild(SCIP_BTNODE *node, SCIP_BTNODE *left)
SCIP_BTNODE * SCIPbtnodeGetParent(SCIP_BTNODE *node)
void SCIPbtFree(SCIP_BT **tree)
SCIP_BTNODE * SCIPbtnodeGetLeftchild(SCIP_BTNODE *node)
void SCIPbtSetRoot(SCIP_BT *tree, SCIP_BTNODE *root)
SCIP_Bool SCIPbtnodeIsRoot(SCIP_BTNODE *node)
SCIP_BTNODE * SCIPbtGetRoot(SCIP_BT *tree)
int SCIPgetHminCumulative(SCIP *scip, SCIP_CONS *cons)
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 SCIPgetBinvarsLinking(SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars)
SCIP_RETCODE SCIPsetSolveCumulative(SCIP *scip, SCIP_DECL_SOLVECUMULATIVE((*solveCumulative)))
SCIP_RETCODE SCIPcreateConsBasicSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
int * SCIPgetDurationsCumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPexistsConsLinking(SCIP *scip, SCIP_VAR *linkvar)
SCIP_RETCODE SCIPsplitCumulativeCondition(SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split)
SCIP_RETCODE SCIPaddCoefKnapsack(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Longint weight)
SCIP_RETCODE SCIPvisualizeConsCumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicCumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity)
int SCIPcomputeHmax(SCIP *scip, SCIP_PROFILE *profile, int capacity)
SCIP_CONS * SCIPgetConsLinking(SCIP *scip, SCIP_VAR *linkvar)
SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, 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 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_VAR ** SCIPgetVarsCumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicKnapsack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity)
int * SCIPgetDemandsCumulative(SCIP *scip, SCIP_CONS *cons)
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 SCIPcreateConsLinking(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars, 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 SCIPsolveKnapsackExactly(SCIP *scip, int nitems, SCIP_Longint *weights, SCIP_Real *profits, SCIP_Longint capacity, int *items, int *solitems, int *nonsolitems, int *nsolitems, int *nnonsolitems, SCIP_Real *solval, SCIP_Bool *success)
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)
int SCIPgetHmaxCumulative(SCIP *scip, SCIP_CONS *cons)
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)
int SCIPgetCapacityCumulative(SCIP *scip, SCIP_CONS *cons)
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 SCIPcreateConsVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs, 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_Real * SCIPgetValsLinking(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetHminCumulative(SCIP *scip, SCIP_CONS *cons, int hmin)
int SCIPgetNVarsCumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetHmaxCumulative(SCIP *scip, SCIP_CONS *cons, int hmax)
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 SCIPincludeConshdlrCumulative(SCIP *scip)
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)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
void SCIPgmlWriteClosing(FILE *file)
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNCheckConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
SCIP_Longint SCIPcalcGreComDiv(SCIP_Longint val1, SCIP_Longint val2)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPapplyProbingVar(SCIP *scip, SCIP_VAR **vars, int nvars, int probingpos, SCIP_BOUNDTYPE boundtype, SCIP_Real bound, int maxproprounds, SCIP_Real *impllbs, SCIP_Real *implubs, SCIP_Real *proplbs, SCIP_Real *propubs, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char 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 SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
void SCIPswapInts(int *value1, int *value2)
void SCIPswapPointers(void **pointer1, void **pointer2)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
SCIP_RETCODE SCIPbranchVarHole(SCIP *scip, SCIP_VAR *var, SCIP_Real left, SCIP_Real right, SCIP_NODE **downchild, SCIP_NODE **upchild)
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 SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
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 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 SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
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_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(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_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
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_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_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBuffer(scip, ptr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPallocBuffer(scip, ptr)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
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_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPrestartSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPconvertRealToInt(SCIP *scip, SCIP_Real real)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPvarGetNVlbs(SCIP_VAR *var)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real * SCIPvarGetVlbCoefs(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
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_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPaddVarVlb(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real * SCIPvarGetVlbConstants(SCIP_VAR *var)
int SCIPvarGetNVubs(SCIP_VAR *var)
SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetVlbVars(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
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_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
SCIP_Real * SCIPvarGetVubConstants(SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetVubVars(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVubCoefs(SCIP_VAR *var)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
int * SCIPprofileGetTimepoints(SCIP_PROFILE *profile)
SCIP_Bool SCIPprofileFindLeft(SCIP_PROFILE *profile, int timepoint, int *pos)
int SCIPprofileGetNTimepoints(SCIP_PROFILE *profile)
void SCIPprofileFree(SCIP_PROFILE **profile)
int SCIPprofileGetLoad(SCIP_PROFILE *profile, int pos)
int * SCIPprofileGetLoads(SCIP_PROFILE *profile)
SCIP_RETCODE SCIPprofileCreate(SCIP_PROFILE **profile, int capacity)
int SCIPprofileGetTime(SCIP_PROFILE *profile, int pos)
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 SCIPprofilePrint(SCIP_PROFILE *profile, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
void SCIPsortDownIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortDownIntIntInt(int *intarray1, int *intarray2, int *intarray3, int len)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
void SCIPsortInt(int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPstrCopySection(const char *str, char startchar, char endchar, char *token, int size, char **endptr)
void SCIPprintSysError(const char *message)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPdebugPrintCons(x, y, z)
#define SCIPstatisticPrintf
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
enum TCLIQUE_Status TCLIQUE_STATUS
void tcliqueMaxClique(TCLIQUE_GETNNODES((*getnnodes)), TCLIQUE_GETWEIGHTS((*getweights)), TCLIQUE_ISEDGE((*isedge)), TCLIQUE_SELECTADJNODES((*selectadjnodes)), TCLIQUE_GRAPH *tcliquegraph, TCLIQUE_NEWSOL((*newsol)), TCLIQUE_DATA *tcliquedata, int *maxcliquenodes, int *nmaxcliquenodes, TCLIQUE_WEIGHT *maxcliqueweight, TCLIQUE_WEIGHT maxfirstnodeweight, TCLIQUE_WEIGHT minweight, int maxntreenodes, int backtrackfreq, int maxnzeroextensions, int fixednode, int *ntreenodes, TCLIQUE_STATUS *status)
struct TCLIQUE_Graph TCLIQUE_GRAPH
@ SCIP_CONFTYPE_PROPAGATION
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSEXITPRE(x)
struct SCIP_ConsData SCIP_CONSDATA
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
enum SCIP_BoundType SCIP_BOUNDTYPE
@ SCIP_PARAMEMPHASIS_CPSOLVER
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_PRIMALLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
#define SCIP_PRESOLTIMING_ALWAYS
#define SCIP_PRESOLTIMING_MEDIUM
unsigned int SCIP_PRESOLTIMING
#define SCIP_PRESOLTIMING_FAST
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4