neventdatascurrent;
133structSCIP_ConshdlrData
150 unsigned intvarmarked:1;
151 unsigned intindvarmarked:1;
166assert(eventhdlr !=
NULL);
167assert(consdata !=
NULL);
168assert(var !=
NULL);
169assert(indvar !=
NULL);
175(*eventdata)->consdata = consdata;
176(*eventdata)->var = var;
177(*eventdata)->indvar = indvar;
178(*eventdata)->varmarked =
FALSE;
179(*eventdata)->indvarmarked =
FALSE;
180(*eventdata)->pos = (
unsignedint)pos;
200assert(eventhdlr !=
NULL);
201assert(consdata !=
NULL);
202assert(var !=
NULL);
203assert(indvar !=
NULL);
204assert(eventdata !=
NULL);
230*infeasible =
FALSE;
250 SCIP_CALL(
SCIPcreateConsLinear(
scip, &cons,
"branch", 1, &var, &val, 0.0, 0.0,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
289assert(var !=
NULL);
290assert(infeasible !=
NULL);
291assert(tightened !=
NULL);
293*infeasible =
FALSE;
316 for( i = 0; i < naggrvars; ++i )
321allnonnegative =
FALSE;
326 if( allnonnegative )
329 for( i = 0; i < naggrvars; ++i )
335*tightened = *tightened || fixed;
358assert(cons !=
NULL);
359assert(var !=
NULL);
379assert(cons !=
NULL);
380assert(var !=
NULL);
399assert(consdata !=
NULL);
400assert(consdata->nvars <= consdata->maxvars);
402 if( num > consdata->maxvars )
413 if( reserveweights )
417consdata->maxvars = newsize;
419assert(num <= consdata->maxvars);
448assert(cons !=
NULL);
449assert(consdata !=
NULL);
450assert(conshdlrdata !=
NULL);
451assert(var !=
NULL);
458assert(eventdata !=
NULL);
461assert(consdata->ntreatnonzeros >= 0 );
463++consdata->ntreatnonzeros;
506assert(var !=
NULL);
507assert(cons !=
NULL);
508assert(conshdlrdata !=
NULL);
511assert(consdata !=
NULL);
513 if( consdata->weights ==
NULL&& consdata->maxvars > 0 )
515 SCIPerrorMessage(
"cannot add variable to cardinality constraint <%s> that does not contain weights.\n",
521 if( indvar ==
NULL)
523 if( conshdlrdata->varhash ==
NULL)
534assert(indvar !=
NULL);
554assert(indvar !=
NULL);
572assert(var !=
NULL);
573assert(indvar !=
NULL);
579assert(consdata->weights !=
NULL);
580assert(consdata->maxvars >= consdata->nvars+1);
583 for( pos = consdata->nvars; pos >= 1; --pos )
586 if( consdata->weights[pos-1] > weight )
588consdata->vars[pos] = consdata->vars[pos-1];
589consdata->indvars[pos] = consdata->indvars[pos-1];
590consdata->eventdatas[pos] = consdata->eventdatas[pos-1];
591consdata->weights[pos] = consdata->weights[pos-1];
593 if( consdata->eventdatas[pos] !=
NULL)
595consdata->eventdatas[pos]->pos = (
unsignedint)pos;
601assert(0 <= pos && pos <= consdata->nvars);
605assert(! transformed || eventdata !=
NULL);
608consdata->vars[pos] = var;
609consdata->indvars[pos] = indvar;
610consdata->eventdatas[pos] = eventdata;
611consdata->weights[pos] = weight;
632assert(var !=
NULL);
633assert(cons !=
NULL);
634assert(conshdlrdata !=
NULL);
637assert(consdata !=
NULL);
640 if( indvar ==
NULL)
642 if( conshdlrdata->varhash ==
NULL)
653assert(indvar !=
NULL);
673assert(indvar !=
NULL);
691assert(var !=
NULL);
692assert(indvar !=
NULL);
702assert(!transformed || eventdata !=
NULL);
705consdata->vars[consdata->nvars] = var;
706consdata->indvars[consdata->nvars] = indvar;
707consdata->eventdatas[consdata->nvars] = eventdata;
709 if( consdata->weights !=
NULL&& consdata->nvars > 0 )
710consdata->weights[consdata->nvars] = consdata->weights[consdata->nvars-1] + 1.0;
713assert(consdata->weights !=
NULL|| consdata->nvars > 0);
730assert(0 <= pos && pos < consdata->nvars);
737&consdata->eventdatas[pos]) );
741--(consdata->ntreatnonzeros);
744 for( j = pos; j < consdata->nvars-1; ++j )
746consdata->vars[j] = consdata->vars[j+1];
747consdata->indvars[j] = consdata->indvars[j+1];
748consdata->eventdatas[j] = consdata->eventdatas[j+1];
749 if( consdata->weights !=
NULL)
750consdata->weights[j] = consdata->weights[j+1];
752consdata->eventdatas[j]->pos = (
unsignedint)j;
776 for( c = 0; c < nconss; ++c )
782assert(cons !=
NULL);
784assert(consdata !=
NULL);
786nvars = consdata->nvars;
787vars = consdata->vars;
788indvars = consdata->indvars;
790 for( j = 0; j < nvars; ++j )
816eventdatas = consdata->eventdatas;
817nvars = consdata->nvars;
818assert(eventdatas !=
NULL);
820 for( j = 0; j < nvars; ++j )
824eventdata = eventdatas[j];
825eventdata->varmarked =
FALSE;
826eventdata->indvarmarked =
FALSE;
863assert(cons !=
NULL);
864assert(consdata !=
NULL);
865assert(eventhdlr !=
NULL);
866assert(cutoff !=
NULL);
867assert(success !=
NULL);
868assert(ndelconss !=
NULL);
869assert(nfixedvars !=
NULL);
870assert(nremovedvars !=
NULL);
879consdata->neventdatascurrent = 0;
883allvarsbinary =
TRUE;
884vars = consdata->vars;
885indvars = consdata->indvars;
888 while( j < consdata->nvars )
918&consdata->eventdatas[j]) );
920&consdata->eventdatas[j]) );
921assert(consdata->eventdatas[j] !=
NULL);
928consdata->eventdatas[j]->var = var;
932assert(var == vars[j]);
935 for( l = j+1; l < consdata->nvars; ++l )
937 if( var == vars[l] || oldvar == vars[l] )
991assert(indub == 1.0);
995 SCIPdebugMsg(
scip,
"deleting variable <%s> from constraint <%s>, since it may be treated as nonzero.\n",
997--(consdata->cardval);
1003assert(indlb == 0.0);
1028allvarsbinary =
FALSE;
1035 if( consdata->cardval < 0 )
1037 SCIPdebugMsg(
scip,
"The problem is infeasible: more variables have bounds that keep them from being 0 than allowed.\n");
1043 else if( consdata->cardval == 0 )
1046 for( j = 0; j < consdata->nvars; ++j )
1063 if( consdata->nvars <= consdata->cardval )
1065 SCIPdebugMsg(
scip,
"Deleting cardinality constraint <%s> with <%d> variables and cardinality value <%d>.\n",
1078 if( allvarsbinary )
1084 for( j = 0; j < consdata->nvars; ++j )
1138assert(cons !=
NULL);
1139assert(consdata !=
NULL);
1140assert(cutoff !=
NULL);
1141assert(nchgdomain !=
NULL);
1146 if( consdata->ntreatnonzeros > consdata->cardval )
1148 SCIPdebugMsg(
scip,
"the node is infeasible, more than %d variables are fixed to be nonzero.\n", consdata->cardval);
1156 if( consdata->ntreatnonzeros == consdata->cardval )
1169nvars = consdata->nvars;
1170vars = consdata->vars;
1171indvars = consdata->indvars;
1172assert(vars !=
NULL);
1173assert(indvars !=
NULL);
1176allvarfixed =
TRUE;
1177 for( j = 0; j < nvars; ++j )
1199 SCIPdebugMsg(
scip,
"the node is infeasible, more than %d variables are fixed to be nonzero.\n",
1209 SCIPdebugMsg(
scip,
"fixed variable <%s> to 0, since constraint <%s> with cardinality value %d is \ 1214allvarfixed =
FALSE;
1218assert(cnt == consdata->ntreatnonzeros);
1221 if( *nchgdomain > 0 )
1237 if( consdata->neventdatascurrent > 0 )
1244neventdatas = consdata->neventdatascurrent;
1245eventvars = consdata->eventvarscurrent;
1246eventdatas = consdata->eventdatascurrent;
1247assert(eventdatas !=
NULL&& eventvars !=
NULL);
1249 for( j = 0; j < neventdatas; ++j )
1256eventdata = eventdatas[j];
1258assert(var !=
NULL&& eventdata !=
NULL);
1259assert(eventdata->var !=
NULL);
1260assert(eventdata->indvar !=
NULL);
1261assert(var == eventdata->var || var == eventdata->indvar);
1265 if( eventdata->indvar == var )
1267assert(eventdata->indvarmarked);
1274implvar = eventdata->var;
1284 SCIPdebugMsg(
scip,
"the node is infeasible, indicator variable %s is fixed to zero although implied " 1294 SCIPdebugMsg(
scip,
"fixed variable <%s> to 0, since indicator variable %s is 0.\n",
1300eventdata->indvarmarked =
FALSE;
1305assert(eventdata->var == var);
1306assert(eventdata->varmarked);
1313indvar = eventdata->indvar;
1322 SCIPdebugMsg(
scip,
"the node is infeasible, implied variable %s is fixed to nonzero " 1330 SCIPdebugMsg(
scip,
"fixed variable <%s> to 1.0, since implied variable %s is nonzero.\n",
1335eventdata->varmarked =
FALSE;
1339consdata->neventdatascurrent = 0;
1368 SCIPdebugMsg(
scip,
"apply unbalanced branching on variable <%s> of constraint <%s>.\n",
1379assert(! infeasible);
1385assert(branchnnonzero + 1 <= cardval);
1386 if( branchnnonzero + 1 == cardval )
1398 for( j = 0; j < nvars; ++j )
1413assert(cnt == nvars - (1 + branchnnonzero));
1423 for( j = 0; j < nvars; ++j )
1432assert(!infeasible);
1485 SCIPerrorMessage(
"balanced branching is only possible if separation frequency of constraint handler is 1.\n");
1500nbuffer = nvars-branchnnonzero;
1505 for( j = 0; j < nvars; ++j )
1520weight1 += val * (
SCIP_Real) (j - (nnonzero + nzero));
1522branchindvars[nbranchvars] = indvars[j];
1523branchvars[nbranchvars++] = var;
1534assert(nnonzero == branchnnonzero);
1535assert(nbranchvars <= nvars - branchnnonzero);
1537assert(cnt >= cardval-nnonzero);
1539 w= weight1/weight2;
1542assert(0 <= ind && ind < nbranchvars-1);
1545 for( j = 0; j <= ind; ++j )
1562 for( j = ind+1; j < nbranchvars; ++j )
1581newcardval = cardval - nnonzero;
1582splitval1 = sum1 + (
SCIP_Real)newcardval - sum2 - 1.0;
1584splitval1 =
MAX(splitval1, 0);
1585assert((
int)splitval1 >= 0);
1586assert((
int)splitval1 <=
MIN(newcardval-1, ind));
1587splitval2 = (
SCIP_Real)(newcardval-1);
1588splitval2 -= splitval1;
1596branchnnonzero, branchpos) );
1618 for( j = 0; j <= ind; ++j )
1628 for( j = 0; j <= ind; ++j )
1631assert(!infeasible);
1661 for( j = ind+1; j < nbranchvars; ++j )
1666assert(nbranchvars - (ind + 1) > 0);
1672 for( j = ind+1; j < nbranchvars; ++j )
1675assert(!infeasible);
1685 for( j = ind+1; j < nbranchvars; ++j )
1687branchvars[cnt] = branchvars[j];
1688branchindvars[cnt++] = branchindvars[j];
1690assert(cnt == nbranchvars - (ind + 1));
1763assert(conshdlr !=
NULL);
1764assert(conss !=
NULL);
1765assert(result !=
NULL);
1769branchnnonzero = -1;
1777assert(conshdlrdata !=
NULL);
1780 for( c = 0; c < nconss; ++c )
1795assert(cons !=
NULL);
1797assert(consdata !=
NULL);
1803nvars = consdata->nvars;
1804vars = consdata->vars;
1805indvars = consdata->indvars;
1806cardval = consdata->cardval;
1815 SCIPdebugMsg(
scip,
"propagating <%s> in enforcing (cutoff: %u, domain reductions: %d).\n",
1822 if( nchgdomain > 0 )
1827assert(nchgdomain == 0);
1833 for( j = 0; j < nvars; ++j )
1888 if( nnonzero > cardval )
1890 SCIPdebugMsg(
scip,
"Detected cut off: constraint <%s> has %d many variables that can be treated as nonzero, \ 1891 although only %d many are feasible.\n",
SCIPconsGetName(cons), nnonzero, cardval);
1896 else if( cnt > 0 && nnonzero + 1 > cardval )
1901 for( v = 0; v < nvars; ++v )
1914assert(!infeasible);
1924 if( cnt > cardval - nnonzero && weight > maxweight )
1928branchnnonzero = nnonzero;
1930branchallneg = allneg;
1931branchallpos = allpos;
1936 if( branchcons ==
NULL)
1950assert(branchnnonzero >= 0);
1951assert(branchpos >= 0);
1955assert(consdata !=
NULL);
1956nvars = consdata->nvars;
1957vars = consdata->vars;
1958indvars = consdata->indvars;
1959cardval = consdata->cardval;
1963 if( conshdlrdata->branchbalanced && !
SCIPisFeasNegative(
scip, maxweight) && ( branchallneg || branchallpos )
1964&& (conshdlrdata->balanceddepth == -1 ||
SCIPgetDepth(
scip) <= conshdlrdata->balanceddepth)
1967branchbalanced =
TRUE;
1971 if( branchbalanced )
1973 SCIP_CALL(
branchBalancedCardinality(
scip, conshdlr, sol, branchcons, vars, indvars, nvars, cardval, branchnnonzero, branchpos,
1974conshdlrdata->balancedcutoff) );
2025assert(conshdlr !=
NULL);
2026assert(cons !=
NULL);
2029assert(consdata !=
NULL);
2030assert(consdata->vars !=
NULL);
2031assert(consdata->indvars !=
NULL);
2033nvars = consdata->nvars;
2038 if( rowub !=
NULL)
2043cardval = consdata->cardval;
2044 for( j = 0; j < nvars; ++j )
2060assert(consdata->vars[j] !=
NULL);
2061vars[cnt] = consdata->vars[j];
2062vals[cnt++] = 1.0/val;
2065assert(cardval >= 0);
2068 if( cnt > cardval )
2080 if( rowlb !=
NULL)
2085cardval = consdata->cardval;
2086 for( j = 0; j < nvars; ++j )
2102assert(consdata->vars[j] !=
NULL);
2103vars[cnt] = consdata->vars[j];
2104vals[cnt++] = 1.0/val;
2107assert(cardval >= 0);
2111 if( cnt > cardval )
2147assert(conss !=
NULL);
2151 for( c = nconss-1; c >= 0; --c )
2158assert(conss !=
NULL);
2159assert(conss[c] !=
NULL);
2161assert(consdata !=
NULL);
2177 if( consdata->rowub ==
NULL|| consdata->rowlb ==
NULL)
2180(consdata->rowlb ==
NULL) ? &consdata->rowlb :
NULL,
2181(consdata->rowub ==
NULL) ? &consdata->rowub :
NULL) );
2183rowub = consdata->rowub;
2184rowlb = consdata->rowlb;
2222 if( rowlb !=
NULL)
2226 if( rowub !=
NULL)
2258assert(conshdlr !=
NULL);
2259assert(conss !=
NULL);
2260assert(result !=
NULL);
2296assert(conshdlr !=
NULL);
2314assert(conshdlr !=
NULL);
2318assert(conshdlrdata !=
NULL);
2321 if( conshdlrdata->varhash !=
NULL)
2339assert(conshdlr !=
NULL);
2343assert(conshdlrdata !=
NULL);
2346 for( c = 0; c < nconss; ++c )
2350assert(conss !=
NULL);
2351assert(conss[c] !=
NULL);
2353assert(consdata !=
NULL);
2358 if( consdata->rowub !=
NULL)
2362 if( consdata->rowlb !=
NULL)
2369 if( conshdlrdata->varhash !=
NULL)
2382assert(conshdlr !=
NULL);
2383assert(cons !=
NULL);
2384assert(consdata !=
NULL);
2397assert(conshdlrdata !=
NULL);
2398assert(conshdlrdata->eventhdlr !=
NULL);
2400 for( j = 0; j < (*consdata)->nvars; ++j )
2403(*consdata)->indvars[j], &(*consdata)->eventdatas[j]) );
2404assert((*consdata)->eventdatas[j] ==
NULL);
2408 if( (*consdata)->weights !=
NULL)
2419 if( (*consdata)->rowub !=
NULL)
2423 if( (*consdata)->rowlb !=
NULL)
2427assert((*consdata)->rowub ==
NULL);
2428assert((*consdata)->rowlb ==
NULL);
2446assert(conshdlr !=
NULL);
2448assert(sourcecons !=
NULL);
2449assert(targetcons !=
NULL);
2453assert(conshdlrdata !=
NULL);
2454assert(conshdlrdata->eventhdlr !=
NULL);
2460assert(sourcedata !=
NULL);
2461assert(sourcedata->nvars > 0);
2462assert(sourcedata->nvars <= sourcedata->maxvars);
2467consdata->cons =
NULL;
2468consdata->nvars = sourcedata->nvars;
2469consdata->maxvars = sourcedata->nvars;
2470consdata->cardval = sourcedata->cardval;
2471consdata->rowub =
NULL;
2472consdata->rowlb =
NULL;
2473consdata->eventdatascurrent =
NULL;
2474consdata->neventdatascurrent = 0;
2475consdata->ntreatnonzeros = 0;
2483 if( sourcedata->weights !=
NULL)
2488consdata->weights =
NULL;
2490 for( j = 0; j < sourcedata->nvars; ++j )
2492assert(sourcedata->vars[j] != 0);
2493assert(sourcedata->indvars[j] != 0);
2499++(consdata->ntreatnonzeros);
2511consdata->cons = *targetcons;
2512assert(consdata->cons !=
NULL);
2515 for( j = 0; j < consdata->nvars; ++j )
2518consdata->vars[j], consdata->indvars[j], j, &consdata->eventdatas[j]) );
2519assert(consdata->eventdatas[j] !=
NULL);
2525 SCIPdebugMsg(
scip,
"constraint <%s> has %d variables fixed to be nonzero, allthough the constraint allows \ 2526 only %d nonzero variables\n",
SCIPconsGetName(*targetcons), consdata->ntreatnonzeros, consdata->cardval);
2545assert(conshdlr !=
NULL);
2547assert(result !=
NULL);
2552 SCIPdebug( oldnfixedvars = *nfixedvars; )
2553 SCIPdebug( oldndelconss = *ndelconss; )
2554 SCIPdebug( oldnupgdconss = *nupgdconss; )
2558 if( nrounds == 0 || nnewfixedvars > 0 || nnewaggrvars > 0 )
2563assert(eventhdlr !=
NULL);
2568 for( c = 0; c < nconss; ++c )
2575assert(conss !=
NULL);
2576assert(conss[c] !=
NULL);
2580assert(consdata !=
NULL);
2581assert(consdata->nvars >= 0);
2582assert(consdata->nvars <= consdata->maxvars);
2587ndelconss, nupgdconss, nfixedvars, &nremovedvars) );
2600(*nchgcoefs) += nremovedvars;
2603 and upgraded %d constraints.\n", *nfixedvars - oldnfixedvars, nremovedvars, *ndelconss - oldndelconss,
2604*nupgdconss - oldnupgdconss); )
2616assert(conshdlr !=
NULL);
2630assert(conshdlr !=
NULL);
2631assert(conss !=
NULL);
2632assert(result !=
NULL);
2644assert(conshdlr !=
NULL);
2645assert(conss !=
NULL);
2646assert(result !=
NULL);
2658assert(conshdlr !=
NULL);
2659assert(conss !=
NULL);
2661assert(result !=
NULL);
2673assert( conshdlr !=
NULL);
2674assert( conss !=
NULL);
2676assert( result !=
NULL);
2688assert(conshdlr !=
NULL);
2689assert(conss !=
NULL);
2691assert(result !=
NULL);
2708assert(conshdlr !=
NULL);
2709assert(conss !=
NULL);
2711assert(result !=
NULL);
2714 for( c = 0; c < nconss; ++c )
2722assert(conss[c] !=
NULL);
2724assert(consdata !=
NULL);
2725cardval = consdata->cardval;
2729 for( j = 0; j < consdata->nvars; ++j )
2737 if( cnt > cardval )
2749 for( l = 0; l < consdata->nvars; ++l )
2780assert(conshdlr !=
NULL);
2781assert(conss !=
NULL);
2783assert(result !=
NULL);
2789 for( c = 0; c < nconss; ++c )
2796assert(conss[c] !=
NULL);
2799assert(consdata !=
NULL);
2811 if( nchgdomain > 0 )
2839assert(conshdlr !=
NULL);
2840assert(cons !=
NULL);
2845assert(consdata !=
NULL);
2849vars = consdata->vars;
2850indvars = consdata->indvars;
2851nvars = consdata->nvars;
2852assert(vars !=
NULL);
2854 for( j = 0; j < nvars; ++j )
2859indvar = indvars[j];
2888assert(conshdlr !=
NULL);
2889assert(cons !=
NULL);
2893assert(consdata !=
NULL);
2895 for( j = 0; j < consdata->nvars; ++j )
2900 if( consdata->weights ==
NULL)
2921 const char* consname;
2926assert(sourcescip !=
NULL);
2927assert(sourcecons !=
NULL);
2938 SCIPdebugMsg(
scip,
"Copying cardinality constraint <%s> ...\n", consname);
2941assert(sourceconsdata !=
NULL);
2944nvars = sourceconsdata->nvars;
2949sourcevars = sourceconsdata->vars;
2950assert(sourcevars !=
NULL);
2951sourceindvars = sourceconsdata->indvars;
2952assert(sourceindvars !=
NULL);
2953sourceweights = sourceconsdata->weights;
2954assert(sourceweights !=
NULL);
2962 for( v = 0; v < nvars && *valid; ++v )
2964assert(sourcevars[v] !=
NULL);
2965assert(sourceindvars[v] !=
NULL);
2978targetweights, initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
3000assert(conshdlr !=
NULL);
3002assert(cons !=
NULL);
3003assert(success !=
NULL);
3009 SCIP_CALL(
SCIPcreateConsCardinality(
scip, cons, name, 0,
NULL, 0,
NULL,
NULL, initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
3012 while( *s !=
'\0')
3019t = strchr(t,
'<');
3028t = strchr(t,
'(');
3032 SCIPerrorMessage(
"Syntax error: expected opening '(' at input: %s\n", s);
3043weight = strtod(s, &t);
3055t = strchr(t,
')');
3059 SCIPerrorMessage(
"Syntax error: expected closing ')' at input %s\n", s);
3081 if( *success && *s ==
'<'&& *(s+1) ==
'=')
3088cardval = (int)strtod(s, &t);
3092 SCIPerrorMessage(
"Syntax error during parsing of the cardinality restriction value: %s\n", s);
3112assert(consdata !=
NULL);
3114 if( varssize < consdata->nvars )
3115(*success) =
FALSE;
3118assert(vars !=
NULL);
3134assert(consdata !=
NULL);
3136(*nvars) = consdata->nvars;
3160assert(consdata !=
NULL);
3161assert(graph !=
NULL);
3163nconsvars = consdata->nvars;
3174 for( i = 0; i < nconsvars; ++i )
3180vars[0] = consdata->vars[i];
3201 else if( nlocvars == 1 )
3209vars[0] = consdata->indvars[i];
3230 else if( nlocvars == 1 )
3241assert(success !=
NULL);
3265assert(consdata !=
NULL);
3266assert(graph !=
NULL);
3268nconsvars = consdata->nvars;
3279 for( i = 0; i < nconsvars; ++i )
3284vars[0] = consdata->vars[i];
3310 for( j = 0; j < nlocvars; ++j )
3324 else if( nlocvars == 1 )
3332allownegation =
TRUE;
3338 if( allownegation )
3351vars[0] = consdata->indvars[i];
3372 else if( nlocvars == 1 )
3383assert(success !=
NULL);
3405assert(eventhdlr !=
NULL);
3406assert(eventdata !=
NULL);
3408assert(event !=
NULL);
3410consdata = eventdata->consdata;
3411assert(consdata !=
NULL);
3412assert(0 <= consdata->ntreatnonzeros && consdata->ntreatnonzeros <= consdata->nvars);
3413assert(consdata->eventdatascurrent !=
NULL);
3414assert(consdata->eventvarscurrent !=
NULL);
3417assert(var !=
NULL);
3423 if( ( eventdata->varmarked && var == eventdata->var) || ( eventdata->indvarmarked && var == eventdata->indvar) )
3427 for( i = 0; i < consdata->neventdatascurrent; ++i )
3429 if( var == consdata->eventvarscurrent[i] )
3434assert(i < consdata->neventdatascurrent);
3465 if( var == eventdata->indvar )
3468assert(consdata->cons !=
NULL);
3471++(consdata->ntreatnonzeros);
3473--(consdata->ntreatnonzeros);
3476assert(oldbound == 1.0 && newbound == 0.0 );
3479consdata->eventdatascurrent[consdata->neventdatascurrent] = eventdata;
3480consdata->eventvarscurrent[consdata->neventdatascurrent] = var;
3481++consdata->neventdatascurrent;
3482eventdata->indvarmarked =
TRUE;
3483assert(consdata->neventdatascurrent <= 4 * consdata->maxvars);
3484assert(var == eventdata->indvar );
3486assert(0 <= consdata->ntreatnonzeros && consdata->ntreatnonzeros <= consdata->nvars);
3491 if( var == eventdata->var && ! eventdata->varmarked )
3499consdata->eventdatascurrent[consdata->neventdatascurrent] = eventdata;
3500consdata->eventvarscurrent[consdata->neventdatascurrent] = var;
3501++consdata->neventdatascurrent;
3502eventdata->varmarked =
TRUE;
3503assert(consdata->neventdatascurrent <= 4 * consdata->maxvars );
3504assert(var == eventdata->var );
3513consdata->eventdatascurrent[consdata->neventdatascurrent] = eventdata;
3514consdata->eventvarscurrent[consdata->neventdatascurrent] = var;
3515++consdata->neventdatascurrent;
3516eventdata->varmarked =
TRUE;
3517assert(consdata->neventdatascurrent <= 4 * consdata->maxvars );
3518assert(var == eventdata->var);
3522assert(0 <= consdata->ntreatnonzeros && consdata->ntreatnonzeros <= consdata->nvars);
3524 SCIPdebugMsg(
scip,
"event exec cons <%s>: changed bound of variable <%s> from %f to %f (ntreatnonzeros: %d).\n",
3526oldbound, newbound, consdata->ntreatnonzeros);
3543conshdlrdata->eventhdlr =
NULL;
3544conshdlrdata->varhash =
NULL;
3548eventExecCardinality,
NULL) );
3549 if( conshdlrdata->eventhdlr ==
NULL)
3551 SCIPerrorMessage(
"event handler for cardinality constraints not found.\n");
3558consEnfolpCardinality, consEnfopsCardinality, consCheckCardinality, consLockCardinality, conshdlrdata) );
3559assert(conshdlr !=
NULL);
3584 "whether to use balanced instead of unbalanced branching",
3588 "maximum depth for using balanced branching (-1: no limit)",
3592 "determines that balanced branching is only used if the branching cut off value " 3593 "w.r.t. the current LP solution is greater than a given value",
3648modifiable =
FALSE;
3652 if( conshdlr ==
NULL)
3659 if( indvars !=
NULL)
3661 for( v = 0; v < nvars; ++v )
3673assert(conshdlrdata !=
NULL);
3680consdata->cons =
NULL;
3681consdata->vars =
NULL;
3682consdata->indvars =
NULL;
3683consdata->eventdatas =
NULL;
3684consdata->nvars = nvars;
3685consdata->cardval = cardval;
3686consdata->maxvars = nvars;
3687consdata->rowub =
NULL;
3688consdata->rowlb =
NULL;
3689consdata->eventdatascurrent =
NULL;
3690consdata->eventvarscurrent =
NULL;
3691consdata->neventdatascurrent = 0;
3692consdata->ntreatnonzeros = transformed ? 0 : -1;
3693consdata->weights =
NULL;
3701 if( indvars !=
NULL)
3707 if( conshdlrdata->varhash ==
NULL)
3714 for( v = 0; v < nvars; ++v )
3719assert(implvar !=
NULL);
3731consdata->indvars[v] = implvar;
3741consdata->indvars[v] = var;
3759 if( weights !=
NULL)
3769 for( v = 0; v < nvars; ++v )
3773 SCIPsortRealPtrPtrInt(consdata->weights, (
void**)consdata->vars, (
void**)consdata->indvars, dummy, nvars);
3780assert(weights ==
NULL);
3784 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
3785local, modifiable, dynamic, removable, stickingatnode) );
3787consdata->cons = *cons;
3788assert(consdata->cons !=
NULL);
3791 for( v = nvars - 1; v >= 0; --v )
3799assert(consdata->vars[v] !=
NULL);
3800assert(consdata->indvars[v] !=
NULL);
3806consdata->indvars[v], v, transformed, &consdata->eventdatas[v]) );
3807assert(! transformed || consdata->eventdatas[v] !=
NULL);
3834 SCIP_CALL(
SCIPcreateConsCardinality(
scip, cons, name, nvars, vars, cardval, indvars, weights,
TRUE,
TRUE,
TRUE,
TRUE,
3850assert(cons !=
NULL);
3859assert(consdata !=
NULL);
3861 SCIPdebugMsg(
scip,
"modify right hand side of cardinality constraint from <%i> to <%i>\n", consdata->cardval, cardval);
3864consdata->cardval = cardval;
3884assert(var !=
NULL);
3885assert(cons !=
NULL);
3891assert(conshdlr !=
NULL);
3899assert(conshdlrdata !=
NULL);
3920assert(var !=
NULL);
3921assert(cons !=
NULL);
3926assert(conshdlr !=
NULL);
3934assert(conshdlrdata !=
NULL);
3950assert(cons !=
NULL);
3960assert(consdata !=
NULL);
3962 returnconsdata->nvars;
3974assert(cons !=
NULL);
3984assert(consdata !=
NULL);
3986 returnconsdata->vars;
3998assert(cons !=
NULL);
4007assert(consdata !=
NULL);
4009 returnconsdata->cardval;
4021assert(cons !=
NULL);
4031assert(consdata !=
NULL);
4033 returnconsdata->weights;
static SCIP_RETCODE unlockVariableCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
static SCIP_DECL_CONSFREE(consFreeCardinality)
static SCIP_DECL_CONSPARSE(consParseCardinality)
#define CONSHDLR_CHECKPRIORITY
static SCIP_DECL_CONSSEPALP(consSepalpCardinality)
static SCIP_DECL_CONSINITLP(consInitlpCardinality)
#define CONSHDLR_PROP_TIMING
static SCIP_RETCODE consdataEnsurevarsSizeCardinality(SCIP *scip, SCIP_CONSDATA *consdata, int num, SCIP_Bool reserveweights)
#define CONSHDLR_MAXPREROUNDS
static SCIP_DECL_CONSSEPASOL(consSepasolCardinality)
static SCIP_RETCODE lockVariableCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar)
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE appendVarCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var, SCIP_VAR *indvar)
static void consdataUnmarkEventdataVars(SCIP_CONSDATA *consdata)
static SCIP_DECL_CONSEXITSOL(consExitsolCardinality)
static SCIP_RETCODE fixVariableZeroNode(SCIP *scip, SCIP_VAR *var, SCIP_NODE *node, SCIP_Bool *infeasible)
static SCIP_DECL_CONSPRESOL(consPresolCardinality)
static SCIP_DECL_CONSPRINT(consPrintCardinality)
static SCIP_RETCODE generateRowCardinality(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool local, SCIP_ROW **rowlb, SCIP_ROW **rowub)
static SCIP_DECL_CONSDELETE(consDeleteCardinality)
static SCIP_RETCODE deleteVarCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE fixVariableZero(SCIP *scip, SCIP_VAR *var, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphCardinality)
static SCIP_RETCODE polishPrimalSolution(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_SOL *primsol)
static SCIP_RETCODE branchBalancedCardinality(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_CONS *branchcons, SCIP_VAR **vars, SCIP_VAR **indvars, int nvars, int cardval, int branchnnonzero, int branchpos, SCIP_Real balancedcutoff)
static SCIP_DECL_CONSCOPY(consCopyCardinality)
static SCIP_DECL_CONSCHECK(consCheckCardinality)
static SCIP_DECL_CONSENFOPS(consEnfopsCardinality)
static SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphCardinality)
#define DEFAULT_BALANCEDDEPTH
static SCIP_RETCODE initsepaBoundInequalityFromCardinality(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool solvedinitlp, int *ngen, SCIP_Bool *cutoff)
#define DEFAULT_BALANCEDCUTOFF
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE enforceCardinality(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, SCIP_RESULT *result)
static SCIP_DECL_CONSTRANS(consTransCardinality)
static SCIP_RETCODE presolRoundCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *success, int *ndelconss, int *nupgdconss, int *nfixedvars, int *nremovedvars)
#define CONSHDLR_PRESOLTIMING
static SCIP_DECL_CONSPROP(consPropCardinality)
static SCIP_DECL_CONSLOCK(consLockCardinality)
#define DEFAULT_BRANCHBALANCED
static SCIP_DECL_CONSENFORELAX(consEnforelaxCardinality)
static SCIP_RETCODE catchVarEventCardinality(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_VAR *indvar, int pos, SCIP_EVENTDATA **eventdata)
static SCIP_RETCODE addVarCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var, SCIP_VAR *indvar, SCIP_Real weight)
#define CONSHDLR_EAGERFREQ
static SCIP_DECL_CONSGETVARS(consGetVarsCardinality)
static SCIP_RETCODE separateCardinality(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, SCIP_RESULT *result)
static SCIP_RETCODE handleNewVariableCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *var, SCIP_VAR *indvar, int pos, SCIP_Bool transformed, SCIP_EVENTDATA **eventdata)
#define EVENTHDLR_EVENT_TYPE
static SCIP_RETCODE propCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *cutoff, int *nchgdomain)
#define CONSHDLR_ENFOPRIORITY
static SCIP_DECL_CONSGETNVARS(consGetNVarsCardinality)
#define CONSHDLR_DELAYSEPA
static SCIP_DECL_CONSENFOLP(consEnfolpCardinality)
static SCIP_RETCODE dropVarEventCardinality(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_VAR *indvar, SCIP_EVENTDATA **eventdata)
static SCIP_RETCODE branchUnbalancedCardinality(SCIP *scip, SCIP_SOL *sol, SCIP_CONS *branchcons, SCIP_VAR **vars, SCIP_VAR **indvars, int nvars, int cardval, int branchnnonzero, int branchpos)
static SCIP_DECL_EVENTEXEC(eventExecCardinality)
#define CONSHDLR_DELAYPROP
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyCardinality)
constraint handler for cardinality constraints
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for linear constraints in their most general form, .
#define SCIP_LONGINT_FORMAT
SCIP_Real * SCIPgetWeightsCardinality(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsCardinality(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int cardval, SCIP_VAR **indvars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicCardinality(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int cardval, SCIP_VAR **indvars, SCIP_Real *weights)
int SCIPgetCardvalCardinality(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPappendVarCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar)
SCIP_RETCODE SCIPcreateConsKnapsack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPaddVarCardinality(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_VAR *indvar, SCIP_Real weight)
int SCIPgetNVarsCardinality(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, 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_VAR ** SCIPgetVarsCardinality(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgCardvalCardinality(SCIP *scip, SCIP_CONS *cons, int cardval)
SCIP_RETCODE SCIPincludeConshdlrCardinality(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)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNTotalVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
SCIP_Real SCIPcalcChildEstimateIncrease(SCIP *scip, SCIP_VAR *var, SCIP_Real varsol, SCIP_Real targetvalue)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
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 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 SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)))
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 SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)))
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 SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
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_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(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 SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPtrySol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(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 SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(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 SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
void SCIPsortRealPtrPtrInt(SCIP_Real *realarray, void **ptrarray1, void **ptrarray2, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPaddSymgraphValnode(SCIP *scip, SYM_GRAPH *graph, SCIP_Real val, int *nodeidx)
int SCIPgetSymgraphVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
structs for symmetry computations
methods for dealing with symmetry detection graphs
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_EVENTTYPE_BOUNDCHANGED
#define SCIP_EVENTTYPE_GUBCHANGED
#define SCIP_EVENTTYPE_GBDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_LBTIGHTENED
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SYM_CONSOPTYPE_CARD_TUPLE
@ SCIP_VARSTATUS_MULTAGGR
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