84#define CONSHDLR_NAME "nonlinear"
85#define CONSHDLR_DESC "handler for nonlinear constraints specified by algebraic expressions"
86#define CONSHDLR_ENFOPRIORITY 50
87#define CONSHDLR_CHECKPRIORITY -4000010
88#define CONSHDLR_EAGERFREQ 100
90#define CONSHDLR_NEEDSCONS TRUE
93#define CONSHDLR_SEPAPRIORITY 10
94#define CONSHDLR_SEPAFREQ 1
95#define CONSHDLR_DELAYSEPA FALSE
97#define CONSHDLR_PROPFREQ 1
98#define CONSHDLR_DELAYPROP FALSE
99#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
101#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
102#define CONSHDLR_MAXPREROUNDS -1
105#define TABLE_NAME_NONLINEAR "cons_nonlinear"
106#define TABLE_DESC_NONLINEAR "nonlinear constraint handler statistics"
107#define TABLE_POSITION_NONLINEAR 14600
108#define TABLE_EARLIEST_STAGE_NONLINEAR SCIP_STAGE_TRANSFORMED
111#define TABLE_NAME_NLHDLR "nlhdlr"
112#define TABLE_DESC_NLHDLR "nonlinear handler statistics"
113#define TABLE_POSITION_NLHDLR 14601
114#define TABLE_EARLIEST_STAGE_NLHDLR SCIP_STAGE_PRESOLVING
116#define DIALOG_NAME "nlhdlrs"
117#define DIALOG_DESC "display nonlinear handlers"
118#define DIALOG_ISSUBMENU FALSE
120#define VERTEXPOLY_MAXPERTURBATION 1e-3
121#define VERTEXPOLY_USEDUALSIMPLEX TRUE
122#define VERTEXPOLY_RANDNUMINITSEED 20181029
123#define VERTEXPOLY_ADJUSTFACETFACTOR 1e1
125#define BRANCH_RANDNUMINITSEED 20191229
127#define BILIN_MAXNAUXEXPRS 10
133#define infty2infty(infty1, infty2, val) ((val) >= (infty1) ? (infty2) : (val))
136#define POWEROFTWO(x) (0x1u << (x))
139#define ENFOLOG(x) if( SCIPgetSubscipDepth(scip) == 0 && SCIPgetVerbLevel(scip) >= SCIP_VERBLEVEL_NORMAL ) { x }
140FILE* enfologfile =
NULL;
162struct SCIP_Expr_OwnerData
170 int monotonicitysize;
174 unsigned int propboundstag;
180 unsigned int lastenforced;
181 unsigned int nactivityusesprop;
182 unsigned int nactivityusessepa;
183 unsigned int nauxvaruses;
190 unsigned int violscoretag;
221 unsigned int ispropagated:1;
222 unsigned int issimplified:1;
249struct SCIP_ConshdlrData
261 int consupgradessize;
274 unsigned int enforound;
282 unsigned int curpropboundstag;
295 int reformbinprodsfac;
305 char rownotremovable;
308 int branchauxmindepth;
319 char branchviolsplit;
322 char linearizeheursol;
344 int bilinmaxnauxexprs;
348 char branchpscostupdatestrategy;
353 int newsoleventfilterpos;
400 if( mydata->auxvar ==
NULL )
442 mydata->nactivityusesprop = 0;
443 mydata->nactivityusessepa = 0;
444 mydata->nauxvaruses = 0;
448 for( e = 0; e < mydata->nenfos; ++e )
454 nlhdlr = mydata->enfos[e]->nlhdlr;
457 if( mydata->enfos[e]->issepainit )
460 SCIP_CALL( SCIPnlhdlrExitsepa(
scip, nlhdlr, expr, mydata->enfos[e]->nlhdlrexprdata) );
461 mydata->enfos[e]->issepainit =
FALSE;
465 if( mydata->enfos[e]->nlhdlrexprdata !=
NULL )
467 SCIP_CALL( SCIPnlhdlrFreeexprdata(
scip, nlhdlr, expr, &mydata->enfos[e]->nlhdlrexprdata) );
468 assert(mydata->enfos[e]->nlhdlrexprdata ==
NULL);
494 assert((*ownerdata)->nlockspos == 0);
495 assert((*ownerdata)->nlocksneg == 0);
500 assert((*ownerdata)->nenfos <= 0);
509 assert((*ownerdata)->nconss == 0);
511 assert((*ownerdata)->filterpos == -1);
543 if( ownerdata->nenfos > 0 )
548 for(
i = 0;
i < ownerdata->nenfos; ++
i )
565 if( ownerdata->auxvar !=
NULL )
610 (*ownerdata)->nenfos = -1;
618 (*ownerdata)->filterpos = -1;
641 (*ownerdata)->filterpos = -2;
644 *ownerfree = exprownerFree;
645 *ownerprint = exprownerPrint;
646 *ownerevalactivity = exprownerEvalactivity;
751 if( consdata->varexprs !=
NULL )
755 assert(consdata->nvarexprs == 0);
758 if( consdata->issimplified )
774 assert(varexprssize >= consdata->nvarexprs);
777 if( varexprssize > consdata->nvarexprs )
789 for(
i = 0;
i < consdata->nvarexprs; ++
i )
812 if( consdata->varexprs ==
NULL )
816 assert(consdata->nvarexprs >= 0);
817 assert(!consdata->catchedevents);
820 for(
i = 0;
i < consdata->nvarexprs; ++
i )
829 consdata->varexprs =
NULL;
830 consdata->nvarexprs = 0;
854 if( conshdlrdata->globalbounds )
877 switch( conshdlrdata->varboundrelax )
892 lb =
MAX(bnd, lb - conshdlrdata->varboundrelaxamount);
899 ub =
MIN(bnd, ub + conshdlrdata->varboundrelaxamount);
912 lb -= conshdlrdata->varboundrelaxamount;
915 ub += conshdlrdata->varboundrelaxamount;
947 SCIPerrorMessage(
"Unsupported value '%c' for varboundrelax option.\n", conshdlrdata->varboundrelax);
976 return consdata1->consindex - consdata2->consindex;
1003 assert(ownerdata->nconss > 0);
1007 boundtightened =
TRUE;
1016 boundtightened =
TRUE;
1027 boundtightened =
TRUE;
1034 if( boundtightened )
1039 for(
c = 0;
c < ownerdata->nconss; ++
c )
1049 consdata->ispropagated =
FALSE;
1055 consdata->issimplified =
FALSE;
1071 ++conshdlrdata->curboundstag;
1072 assert(conshdlrdata->curboundstag > 0);
1076 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
1081 SCIP_CALL( SCIPcallExprInteval(
scip, expr, &activity, conshdlrdata->intevalvar, conshdlrdata) );
1119 for(
i = 0;
i < ownerdata->nconss; ++
i )
1120 assert(ownerdata->conss[
i] != cons);
1126 ownerdata->conss[ownerdata->nconss++] = cons;
1130 if( ownerdata->nconss <= 1 )
1131 ownerdata->consssorted =
TRUE;
1132 else if( ownerdata->consssorted )
1133 ownerdata->consssorted = compIndexConsNonlinear(ownerdata->conss[ownerdata->nconss-2], ownerdata->conss[ownerdata->nconss-1]) < 0;
1136 if( ownerdata->filterpos < 0 )
1140 assert(ownerdata->nconss == 1);
1145 assert(ownerdata->filterpos >= 0);
1170 assert(consdata->nvarexprs >= 0);
1173 if( consdata->catchedevents )
1179 assert(conshdlrdata->intevalvar == intEvalVarBoundTightening);
1184 for(
i = 0;
i < consdata->nvarexprs; ++
i )
1186 expr = consdata->varexprs[
i];
1199 SCIP_CALL( SCIPcallExprInteval(
scip, expr, &activity, intEvalVarBoundTightening, conshdlrdata) );
1208 consdata->catchedevents =
TRUE;
1236 assert(ownerdata->nconss > 0);
1238 if( ownerdata->conss[ownerdata->nconss-1] == cons )
1240 pos = ownerdata->nconss-1;
1244 if( !ownerdata->consssorted )
1246 SCIPsortPtr((
void**)ownerdata->conss, compIndexConsNonlinear, ownerdata->nconss);
1247 ownerdata->consssorted =
TRUE;
1250 if( !
SCIPsortedvecFindPtr((
void**)ownerdata->conss, compIndexConsNonlinear, cons, ownerdata->nconss, &pos) )
1255 assert(pos >= 0 && pos < ownerdata->nconss);
1257 assert(ownerdata->conss[pos] == cons);
1260 if( pos < ownerdata->nconss-1 )
1262 ownerdata->conss[pos] = ownerdata->conss[ownerdata->nconss-1];
1263 ownerdata->consssorted =
FALSE;
1265 --ownerdata->nconss;
1268 if( ownerdata->nconss == 0 )
1272 assert(ownerdata->filterpos >= 0);
1277 ownerdata->filterpos = -1;
1301 if( !consdata->catchedevents )
1305 assert(consdata->nvarexprs >= 0);
1309 for(
i = consdata->nvarexprs - 1;
i >= 0; --
i )
1316 consdata->catchedevents =
FALSE;
1368 SCIPerrorMessage(
"Locally valid nonlinear constraints are not supported, yet.\n");
1375 SCIPerrorMessage(
"Non-initial nonlinear constraints are not supported, yet.\n");
1379 if( isnan(lhs) || isnan(rhs) )
1382 isnan(lhs) ?
"left" :
"right", name);
1396 consdata->expr = expr;
1399 consdata->lhs = lhs;
1400 consdata->rhs = rhs;
1401 consdata->consindex = conshdlrdata->lastconsindex++;
1405 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
1406 local, modifiable, dynamic, removable,
FALSE) );
1443 if( violunder !=
NULL )
1445 if( violover !=
NULL )
1454 if( violunder !=
NULL )
1456 if( violover !=
NULL )
1463 if( violunder !=
NULL )
1465 if( violover !=
NULL )
1470 if( violunder !=
NULL )
1472 if( violover !=
NULL )
1510 if( violunder !=
NULL )
1512 if( violover !=
NULL )
1519 if( ownerdata->nlocksneg > 0 && auxvarvalue > auxvalue )
1521 if( violunder !=
NULL )
1523 if( violover !=
NULL )
1525 return auxvarvalue - auxvalue;
1528 if( ownerdata->nlockspos > 0 && auxvalue > auxvarvalue )
1530 if( violunder !=
NULL )
1532 if( violover !=
NULL )
1534 return auxvalue - auxvarvalue;
1537 if( violunder !=
NULL )
1539 if( violover !=
NULL )
1597 return MAX3(0.0, consdata->lhsviol, consdata->rhsviol);
1629 if( conshdlrdata->violscale ==
'n' )
1638 if( conshdlrdata->violscale ==
'a' )
1643 if( consdata->lhsviol > 0.0 &&
REALABS(consdata->lhs) > scale )
1646 scale =
REALABS(consdata->lhs);
1648 else if( consdata->rhsviol > 0.0 &&
REALABS(consdata->rhs) > scale )
1651 scale =
REALABS(consdata->rhs);
1659 assert(conshdlrdata->violscale ==
'g');
1660 if( soltag == 0L || consdata->gradnormsoltag != soltag )
1666 consdata->gradnorm = 0.0;
1675 for(
i = 0;
i < consdata->nvarexprs; ++
i )
1684 consdata->gradnorm = 0.0;
1688 consdata->gradnorm += deriv*deriv;
1691 consdata->gradnorm = sqrt(consdata->gradnorm);
1692 consdata->gradnormsoltag = soltag;
1695 *viol /=
MAX(1.0, consdata->gradnorm);
1730 consdata->linvarincr =
NULL;
1731 consdata->linvardecr =
NULL;
1732 consdata->linvarincrcoef = 0.0;
1733 consdata->linvardecrcoef = 0.0;
1769 if( (consdata->linvardecr ==
NULL) ||
1772 consdata->linvardecr =
var;
1773 consdata->linvardecrcoef = coef;
1782 if( (consdata->linvarincr ==
NULL) ||
1785 consdata->linvarincr =
var;
1786 consdata->linvarincrcoef = coef;
1792 assert(consdata->linvarincr ==
NULL || consdata->linvarincrcoef != 0.0);
1793 assert(consdata->linvardecr ==
NULL || consdata->linvardecrcoef != 0.0);
1795 if( consdata->linvarincr !=
NULL )
1799 if( consdata->linvardecr !=
NULL )
1847 SCIPdebugMsg(
scip,
"attempt to make solution from <%s> feasible by shifting linear variable\n",
1850 for(
c = 0;
c < nconss; ++
c )
1861 viol = consdata->lhsviol;
1863 viol = -consdata->rhsviol;
1867 if( consdata->linvarincr !=
NULL &&
1868 ((viol > 0.0 && consdata->linvarincrcoef > 0.0) || (viol < 0.0 && consdata->linvarincrcoef < 0.0)) )
1873 delta = viol / consdata->linvarincrcoef;
1880 delta =
MIN(
MAX(0.0, gap), delta);
1889 SCIPdebugMsg(
scip,
"increase <%s> by %g to %g to remedy lhs-violation %g of cons <%s>\n",
1893 viol -= consdata->linvarincrcoef * delta;
1900 if( consdata->linvardecr !=
NULL &&
1901 ((viol > 0.0 && consdata->linvardecrcoef < 0.0) || (viol < 0.0 && consdata->linvardecrcoef > 0.0)) )
1906 delta = viol / consdata->linvardecrcoef;
1913 delta =
MAX(
MIN(0.0, gap), delta);
1922 SCIPdebugMsg(
scip,
"increase <%s> by %g to %g to remedy rhs-violation %g of cons <%s>\n",
1926 viol -= consdata->linvardecrcoef * delta;
1998 for(
c = 0;
c < nconss; ++
c )
2014 for(
i = 0;
i < consdata->nvarexprs; ++
i )
2036 if( ownerdata->auxvar !=
NULL )
2042 for( e = 0; e < ownerdata->nenfos; ++e )
2046 ownerdata->enfos[e]->nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata,
sol, solisbest,
2140 if( ntightenings !=
NULL )
2154 if( ntightenings !=
NULL )
2193 if( infeasible !=
NULL )
2194 *infeasible =
FALSE;
2195 if( ntightenings !=
NULL )
2204 SCIPdebugMsg(
scip,
"stored activity of root expr is empty and valid (activitytag >= lastboundrelax (%" SCIP_LONGINT_FORMAT ")), skip forwardPropExpr -> cutoff\n", conshdlrdata->lastboundrelax);
2206 if( infeasible !=
NULL )
2233 if( ownerdata->nenfos >= 0 && ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 && !conshdlrdata->indetect)
2236 SCIPdebugMsg(
scip,
"root expr activity is not used but enfo initialized, skip inteval\n");
2284 SCIPexprGetActivityTag(expr) >= conshdlrdata->lastvaractivitymethodchange && !conshdlrdata->globalbounds )
2289 SCIP_CALL( SCIPcallExprInteval(
scip, expr, &exprhdlrinterval, conshdlrdata->intevalvar, conshdlrdata) );
2319 if( infeasible !=
NULL )
2321 SCIPdebugMsg(
scip,
"expr %p already has empty activity -> cutoff\n", (
void*)expr);
2331 if( ownerdata->nenfos >= 0 && ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 && !conshdlrdata->indetect )
2334 SCIPdebugMsg(
scip,
"expr %p activity is not used but enfo initialized, skip inteval\n", (
void*)expr);
2346 if( ownerdata->nenfos > 0 )
2359 nlhdlr = ownerdata->enfos[e]->nlhdlr;
2367 nlhdlrinterval = activity;
2368 SCIP_CALL( SCIPnlhdlrInteval(
scip, nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata,
2369 &nlhdlrinterval, conshdlrdata->intevalvar, conshdlrdata) );
2385 SCIP_CALL( SCIPcallExprInteval(
scip, expr, &exprhdlrinterval, conshdlrdata->intevalvar, conshdlrdata) );
2430 if( infeasible !=
NULL )
2433 else if( tightenauxvars && ownerdata->auxvar !=
NULL )
2438 if( tighteninfeasible )
2440 if( infeasible !=
NULL )
2486 if( subsetsufficient )
2545 while( !
SCIPqueueIsEmpty(conshdlrdata->reversepropqueue) && !(*infeasible) )
2556 assert(ownerdata->inpropqueue);
2558 ownerdata->inpropqueue =
FALSE;
2563 assert(ownerdata->propboundstag == conshdlrdata->curpropboundstag);
2571#ifdef SCIP_DISABLED_CODE
2579 propbounds = ownerdata->propbounds;
2582 if( ownerdata->nenfos > 0 )
2585 for( e = 0; e < ownerdata->nenfos && !*infeasible; ++e )
2594 nlhdlr = ownerdata->enfos[e]->nlhdlr;
2605 SCIP_CALL( SCIPnlhdlrReverseprop(
scip, conshdlr, nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata, propbounds, infeasible, &nreds) );
2607 *ntightenings += nreds;
2625 assert(ownerdata->nenfos < 0);
2632 SCIP_CALL( SCIPcallExprReverseprop(
scip, expr, propbounds, childrenbounds, infeasible) );
2654 ownerdata->inpropqueue =
FALSE;
2722 assert(conshdlrdata->intevalvar == intEvalVarBoundTightening);
2724 assert(!conshdlrdata->globalbounds);
2730 conshdlrdata->forceboundtightening = force;
2733 ++conshdlrdata->curpropboundstag;
2736 if( conshdlrdata->propauxvars )
2751 for(
i = 0;
i < nconss; ++
i )
2763 if( consdata->ispropagated )
2784 if( !conshdlrdata->propauxvars || ownerdata->auxvar ==
NULL )
2790 if( ownerdata->auxvar ==
NULL )
2799 conssides = intEvalVarBoundTightening(
scip, ownerdata->auxvar, (
void*)conshdlrdata);
2818 if( ownerdata->auxvar ==
NULL )
2821 if( ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 )
2824 conssides = intEvalVarBoundTightening(
scip, ownerdata->auxvar, (
void*)conshdlrdata);
2836 assert(ntightenings >= 0);
2837 if( ntightenings > 0 )
2839 *nchgbds += ntightenings;
2844 consdata->ispropagated =
TRUE;
2849 assert(ntightenings >= 0);
2859 if( ntightenings > 0 )
2861 *nchgbds += ntightenings;
2865 while( ntightenings > 0 && ++roundnr < conshdlrdata->maxproprounds );
2867 if( conshdlrdata->propauxvars )
2872 conshdlrdata->forceboundtightening =
FALSE;
2875 ++conshdlrdata->curpropboundstag;
2925 for(
c = 0;
c < nconss && !
cutoff; ++
c )
2942 for( e = 0; e < ownerdata->nenfos; ++e )
2947 nlhdlr = ownerdata->enfos[e]->nlhdlr;
2952 SCIPdebugMsg(
scip,
"propExprDomains calling reverseprop for expression %p [%g,%g]\n", (
void*)expr,
2955 SCIP_CALL( SCIPnlhdlrReverseprop(
scip, conshdlr, nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata,
2966 assert(ntightenings >= 0);
2967 if( ntightenings > 0 )
2969 *nchgbds += ntightenings;
2978 assert(ntightenings >= 0);
2985 else if( ntightenings > 0 )
2987 *nchgbds += ntightenings;
3015 if( nlockspos == 0 && nlocksneg == 0 )
3024 ituserdata.
intvals[0] = nlockspos;
3025 ituserdata.
intvals[1] = nlocksneg;
3032 nlockspos = ituserdata.
intvals[0];
3033 nlocksneg = ituserdata.
intvals[1];
3048 ownerdata->nlockspos += nlockspos;
3049 ownerdata->nlocksneg += nlocksneg;
3052 if( ownerdata->nlockspos == nlockspos && ownerdata->nlocksneg == nlocksneg &&
SCIPexprGetNChildren(expr) > 0
3058 assert(ownerdata->monotonicitysize == 0);
3066 SCIP_CALL( SCIPcallExprMonotonicity(
scip, expr,
i, &ownerdata->monotonicity[
i]) );
3075 if( ownerdata->nlockspos == 0 && ownerdata->nlocksneg == 0 && ownerdata->monotonicity !=
NULL )
3077 assert(ownerdata->monotonicitysize > 0);
3082 ownerdata->monotonicitysize = 0;
3098 switch( monotonicity )
3101 ituserdata.
intvals[0] = nlockspos;
3102 ituserdata.
intvals[1] = nlocksneg;
3105 ituserdata.
intvals[0] = nlocksneg;
3106 ituserdata.
intvals[1] = nlockspos;
3109 ituserdata.
intvals[0] = nlockspos + nlocksneg;
3110 ituserdata.
intvals[1] = nlockspos + nlocksneg;
3165 if( nlockspos == 0 && nlocksneg == 0 )
3176 consdata->nlockspos += nlockspos;
3177 consdata->nlocksneg += nlocksneg;
3179 assert(consdata->nlockspos >= 0);
3180 assert(consdata->nlocksneg >= 0);
3216 if( consdata->nlrow !=
NULL )
3325 assert(conshdlrdata->auxvarid >= 0);
3326 assert(!conshdlrdata->indetect);
3329 assert(ownerdata->nenfos < 0);
3339 if( ownerdata->nauxvaruses == 0 )
3343 if( ownerdata->nlockspos == 0 )
3345 if( ownerdata->nlocksneg == 0 )
3348 if( ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 )
3357 ownerdata->nenfos = 0;
3360 conshdlrdata->indetect =
TRUE;
3362 SCIPdebugMsg(
scip,
"detecting nlhdlrs for %s expression %p (%s); requiring%s%s%s\n",
3368 for(
h = 0;
h < conshdlrdata->nnlhdlrs; ++
h )
3372 nlhdlr = conshdlrdata->nlhdlrs[
h];
3380 nlhdlrexprdata =
NULL;
3381 enforcemethodsnew = enforcemethods;
3383 conshdlrdata->registerusesactivitysepabelow =
FALSE;
3384 conshdlrdata->registerusesactivitysepaabove =
FALSE;
3386 SCIP_CALL( SCIPnlhdlrDetect(
scip, ownerdata->conshdlr, nlhdlr, expr, cons, &enforcemethodsnew, &nlhdlrparticipating, &nlhdlrexprdata) );
3389 nlhdlrparticipating &= enforcemethodsallowed;
3392 assert((enforcemethodsnew & enforcemethods) == enforcemethods);
3397 nlhdlrenforcemethods = (enforcemethodsnew ^ enforcemethods) & enforcemethodsallowed;
3400 assert((nlhdlrparticipating & nlhdlrenforcemethods) == nlhdlrenforcemethods);
3408 if( nlhdlrexprdata !=
NULL )
3410 SCIP_CALL( SCIPnlhdlrFreeexprdata(
scip, nlhdlr, expr, &nlhdlrexprdata) );
3420 SCIPdebugMsg(
scip,
"nlhdlr <%s> detect successful; sepabelow: %s, sepaabove: %s, activity: %s\n",
3429 ownerdata->enfos[ownerdata->nenfos]->nlhdlr = nlhdlr;
3430 ownerdata->enfos[ownerdata->nenfos]->nlhdlrexprdata = nlhdlrexprdata;
3431 ownerdata->enfos[ownerdata->nenfos]->nlhdlrparticipation = nlhdlrparticipating;
3432 ownerdata->enfos[ownerdata->nenfos]->issepainit =
FALSE;
3433 ownerdata->enfos[ownerdata->nenfos]->sepabelowusesactivity = conshdlrdata->registerusesactivitysepabelow;
3434 ownerdata->enfos[ownerdata->nenfos]->sepaaboveusesactivity = conshdlrdata->registerusesactivitysepaabove;
3435 ownerdata->nenfos++;
3438 enforcemethods = enforcemethodsnew;
3441 conshdlrdata->indetect =
FALSE;
3448 SCIPerrorMessage(
"no nonlinear handler provided some of the required enforcement methods\n");
3452 assert(ownerdata->nenfos > 0);
3455 if( ownerdata->nenfos > 1 )
3456 SCIPsortDownPtr((
void**)ownerdata->enfos, enfodataCmp, ownerdata->nenfos);
3496 conshdlrdata->globalbounds =
TRUE;
3497 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
3500 for(
i = 0;
i < nconss; ++
i )
3522 if( ownerdata->nenfos > 0 )
3525 assert(ownerdata->nenfos < 0);
3533 conshdlrdata->indetect =
TRUE;
3538 conshdlrdata->indetect =
FALSE;
3568 if( ownerdata->nenfos >= 0 )
3578 if( ownerdata->nauxvaruses > 0 || ownerdata->nactivityusesprop > 0 || ownerdata->nactivityusessepa > 0 )
3582 assert(ownerdata->nenfos >= 0);
3591 ownerdata->nenfos = 0;
3597 consdata->ispropagated =
FALSE;
3606 conshdlrdata->globalbounds =
FALSE;
3607 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
3643 for(
c = 0;
c < nconss; ++
c )
3694 if( consdata->nlrow ==
NULL )
3744 for(
c = 0;
c < nconss; ++
c )
3758 SCIPdebugMsg(
scip,
"exitsepa and free nonlinear handler data for expression %p\n", (
void*)expr);
3766 if( rootactivityvalid )
3777 if( consdata->nlrow !=
NULL )
3791 consdata->linvardecr =
NULL;
3792 consdata->linvarincr =
NULL;
3930 minact +=
MIN(coefs[
i], 0.0);
3931 maxact +=
MAX(coefs[
i], 0.0);
3938 assert(minact <= maxact);
3946#ifdef WITH_DEBUG_SOLUTION
3947 if( SCIPdebugIsMainscip(
scip) )
3958 debugsolval += coefs[
i] * val;
3977 if( naddconss !=
NULL )
3988 if( naddconss !=
NULL )
4002 if( naddconss !=
NULL )
4015 if( naddconss !=
NULL )
4048 int* childidxs =
NULL;
4073 if( nchildren < minterms )
4107 assert(xidx < ntotalvars);
4109 assert(yidx < ntotalvars);
4140 for( j = 0; j <
nterms; ++j )
4142 int childidx = childidxs[j];
4143 assert(childidx >= 0 && childidx < nchildren);
4145 if( !isused[childidx] && (xs[j] == facvar || ys[j] == facvar) )
4151 coef = sumcoefs[childidx];
4155 tmpvars[ntmpvars] = (xs[j] == facvar) ? ys[j] : xs[j];
4156 tmpcoefs[ntmpvars] = coef;
4161 assert(xidx < ntotalvars);
4163 assert(yidx < ntotalvars);
4166 assert(count[xidx] >= 0);
4167 assert(count[yidx] >= 0);
4170 isused[childidx] =
TRUE;
4173 assert(ntmpvars >= minterms);
4179 exprcoefs[nexprs] = 1.0;
4186 int nexprsold = nexprs;
4189 for(
i = 0;
i < nchildren; ++
i )
4194 exprcoefs[nexprs] = sumcoefs[
i];
4203 for(
i = 0;
i < nexprsold; ++
i )
4259 strcpy(name,
"binreform");
4260 for(
i = 0;
i < nchildren; ++
i )
4265 (void) strcat(name,
"_");
4278#ifdef WITH_DEBUG_SOLUTION
4279 if( SCIPdebugIsMainscip(
scip) )
4286 for(
i = 0;
i < nchildren; ++
i )
4298 if( nchildren == 2 && !empathy4and )
4328 if( naddconss !=
NULL )
4340 if( naddconss !=
NULL )
4398 SCIPdebugMsg(
scip,
" product expression %p has been considered for the first time\n", (
void*)prodexpr);
4400 if( nchildren == 2 )
4438 if( naddconss !=
NULL )
4440 if( nchgcoefs !=
NULL )
4443 found_clique =
TRUE;
4461 if( naddconss !=
NULL )
4463 if( nchgcoefs !=
NULL )
4466 found_clique =
TRUE;
4492 if( naddconss !=
NULL )
4494 if( nchgcoefs !=
NULL )
4497 found_clique =
TRUE;
4524 if( naddconss !=
NULL )
4526 if( nchgcoefs !=
NULL )
4529 found_clique =
TRUE;
4596 if( conshdlrdata->reformbinprodsfac > 1 )
4602 if( newexpr ==
NULL )
4607 if( newexpr !=
NULL )
4609 assert(naddconss ==
NULL || *naddconss > 0 || nchgcoefs ==
NULL || *nchgcoefs > 0);
4618 consdata->issimplified =
FALSE;
4698 for(
c = 0;
c < nconss; ++
c )
4709 if( conshdlrdata->reformbinprodsfac > 1 )
4715 if( newexpr !=
NULL )
4718 consdata->expr = newexpr;
4721 consdata->issimplified =
FALSE;
4770 if( nchildren == 1 && constant == 0.0 && coefs[0] == -1.0 )
4773 expr = consdata->expr;
4781 consdata->lhs = -consdata->lhs;
4782 consdata->rhs = -consdata->rhs;
4790 for(
i = 0;
i < nchildren; ++
i )
4791 counter += coefs[
i] > 0 ? 1 : -1;
4801 for(
i = 0;
i < nchildren; ++
i )
4802 newcoefs[
i] = -coefs[
i];
4809 consdata->expr = expr;
4811 consdata->lhs = -consdata->lhs;
4812 consdata->rhs = -consdata->rhs;
4847 for(
c = 0;
c < nconss; ++
c )
4922 ++(conshdlrdata->ncanonicalizecalls);
4926 *infeasible =
FALSE;
4929 havechange = conshdlrdata->ncanonicalizecalls == 1;
4939 for(
i = 0;
i < nconss; ++
i )
4947 nlockspos[
i] = consdata->nlockspos;
4948 nlocksneg[
i] = consdata->nlocksneg;
4952 assert(consdata->nlockspos == 0);
4953 assert(consdata->nlocksneg == 0);
4958 for(
i = 0;
i < nconss; ++
i )
4983 int tmpnaddconss = 0;
4984 int tmpnchgcoefs = 0;
4992 if( naddconss !=
NULL )
4993 *naddconss += tmpnaddconss;
4994 if( nchgcoefs !=
NULL )
4995 *nchgcoefs += tmpnchgcoefs;
4998 if( tmpnaddconss + tmpnchgcoefs > 0 )
5002 for(
i = 0;
i < nconss; ++
i )
5008 if( !consdata->issimplified && consdata->expr !=
NULL )
5015 consdata->issimplified =
TRUE;
5023 if( simplified != consdata->expr )
5031 consdata->expr = simplified;
5066 if( ndelconss !=
NULL )
5075 if( havechange && !*infeasible )
5082 for(
i = 0;
i < nconss; ++
i )
5091 for(
i = 0;
i < nconss; ++
i )
5104 SCIPsortPtr((
void**)consssorted, compIndexConsNonlinear, nconss);
5106 for(
i = nconss-1;
i >= 0; --
i )
5108 assert(
i == 0 || compIndexConsNonlinear((
void*)consssorted[
i-1], (
void*)consssorted[
i]) < 0);
5115 for(
i = 0;
i < nconss; ++
i )
5134 for(
i = 0;
i < nconss; ++
i )
5148 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
5191 for(
c = 0;
c < nconss; ++
c )
5213 assert(idx >= 0 && idx < nconss);
5217 assert(imgconsdata->expr == consdata->expr);
5219 SCIPdebugMsg(
scip,
"merge constraint %g <= %s <= %g with %g <= %s <= %g\n", consdata->lhs,
5226 nlockspos[idx] = imgconsdata->nlockspos;
5227 nlocksneg[idx] = imgconsdata->nlocksneg;
5229 updatelocks[idx] =
TRUE;
5233 imgconsdata->lhs =
MAX(imgconsdata->lhs, consdata->lhs);
5234 imgconsdata->rhs =
MIN(imgconsdata->rhs, consdata->rhs);
5245 for(
c = 0;
c < nconss; ++
c )
5247 if( updatelocks[
c] )
5281 if( conshdlrdata->globalbounds )
5367 ++conshdlrdata->curboundstag;
5368 assert(conshdlrdata->curboundstag > 0);
5369 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
5370 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
5371 conshdlrdata->intevalvar = intEvalVarRedundancyCheck;
5376 for(
i = 0;
i < nconss; ++
i )
5477 SCIPdebugMsg(
scip,
" -> redundant: activity [%g,%g] within sides [%g,%g]\n", activity.
inf, activity.
sup, consdata->lhs, consdata->rhs);
5485 SCIPdebugMsg(
scip,
" -> not redundant: activity [%g,%g] not within sides [%g,%g]\n", activity.
inf, activity.
sup, consdata->lhs, consdata->rhs);
5490 ++conshdlrdata->curboundstag;
5491 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
5492 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
5493 conshdlrdata->intevalvar = intEvalVarBoundTightening;
5532 if( conshdlrdata->nconsupgrades == 0 )
5546 for(
i = 0;
i < conshdlrdata->nconsupgrades; ++
i )
5548 if( !conshdlrdata->consupgrades[
i]->active )
5551 assert(conshdlrdata->consupgrades[
i]->consupgd !=
NULL);
5553 SCIP_CALL( conshdlrdata->consupgrades[
i]->consupgd(
scip, cons, consdata->nvarexprs, &nupgdconss_, upgdconss, upgdconsssize) );
5555 while( nupgdconss_ < 0 )
5558 assert(-nupgdconss_ > upgdconsssize);
5559 upgdconsssize = -nupgdconss_;
5562 SCIP_CALL( conshdlrdata->consupgrades[
i]->consupgd(
scip, cons, consdata->nvarexprs, &nupgdconss_, upgdconss, upgdconsssize) );
5564 assert(nupgdconss_ != 0);
5567 if( nupgdconss_ > 0 )
5575 for( j = 0; j < nupgdconss_; ++j )
5586 *naddconss += nupgdconss_ - 1;
5678 int nsinglelocked = 0;
5689 *infeasible =
FALSE;
5713 for(
i = 0;
i < consdata->nvarexprs; ++
i )
5720 singlelocked[nsinglelocked++] = consdata->varexprs[
i];
5725 if( nsinglelocked > 0 )
5739 for(
i = 0;
i < nchildren; ++
i )
5744 child = children[
i];
5770 keepevenpower = (haslhs && productactivity.
inf >= 0.0) || (hasrhs && productactivity.
sup <= 0.0);
5782 if( exponent > 1.0 && fmod(exponent, 2.0) == 0.0 )
5803 valid = exponent > 1.0 && fmod(exponent, 2.0) == 0.0;
5827 for(
i = 0;
i < nsinglelocked; ++
i )
5841 SCIPdebugMsg(
scip,
"found single locked variable %s in [%g,%g] that can be fixed to one of its bounds\n",
5906 *infeasible =
FALSE;
5916 for(
c = 0;
c < nconss; ++
c )
5946 if( nchildren <= 1 )
5952 for(
i = 0;
i < nchildren; ++
i )
5957 candcoef = coefs[
i];
5976 for(
i = 0;
i < nchildren; ++
i )
5978 if( children[
i] == cand )
6000 SCIPdebugMsg(
scip,
"make variable <%s> implicit integer due to constraint <%s>\n",
6041 assert(ownerdata->nauxvaruses > 0);
6044 if( ownerdata->auxvar !=
NULL )
6059 assert(conshdlrdata->auxvarid >= 0);
6069 ++conshdlrdata->auxvarid;
6124#ifdef WITH_DEBUG_SOLUTION
6125 if( SCIPdebugIsMainscip(
scip) )
6167 int nreductions = 0;
6180 ++conshdlrdata->curpropboundstag;
6186 *infeasible =
FALSE;
6187 for(
c = 0;
c < nconss; ++
c )
6196#ifdef WITH_DEBUG_SOLUTION
6197 if( SCIPdebugIsMainscip(
scip) )
6203 if( debugsol !=
NULL )
6225 if( auxvar !=
NULL )
6227 SCIPdebugMsg(
scip,
"tighten auxvar <%s> bounds using constraint sides [%g,%g]\n",
6260 for(
c = 0;
c < nconss && !*infeasible; ++
c )
6276 if( ownerdata->nauxvaruses == 0 )
6279 for( e = 0; e < ownerdata->nenfos; ++e )
6289 if( ownerdata->enfos[e]->issepainit )
6296 nlhdlr = ownerdata->enfos[e]->nlhdlr;
6304 overestimate = ownerdata->nlocksneg > 0;
6305 underestimate = ownerdata->nlockspos > 0;
6306 assert(underestimate || overestimate);
6308 SCIPdebugMsg(
scip,
"initsepa under=%u over=%u for expression %p\n", underestimate, overestimate, (
void*)expr);
6311 SCIP_CALL( SCIPnlhdlrInitsepa(
scip, conshdlr, conss[
c], nlhdlr, expr,
6312 ownerdata->enfos[e]->nlhdlrexprdata, overestimate, underestimate, infeasible) );
6313 ownerdata->enfos[e]->issepainit =
TRUE;
6364 switch( conshdlrdata->branchviolsplit )
6373 return MAX(0.05, weight);
6384 return 10.0*log10(width);
6386 return 0.1/(-log10(width));
6391 SCIPerrorMessage(
"invalid value for parameter constraints/expr/branching/violsplit");
6442 for(
i = 0;
i < nexprs; ++
i )
6454 for(
i = 0;
i < nexprs; ++
i )
6459 if( nunbounded > 0 )
6464 SCIPdebugMsg(
scip,
"add score %g (%g%% of %g) to <%s>[%g,%g]\n", violscore / nunbounded,
6465 100.0/nunbounded, violscore,
6476 SCIPdebugMsg(
scip,
"add score %g (%g%% of %g) to <%s>[%g,%g]\n", violscore * weight / weightsum,
6477 100*weight / weightsum, violscore,
6519 SCIPsortPtr((
void**)auxvars, SCIPvarComp, nauxvars);
6530 if( auxvar ==
NULL )
6536 assert(auxvars[pos] == auxvar);
6539 exprs[nexprs++] = expr;
6541 if( nexprs == nauxvars )
6576 for(
c = 0;
c < nconss; ++
c )
6589 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6631 for(
c = 0;
c < nconss; ++
c )
6650 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6660 if( violscore == 0.0 )
6698 if( violscore == 0.0 )
6776 for( attempt = 0; attempt < 2; ++attempt )
6782 for(
c = 0;
c < nconss; ++
c )
6798 if( attempt == 0 && consviol < conshdlrdata->branchhighviolfactor * maxrelconsviol )
6800 else if( attempt == 1 && consviol >= conshdlrdata->branchhighviolfactor * maxrelconsviol )
6812 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6835 cands[*ncands].
expr = consdata->varexprs[
i];
6836 cands[*ncands].
var =
var;
6874 cands[*ncands].
expr = expr;
6875 cands[*ncands].
var =
var;
6962 for(
r = 0;
r < nrows; ++
r )
6965 const char* estimategapstr;
6979 if( estimategapstr ==
NULL )
6981 estimategap = atof(estimategapstr + 13);
6982 assert(estimategap >= 0.0);
7042 for(
c = 0;
c < ncands; ++
c )
7044 if( conshdlrdata->branchviolweight > 0.0 )
7055 assert(cands[
c].expr !=
NULL || cands[
c].fractionality > 0.0);
7057 if( considerfracnl && cands[
c].fractionality == 0.0 )
7076 if( conshdlrdata->branchdomainweight > 0.0 && cands[
c].
expr !=
NULL )
7091 if( domainwidth >= 1.0 )
7101 if( conshdlrdata->branchdualweight > 0.0 && cands[
c].
expr !=
NULL )
7112 cands[
c].
dual = 0.0;
7121 if( cands[
c].expr !=
NULL )
7137 strategy = conshdlrdata->branchpscostupdatestrategy;
7252 if( conshdlrdata->branchvartypeweight > 0.0 )
7281 for(
c = 0;
c < ncands; ++
c )
7287 cands[
c].weighted = 0.0;
7293 weightsum += conshdlrdata->branchviolweight;
7301 weightsum += conshdlrdata->branchfracweight;
7306 if( maxscore.
domain > 0.0 )
7309 weightsum += conshdlrdata->branchdomainweight;
7314 if( maxscore.
dual > 0.0 )
7317 weightsum += conshdlrdata->branchdualweight;
7322 if( maxscore.
pscost > 0.0 )
7328 weightsum += conshdlrdata->branchpscostweight;
7342 weightsum += conshdlrdata->branchvartypeweight;
7364 if( cands[ind1].weighted != cands[ind2].weighted )
7367 if( cands[ind1].
var != cands[ind2].
var )
7370 return cands[ind1].
expr !=
NULL ? 1 : -1;
7412 SCIPsortDown(perm, branchcandCompare, (
void*)cands, ncands);
7416 SCIPvarGetName(cands[perm[ncands - 1]].
var), cands[perm[ncands - 1]].weighted); )
7421 threshold = conshdlrdata->branchhighscorefactor * cands[perm[0]].
weighted;
7422 while( left < right )
7424 int mid = (left + right) / 2;
7425 if( cands[perm[mid]].weighted >= threshold )
7434 if( cands[perm[left]].weighted >= threshold )
7436 assert(left + 1 == ncands || cands[perm[left + 1]].weighted < threshold);
7441 assert(cands[perm[left]].weighted < threshold);
7447 ENFOLOG(
SCIPinfoMessage(
scip, enfologfile,
" %d branching candidates <%s>(%g)...<%s>(%g) after removing low scores\n", ncands,
7449 SCIPvarGetName(cands[perm[ncands - 1]].
var), cands[perm[ncands - 1]].weighted); )
7454 if( conshdlrdata->branchrandnumgen ==
NULL )
7459 *selected = &cands[perm[
c]];
7462 *selected = &cands[perm[0]];
7498 if( conshdlrdata->branchexternal )
7532 if( downchild !=
NULL || eqchild !=
NULL || upchild !=
NULL )
7572 SCIP_CALL( SCIPnlhdlrEnfo(
scip, conshdlr, cons, nlhdlr, expr, nlhdlrexprdata,
sol, auxvalue, overestimate,
7573 allowweakcuts, separated, inenforcement, branchcandonly,
result) );
7606 SCIP_CALL( SCIPnlhdlrEstimate(
scip, conshdlr, nlhdlr, expr, nlhdlrexprdata,
sol, auxvalue, overestimate,
7607 SCIPgetSolVal(
scip,
sol, auxvar), inenforcement, rowpreps, &sepasuccess, &branchscoresuccess) );
7612 assert((sepasuccess && minidx <= maxidx) || (!sepasuccess && minidx > maxidx));
7620 for(
r = minidx;
r <= maxidx; ++
r )
7627 if( !branchcandonly )
7636 auxvalue, allowweakcuts, branchscoresuccess, inenforcement,
sol,
result) );
7642 if( branchcandonly && branchscoresuccess )
7703 if( !overestimate && !underestimate )
7709 for( e = 0; e < ownerdata->nenfos; ++e )
7718 if( branchcandonly && !ownerdata->enfos[e]->sepaaboveusesactivity && !ownerdata->enfos[e]->sepabelowusesactivity )
7721 nlhdlr = ownerdata->enfos[e]->nlhdlr;
7725 SCIP_CALL( SCIPnlhdlrEvalaux(
scip, nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata, &ownerdata->enfos[e]->auxvalue,
sol) );
7729 SCIPinfoMessage(
scip, enfologfile,
" (%p): evalvalue %.15g auxvarvalue %.15g [%.15g,%.15g], nlhdlr <%s> " \
7746 if( !
SCIPisInfinity(
scip, auxviol) && auxviol < conshdlrdata->enfoauxviolfactor * origviol )
7749 "auxviolation %g << origviolation %g under:%d over:%d\n",
SCIPnlhdlrGetName(nlhdlr), (
void*)expr,
7761 underestimate, overestimate); )
7769 auxviol, origviol, underestimate, overestimate, allowweakcuts); )
7774 if( overestimate && auxoverestimate && (ownerdata->enfos[e]->nlhdlrparticipation &
SCIP_NLHDLR_METHOD_SEPAABOVE) != 0 && (!branchcandonly || ownerdata->enfos[e]->sepaaboveusesactivity) )
7779 ownerdata->enfos[e]->auxvalue,
TRUE, *
result ==
SCIP_SEPARATED, allowweakcuts, inenforcement, branchcandonly, &hdlrresult) );
7785 ownerdata->lastenforced = conshdlrdata->enforound;
7793 ownerdata->lastenforced = conshdlrdata->enforound;
7802 ownerdata->lastenforced = conshdlrdata->enforound;
7815 ownerdata->lastenforced = conshdlrdata->enforound;
7822 if( underestimate && auxunderestimate && (ownerdata->enfos[e]->nlhdlrparticipation &
SCIP_NLHDLR_METHOD_SEPABELOW) != 0 && (!branchcandonly || ownerdata->enfos[e]->sepabelowusesactivity) )
7827 ownerdata->enfos[e]->auxvalue,
FALSE, *
result ==
SCIP_SEPARATED, allowweakcuts, inenforcement, branchcandonly, &hdlrresult) );
7833 ownerdata->lastenforced = conshdlrdata->enforound;
7841 ownerdata->lastenforced = conshdlrdata->enforound;
7850 ownerdata->lastenforced = conshdlrdata->enforound;
7863 ownerdata->lastenforced = conshdlrdata->enforound;
7906 if( inenforcement && !branchcandonly && !consdata->ispropagated )
7926 if( ntightenings > 0 )
7939 if( ownerdata->auxvar ==
NULL )
7942 assert(ownerdata->lastenforced <= conshdlrdata->enforound);
7943 if( ownerdata->lastenforced == conshdlrdata->enforound )
7958 if( ownerdata->lastenforced == conshdlrdata->enforound )
8022 ++(conshdlrdata->enforound);
8029 for(
c = 0;
c < nconss; ++
c )
8055 for(
i = 0;
i < consdata->nvarexprs; ++
i )
8064 SCIP_CALL(
enforceConstraint(
scip, conshdlr, conss[
c],
sol, soltag, it,
FALSE, inenforcement, branchcandonly,
result, &consenforced) );
8069 if( !consenforced && inenforcement && !branchcandonly )
8074 if( viol > conshdlrdata->weakcutminviolfactor * maxrelconsviol )
8079 SCIP_CALL(
enforceConstraint(
scip, conshdlr, conss[
c],
sol, soltag, it,
TRUE, inenforcement, branchcandonly,
result, &consenforced) );
8082 ++conshdlrdata->nweaksepa;
8092 ENFOLOG(
if( enfologfile !=
NULL ) fflush( enfologfile); )
8109 ENFOLOG(
if( enfologfile !=
NULL ) fflush( enfologfile); )
8151 *branchintegral =
FALSE;
8162 *branchintegral =
TRUE;
8173 SCIPerrorMessage(
"Unexpected separation or propagation from enforceConstraints(branchcandonly = TRUE)\n");
8185 SCIPerrorMessage(
"Unexpected return from enforceConstraints(branchcandonly = TRUE)\n");
8220 *branchintegral =
TRUE;
8272 for(
i = 0;
i < nbinvars + nintvars && !isfractional; ++
i )
8278 isfractional =
TRUE;
8290 if( conshdlrdata->branchmixfractional == 0.0 )
8339 *maxabsconsviol = 0.0;
8340 *maxrelconsviol = 0.0;
8343 *maxvarboundviol = 0.0;
8345 for(
c = 0;
c < nconss; ++
c )
8358 *maxabsconsviol =
MAX(*maxabsconsviol, v);
8365 *maxrelconsviol =
MAX(*maxrelconsviol, v);
8382 if( ownerdata->auxvar ==
NULL )
8395 origviol = auxvarlb - auxvarvalue;
8397 origviol = auxvarvalue - auxvarub;
8398 if( origviol <= 0.0 )
8401 *maxvarboundviol =
MAX(*maxvarboundviol, origviol);
8422 *maxvarboundviol = auxvarlb - auxvarvalue;
8423 else if( auxvarvalue - auxvarub > *maxvarboundviol && !
SCIPisInfinity(
scip, auxvarub) )
8424 *maxvarboundviol = auxvarvalue - auxvarub;
8429 if( origviol > 0.0 || auxvarlb > auxvarvalue || auxvarub < auxvarvalue )
8436 if( origviol > 0.0 )
8437 SCIPinfoMessage(
scip, enfologfile,
" auxvar %s expr violated by %g", violunder ?
">=" :
"<=", origviol);
8439 SCIPinfoMessage(
scip, enfologfile,
" auxvar >= auxvar's lb violated by %g", auxvarlb - auxvarvalue);
8441 SCIPinfoMessage(
scip, enfologfile,
" auxvar <= auxvar's ub violated by %g", auxvarvalue - auxvarub);
8447 if( origviol == 0.0 )
8451 for( e = 0; e < ownerdata->nenfos; ++e )
8459 nlhdlr = ownerdata->enfos[e]->nlhdlr;
8463 SCIP_CALL( SCIPnlhdlrEvalaux(
scip, nlhdlr, expr, ownerdata->enfos[e]->nlhdlrexprdata, &ownerdata->enfos[e]->auxvalue,
sol) );
8472 *maxauxviol =
MAX(*maxauxviol, auxviol);
8473 *minauxviol =
MIN(*minauxviol, auxviol);
8520 for(
c = 0;
c < nconss; ++
c )
8536 &minauxviol, &maxauxviol, &maxvarboundviol) );
8539 "auxviolations in %g..%g, variable bounds violated by at most %g, LP feastol=%e\n",
8556 if( branchintegral )
8565 if( conshdlrdata->propinenforce )
8586 ++conshdlrdata->ntightenlp;
8602 ++conshdlrdata->ntightenlp;
8632 ++conshdlrdata->ntightenlp;
8654 ++conshdlrdata->ndesperatetightenlp;
8664 if( !conshdlrdata->propinenforce )
8686 ++conshdlrdata->ndesperatebranch;
8701 ENFOLOG(
SCIPinfoMessage(
scip, enfologfile,
" enforcement with max. violation %g failed; cutting off node\n", maxabsconsviol); )
8706 ++conshdlrdata->ndesperatecutoff;
8731 for(
c = 0;
c < nconss; ++
c )
8771 idx = ((int)(size_t)elem) - 1;
8772 assert(idx >= 0 && idx < conshdlrdata->nbilinterms);
8774 return (
void*)&conshdlrdata->bilinterms[idx];
8792 return entry1->
x == entry2->
x && entry1->
y == entry2->
y;
8827 for(
i = 0;
i < 3; ++
i )
8830 return auxexpr1->
coefs[
i] < auxexpr2->
coefs[
i] ? -1 : 1;
8833 return auxexpr1->
cst < auxexpr2->
cst ? -1 : auxexpr1->
cst == auxexpr2->
cst ? 0 : 1;
8865 if( term->
nauxexprs >= conshdlrdata->bilinmaxnauxexprs )
8912 if( conshdlrdata->bilinterms !=
NULL )
8921 for(
c = 0;
c < nconss; ++
c )
9002 assert(conshdlrdata->bilinterms[*idx].x ==
x);
9003 assert(conshdlrdata->bilinterms[*idx].y ==
y);
9006 term = &conshdlrdata->bilinterms[*idx];
9007 assert(existing <= term->existing);
9016 *idx = conshdlrdata->nbilinterms;
9019 term = &conshdlrdata->bilinterms[*idx];
9034 ++(conshdlrdata->nbilinterms);
9037 if( conshdlrdata->bilinhashtable ==
NULL )
9040 bilinearTermsGetHashkey, bilinearTermsIsHashkeyEq, bilinearTermsGetHashkeyVal,
9041 (
void*)conshdlrdata) );
9043 assert(conshdlrdata->bilinhashtable !=
NULL);
9071 if( conshdlrdata->bilinterms ==
NULL )
9074 assert(conshdlrdata->nbilinterms == 0);
9075 assert(conshdlrdata->bilintermssize == 0);
9081 for(
i = 0;
i < conshdlrdata->nbilinterms; ++
i )
9086 for( j = 0; j < conshdlrdata->bilinterms[
i].nauxexprs; ++j )
9088 if( conshdlrdata->bilinterms[
i].aux.exprs[j]->auxvar !=
NULL )
9095 if( conshdlrdata->bilinterms[
i].nauxexprs > 0 )
9104 if( conshdlrdata->bilinterms[
i].aux.var !=
NULL )
9111 if( conshdlrdata->bilinhashtable !=
NULL )
9118 conshdlrdata->nbilinterms = 0;
9119 conshdlrdata->bilintermssize = 0;
9153 SCIPdebugMsg(
scip,
"Building LP for computing facets of convex envelope of vertex-polyhedral function\n");
9158 nrows = (
unsigned int)
nvars + 1;
9160 nnonz = (ncols * (nrows + 1)) / 2;
9171 for(
i = 0, k = 0;
i < ncols; ++
i )
9205 ind[k] = (int)nrows - 1;
9216 (
int)ncols,
obj, lb, ub,
NULL,
9217 (
int)nrows, lb, lb,
NULL,
9218 (
int)nnonz, beg, ind, val) );
9221 ind[0] = (int)nrows - 1;
9258 unsigned int ncorners;
9271 facetval = facetconstant;
9272 for(
i = 0;
i < (
unsigned int) nallvars; ++
i )
9273 facetval += facetcoefs[
i] * box[2*
i];
9276 funval = funvals[0];
9278 error = funval - facetval;
9280 error = facetval - funval;
9283 maxerror =
MAX(error, maxerror);
9286 for(
i = 1;
i < ncorners; ++
i )
9293 gray =
i ^ (
i >> 1);
9298 while( (diff >>= 1) != 0 )
9302 origpos = nonfixedpos[pos];
9305 facetval += facetcoefs[origpos] * (box[2*origpos+1] - box[2*origpos]);
9307 facetval -= facetcoefs[origpos] * (box[2*origpos+1] - box[2*origpos]);
9310 funval = funvals[gray];
9312 error = funval - facetval;
9314 error = facetval - funval;
9317 maxerror =
MAX(error, maxerror);
9373 if( conshdlrdata->vp_randnumgen ==
NULL && conshdlrdata->vp_maxperturb > 0.0 )
9379 if( conshdlrdata->vp_lp[
nvars] ==
NULL )
9383 lp = conshdlrdata->vp_lp[
nvars];
9401 for(
i = 0;
i < ncols; ++
i )
9406 for(
i = 0;
i < nrows-1; ++
i )
9415 varpos = nonfixedpos[
i];
9416 lb = box[2 * varpos];
9417 ub = box[2 * varpos + 1];
9418 solval = xstar[varpos];
9420 if( ub - lb < mindomwidth )
9421 mindomwidth = ub - lb;
9426 else if( solval >= ub )
9429 aux[
i] = (solval - lb) / (ub - lb);
9432 if( conshdlrdata->vp_maxperturb > 0.0 )
9437 aux[
i] -=
SCIPrandomGetReal(conshdlrdata->vp_randnumgen, 0.0, conshdlrdata->vp_maxperturb);
9438 else if( aux[
i] == 0.0 )
9439 aux[
i] +=
SCIPrandomGetReal(conshdlrdata->vp_randnumgen, 0.0, conshdlrdata->vp_maxperturb);
9444 perturbation =
MIN( aux[
i], 1.0 - aux[
i] ) / 2.0;
9445 perturbation =
MIN( perturbation, conshdlrdata->vp_maxperturb );
9446 aux[
i] +=
SCIPrandomGetReal(conshdlrdata->vp_randnumgen, -perturbation, perturbation);
9448 assert(0.0 < aux[
i] && aux[
i] < 1.0);
9481 if( conshdlrdata->vp_dualsimplex )
9509 facetcoefs[nonfixedpos[
i]] = aux[
i];
9511 *facetconstant = aux[nrows - 1];
9515 for(
i = 0;
i < nallvars; ++
i )
9535 varpos = nonfixedpos[
i];
9536 lb = box[2 * varpos];
9537 ub = box[2 * varpos + 1];
9541 facetcoefs[varpos] = facetcoefs[varpos] / (ub - lb);
9544 *facetconstant -= facetcoefs[varpos] * lb;
9547 facetvalue += facetcoefs[varpos] * xstar[varpos];
9554 facetvalue += *facetconstant;
9563 if( overestimate == (facetvalue > targetvalue) )
9565 SCIPdebugMsg(
scip,
"missed the target, facetvalue %g targetvalue %g, overestimate=%u\n", facetvalue, targetvalue, overestimate);
9606 *facetcoef = (funright - funleft) / (right - left);
9607 *facetconstant = funleft - *facetcoef * left;
9644 *
alpha = -b3*c2 + a3*(-b2+c2) + a2*(b3-c3) + b2*c3;
9645 *beta = -(-b3*c1 + a3*(-b1+c1) + a1*(b3-c3) + b1*c3);
9646 *gamma_ = -a2*b1 + a1*b2 + a2*c1 - b2*c1 - a1*c2 + b1*c2;
9647 *delta = -a3*b2*c1 + a2*b3*c1 + a3*b1*c2 - a1*b3*c2 - a2*b1*c3 + a1*b2*c3;
9694 SCIPdebugMsg(
scip,
"numerical troubles - try to solve the linear system via an LU factorization\n");
9772 targetvalue = -targetvalue;
9789 for( leaveout = 1; leaveout <= 4; ++leaveout )
9795 SCIP_CALL(
computeHyperplaneThreePoints(
scip, p2[0], p2[1], p2val, p3[0], p3[1], p3val, p4[0], p4[1], p4val,
9796 &
alpha, &beta, &gamma_, &delta) );
9798 if(
alpha * p1[0] + beta * p1[1] + gamma_ * p1val - delta > 0.0 )
9804 SCIP_CALL(
computeHyperplaneThreePoints(
scip, p1[0], p1[1], p1val, p3[0], p3[1], p3val, p4[0], p4[1], p4val,
9805 &
alpha, &beta, &gamma_, &delta) );
9807 if(
alpha * p2[0] + beta * p2[1] + gamma_ * p2val - delta > 0.0 )
9813 SCIP_CALL(
computeHyperplaneThreePoints(
scip, p1[0], p1[1], p1val, p2[0], p2[1], p2val, p4[0], p4[1], p4val,
9814 &
alpha, &beta, &gamma_, &delta) );
9816 if(
alpha * p3[0] + beta * p3[1] + gamma_ * p3val - delta > 0.0 )
9822 SCIP_CALL(
computeHyperplaneThreePoints(
scip, p1[0], p1[1], p1val, p2[0], p2[1], p2val, p3[0], p3[1], p3val,
9823 &
alpha, &beta, &gamma_, &delta) );
9825 if(
alpha * p4[0] + beta * p4[1] + gamma_ * p4val - delta > 0.0 )
9850 xstarval = -
alpha/gamma_ * xstar[0] -beta/gamma_ * xstar[1] + delta/gamma_;
9853 if( xstarval <= targetvalue && (!*success || xstarval < candxstarval) )
9859 facetcoefs[0] = -
alpha/gamma_;
9860 facetcoefs[1] = -beta/gamma_;
9861 *facetconstant = delta/gamma_;
9864 candxstarval = xstarval;
9886 if( nelems > *maxnelems )
9891 assert(newsize >= nelems);
9895 *maxnelems = newsize;
9916 if( nelems > *maxnelems )
9921 assert(newsize > *maxnelems);
9926 *maxnelems = newsize;
9978 assert(*maxnconsvars > 0);
9986 if( nchildren != 2 )
9996 for( childidx = 0; childidx < 2; ++childidx )
9999 (*consvals)[0] = 1.0;
10014 if( childidx == 0 )
10016 var1 = (*consvars)[0];
10017 val1 = (*consvals)[0];
10021 var2 = (*consvars)[0];
10022 val2 = (*consvals)[0];
10051 prodval = coef * val1 * val2;
10135 safeexponent = (int) (exponent + 0.5);
10136 if( safeexponent % 2 != 0 )
10219 (*consvars)[0] =
var;
10220 (*consvals)[0] = 1.0;
10236 var = (*consvars)[0];
10237 edgeweight = (*consvals)[0];
10248 TRUE, edgeweight) );
10250 TRUE, edgeweight) );
10310 for(
i = 0;
i < nlocvars; ++
i)
10330 var = (*consvars)[0];
10334 if( nlocvars == 2 )
10336 var = (*consvars)[1];
10359 if( nlocvars == 1 )
10361 var = (*consvars)[0];
10362 weight = (*consvals)[0];
10383 for(
i = 0;
i < 2; ++
i)
10385 var = (*consvars)[
i];
10386 weight =
ABS((*consvals)[
i]);
10431 assert(*maxnconsvars > 0);
10455 hasval, val, consvars, consvals, maxnconsvars, success) );
10460 hasval, val, consvars, consvals, maxnconsvars, handledexprs, success) );
10513 return (ub + lb) / 2;
10547 int* powperm =
NULL;
10548 int* prodperm =
NULL;
10559 int nprodexprs = 0;
10569 assert(*maxnconsvars > 0);
10583 for(
i = 0;
i < nchildren; ++
i )
10619 powexprs[npowexprs] = children[
i];
10620 powvars[npowexprs++] =
var;
10648 prodexprs[nprodexprs] = children[
i];
10649 prodvars[nprodexprs++] =
var;
10650 prodexprs[nprodexprs] = children[
i];
10651 prodvars[nprodexprs++] = var2;
10656 if( npowexprs == 0 || nprodexprs != npowexprs )
10663 SCIPsort(powperm, SCIPsortVarPtr, (
void*) powvars, npowexprs);
10664 SCIPsort(prodperm, SCIPsortVarPtr, (
void*) prodvars, npowexprs);
10666 for(
i = 0;
i < npowexprs; ++
i )
10673 assert(npowexprs % 2 == 0);
10684 (*consvals)[0] = 1.0;
10685 (*consvars)[0] = prodvars[cnt++];
10692 if( nlocvars != 1 )
10697 actvar = (*consvars)[0];
10698 val = (*consvals)[0];
10700 (*consvals)[0] = 1.0;
10701 (*consvars)[0] = prodvars[cnt++];
10708 if( nlocvars != 1 )
10710 actvar2 = (*consvars)[0];
10711 val2 = (*consvals)[0];
10744 for( j = 0; j < npowexprs && !(var1found && var2found); ++j )
10746 if( powexprused[j] )
10750 if( !var1found && powvars[j] == prodvars[cnt - 2] )
10753 powexprused[j] =
TRUE;
10756 else if( !var2found && powvars[j] == prodvars[cnt - 1] )
10759 powexprused[j] =
TRUE;
10878 if( expr == rootexpr )
10879 parentidx = consnodeidx;
10883 parentidx = openidx[nopenidx - 1];
10887 hasparentcoef =
FALSE;
10888 if ( expr != rootexpr )
10899 openidx[nopenidx++] = -1;
10901 assert(maxnconsvars > 0);
10905 if( hasparentcoef )
10910 parentidx = nodeidx;
10930 parentidx = thisidx;
10933 nconsvars, constant) );
10946 openidx[nopenidx++] = -1;
10952 assert(expr == rootexpr || parentidx > 0);
10964 usedefaultgadget =
FALSE;
11003 &consvars, &consvals, &maxnconsvars, handledexprs) );
11007 openidx[nopenidx++] = sumidx;
11014 parentcoef, &consvars, &consvals, &maxnconsvars, handledexprs, &succ) );
11018 usedefaultgadget =
FALSE;
11028 &consvars, &consvals, &maxnconsvars, handledexprs, &succ) );
11032 usedefaultgadget =
FALSE;
11037 if( usedefaultgadget )
11067 openidx[nopenidx++] = opidx;
11105 assert(targetconshdlr != conshdlr);
11111 for(
i = 0;
i < sourceconshdlrdata->nnlhdlrs; ++
i )
11113 SCIP_CALL( SCIPnlhdlrCopyhdlr(
scip, targetconshdlr, conshdlr, sourceconshdlrdata->nlhdlrs[
i]) );
11132 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
11138 conshdlrdata->nlhdlrssize = 0;
11141 for(
i = 0;
i < conshdlrdata->nconsupgrades; ++
i )
11152 if( conshdlrdata->vp_randnumgen !=
NULL )
11158 if( conshdlrdata->vp_lp[
i] !=
NULL )
11164 assert(conshdlrdata->branchrandnumgen ==
NULL);
11187 conshdlrdata->lastboundrelax = ++conshdlrdata->curboundstag;
11189 conshdlrdata->enforound = 1;
11191 conshdlrdata->auxvarid = 0;
11193 for(
i = 0;
i < nconss; ++
i )
11200 if( conshdlrdata->nnlhdlrs > 1 )
11201 SCIPsortDownPtr((
void**)conshdlrdata->nlhdlrs, SCIPnlhdlrComp, conshdlrdata->nnlhdlrs);
11208 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
11214 conshdlrdata->nweaksepa = 0;
11215 conshdlrdata->ntightenlp = 0;
11216 conshdlrdata->ndesperatebranch = 0;
11217 conshdlrdata->ndesperatecutoff = 0;
11218 conshdlrdata->ndesperatetightenlp = 0;
11219 conshdlrdata->nforcelp = 0;
11221 conshdlrdata->ncanonicalizecalls = 0;
11224 ENFOLOG( enfologfile = fopen(ENFOLOGFILE,
"w"); )
11246 SCIPsortDownPtr((
void**)consssorted, compIndexConsNonlinear, nconss);
11248 for(
i = 0;
i < nconss; ++
i )
11257 conshdlrdata->subnlpheur =
NULL;
11258 conshdlrdata->trysolheur =
NULL;
11260 if( conshdlrdata->vp_randnumgen !=
NULL )
11266 if( conshdlrdata->vp_lp[
i] !=
NULL )
11272 if( conshdlrdata->branchrandnumgen !=
NULL )
11276 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
11282 if( enfologfile !=
NULL )
11284 fclose(enfologfile);
11285 enfologfile =
NULL;
11293#ifdef SCIP_DISABLED_CODE
11297 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
11303#define consInitpreNonlinear NULL
11362 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
11368 if( conshdlrdata->branchpscostweight > 0.0 )
11371 if( strchr(
"lds", conshdlrdata->branchpscostupdatestrategy) ==
NULL )
11373 SCIPerrorMessage(
"branching/lpgainnormalize strategy %c unknown\n", conshdlrdata->branchpscostupdatestrategy);
11398 conshdlrdata->checkedvarlocks =
FALSE;
11401 if( conshdlrdata->newsoleventfilterpos >= 0 )
11409 conshdlrdata->newsoleventfilterpos = -1;
11425 assert((*consdata)->nlockspos == 0);
11426 assert((*consdata)->nlocksneg == 0);
11434 if( (*consdata)->nlrow !=
NULL )
11461 targetexpr, sourcedata->lhs, sourcedata->rhs,
FALSE,
11491 if( conshdlrdata->linearizeheursol !=
'o' && conshdlrdata->newsoleventfilterpos == -1 )
11499 eventhdlr, (
SCIP_EVENTDATA*)conshdlr, &conshdlrdata->newsoleventfilterpos) );
11566 for(
c = 0;
c < nconss; ++
c )
11593 SCIPdebugMsg(
scip,
"registered %d external branching candidates\n", nnotify);
11598 SCIPdebugMsg(
scip,
"could not find branching candidates, forcing to solve LP\n");
11632 maypropfeasible =
FALSE;
11635 for(
c = 0;
c < nconss; ++
c )
11650 maxviol =
MAX(maxviol, absviol);
11670 else if( (conshdlrdata->subnlpheur ==
NULL ||
sol ==
NULL) && !maypropfeasible && !completely )
11678 maypropfeasible =
FALSE;
11680 if( maypropfeasible )
11687 if( !(consdata->linvarincr !=
NULL && consdata->linvarincrcoef > 0.0) &&
11688 !(consdata->linvardecr !=
NULL && consdata->linvardecrcoef < 0.0) )
11689 maypropfeasible =
FALSE;
11697 if( !(consdata->linvarincr !=
NULL && consdata->linvarincrcoef < 0.0) &&
11698 !(consdata->linvardecr !=
NULL && consdata->linvardecrcoef > 0.0) )
11699 maypropfeasible =
FALSE;
11805 for(
c = 0;
c < nconss; ++
c )
11831 && !conshdlrdata->checkedvarlocks && conshdlrdata->checkvarlocks !=
'd' )
11836 conshdlrdata->checkedvarlocks =
TRUE;
11838 for(
c = 0;
c < nconss; ++
c )
11840 int tmpnchgvartypes = 0;
11841 int tmpnaddconss = 0;
11844 SCIPdebugMsg(
scip,
"presolSingleLockedVars() for %s: nchgvartypes=%d naddconss=%d infeas=%u\n",
11854 (*nchgvartypes) += tmpnchgvartypes;
11855 (*naddconss) += tmpnaddconss;
11859 if( *ndelconss > 0 || *nchgbds > 0 || *nupgdconss > 0 || *naddconss > 0 || *nchgvartypes > 0 )
11869#ifdef SCIP_DISABLED_CODE
11873 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
11879#define consRespropNonlinear NULL
11904 if( ownerdata->nenfos >= 0 )
11906 if( (consdata->nlockspos == 0) != (nlockspos == 0) )
11907 reinitsolve =
TRUE;
11908 if( (consdata->nlocksneg == 0) != (nlocksneg == 0) )
11909 reinitsolve =
TRUE;
11944 if( !consdata->issimplified )
11953 consdata->expr = simplified;
11954 consdata->issimplified =
TRUE;
11985 if( hashmapexpr !=
NULL && hashmapexpr != child )
12003 assert(consdata->nlockspos == 0);
12004 assert(consdata->nlocksneg == 0);
12090#ifdef SCIP_DISABLED_CODE
12094 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
12100#define consDelvarsNonlinear NULL
12153 SCIP_CALL(
SCIPcopyExpr(sourcescip,
scip, sourcedata->expr, &targetexpr, exprownerCreate, (
void*)targetconshdlr, varmap, consmap, global,
valid) );
12155 if( targetexpr ==
NULL )
12163 targetexpr, sourcedata->lhs, sourcedata->rhs,
FALSE,
12164 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
12167 if( targetexpr !=
NULL )
12200 endptr = (
char*)str;
12209 if( isdigit((
unsigned char)str[0]) || ((str[0] ==
'-' || str[0] ==
'+') && isdigit((
unsigned char)str[1])) )
12221 if( endptr[0] !=
'<' || endptr[1] !=
'=' )
12245 if( strncmp(str,
"[free]", 6) == 0 )
12299 consexprtree, lhs, rhs,
FALSE,
12300 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
12325 if( varssize < consdata->nvarexprs )
12331 for(
i = 0;
i < consdata->nvarexprs; ++
i )
12354 *
nvars = consdata->nvarexprs;
12361#ifdef SCIP_DISABLED_CODE
12365 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
12371#define consGetDiveBdChgsNonlinear NULL
12406 SCIPinfoMessage(
scip, file,
"Nonlinear Conshdlr : %10s %10s %10s %10s %10s %10s %10s\n",
"WeakSepa",
"TightenLP",
"DespTghtLP",
"DespBranch",
"DespCutoff",
"ForceLP",
"CanonTime");
12519 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
12553 conshdlrdata->intevalvar = intEvalVarBoundTightening;
12554 conshdlrdata->curboundstag = 1;
12555 conshdlrdata->lastboundrelax = 1;
12556 conshdlrdata->curpropboundstag = 1;
12557 conshdlrdata->newsoleventfilterpos = -1;
12568 conshdlrCopyNonlinear,
12569 consFreeNonlinear, consInitNonlinear, consExitNonlinear,
12571 consDeleteNonlinear, consTransNonlinear, consInitlpNonlinear,
12572 consSepalpNonlinear, consSepasolNonlinear, consEnfolpNonlinear, consEnforelaxNonlinear, consEnfopsNonlinear, consCheckNonlinear,
12574 consActiveNonlinear, consDeactiveNonlinear,
12576 consPrintNonlinear, consCopyNonlinear, consParseNonlinear,
12578 consGetSignedPermsymGraphNonlinear, conshdlrdata) );
12583 "limit on number of propagation rounds for a set of constraints within one round of SCIP propagation",
12584 &conshdlrdata->maxproprounds,
FALSE, 10, 0, INT_MAX,
NULL,
NULL) );
12587 "whether to check bounds of all auxiliary variable to seed reverse propagation",
12591 "strategy on how to relax variable bounds during bound tightening: relax (n)ot, relax by (a)bsolute value, relax always by a(b)solute value, relax by (r)relative value",
12592 &conshdlrdata->varboundrelax,
TRUE,
'r',
"nabr",
NULL,
NULL) );
12595 "by how much to relax variable bounds during bound tightening if strategy 'a', 'b', or 'r'",
12599 "by how much to relax constraint sides during bound tightening",
12603 "maximal relative perturbation of reference point when computing facet of envelope of vertex-polyhedral function (dim>2)",
12607 "adjust computed facet of envelope of vertex-polyhedral function up to a violation of this value times LP feasibility tolerance",
12611 "whether to use dual simplex instead of primal simplex for LP that computes facet of vertex-polyhedral function",
12615 "maximal number of auxiliary expressions per bilinear term",
12619 "whether to reformulate products of binary variables during presolving",
12623 "whether to use the AND constraint handler for reformulating binary products",
12627 "minimum number of terms to reformulate bilinear binary products by factorizing variables (<= 1: disabled)",
12628 &conshdlrdata->reformbinprodsfac,
FALSE, 50, 1, INT_MAX,
NULL,
NULL) );
12631 "whether to forbid multiaggregation of nonlinear variables",
12635 "whether to tighten LP feasibility tolerance during enforcement, if it seems useful",
12639 "whether to (re)run propagation in enforcement",
12643 "threshold for when to regard a cut from an estimator as weak (lower values allow more weak cuts)",
12644 &conshdlrdata->weakcutthreshold,
TRUE, 0.2, 0.0, 1.0,
NULL,
NULL) );
12647 "\"strong\" cuts will be scaled to have their maximal coef in [1/strongcutmaxcoef,strongcutmaxcoef]",
12651 "consider efficacy requirement when deciding whether a cut is \"strong\"",
12655 "whether to force \"strong\" cuts in enforcement",
12659 "an expression will be enforced if the \"auxiliary\" violation is at least this factor times the \"original\" violation",
12660 &conshdlrdata->enfoauxviolfactor,
TRUE, 0.01, 0.0, 1.0,
NULL,
NULL) );
12663 "retry enfo of constraint with weak cuts if violation is least this factor of maximal violated constraints",
12664 &conshdlrdata->weakcutminviolfactor,
TRUE, 0.5, 0.0, 2.0,
NULL,
NULL) );
12667 "whether to make rows to be non-removable in the node where they are added (can prevent some cycling): 'o'ff, in 'e'nforcement only, 'a'lways",
12668 &conshdlrdata->rownotremovable,
TRUE,
'o',
"oea",
NULL,
NULL) );
12671 "method how to scale violations to make them comparable (not used for feasibility check): (n)one, (a)ctivity and side, norm of (g)radient",
12672 &conshdlrdata->violscale,
TRUE,
'n',
"nag",
NULL,
NULL) );
12675 "whether variables contained in a single constraint should be forced to be at their lower or upper bounds ('d'isable, change 't'ype, add 'b'ound disjunction)",
12676 &conshdlrdata->checkvarlocks,
TRUE,
't',
"bdt",
NULL,
NULL) );
12679 "from which depth on in the tree to allow branching on auxiliary variables (variables added for extended formulation)",
12680 &conshdlrdata->branchauxmindepth,
FALSE, INT_MAX, 0, INT_MAX,
NULL,
NULL) );
12683 "whether to use external branching candidates and branching rules for branching",
12687 "consider a constraint highly violated if its violation is >= this factor * maximal violation among all constraints",
12688 &conshdlrdata->branchhighviolfactor,
FALSE, 0.0, 0.0, 1.0,
NULL,
NULL) );
12691 "consider a variable branching score high if its branching score >= this factor * maximal branching score among all variables",
12692 &conshdlrdata->branchhighscorefactor,
FALSE, 0.9, 0.0, 1.0,
NULL,
NULL) );
12695 "weight by how much to consider the violation assigned to a variable for its branching score",
12699 "weight by how much to consider fractionality of integer variables in branching score for spatial branching",
12703 "weight by how much to consider the dual values of rows that contain a variable for its branching score",
12707 "weight by how much to consider the pseudo cost of a variable for its branching score",
12711 "weight by how much to consider the domain width in branching score",
12715 "weight by how much to consider variable type (continuous: 0, binary: 1, integer: 0.1, impl-integer: 0.01) in branching score",
12719 "how to aggregate several branching scores given for the same expression: 'a'verage, 'm'aximum, 's'um",
12720 &conshdlrdata->branchscoreagg,
FALSE,
's',
"ams",
NULL,
NULL) );
12723 "method used to split violation in expression onto variables: 'u'niform, 'm'idness of solution, 'd'omain width, 'l'ogarithmic domain width",
12724 &conshdlrdata->branchviolsplit,
FALSE,
'm',
"umdl",
NULL,
NULL) );
12727 "minimum pseudo-cost update count required to consider pseudo-costs reliable",
12731 "minimal average pseudo cost count for discrete variables at which to start considering spatial branching before branching on fractional integer variables",
12735 "whether tight linearizations of nonlinear constraints should be added to cutpool when some heuristics finds a new solution ('o'ff, on new 'i'ncumbents, on 'e'very solution)",
12736 &conshdlrdata->linearizeheursol,
FALSE,
'o',
"oie",
NULL,
NULL) );
12739 "whether to assume that any constraint in the presolved problem is convex",
12744 "signals a bound change to a nonlinear constraint", processVarEvent,
NULL) );
12774 processNewSolutionEvent,
NULL) );
12785 const char* conshdlrname
12800 if( conshdlr ==
NULL )
12810 for(
i = conshdlrdata->nconsupgrades - 1;
i >= 0; --
i )
12812 if( conshdlrdata->consupgrades[
i]->consupgd == nlconsupgd )
12815 SCIPwarningMessage(
scip,
"Try to add already known upgrade method for constraint handler <%s>.\n", conshdlrname);
12823 consupgrade->consupgd = nlconsupgd;
12829 assert(conshdlrdata->nconsupgrades+1 <= conshdlrdata->consupgradessize);
12831 for(
i = conshdlrdata->nconsupgrades;
i > 0 && conshdlrdata->consupgrades[
i-1]->priority < consupgrade->
priority; --
i )
12832 conshdlrdata->consupgrades[
i] = conshdlrdata->consupgrades[
i-1];
12834 conshdlrdata->consupgrades[
i] = consupgrade;
12835 conshdlrdata->nconsupgrades++;
12885 if( conshdlr ==
NULL )
12893 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
12965 assert(nquadterms == 0 || (quadvars1 !=
NULL && quadvars2 !=
NULL && quadcoefs !=
NULL));
12968 for(
i = 0;
i < nlinvars; ++
i )
12976 for(
i = 0;
i < nquadterms; ++
i )
12988 if( conshdlr ==
NULL )
12995 SCIP_CALL(
SCIPcreateExprQuadratic(
scip, &expr, nlinvars, linvars, lincoefs, nquadterms, quadvars1, quadvars2, quadcoefs, exprownerCreate, (
void*)conshdlr) );
13000 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
13031 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, cons, name, nlinvars, linvars, lincoefs, nquadterms, quadvars1, quadvars2, quadcoefs, lhs, rhs,
13081 SCIPerrorMessage(
"Second-order cone constant with infinite or nan value in nonlinear constraint %s\n", name);
13086 SCIPerrorMessage(
"Infinite or nan coefficient of right hand side variable in second-order cone constraint %s\n", name);
13091 SCIPerrorMessage(
"Infinite or nan right hand side offset in second-order cone constraint %s\n", name);
13103 if( offsets !=
NULL && offsets[
i] != 0.0 )
13122 termcoefs[0] = 1.0;
13125 termcoefs[1] = -rhscoeff;
13168 SCIPerrorMessage(
"exponent in nonlinear signpower constraint <%s> is infinite or nan\n", name);
13174 SCIPerrorMessage(
"argument offset in nonlinear signpower constraint <%s> is infinite or nan\n", name);
13180 SCIPerrorMessage(
"coefficient of linear variable in nonlinear signpower constraint <%s> is infinite or nan\n", name);
13185 if( xoffset != 0.0 )
13223 return conshdlrdata->curboundstag;
13236 return conshdlrdata->lastboundrelax;
13255 ++conshdlrdata->curboundstag;
13256 assert(conshdlrdata->curboundstag > 0);
13259 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
13312 sepasuccess =
TRUE;
13315 if( cutviol > 0.0 )
13336 if( (!overestimate && ( cutviol <= conshdlrdata->weakcutthreshold * (auxvalue - auxvarvalue))) ||
13337 ( overestimate && (-cutviol >= conshdlrdata->weakcutthreshold * (auxvalue - auxvarvalue))) )
13340 "weak: auxvarvalue %g estimateval %g auxvalue %g (over %d)\n",
13342 auxvarvalue + (overestimate ? -cutviol : cutviol), auxvalue, overestimate); )
13343 sepasuccess =
FALSE;
13348 estimateval = auxvarvalue + (!overestimate ? cutviol : -cutviol);
13352 sepasuccess =
FALSE;
13361 "estimateval %g auxvalue %g (over %d)\n ",
SCIPnlhdlrGetName(nlhdlr), auxvarvalue,
13362 auxvarvalue + (overestimate ? -cutviol : cutviol), auxvalue, overestimate);
13368 if( !allowweakcuts )
13380 "min requ viol = %g\n", cutviol, sepasuccess ?
"" :
"not ", mincutviolation); )
13382 sepasuccess = cutviol > mincutviolation;
13406 if( auxvarcoef == 0.0 ||
13407 (!overestimate && ( cutviol / auxvarcoef <= conshdlrdata->weakcutthreshold * (auxvalue - auxvarvalue))) ||
13408 ( overestimate && (-cutviol / auxvarcoef >= conshdlrdata->weakcutthreshold * (auxvalue - auxvarvalue))) )
13410 ENFOLOG(
SCIPinfoMessage(
scip, enfologfile,
" cut is too weak after cleanup: auxvarvalue %g estimateval %g auxvalue %g (over %d)\n",
13411 auxvarvalue, auxvarvalue + (overestimate ? -cutviol : cutviol) / auxvarcoef, auxvalue, overestimate); )
13412 sepasuccess =
FALSE;
13423 if( !branchscoresuccess )
13441#ifdef BRSCORE_ABSVIOL
13466 if( conshdlrdata->branchdualweight > 0.0 )
13477 (void) sprintf(gap,
"_estimategap=%g",
REALABS(auxvalue - estimateval));
13503 SCIP_CALL(
SCIPaddRow(
scip, row, conshdlrdata->forcestrongcut && !allowweakcuts && inenforcement, &infeasible) );
13506 if( conshdlrdata->rownotremovable ==
'a' || (conshdlrdata->rownotremovable ==
'e' && inenforcement) )
13523 else if( branchscoresuccess )
13536 "branching candidates%s\n",
SCIPnlhdlrGetName(nlhdlr), (allowweakcuts && inenforcement) ?
13555 return conshdlrdata->assumeconvex;
13593 return conshdlrdata->nbilinterms;
13612 return conshdlrdata->bilinterms;
13637 if( conshdlrdata->bilinhashtable ==
NULL )
13653 assert(idx >= -1 && idx < conshdlrdata->nbilinterms);
13654 assert(idx < 0 || conshdlrdata->bilinterms[idx].
x ==
x);
13655 assert(idx < 0 || conshdlrdata->bilinterms[idx].
y ==
y);
13682 assert(idx >= -1 && idx < conshdlrdata->nbilinterms);
13686 return &conshdlrdata->bilinterms[idx];
13733 term = &conshdlrdata->bilinterms[idx];
13739 if( auxvar !=
NULL )
13775 nlockspos = overestimate ? 1 : 0;
13776 nlocksneg = overestimate ? 0 : 1;
13780 term = &conshdlrdata->bilinterms[idx];
13791 if( conshdlrdata->bilinmaxnauxexprs <= 1 )
13795 auxvarexpr->
cst = 0.0;
13796 auxvarexpr->
coefs[0] = 1.0;
13797 auxvarexpr->
coefs[1] = 0.0;
13798 auxvarexpr->
coefs[2] = 0.0;
13816 auxexpr->
auxvar = auxvar;
13817 auxexpr->
coefs[0] = coefaux;
13821 auxexpr->
coefs[1] = coefx;
13822 auxexpr->
coefs[2] = coefy;
13828 auxexpr->
coefs[1] = coefy;
13829 auxexpr->
coefs[2] = coefx;
13831 auxexpr->
cst = cst;
13838 else if( auxvar !=
NULL )
13867 unsigned int ncorners;
13885 for( j = 0; j < nallvars; ++j )
13889 nonfixedpos[
nvars] = j;
13907 for( j = 0; j < nallvars; ++j )
13910 corner[j] = (box[2 * j] + box[2 * j + 1]) / 2.0;
13912 for(
i = 0;
i < ncorners; ++
i )
13915 for( j = 0; j <
nvars; ++j )
13917 int varpos = nonfixedpos[j];
13921 if( (
i >> j) & 0x1 )
13922 corner[varpos] = box[2 * varpos + 1];
13924 corner[varpos] = box[2 * varpos ];
13929 funvals[
i] = function(corner, nallvars, fundata);
13935 SCIPdebugMsg(
scip,
"cannot compute underestimator; function value at corner is too large %g\n", funvals[
i]);
13948 if( *success && overestimate == (*facetconstant + facetcoefs[nonfixedpos[0]] * xstar[nonfixedpos[0]] > targetvalue) )
13950 SCIPdebugMsg(
scip,
"computed secant, but missed target %g (facetvalue=%g, overestimate=%u)\n", targetvalue, *facetconstant + facetcoefs[nonfixedpos[0]] * xstar[nonfixedpos[0]], overestimate);
13956 int idx1 = nonfixedpos[0];
13957 int idx2 = nonfixedpos[1];
13958 SCIP_Real p1[2] = { box[2*idx1], box[2*idx2] };
13959 SCIP_Real p2[2] = { box[2*idx1+1], box[2*idx2] };
13960 SCIP_Real p3[2] = { box[2*idx1], box[2*idx2+1] };
13961 SCIP_Real p4[2] = { box[2*idx1+1], box[2*idx2+1] };
13962 SCIP_Real xstar2[2] = { xstar[idx1], xstar[idx2] };
13965 SCIP_CALL(
computeVertexPolyhedralFacetBivariate(
scip, overestimate, p1, p2, p3, p4, funvals[0], funvals[1], funvals[2], funvals[3], xstar2, targetvalue, success, coefs, facetconstant) );
13967 facetcoefs[idx1] = coefs[0];
13968 facetcoefs[idx2] = coefs[1];
13972 SCIP_CALL(
computeVertexPolyhedralFacetLP(
scip, conshdlr, overestimate, xstar, box, nallvars, nonfixedpos, funvals,
nvars, targetvalue, success, facetcoefs, facetconstant) );
13987 if( maxfaceterror > 0.0 )
13996 for( j = 0; j <
nvars; ++j )
13997 corner[nonfixedpos[j]] = (box[2 * nonfixedpos[j]] + box[2 * nonfixedpos[j] + 1]) / 2.0;
13998 midval = function(corner, nallvars, fundata);
14006 if( maxfaceterror > conshdlrdata->vp_adjfacetthreshold * feastol * fabs(midval) )
14008 SCIPdebugMsg(
scip,
"ignoring facet due to instability, it cuts off a vertex by %g (midval=%g).\n", maxfaceterror, midval);
14013 SCIPdebugMsg(
scip,
"maximum facet error %g (midval=%g), adjust constant to make cut valid!\n", maxfaceterror, midval);
14016 *facetconstant += maxfaceterror;
14018 *facetconstant -= maxfaceterror;
14050 return consdata->expr;
14066 return consdata->lhs;
14082 return consdata->rhs;
14101 if( consdata->nlrow ==
NULL )
14106 *nlrow = consdata->nlrow;
14127 return consdata->curv;
14181 SCIPerrorMessage(
"SCIPchgLhsNonlinear can only be called in problem stage.\n");
14191 if( consdata->lhs == lhs )
14194 consdata->lhs = lhs;
14197 consdata->ispropagated =
FALSE;
14220 SCIPerrorMessage(
"SCIPchgLhsNonlinear can only be called in problem stage.\n");
14230 if( consdata->rhs == rhs )
14233 consdata->rhs = rhs;
14236 consdata->ispropagated =
FALSE;
14260 SCIPerrorMessage(
"SCIPchgExprNonlinear can only be called in problem stage.\n");
14278 assert(consdata->nvarexprs == 0);
14280 assert(!consdata->catchedevents);
14289 consdata->issimplified =
FALSE;
14290 consdata->ispropagated =
FALSE;
14315 SCIPerrorMessage(
"SCIPaddLinearVarNonlinear can only be called in problem stage.\n");
14336 assert(consdata->nvarexprs == 0);
14338 assert(!consdata->catchedevents);
14350 SCIP_EXPR* children[2] = { consdata->expr, varexpr };
14362 consdata->issimplified =
FALSE;
14363 consdata->ispropagated =
FALSE;
14388 SCIPerrorMessage(
"SCIPaddExprNonlinear can only be called in problem stage.\n");
14425 SCIP_EXPR* children[2] = { consdata->expr, exprowned };
14437 consdata->issimplified =
FALSE;
14438 consdata->ispropagated =
FALSE;
14534 *
var = consdata->linvardecr;
14535 *coef = consdata->linvardecrcoef;
14558 *
var = consdata->linvarincr;
14559 *coef = consdata->linvarincrcoef;
14604 return ownerdata->filterpos >= -1 ?
SCIPgetVarExprVar(expr) : ownerdata->auxvar;
14637 assert(idx < ownerdata->nenfos);
14641 *nlhdlr = ownerdata->enfos[idx]->nlhdlr;
14643 if( nlhdlrexprdata !=
NULL )
14644 *nlhdlrexprdata = ownerdata->enfos[idx]->nlhdlrexprdata;
14646 if( nlhdlrparticipation !=
NULL )
14647 *nlhdlrparticipation = ownerdata->enfos[idx]->nlhdlrparticipation;
14649 if( sepabelowusesactivity !=
NULL )
14650 *sepabelowusesactivity = ownerdata->enfos[idx]->sepabelowusesactivity;
14652 if( sepaaboveusesactivity !=
NULL )
14653 *sepaaboveusesactivity = ownerdata->enfos[idx]->sepaaboveusesactivity;
14655 if( auxvalue !=
NULL )
14656 *auxvalue = ownerdata->enfos[idx]->auxvalue;
14674 assert(idx < ownerdata->nenfos);
14677 ownerdata->enfos[idx]->auxvalue = auxvalue;
14755 if( ownerdata->nenfos >= 0 &&
14756 ( (ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 && (useactivityforprop || useactivityforsepabelow || useactivityforsepaabove)) ||
14757 (ownerdata->nauxvaruses == 0 && useauxvar)
14769 ++ownerdata->nauxvaruses;
14771 if( useactivityforprop )
14772 ++ownerdata->nactivityusesprop;
14774 if( useactivityforsepabelow || useactivityforsepaabove )
14775 ++ownerdata->nactivityusessepa;
14780 if( useactivityforsepabelow )
14782 if( useactivityforsepaabove )
14785 if( useactivityforprop )
14949 if( ownerdata->propboundstag == conshdlrdata->curpropboundstag )
14951 bounds = ownerdata->propbounds;
14964 if( ownerdata->auxvar !=
NULL )
14969 auxvarbounds = conshdlrdata->intevalvar(
scip, ownerdata->auxvar, conshdlrdata);
15052 if( ownerdata->propboundstag == conshdlrdata->curpropboundstag )
15065 SCIPdebugMsg(
scip,
" applied %s: [%.20g,%.20g]\n", ownerdata->propboundstag == conshdlrdata->curpropboundstag ?
"previous propbounds" :
"activity", newbounds.
inf, newbounds.
sup);
15071 SCIPdebugMsg(
scip,
" cut off due to empty intersection with previous propbounds or activity\n");
15083 ownerdata->propbounds = newbounds;
15084 ownerdata->propboundstag = conshdlrdata->curpropboundstag;
15098 SCIPdebugMsg(
scip,
" new bounds [%g,%g] for expr %p not sufficiently tighter than activity -- not adding to propqueue or tightening auxvar\n", newbounds.
inf, newbounds.
sup, (
void*)expr);
15103 if(
SCIPexprGetNChildren(expr) > 0 && !ownerdata->inpropqueue && (ownerdata->nactivityusesprop > 0 || ownerdata->nactivityusessepa > 0 || ownerdata->nenfos < 0) )
15112 ownerdata->inpropqueue =
TRUE;
15159 for(
c = 0;
c < ownerdata->nconss; ++
c )
15163 consdata->ispropagated =
FALSE;
15194 assert(violscore >= 0.0);
15208 if( ownerdata->violscoretag != conshdlrdata->enforound )
15210 ownerdata->violscoresum = violscore;
15211 ownerdata->violscoremax = violscore;
15212 ownerdata->nviolscores = 1;
15213 ownerdata->violscoretag = conshdlrdata->enforound;
15217 ownerdata->violscoresum += violscore;
15218 if( violscore > ownerdata->violscoremax )
15219 ownerdata->violscoremax = violscore;
15220 ++ownerdata->nviolscores;
15269 for(
i = 0;
i < nexprs; ++
i )
15278 if( varssize ==
nvars )
15285 varexprs[
nvars++] = e;
15315 if( conshdlrdata->enforound != ownerdata->violscoretag )
15318 if( ownerdata->nviolscores == 0 )
15321 switch( conshdlrdata->branchscoreagg )
15325 return ownerdata->violscoresum / ownerdata->nviolscores;
15329 return ownerdata->violscoremax;
15333 return ownerdata->violscoresum;
15336 SCIPerrorMessage(
"Invalid value %c for branchscoreagg parameter\n", conshdlrdata->branchscoreagg);
15458 for(
i = 0;
i < nlinexprs; ++
i )
15465 for(
i = 0;
i < nquadexprs; ++
i )
15477 auxvalue += (lincoef + sqrcoef * solval) * solval;
15481 for(
i = 0;
i < nbilinexprs; ++
i )
15507 int detectpriority,
15523 if( conshdlr ==
NULL )
15538 conshdlrdata->nlhdlrs[conshdlrdata->nnlhdlrs] = *nlhdlr;
15539 ++conshdlrdata->nnlhdlrs;
15545 SCIPsortDownPtr((
void**)conshdlrdata->nlhdlrs, SCIPnlhdlrComp, conshdlrdata->nnlhdlrs);
15562 return conshdlrdata->nnlhdlrs;
15577 return conshdlrdata->nlhdlrs;
15595 for(
h = 0;
h < conshdlrdata->nnlhdlrs; ++
h )
15597 return conshdlrdata->nlhdlrs[
h];
15620 for( e = 0; e < ownerdata->nenfos; ++e )
15621 if( ownerdata->enfos[e]->nlhdlr == nlhdlr )
15622 return ownerdata->enfos[e]->nlhdlrexprdata;
static GRAPHNODE ** active
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_SEPAPRIORITY
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
Constraint handler for AND constraints, .
constraint handler for bound disjunction constraints
Constraint handler for linear constraints in their most general form, .
static SCIP_Bool isBinaryProduct(SCIP *scip, SCIP_EXPR *expr)
static SCIP_RETCODE createExprVar(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR **expr, SCIP_VAR *var)
static SCIP_Real computeVertexPolyhedralMaxFacetError(SCIP *scip, SCIP_Bool overestimate, SCIP_Real *funvals, SCIP_Real *box, int nallvars, int nvars, int *nonfixedpos, SCIP_Real *facetcoefs, SCIP_Real facetconstant)
static SCIP_Bool isEvenOperator(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *hasvalue, SCIP_Real *value)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_EXPRITER *it, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result, SCIP_Bool *success)
static SCIP_RETCODE tryAddGadgetEvenOperatorVariable(SCIP *scip, SCIP_EXPR *evenopexpr, SCIP_EXPR *child, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_Bool hassymval, SCIP_Real symval, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_Bool *success)
static SCIP_RETCODE analyzeViolation(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Real *maxabsconsviol, SCIP_Real *maxrelconsviol, SCIP_Real *minauxviol, SCIP_Real *maxauxviol, SCIP_Real *maxvarboundviol)
static SCIP_RETCODE presolveRedundantConss(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *ndelconss, int *nchgbds)
static SCIP_RETCODE enforceExpr(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result)
static SCIP_RETCODE reversePropQueue(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool *infeasible, int *ntightenings)
#define BRANCH_RANDNUMINITSEED
static SCIP_RETCODE dropVarEvent(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EXPR *expr, SCIP_CONS *cons)
static SCIP_RETCODE forbidNonlinearVariablesMultiaggration(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE computeHyperplaneThreePoints(SCIP *scip, SCIP_Real a1, SCIP_Real a2, SCIP_Real a3, SCIP_Real b1, SCIP_Real b2, SCIP_Real b3, SCIP_Real c1, SCIP_Real c2, SCIP_Real c3, SCIP_Real *alpha, SCIP_Real *beta, SCIP_Real *gamma_, SCIP_Real *delta)
static SCIP_RETCODE propagateLocks(SCIP *scip, SCIP_EXPR *expr, int nlockspos, int nlocksneg)
static SCIP_RETCODE registerBranchingCandidates(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
static SCIP_RETCODE bilinTermAddAuxExpr(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONSNONLINEAR_BILINTERM *term, SCIP_CONSNONLINEAR_AUXEXPR *auxexpr, SCIP_Bool *added)
static SCIP_RETCODE freeVarExprs(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE proposeFeasibleSolution(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool *success)
static void scoreBranchingCandidates(SCIP *scip, SCIP_CONSHDLR *conshdlr, BRANCHCAND *cands, int ncands, SCIP_Bool considerfracnl, SCIP_SOL *sol)
#define consRespropNonlinear
static SCIP_RETCODE consSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
static void addExprsViolScore(SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Real violscore, SCIP_SOL *sol, SCIP_Bool *success)
static SCIP_RETCODE tightenAuxVarBounds(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *expr, SCIP_INTERVAL bounds, SCIP_Bool *cutoff, int *ntightenings)
#define TABLE_DESC_NLHDLR
static SCIP_RETCODE replaceBinaryProducts(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_HASHMAP *exprmap, SCIP_EXPRITER *it, int *naddconss, int *nchgcoefs)
static SCIP_RETCODE computeVertexPolyhedralFacetBivariate(SCIP *scip, SCIP_Bool overestimate, SCIP_Real p1[2], SCIP_Real p2[2], SCIP_Real p3[2], SCIP_Real p4[2], SCIP_Real p1val, SCIP_Real p2val, SCIP_Real p3val, SCIP_Real p4val, SCIP_Real xstar[2], SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
static SCIP_RETCODE tryAddGadgetEvenOperator(SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
#define consInitpreNonlinear
static SCIP_RETCODE addExprViolScoresAuxVars(SCIP *scip, SCIP_EXPR *expr, SCIP_Real violscore, SCIP_VAR **auxvars, int nauxvars, SCIP_SOL *sol, SCIP_Bool *success)
static SCIP_RETCODE detectNlhdlr(SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons)
static SCIP_RETCODE computeVertexPolyhedralFacetLP(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool overestimate, SCIP_Real *xstar, SCIP_Real *box, int nallvars, int *nonfixedpos, SCIP_Real *funvals, int nvars, SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
#define TABLE_EARLIEST_STAGE_NLHDLR
#define VERTEXPOLY_RANDNUMINITSEED
static SCIP_RETCODE getFactorizedBinaryQuadraticExpr(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_EXPR *sumexpr, int minterms, SCIP_EXPR **newexpr, int *naddconss)
#define consDelvarsNonlinear
static SCIP_RETCODE reformulateFactorizedBinaryQuadratic(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_VAR *facvar, SCIP_VAR **vars, SCIP_Real *coefs, int nvars, SCIP_EXPR **newexpr, int *naddconss)
static SCIP_RETCODE getConsRelViolation(SCIP *scip, SCIP_CONS *cons, SCIP_Real *viol, SCIP_SOL *sol, SCIP_Longint soltag)
#define consGetDiveBdChgsNonlinear
static SCIP_Bool isConsViolated(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE getBinaryProductExprDo(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *prodexpr, SCIP_EXPR **newexpr, int *naddconss, SCIP_Bool empathy4and)
static SCIP_RETCODE registerBranchingCandidatesAllUnfixed(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *nnotify)
static SCIP_Bool isIntervalBetter(SCIP *scip, SCIP_Bool subsetsufficient, SCIP_INTERVAL newinterval, SCIP_INTERVAL oldinterval)
static SCIP_RETCODE detectNlhdlrs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
#define TABLE_EARLIEST_STAGE_NONLINEAR
static SCIP_RETCODE getBinaryProductExpr(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_HASHMAP *exprmap, SCIP_EXPR *prodexpr, SCIP_EXPR **newexpr, int *naddconss, int *nchgcoefs)
static SCIP_RETCODE catchVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
#define TABLE_DESC_NONLINEAR
static SCIP_RETCODE createAuxVar(SCIP *scip, SCIP_EXPR *expr)
static SCIP_Real getViolSplitWeight(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *var, SCIP_SOL *sol)
static SCIP_RETCODE freeEnfoData(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool freeauxvar)
#define infty2infty(infty1, infty2, val)
static SCIP_RETCODE getBilinearBinaryTerms(SCIP *scip, SCIP_EXPR *sumexpr, SCIP_VAR **xs, SCIP_VAR **ys, int *childidxs, int *nterms)
static SCIP_RETCODE storeVarExprs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata)
static SCIP_RETCODE buildVertexPolyhedralSeparationLP(SCIP *scip, int nvars, SCIP_LPI **lp)
static SCIP_RETCODE tryAddGadgetSquaredDifference(SCIP *scip, SCIP_EXPR *sumexpr, SCIP_CONS *cons, SYM_GRAPH *graph, int sumnodeidx, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs)
static SCIP_RETCODE tryAddGadgetBilinearProductSignedPerm(SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
static SCIP_RETCODE propConss(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool force, SCIP_RESULT *result, int *nchgbds)
static SCIP_RETCODE presolveUpgrade(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *upgraded, int *nupgdconss, int *naddconss)
static SCIP_RETCODE forwardPropExpr(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *rootexpr, SCIP_Bool tightenauxvars, SCIP_Bool *infeasible, int *ntightenings)
static SCIP_RETCODE consEnfo(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_Bool isSingleLockedCand(SCIP *scip, SCIP_EXPR *expr)
static SCIP_Bool branchAuxNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr)
static SCIP_RETCODE presolveImplint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *nchgvartypes, SCIP_Bool *infeasible)
#define TABLE_NAME_NONLINEAR
#define TABLE_NAME_NLHDLR
static SCIP_RETCODE tryAddGadgetEvenOperatorSum(SCIP *scip, SCIP_EXPR *evenopexpr, SCIP_EXPR *child, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_Bool hassymval, SCIP_Real symval, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
static SCIP_Real getDualBranchscore(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
static SCIP_RETCODE deinitSolve(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE ensureLocVarsArraySize(SCIP *scip, SCIP_VAR ***vars, SCIP_Real **vals, int nelems, int *maxnelems)
static SCIP_RETCODE createNlRow(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE enforceExprNlhdlr(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_NLHDLR *nlhdlr, SCIP_EXPR *expr, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_Real auxvalue, SCIP_Bool overestimate, SCIP_Bool separated, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result)
static SCIP_RETCODE selectBranchingCandidate(SCIP *scip, SCIP_CONSHDLR *conshdlr, BRANCHCAND *cands, int ncands, SCIP_Bool considerfracnl, SCIP_SOL *sol, BRANCHCAND **selected)
static SCIP_RETCODE scaleConsSides(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *changed)
static SCIP_RETCODE computeViolation(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Longint soltag)
#define VERTEXPOLY_MAXPERTURBATION
static SCIP_RETCODE presolveBinaryProducts(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *naddconss, int *nchgcoefs)
static SCIP_RETCODE catchVarEvent(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EXPR *expr, SCIP_CONS *cons)
static SCIP_RETCODE enforceConstraints(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_Real maxrelconsviol, SCIP_RESULT *result)
static SCIP_RETCODE presolveSingleLockedVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, int *nchgvartypes, int *naddconss, SCIP_Bool *infeasible)
#define VERTEXPOLY_USEDUALSIMPLEX
static SCIP_Bool varIsCenteredAt0(SCIP *scip, SCIP_VAR *var)
static SCIP_RETCODE initSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *infeasible)
static SCIP_RETCODE computeVertexPolyhedralFacetUnivariate(SCIP *scip, SCIP_Real left, SCIP_Real right, SCIP_Real funleft, SCIP_Real funright, SCIP_Bool *success, SCIP_Real *facetcoef, SCIP_Real *facetconstant)
static SCIP_RETCODE collectBranchingCandidates(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Real maxrelconsviol, SCIP_SOL *sol, SCIP_Longint soltag, BRANCHCAND *cands, int *ncands)
static SCIP_RETCODE branching(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Real maxrelconsviol, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_RESULT *result)
static SCIP_RETCODE bilinearTermsInsertAll(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
#define VERTEXPOLY_ADJUSTFACETFACTOR
#define TABLE_POSITION_NONLINEAR
static SCIP_RETCODE initSolve(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
static SCIP_RETCODE removeSingleLockedVars(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRITER *it, SCIP_HASHMAP *exprcands)
static SCIP_RETCODE branchingIntegralOrNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Longint soltag, SCIP_Real maxrelconsviol, SCIP_Bool *branchintegral, SCIP_Bool *cutoff)
static void findUnlockedLinearVar(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE addLocks(SCIP *scip, SCIP_CONS *cons, int nlockspos, int nlocksneg)
static SCIP_RETCODE propExprDomains(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_RESULT *result, int *nchgbds)
static SCIP_RETCODE freeAuxVar(SCIP *scip, SCIP_EXPR *expr)
static SCIP_Real getConsAbsViolation(SCIP_CONS *cons)
static SCIP_RETCODE bilinearTermsFree(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_Bool branchingIntegralFirst(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol)
static SCIP_RETCODE createCons(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool copyexpr, 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)
static SCIP_RETCODE bilinearTermsInsertEntry(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, int nlockspos, int nlocksneg, int *idx, SCIP_Bool existing)
static SCIP_RETCODE notifyNlhdlrNewsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool solisbest)
static SCIP_Real getExprAbsOrigViolation(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Bool *violunder, SCIP_Bool *violover)
static SCIP_RETCODE presolveMergeConss(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
static SCIP_Real getDomainCenter(SCIP *scip, SCIP_VAR *var)
#define TABLE_POSITION_NLHDLR
static SCIP_RETCODE ensureOpenArraySizeSymdetect(SCIP *scip, int **openidx, int nelems, int *maxnelems)
static SCIP_RETCODE canonicalizeConstraints(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_PRESOLTIMING presoltiming, SCIP_Bool *infeasible, int *ndelconss, int *naddconss, int *nchgcoefs)
static SCIP_RETCODE dropVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
static SCIP_Real getExprAbsAuxViolation(SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Bool *violunder, SCIP_Bool *violover)
#define BILIN_MAXNAUXEXPRS
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for the set partitioning / packing / covering constraints .
Constraint handler for variable bound constraints .
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIP_INTERVAL_INFINITY
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
default user interface dialog
absolute expression handler
power and signed power expression handlers
handler for sin expressions
constant value expression handler
variable expression handler
handler for variable index expressions
SCIP_Real SCIPevalBilinAuxExprNonlinear(SCIP *scip, SCIP_VAR *x, SCIP_VAR *y, SCIP_CONSNONLINEAR_AUXEXPR *auxexpr, SCIP_SOL *sol)
SCIP_RETCODE SCIPcheckQuadraticNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *isquadratic)
SCIP_RETCODE SCIPaddLinearVarNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
#define SCIP_DECL_NONLINCONSUPGD(x)
SCIP_RETCODE SCIPmarkExprPropagateNonlinear(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateConsBasicSignpowerNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
SCIP_Real SCIPgetExprViolScoreNonlinear(SCIP_EXPR *expr)
unsigned int SCIPgetExprNAuxvarUsesNonlinear(SCIP_EXPR *expr)
SCIP_RETCODE SCIPincludeConsUpgradeNonlinear(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nlconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
void SCIPgetLinvarMayDecreaseNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **var, SCIP_Real *coef)
void SCIPgetExprEnfoDataNonlinear(SCIP_EXPR *expr, int idx, SCIP_NLHDLR **nlhdlr, SCIP_NLHDLREXPRDATA **nlhdlrexprdata, SCIP_NLHDLR_METHOD *nlhdlrparticipation, SCIP_Bool *sepabelowusesactivity, SCIP_Bool *sepaaboveusesactivity, SCIP_Real *auxvalue)
int SCIPgetExprNLocksPosNonlinear(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateConsBasicSOCNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *coefs, SCIP_Real *offsets, SCIP_Real constant, SCIP_VAR *rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsBasicVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPchgLhsNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_HASHMAP * SCIPgetVarExprHashmapNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPinsertBilinearTermImplicitNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *auxvar, SCIP_Real coefx, SCIP_Real coefy, SCIP_Real coefaux, SCIP_Real cst, SCIP_Bool overestimate)
void SCIPsetExprEnfoAuxValueNonlinear(SCIP_EXPR *expr, int idx, SCIP_Real auxvalue)
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 SCIPgetNlRowNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPchgRhsNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_RETCODE SCIPgetAbsViolationNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *viol)
SCIP_RETCODE SCIPgetExprRelAuxViolationNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
SCIP_Longint SCIPgetCurBoundsTagNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPassumeConvexNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_VAR * SCIPgetExprAuxVarNonlinear(SCIP_EXPR *expr)
int SCIPgetBilinTermIdxNonlinear(SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y)
void SCIPgetLinvarMayIncreaseNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **var, SCIP_Real *coef)
SCIP_RETCODE SCIPinsertBilinearTermExistingNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *auxvar, int nlockspos, int nlocksneg)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPaddExprNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_Real coef)
SCIP_RETCODE SCIPprocessRowprepNonlinear(SCIP *scip, SCIP_NLHDLR *nlhdlr, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_ROWPREP *rowprep, SCIP_Bool overestimate, SCIP_VAR *auxvar, SCIP_Real auxvalue, SCIP_Bool allowweakcuts, SCIP_Bool branchscoresuccess, SCIP_Bool inenforcement, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_EXPR * SCIPgetExprNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetExprAbsOrigViolationNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
unsigned int SCIPgetExprNSepaUsesActivityNonlinear(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateConsNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, 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_RETCODE SCIPcreateConsBasicNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPgetExprActivityNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity)
int SCIPgetExprNEnfosNonlinear(SCIP_EXPR *expr)
int SCIPgetExprNLocksNegNonlinear(SCIP_EXPR *expr)
SCIP_CONSNONLINEAR_BILINTERM * SCIPgetBilinTermsNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPtightenExprIntervalNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_INTERVAL newbounds, SCIP_Bool *cutoff, int *ntightenings)
SCIP_RETCODE SCIPaddExprsViolScoreNonlinear(SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Real violscore, SCIP_SOL *sol, SCIP_Bool *success)
int SCIPgetNBilinTermsNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPgetExprPartialDiffNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_VAR *var)
SCIP_Longint SCIPgetLastBoundRelaxTagNonlinear(SCIP_CONSHDLR *conshdlr)
struct SCIP_ConsNonlinear_BilinTerm SCIP_CONSNONLINEAR_BILINTERM
SCIP_RETCODE SCIPcollectBilinTermsNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
SCIP_RETCODE SCIPregisterExprUsageNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool useauxvar, SCIP_Bool useactivityforprop, SCIP_Bool useactivityforsepabelow, SCIP_Bool useactivityforsepaabove)
SCIP_RETCODE SCIPcomputeFacetVertexPolyhedralNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool overestimate, SCIP_DECL_VERTEXPOLYFUN((*function)), void *fundata, SCIP_Real *xstar, SCIP_Real *box, int nallvars, SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
SCIP_RETCODE SCIPcreateConsBasicQuadraticNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs)
SCIP_CONSNONLINEAR_BILINTERM * SCIPgetBilinTermNonlinear(SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y)
#define SCIP_DECL_VERTEXPOLYFUN(f)
SCIP_RETCODE SCIPgetRelViolationNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *viol)
SCIP_INTERVAL SCIPgetExprBoundsNonlinear(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateConsBasicAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars)
unsigned int SCIPgetExprNPropUsesActivityNonlinear(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateConsQuadraticNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, 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_RETCODE SCIPchgExprNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_EXPR *expr)
SCIP_EXPRCURV SCIPgetCurvatureNonlinear(SCIP_CONS *cons)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
void SCIPaddExprViolScoreNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Real violscore)
SCIP_RETCODE SCIPcreateConsBasicSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars)
void SCIPincrementCurBoundsTagNonlinear(SCIP_CONSHDLR *conshdlr, SCIP_Bool boundrelax)
SCIP_RETCODE SCIPgetExprAbsAuxViolationNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
SCIP_Real SCIPevalExprQuadraticAuxNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol)
#define SCIP_MAXVERTEXPOLYDIM
SCIP_Real SCIPgetExprPartialDiffGradientDirNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_VAR *var)
struct SCIP_ConsNonlinear_Auxexpr SCIP_CONSNONLINEAR_AUXEXPR
SCIP_RETCODE SCIPincludeConshdlrNonlinear(SCIP *scip)
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPisExprVaridx(SCIP *scip, SCIP_EXPR *expr)
SCIP_Bool SCIPisExprAbs(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPappendExprSumExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR *child, SCIP_Real childcoef)
SCIP_RETCODE SCIPcreateExprSignpower(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_Real exponent, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPisExprSignpower(SCIP *scip, SCIP_EXPR *expr)
SCIP_Bool SCIPisExprCos(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateExprSum(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefficients, SCIP_Real constant, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprPow(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_Real exponent, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
int SCIPgetNTotalVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
int SCIPhashmapGetNElements(SCIP_HASHMAP *hashmap)
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 SCIPhashsetFree(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPhashsetExists(SCIP_HASHSET *hashset, void *element)
SCIP_Bool SCIPhashsetIsEmpty(SCIP_HASHSET *hashset)
SCIP_RETCODE SCIPhashsetInsert(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem, void *element)
SCIP_RETCODE SCIPhashsetCreate(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem, int size)
SCIP_RETCODE SCIPhashsetRemove(SCIP_HASHSET *hashset, void *element)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashTwo(a, b)
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)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiLoadColLP(SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPhasExprCurvature(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRCURV curv, SCIP_Bool *success, SCIP_HASHMAP *assumevarfixed)
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *solcand, SCIP_Real violation)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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_RETCODE SCIPgetCharParam(SCIP *scip, const char *name, char *value)
void SCIPswapPointers(void **pointer1, void **pointer2)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
SCIP_Real SCIPgetBranchingPoint(SCIP *scip, SCIP_VAR *var, SCIP_Real suggestion)
SCIP_RETCODE SCIPbranchVarVal(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_Real SCIPgetBranchScore(SCIP *scip, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
SCIP_ROW ** SCIPcolGetRows(SCIP_COL *col)
int SCIPcolGetNLPNonz(SCIP_COL *col)
SCIP_Bool SCIPcolIsInLP(SCIP_COL *col)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPincludeConshdlr(SCIP *scip, const char *name, const char *desc, int sepapriority, int enfopriority, int chckpriority, int sepafreq, int propfreq, int eagerfreq, int maxprerounds, SCIP_Bool delaysepa, SCIP_Bool delayprop, SCIP_Bool needscons, SCIP_PROPTIMING proptiming, SCIP_PRESOLTIMING presoltiming, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSFREE((*consfree)), SCIP_DECL_CONSINIT((*consinit)), SCIP_DECL_CONSEXIT((*consexit)), SCIP_DECL_CONSINITPRE((*consinitpre)), SCIP_DECL_CONSEXITPRE((*consexitpre)), SCIP_DECL_CONSINITSOL((*consinitsol)), SCIP_DECL_CONSEXITSOL((*consexitsol)), SCIP_DECL_CONSDELETE((*consdelete)), SCIP_DECL_CONSTRANS((*constrans)), SCIP_DECL_CONSINITLP((*consinitlp)), SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFORELAX((*consenforelax)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSPROP((*consprop)), SCIP_DECL_CONSPRESOL((*conspresol)), SCIP_DECL_CONSRESPROP((*consresprop)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_DECL_CONSACTIVE((*consactive)), SCIP_DECL_CONSDEACTIVE((*consdeactive)), SCIP_DECL_CONSENABLE((*consenable)), SCIP_DECL_CONSDISABLE((*consdisable)), SCIP_DECL_CONSDELVARS((*consdelvars)), SCIP_DECL_CONSPRINT((*consprint)), SCIP_DECL_CONSCOPY((*conscopy)), SCIP_DECL_CONSPARSE((*consparse)), SCIP_DECL_CONSGETVARS((*consgetvars)), SCIP_DECL_CONSGETNVARS((*consgetnvars)), SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)), SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagationEnabled(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_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)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparationEnabled(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Bool SCIPisCutApplicable(SCIP *scip, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPinsertDatatreeLong(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPinsertDatatreeReal(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
SCIP_RETCODE SCIPincludeDialog(SCIP *scip, SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
SCIP_RETCODE SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
int SCIPgetPtrarrayMinIdx(SCIP *scip, SCIP_PTRARRAY *ptrarray)
void * SCIPgetPtrarrayVal(SCIP *scip, SCIP_PTRARRAY *ptrarray, int idx)
SCIP_RETCODE SCIPfreePtrarray(SCIP *scip, SCIP_PTRARRAY **ptrarray)
int SCIPgetPtrarrayMaxIdx(SCIP *scip, SCIP_PTRARRAY *ptrarray)
SCIP_RETCODE SCIPcreatePtrarray(SCIP *scip, SCIP_PTRARRAY **ptrarray)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
SCIP_IMPLINTTYPE SCIPeventGetNewImpltype(SCIP_EVENT *event)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_SOL * SCIPeventGetSol(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_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
SCIP_Bool SCIPexprhdlrHasGetSymData(SCIP_EXPRHDLR *exprhdlr)
SCIP_Bool SCIPexprhdlrHasMonotonicity(SCIP_EXPRHDLR *exprhdlr)
SCIP_Bool SCIPexprhdlrHasReverseProp(SCIP_EXPRHDLR *exprhdlr)
void SCIPexprSetActivity(SCIP_EXPR *expr, SCIP_INTERVAL activity, SCIP_Longint activitytag)
SCIP_RETCODE SCIPcreateExprQuadratic(SCIP *scip, SCIP_EXPR **expr, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_IMPLINTTYPE SCIPexprGetIntegrality(SCIP_EXPR *expr)
SCIP_RETCODE SCIPgetSymDataExpr(SCIP *scip, SCIP_EXPR *expr, SYM_EXPRDATA **symdata)
SCIP_RETCODE SCIPevalExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
void SCIPexprGetQuadraticBilinTerm(SCIP_EXPR *expr, int termidx, SCIP_EXPR **expr1, SCIP_EXPR **expr2, SCIP_Real *coef, int *pos2, SCIP_EXPR **prodexpr)
SCIP_RETCODE SCIPcomputeExprIntegrality(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetExponentExprPow(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprProduct(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPevalExprGradient(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag)
SCIP_Bool SCIPexpriterIsEnd(SCIP_EXPRITER *iterator)
SCIP_Longint SCIPgetExprNewSoltag(SCIP *scip)
SCIP_EXPR * SCIPexpriterSkipDFS(SCIP_EXPRITER *iterator)
SCIP_EXPR_OWNERDATA * SCIPexprGetOwnerData(SCIP_EXPR *expr)
SCIP_Real SCIPexprGetDerivative(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprSum(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPgetExprNVars(SCIP *scip, SCIP_EXPR *expr, int *nvars)
SCIP_Longint SCIPexprGetEvalTag(SCIP_EXPR *expr)
SCIP_Bool SCIPexprIsIntegral(SCIP_EXPR *expr)
SCIP_Bool SCIPexprAreQuadraticExprsVariables(SCIP_EXPR *expr)
void SCIPexprGetQuadraticData(SCIP_EXPR *expr, SCIP_Real *constant, int *nlinexprs, SCIP_EXPR ***linexprs, SCIP_Real **lincoefs, int *nquadexprs, int *nbilinexprs, SCIP_Real **eigenvalues, SCIP_Real **eigenvectors)
SCIP_RETCODE SCIPreplaceExprChild(SCIP *scip, SCIP_EXPR *expr, int childidx, SCIP_EXPR *newchild)
SCIP_Real * SCIPgetCoefsExprSum(SCIP_EXPR *expr)
SCIP_EXPRITER_USERDATA SCIPexpriterGetCurrentUserData(SCIP_EXPRITER *iterator)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetCoefExprProduct(SCIP_EXPR *expr)
void SCIPfreeExprQuadratic(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_EXPR * SCIPexpriterGetCurrent(SCIP_EXPRITER *iterator)
void SCIPexpriterSetStagesDFS(SCIP_EXPRITER *iterator, SCIP_EXPRITER_STAGE stopstages)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPparseExpr(SCIP *scip, SCIP_EXPR **expr, const char *exprstr, const char **finalpos, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_EXPR * SCIPexpriterRestartDFS(SCIP_EXPRITER *iterator, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateExpriter(SCIP *scip, SCIP_EXPRITER **iterator)
SCIP_RETCODE SCIPprintExpr(SCIP *scip, SCIP_EXPR *expr, FILE *file)
SCIP_EXPR * SCIPexpriterGetParentDFS(SCIP_EXPRITER *iterator)
SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)
void SCIPexpriterSetCurrentUserData(SCIP_EXPRITER *iterator, SCIP_EXPRITER_USERDATA userdata)
SCIP_Bool SCIPisExprPower(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
SCIP_Longint SCIPexprGetActivityTag(SCIP_EXPR *expr)
SCIP_RETCODE SCIPreplaceCommonSubexpressions(SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Bool *replacedroot)
SCIP_EXPR * SCIPexpriterGetNext(SCIP_EXPRITER *iterator)
SCIP_RETCODE SCIPcheckExprQuadratic(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *isquadratic)
SCIP_Real SCIPexprGetBardot(SCIP_EXPR *expr)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_Real SCIPgetConstantExprSum(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcopyExpr(SCIP *sourcescip, SCIP *targetscip, SCIP_EXPR *expr, SCIP_EXPR **copyexpr, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *valid)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
void SCIPexpriterSetChildUserData(SCIP_EXPRITER *iterator, SCIP_EXPRITER_USERDATA userdata)
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
void SCIPexprGetQuadraticQuadTerm(SCIP_EXPR *quadexpr, int termidx, SCIP_EXPR **expr, SCIP_Real *lincoef, SCIP_Real *sqrcoef, int *nadjbilin, int **adjbilin, SCIP_EXPR **sqrexpr)
int SCIPexpriterGetChildIdxDFS(SCIP_EXPRITER *iterator)
void SCIPfreeExpriter(SCIP_EXPRITER **iterator)
SCIP_EXPRITER_STAGE SCIPexpriterGetStageDFS(SCIP_EXPRITER *iterator)
void SCIPexprSetIntegrality(SCIP_EXPR *expr, SCIP_IMPLINTTYPE integrality)
SCIP_RETCODE SCIPduplicateExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR **copyexpr, SCIP_DECL_EXPR_MAPEXPR((*mapexpr)), void *mapexprdata, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
void SCIPcaptureExpr(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexpriterInit(SCIP_EXPRITER *iterator, SCIP_EXPR *expr, SCIP_EXPRITER_TYPE type, SCIP_Bool allowrevisit)
int SCIPexprGetNUses(SCIP_EXPR *expr)
SCIP_RETCODE SCIPgetExprVarExprs(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR **varexprs, int *nvarexprs)
SCIP_Longint SCIPexprGetDiffTag(SCIP_EXPR *expr)
SCIP_RETCODE SCIPsimplifyExpr(SCIP *scip, SCIP_EXPR *rootexpr, SCIP_EXPR **simplified, SCIP_Bool *changed, SCIP_Bool *infeasible, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPevalExprActivity(SCIP *scip, SCIP_EXPR *expr)
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
SCIP_EXPR * SCIPexpriterGetChildExprDFS(SCIP_EXPRITER *iterator)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
const char * SCIPheurGetName(SCIP_HEUR *heur)
void SCIPintervalIntersectEps(SCIP_INTERVAL *resultant, SCIP_Real eps, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_Bool SCIPintervalIsEntire(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalSetEntire(SCIP_Real infinity, SCIP_INTERVAL *resultant)
SCIP_Bool SCIPintervalIsSubsetEQ(SCIP_Real infinity, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
struct SCIP_Interval SCIP_INTERVAL
void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
SCIP_Real SCIPgetLPFeastol(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBlockMemory(scip, ptr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
BMS_BUFMEM * SCIPbuffer(SCIP *scip)
#define SCIPallocClearBufferArray(scip, ptr, num)
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 SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
void SCIPenableNLP(SCIP *scip)
SCIP_RETCODE SCIPsetNlRowExpr(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPR *expr)
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
void SCIPsetNlRowCurvature(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPRCURV curvature)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
const char * SCIPnlhdlrGetDesc(SCIP_NLHDLR *nlhdlr)
SCIP_NLHDLR ** SCIPgetNlhdlrsNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPnlhdlrHasIntEval(SCIP_NLHDLR *nlhdlr)
int SCIPnlhdlrGetDetectPriority(SCIP_NLHDLR *nlhdlr)
SCIP_NLHDLREXPRDATA * SCIPgetNlhdlrExprDataNonlinear(SCIP_NLHDLR *nlhdlr, SCIP_EXPR *expr)
SCIP_Bool SCIPnlhdlrIsEnabled(SCIP_NLHDLR *nlhdlr)
int SCIPgetNNlhdlrsNonlinear(SCIP_CONSHDLR *conshdlr)
const char * SCIPnlhdlrGetName(SCIP_NLHDLR *nlhdlr)
SCIP_NLHDLR * SCIPfindNlhdlrNonlinear(SCIP_CONSHDLR *conshdlr, const char *name)
SCIP_Bool SCIPnlhdlrHasEstimate(SCIP_NLHDLR *nlhdlr)
SCIP_RETCODE SCIPincludeNlhdlrNonlinear(SCIP *scip, SCIP_NLHDLR **nlhdlr, const char *name, const char *desc, int detectpriority, int enfopriority, SCIP_DECL_NLHDLRDETECT((*detect)), SCIP_DECL_NLHDLREVALAUX((*evalaux)), SCIP_NLHDLRDATA *nlhdlrdata)
SCIP_Bool SCIPnlhdlrHasInitSepa(SCIP_NLHDLR *nlhdlr)
int SCIPnlhdlrGetEnfoPriority(SCIP_NLHDLR *nlhdlr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_CONSHDLR * SCIProwGetOriginConshdlr(SCIP_ROW *row)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
SCIP_Real SCIPgetSepaMinEfficacy(SCIP *scip)
SCIP_SOLORIGIN SCIPsolGetOrigin(SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPunlinkSol(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPincSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real incval)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocostCount(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_TABLE * SCIPfindTable(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_DECL_TABLECOLLECT((*tablecollect)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Real SCIPgetHugeValue(SCIP *scip)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNonimpliedIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
void SCIPvarMarkRelaxationOnly(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarImplType(SCIP *scip, SCIP_VAR *var, SCIP_IMPLINTTYPE impltype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVarImpl(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_IMPLINTTYPE impltype, 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)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_CLIQUE ** SCIPvarGetCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_IMPLINTTYPE SCIPvarGetImplType(SCIP_VAR *var)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
void SCIPqueueFree(SCIP_QUEUE **queue)
SCIP_RETCODE SCIPqueueCreate(SCIP_QUEUE **queue, int initsize, SCIP_Real sizefac)
SCIP_RETCODE SCIPqueueInsert(SCIP_QUEUE *queue, void *elem)
SCIP_Bool SCIPqueueIsEmpty(SCIP_QUEUE *queue)
void * SCIPqueueRemove(SCIP_QUEUE *queue)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
SCIP_VAR ** SCIProwprepGetVars(SCIP_ROWPREP *rowprep)
SCIP_RETCODE SCIPcleanupRowprep2(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefbound, SCIP_Bool *success)
int SCIProwprepGetNModifiedVars(SCIP_ROWPREP *rowprep)
SCIP_Real SCIPgetRowprepViolation(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Bool *reliable)
SCIP_Real * SCIProwprepGetCoefs(SCIP_ROWPREP *rowprep)
SCIP_VAR ** SCIProwprepGetModifiedVars(SCIP_ROWPREP *rowprep)
char * SCIProwprepGetName(SCIP_ROWPREP *rowprep)
SCIP_SIDETYPE SCIProwprepGetSidetype(SCIP_ROWPREP *rowprep)
SCIP_RETCODE SCIPaddRowprepTerm(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPgetRowprepRowCons(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONS *cons)
int SCIProwprepGetNVars(SCIP_ROWPREP *rowprep)
void SCIProwprepRecordModifications(SCIP_ROWPREP *rowprep)
SCIP_RETCODE SCIPcleanupRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real minviol, SCIP_Real *viol, SCIP_Bool *success)
void SCIPfreeRowprep(SCIP *scip, SCIP_ROWPREP **rowprep)
void SCIPprintRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, FILE *file)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortDown(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortDownIntPtr(int *intarray, void **ptrarray, int len)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, 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 SCIPgetSymExprdataNConstants(SYM_EXPRDATA *symdata)
int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIP_RETCODE SCIPfreeSymDataExpr(SCIP *scip, SYM_EXPRDATA **symdata)
int SCIPgetSymgraphNNodes(SYM_GRAPH *graph)
SCIP_Real * SCIPgetSymExprdataConstants(SYM_EXPRDATA *symdata)
SCIP_RETCODE SCIPgetCoefSymData(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR *parentexpr, SCIP_Real *coef, SCIP_Bool *success)
SCIPfreeSol(scip, &heurdata->sol))
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
NLP local search primal heuristic using sub-SCIPs.
primal heuristic that tries a given solution
SCIP_Bool SCIPcliqueHasVar(SCIP_CLIQUE *clique, SCIP_VAR *var, SCIP_Bool value)
static volatile int nterms
SCIP_Bool SCIPlapackIsAvailable(void)
SCIP_RETCODE SCIPlapackSolveLinearEquations(BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
interface methods for lapack functions
static const char * paramname[]
#define BMSclearMemoryArray(ptr, num)
SCIP_RETCODE SCIPnlhdlrFree(SCIP *scip, SCIP_NLHDLR **nlhdlr)
SCIP_RETCODE SCIPnlhdlrCreate(SCIP *scip, SCIP_NLHDLR **nlhdlr, const char *name, const char *desc, int detectpriority, int enfopriority, SCIP_DECL_NLHDLRDETECT((*detect)), SCIP_DECL_NLHDLREVALAUX((*evalaux)), SCIP_NLHDLRDATA *nlhdlrdata)
void SCIPnlhdlrPrintStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, FILE *file)
SCIP_RETCODE SCIPnlhdlrCollectStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, SCIP_DATATREE *datatree)
private functions of nonlinear handlers of nonlinear constraints
#define SCIPnlhdlrIncrementNSeparated(nlhdlr)
#define SCIPnlhdlrResetNDetectionslast(nlhdlr)
#define SCIPnlhdlrIncrementNCutoffs(nlhdlr)
nonlinear handlers for convex and concave expressions, respectively
SCIP_RETCODE SCIPgetSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
propagator for symmetry handling
#define SCIPdebugPrintCons(x, y, z)
methods for sorting joint arrays of various types
public methods for data tree structure
public functions to work with algebraic expressions
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
SCIP_DECL_NONLINCONSUPGD((*consupgd))
SCIP_NLHDLR_METHOD nlhdlrparticipation
SCIP_Bool sepaaboveusesactivity
SCIP_Bool sepabelowusesactivity
SCIP_NLHDLREXPRDATA * nlhdlrexprdata
SCIP_CONSNONLINEAR_AUXEXPR ** exprs
union SCIP_ConsNonlinear_BilinTerm::@055261256347130033265073212045155110332303333345 aux
structs for symmetry computations
methods for dealing with symmetry detection graphs
struct SCIP_Clock SCIP_CLOCK
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
struct SCIP_Cons SCIP_CONS
#define SCIP_DECL_CONSEXIT(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSDISABLE(x)
struct SYM_Graph SYM_GRAPH
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSACTIVE(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSDEACTIVE(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSENABLE(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCOPY(x)
#define SCIP_DECL_CONSINIT(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
#define SCIP_DECL_CONSDELVARS(x)
struct SCIP_Dialog SCIP_DIALOG
#define SCIP_DECL_DIALOGEXEC(x)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_BOUNDCHANGED
#define SCIP_EVENTTYPE_TYPECHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_VARFIXED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_BESTSOLFOUND
#define SCIP_EVENTTYPE_FORMAT
#define SCIP_EVENTTYPE_BOUNDRELAXED
#define SCIP_EVENTTYPE_SOLFOUND
#define SCIP_EVENTTYPE_IMPLTYPECHANGED
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
struct SCIP_Expr SCIP_EXPR
struct SCIP_ExprIter SCIP_EXPRITER
#define SCIP_DECL_EXPR_OWNERCREATE(x)
#define SCIP_EXPRITER_VISITINGCHILD
#define SCIP_DECL_EXPR_OWNERPRINT(x)
struct SCIP_Expr_OwnerData SCIP_EXPR_OWNERDATA
#define SCIP_DECL_EXPR_INTEVALVAR(x)
@ SCIP_EXPRITER_RTOPOLOGIC
struct SYM_ExprData SYM_EXPRDATA
#define SCIP_DECL_EXPR_MAPEXPR(x)
#define SCIP_DECL_EXPR_OWNERFREE(x)
#define SCIP_EXPRITER_LEAVEEXPR
#define SCIP_DECL_EXPR_OWNEREVALACTIVITY(x)
#define SCIP_EXPRITER_ENTEREXPR
struct SCIP_Heur SCIP_HEUR
@ SCIP_BRANCHDIR_DOWNWARDS
struct SCIP_Clique SCIP_CLIQUE
enum SCIP_BoundType SCIP_BOUNDTYPE
@ SCIP_LPSOLSTAT_UNBOUNDEDRAY
struct SCIP_RowPrep SCIP_ROWPREP
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_SORTINDCOMP(x)
struct SCIP_RandNumGen SCIP_RANDNUMGEN
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_PtrArray SCIP_PTRARRAY
struct SCIP_HashSet SCIP_HASHSET
struct SCIP_HashTable SCIP_HASHTABLE
struct SCIP_Queue SCIP_QUEUE
#define SCIP_NLHDLR_METHOD_SEPAABOVE
#define SCIP_DECL_NLHDLREVALAUX(x)
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
#define SCIP_NLHDLR_METHOD_SEPABOTH
#define SCIP_NLHDLR_METHOD_ACTIVITY
unsigned int SCIP_NLHDLR_METHOD
#define SCIP_DECL_NLHDLRDETECT(x)
#define SCIP_NLHDLR_METHOD_NONE
struct SCIP_Nlhdlr SCIP_NLHDLR
struct SCIP_NlhdlrExprData SCIP_NLHDLREXPRDATA
#define SCIP_NLHDLR_METHOD_ALL
#define SCIP_NLHDLR_METHOD_SEPABELOW
struct SCIP_NlRow SCIP_NLROW
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_INITPRESOLVE
@ SCIP_STAGE_EXITPRESOLVE
enum SYM_Symtype SYM_SYMTYPE
#define SCIP_DECL_TABLEOUTPUT(x)
#define SCIP_DECL_TABLECOLLECT(x)
#define SCIP_PRESOLTIMING_ALWAYS
#define SCIP_PRESOLTIMING_MEDIUM
unsigned int SCIP_PRESOLTIMING
#define SCIP_PRESOLTIMING_EXHAUSTIVE
struct SCIP_Node SCIP_NODE
enum SCIP_ImplintType SCIP_IMPLINTTYPE
@ SCIP_IMPLINTTYPE_STRONG
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR