75#define CONSHDLR_NAME "nonlinear"
76#define CONSHDLR_DESC "handler for nonlinear constraints specified by algebraic expressions"
77#define CONSHDLR_ENFOPRIORITY -60
78#define CONSHDLR_CHECKPRIORITY -4000010
79#define CONSHDLR_EAGERFREQ 100
81#define CONSHDLR_NEEDSCONS TRUE
84#define CONSHDLR_SEPAPRIORITY 10
85#define CONSHDLR_SEPAFREQ 1
86#define CONSHDLR_DELAYSEPA FALSE
88#define CONSHDLR_PROPFREQ 1
89#define CONSHDLR_DELAYPROP FALSE
90#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
92#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS
93#define CONSHDLR_MAXPREROUNDS -1
96#define TABLE_NAME_NONLINEAR "cons_nonlinear"
97#define TABLE_DESC_NONLINEAR "nonlinear constraint handler statistics"
98#define TABLE_POSITION_NONLINEAR 14600
99#define TABLE_EARLIEST_STAGE_NONLINEAR SCIP_STAGE_TRANSFORMED
102#define TABLE_NAME_NLHDLR "nlhdlr"
103#define TABLE_DESC_NLHDLR "nonlinear handler statistics"
104#define TABLE_POSITION_NLHDLR 14601
105#define TABLE_EARLIEST_STAGE_NLHDLR SCIP_STAGE_PRESOLVING
107#define DIALOG_NAME "nlhdlrs"
108#define DIALOG_DESC "display nonlinear handlers"
109#define DIALOG_ISSUBMENU FALSE
111#define VERTEXPOLY_MAXPERTURBATION 1e-3
112#define VERTEXPOLY_USEDUALSIMPLEX TRUE
113#define VERTEXPOLY_RANDNUMINITSEED 20181029
114#define VERTEXPOLY_ADJUSTFACETFACTOR 1e1
116#define BRANCH_RANDNUMINITSEED 20191229
118#define BILIN_MAXNAUXEXPRS 10
124#define infty2infty(infty1, infty2, val) ((val) >= (infty1) ? (infty2) : (val))
127#define POWEROFTWO(x) (0x1u << (x))
130#define ENFOLOG(x) if( SCIPgetSubscipDepth(scip) == 0 && SCIPgetVerbLevel(scip) >= SCIP_VERBLEVEL_NORMAL ) { x }
153struct SCIP_Expr_OwnerData
161 int monotonicitysize;
165 unsigned int propboundstag;
166 SCIP_Bool inpropqueue;
171 unsigned int lastenforced;
172 unsigned int nactivityusesprop;
173 unsigned int nactivityusessepa;
174 unsigned int nauxvaruses;
178 SCIP_Real violscoresum;
179 SCIP_Real violscoremax;
181 unsigned int violscoretag;
187 SCIP_Bool consssorted;
203 SCIP_Bool catchedevents;
209 SCIP_Longint gradnormsoltag;
212 unsigned int ispropagated:1;
213 unsigned int issimplified:1;
222 SCIP_Real linvardecrcoef;
223 SCIP_Real linvarincrcoef;
240struct SCIP_ConshdlrData
247 SCIP_Bool registerusesactivitysepabelow;
248 SCIP_Bool registerusesactivitysepaabove;
252 int consupgradessize;
262 SCIP_Longint curboundstag;
263 SCIP_Longint lastboundrelax;
264 SCIP_Longint lastvaractivitymethodchange;
265 unsigned int enforound;
270 SCIP_Bool globalbounds;
272 SCIP_Bool forceboundtightening;
273 unsigned int curpropboundstag;
277 SCIP_Bool propauxvars;
279 SCIP_Real varboundrelaxamount;
280 SCIP_Real conssiderelaxamount;
281 SCIP_Real vp_maxperturb;
282 SCIP_Real vp_adjfacetthreshold;
283 SCIP_Bool vp_dualsimplex;
284 SCIP_Bool reformbinprods;
285 SCIP_Bool reformbinprodsand;
286 int reformbinprodsfac;
287 SCIP_Bool forbidmultaggrnlvar;
288 SCIP_Bool tightenlpfeastol;
289 SCIP_Bool propinenforce;
290 SCIP_Real weakcutthreshold;
291 SCIP_Real strongcutmaxcoef;
292 SCIP_Bool strongcutefficacy;
293 SCIP_Bool forcestrongcut;
294 SCIP_Real enfoauxviolfactor;
295 SCIP_Real weakcutminviolfactor;
296 char rownotremovable;
299 int branchauxmindepth;
300 SCIP_Bool branchexternal;
301 SCIP_Real branchhighviolfactor;
302 SCIP_Real branchhighscorefactor;
303 SCIP_Real branchviolweight;
304 SCIP_Real branchdualweight;
305 SCIP_Real branchpscostweight;
306 SCIP_Real branchdomainweight;
307 SCIP_Real branchvartypeweight;
309 char branchviolsplit;
310 SCIP_Real branchpscostreliable;
311 char linearizeheursol;
312 SCIP_Bool assumeconvex;
315 SCIP_Longint nweaksepa;
316 SCIP_Longint ntightenlp;
317 SCIP_Longint ndesperatetightenlp;
318 SCIP_Longint ndesperatebranch;
319 SCIP_Longint ndesperatecutoff;
320 SCIP_Longint nforcelp;
322 SCIP_Longint ncanonicalizecalls;
333 int bilinmaxnauxexprs;
337 char branchpscostupdatestrategy;
340 SCIP_Bool checkedvarlocks;
342 int newsoleventfilterpos;
368 SCIP_Bool* infeasible,
429 mydata->nactivityusesprop = 0;
430 mydata->nactivityusessepa = 0;
441 nlhdlr =
mydata->enfos[
e]->nlhdlr;
444 if(
mydata->enfos[
e]->issepainit )
481 assert((*ownerdata)->nlockspos == 0);
482 assert((*ownerdata)->nlocksneg == 0);
487 assert((*ownerdata)->nenfos <= 0);
496 assert((*ownerdata)->nconss == 0);
498 assert((*ownerdata)->filterpos == -1);
530 if( ownerdata->nenfos > 0 )
535 for(
i = 0;
i < ownerdata->nenfos; ++
i )
552 if( ownerdata->auxvar !=
NULL )
597 (*ownerdata)->nenfos = -1;
605 (*ownerdata)->filterpos = -1;
628 (*ownerdata)->filterpos = -2;
738 if( consdata->varexprs !=
NULL )
742 assert(consdata->nvarexprs == 0);
745 if( consdata->issimplified )
776 for(
i = 0;
i < consdata->nvarexprs; ++
i )
799 if( consdata->varexprs ==
NULL )
803 assert(consdata->nvarexprs >= 0);
806 for(
i = 0;
i < consdata->nvarexprs; ++
i )
815 consdata->varexprs =
NULL;
816 consdata->nvarexprs = 0;
840 if( conshdlrdata->globalbounds )
863 switch( conshdlrdata->varboundrelax )
878 lb =
MAX(
bnd, lb - conshdlrdata->varboundrelaxamount);
885 ub =
MIN(
bnd, ub + conshdlrdata->varboundrelaxamount);
898 lb -= conshdlrdata->varboundrelaxamount;
901 ub += conshdlrdata->varboundrelaxamount;
933 SCIPerrorMessage(
"Unsupported value '%c' for varboundrelax option.\n", conshdlrdata->varboundrelax);
988 assert(ownerdata->nconss > 0);
1001 for(
c = 0;
c < ownerdata->nconss; ++
c )
1013 consdata->ispropagated =
FALSE;
1020 consdata->issimplified =
FALSE;
1036 ++conshdlrdata->curboundstag;
1037 assert(conshdlrdata->curboundstag > 0);
1041 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
1084 for(
i = 0;
i < ownerdata->nconss; ++
i )
1085 assert(ownerdata->conss[
i] != cons);
1091 ownerdata->conss[ownerdata->nconss++] = cons;
1095 if( ownerdata->nconss <= 1 )
1096 ownerdata->consssorted =
TRUE;
1097 else if( ownerdata->consssorted )
1098 ownerdata->consssorted =
compIndexConsNonlinear(ownerdata->conss[ownerdata->nconss-2], ownerdata->conss[ownerdata->nconss-1]) > 0;
1101 if( ownerdata->filterpos < 0 )
1105 assert(ownerdata->nconss == 1);
1110 assert(ownerdata->filterpos >= 0);
1135 assert(consdata->nvarexprs >= 0);
1138 if( consdata->catchedevents )
1149 for(
i = 0;
i < consdata->nvarexprs; ++
i )
1151 expr = consdata->varexprs[
i];
1173 consdata->catchedevents =
TRUE;
1201 assert(ownerdata->nconss > 0);
1203 if( ownerdata->conss[ownerdata->nconss-1] == cons )
1205 pos = ownerdata->nconss-1;
1209 if( !ownerdata->consssorted )
1212 ownerdata->consssorted =
TRUE;
1222 assert(ownerdata->conss[pos] == cons);
1227 ownerdata->conss[pos] = ownerdata->conss[ownerdata->nconss-1];
1228 ownerdata->consssorted =
FALSE;
1230 --ownerdata->nconss;
1233 if( ownerdata->nconss == 0 )
1237 assert(ownerdata->filterpos >= 0);
1242 ownerdata->filterpos = -1;
1266 if( !consdata->catchedevents )
1270 assert(consdata->nvarexprs >= 0);
1274 for(
i = consdata->nvarexprs - 1;
i >= 0; --
i )
1281 consdata->catchedevents =
FALSE;
1312 SCIP_Bool modifiable,
1333 SCIPerrorMessage(
"Locally valid nonlinear constraints are not supported, yet.\n");
1340 SCIPerrorMessage(
"Non-initial nonlinear constraints are not supported, yet.\n");
1354 consdata->expr = expr;
1357 consdata->lhs = lhs;
1358 consdata->rhs = rhs;
1359 consdata->consindex = conshdlrdata->lastconsindex++;
1363 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
1364 local, modifiable, dynamic, removable,
FALSE) );
1477 if( ownerdata->nlocksneg > 0 &&
auxvarvalue > auxvalue )
1486 if( ownerdata->nlockspos > 0 && auxvalue >
auxvarvalue )
1555 return MAX3(0.0, consdata->lhsviol, consdata->rhsviol);
1587 if( conshdlrdata->violscale ==
'n' )
1596 if( conshdlrdata->violscale ==
'a' )
1601 if( consdata->lhsviol > 0.0 &&
REALABS(consdata->lhs) > scale )
1604 scale =
REALABS(consdata->lhs);
1606 else if( consdata->rhsviol > 0.0 &&
REALABS(consdata->rhs) > scale )
1609 scale =
REALABS(consdata->rhs);
1617 assert(conshdlrdata->violscale ==
'g');
1624 consdata->gradnorm = 0.0;
1633 for(
i = 0;
i < consdata->nvarexprs; ++
i )
1642 consdata->gradnorm = 0.0;
1649 consdata->gradnorm =
sqrt(consdata->gradnorm);
1650 consdata->gradnormsoltag =
soltag;
1653 *viol /=
MAX(1.0, consdata->gradnorm);
1688 consdata->linvarincr =
NULL;
1689 consdata->linvardecr =
NULL;
1690 consdata->linvarincrcoef = 0.0;
1691 consdata->linvardecrcoef = 0.0;
1727 if( (consdata->linvardecr ==
NULL) ||
1730 consdata->linvardecr =
var;
1731 consdata->linvardecrcoef = coef;
1740 if( (consdata->linvarincr ==
NULL) ||
1743 consdata->linvarincr =
var;
1744 consdata->linvarincrcoef = coef;
1750 assert(consdata->linvarincr ==
NULL || consdata->linvarincrcoef != 0.0);
1751 assert(consdata->linvardecr ==
NULL || consdata->linvardecrcoef != 0.0);
1753 if( consdata->linvarincr !=
NULL )
1757 if( consdata->linvardecr !=
NULL )
1805 SCIPdebugMsg(
scip,
"attempt to make solution from <%s> feasible by shifting linear variable\n",
1808 for(
c = 0;
c < nconss; ++
c )
1811 SCIP_Real viol = 0.0;
1819 viol = consdata->lhsviol;
1821 viol = -consdata->rhsviol;
1825 if( consdata->linvarincr !=
NULL &&
1831 delta = viol / consdata->linvarincrcoef;
1838 delta =
MIN(
MAX(0.0, gap), delta);
1847 SCIPdebugMsg(
scip,
"increase <%s> by %g to %g to remedy lhs-violation %g of cons <%s>\n",
1851 viol -= consdata->linvarincrcoef * delta;
1858 if( consdata->linvardecr !=
NULL &&
1864 delta = viol / consdata->linvardecrcoef;
1871 delta =
MAX(
MIN(0.0, gap), delta);
1880 SCIPdebugMsg(
scip,
"increase <%s> by %g to %g to remedy rhs-violation %g of cons <%s>\n",
1884 viol -= consdata->linvardecrcoef * delta;
1924 SCIP_Bool overestimate,
1955 for(
r = minidx;
r <= maxidx; ++
r )
2061 for(
c = 0;
c < nconss; ++
c )
2081 for(
i = 0;
i < consdata->nvarexprs; ++
i )
2101 if( ownerdata->auxvar ==
NULL )
2110 for(
e = 0;
e < ownerdata->nenfos; ++
e )
2114 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
2293 SCIP_Bool* infeasible,
2305 if( infeasible !=
NULL )
2306 *infeasible =
FALSE;
2316 SCIPdebugMsg(
scip,
"stored activity of root expr is empty and valid (activitytag >= lastboundrelax (%" SCIP_LONGINT_FORMAT ")), skip forwardPropExpr -> cutoff\n", conshdlrdata->lastboundrelax);
2318 if( infeasible !=
NULL )
2345 if( ownerdata->nenfos >= 0 && ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 && !conshdlrdata->indetect)
2348 SCIPdebugMsg(
scip,
"root expr activity is not used but enfo initialized, skip inteval\n");
2396 SCIPexprGetActivityTag(expr) >= conshdlrdata->lastvaractivitymethodchange && !conshdlrdata->globalbounds )
2431 if( infeasible !=
NULL )
2433 SCIPdebugMsg(
scip,
"expr %p already has empty activity -> cutoff\n", (
void*)expr);
2443 if( ownerdata->nenfos >= 0 && ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 && !conshdlrdata->indetect )
2446 SCIPdebugMsg(
scip,
"expr %p activity is not used but enfo initialized, skip inteval\n", (
void*)expr);
2458 if( ownerdata->nenfos > 0 )
2471 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
2541 if( infeasible !=
NULL )
2551 if( infeasible !=
NULL )
2637 SCIP_Bool* infeasible,
2656 while( !
SCIPqueueIsEmpty(conshdlrdata->reversepropqueue) && !(*infeasible) )
2667 assert(ownerdata->inpropqueue);
2669 ownerdata->inpropqueue =
FALSE;
2674 assert(ownerdata->propboundstag == conshdlrdata->curpropboundstag);
2682#ifdef SCIP_DISABLED_CODE
2690 propbounds = ownerdata->propbounds;
2693 if( ownerdata->nenfos > 0 )
2696 for(
e = 0;
e < ownerdata->nenfos && !*infeasible; ++
e )
2705 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
2736 assert(ownerdata->nenfos < 0);
2765 ownerdata->inpropqueue =
FALSE;
2835 assert(!conshdlrdata->globalbounds);
2841 conshdlrdata->forceboundtightening = force;
2844 ++conshdlrdata->curpropboundstag;
2847 if( conshdlrdata->propauxvars )
2862 for(
i = 0;
i < nconss; ++
i )
2874 if( consdata->ispropagated )
2895 if( !conshdlrdata->propauxvars || ownerdata->auxvar ==
NULL )
2901 if( ownerdata->auxvar ==
NULL )
2929 if( ownerdata->auxvar ==
NULL )
2932 if( ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 )
2955 consdata->ispropagated =
TRUE;
2978 if( conshdlrdata->propauxvars )
2983 conshdlrdata->forceboundtightening =
FALSE;
2986 ++conshdlrdata->curpropboundstag;
3036 for(
c = 0;
c < nconss && !
cutoff; ++
c )
3053 for(
e = 0;
e < ownerdata->nenfos; ++
e )
3058 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
3063 SCIPdebugMsg(
scip,
"propExprDomains calling reverseprop for expression %p [%g,%g]\n", (
void*)expr,
3126 if( nlockspos == 0 && nlocksneg == 0 )
3159 ownerdata->nlockspos += nlockspos;
3160 ownerdata->nlocksneg += nlocksneg;
3163 if( ownerdata->nlockspos == nlockspos && ownerdata->nlocksneg == nlocksneg &&
SCIPexprGetNChildren(expr) > 0
3169 assert(ownerdata->monotonicitysize == 0);
3186 if( ownerdata->nlockspos == 0 && ownerdata->nlocksneg == 0 && ownerdata->monotonicity !=
NULL )
3188 assert(ownerdata->monotonicitysize > 0);
3193 ownerdata->monotonicitysize = 0;
3209 switch( monotonicity )
3220 ituserdata.intvals[0] = nlockspos + nlocksneg;
3221 ituserdata.intvals[1] = nlockspos + nlocksneg;
3276 if( nlockspos == 0 && nlocksneg == 0 )
3287 consdata->nlockspos += nlockspos;
3288 consdata->nlocksneg += nlocksneg;
3290 assert(consdata->nlockspos >= 0);
3291 assert(consdata->nlocksneg >= 0);
3327 if( consdata->nlrow !=
NULL )
3436 assert(conshdlrdata->auxvarid >= 0);
3437 assert(!conshdlrdata->indetect);
3440 assert(ownerdata->nenfos < 0);
3450 if( ownerdata->nauxvaruses == 0 )
3454 if( ownerdata->nlockspos == 0 )
3456 if( ownerdata->nlocksneg == 0 )
3459 if( ownerdata->nactivityusesprop == 0 && ownerdata->nactivityusessepa == 0 )
3468 ownerdata->nenfos = 0;
3471 conshdlrdata->indetect =
TRUE;
3473 SCIPdebugMsg(
scip,
"detecting nlhdlrs for %s expression %p (%s); requiring%s%s%s\n",
3479 for(
h = 0;
h < conshdlrdata->nnlhdlrs; ++
h )
3483 nlhdlr = conshdlrdata->nlhdlrs[
h];
3491 nlhdlrexprdata =
NULL;
3494 conshdlrdata->registerusesactivitysepabelow =
FALSE;
3495 conshdlrdata->registerusesactivitysepaabove =
FALSE;
3519 if( nlhdlrexprdata !=
NULL )
3531 SCIPdebugMsg(
scip,
"nlhdlr <%s> detect successful; sepabelow: %s, sepaabove: %s, activity: %s\n",
3540 ownerdata->enfos[ownerdata->nenfos]->nlhdlr = nlhdlr;
3541 ownerdata->enfos[ownerdata->nenfos]->nlhdlrexprdata = nlhdlrexprdata;
3543 ownerdata->enfos[ownerdata->nenfos]->issepainit =
FALSE;
3544 ownerdata->enfos[ownerdata->nenfos]->sepabelowusesactivity = conshdlrdata->registerusesactivitysepabelow;
3545 ownerdata->enfos[ownerdata->nenfos]->sepaaboveusesactivity = conshdlrdata->registerusesactivitysepaabove;
3546 ownerdata->nenfos++;
3552 conshdlrdata->indetect =
FALSE;
3559 SCIPerrorMessage(
"no nonlinear handler provided some of the required enforcement methods\n");
3563 assert(ownerdata->nenfos > 0);
3566 if( ownerdata->nenfos > 1 )
3607 conshdlrdata->globalbounds =
TRUE;
3608 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
3611 for(
i = 0;
i < nconss; ++
i )
3633 if( ownerdata->nenfos > 0 )
3636 assert(ownerdata->nenfos < 0);
3644 conshdlrdata->indetect =
TRUE;
3649 conshdlrdata->indetect =
FALSE;
3661 if( ownerdata->nenfos >= 0 )
3671 if( ownerdata->nauxvaruses > 0 || ownerdata->nactivityusesprop > 0 || ownerdata->nactivityusessepa > 0 )
3675 assert(ownerdata->nenfos >= 0);
3684 ownerdata->nenfos = 0;
3690 consdata->ispropagated =
FALSE;
3699 conshdlrdata->globalbounds =
FALSE;
3700 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
3736 for(
c = 0;
c < nconss; ++
c )
3787 if( consdata->nlrow ==
NULL )
3837 for(
c = 0;
c < nconss; ++
c )
3851 SCIPdebugMsg(
scip,
"exitsepa and free nonlinear handler data for expression %p\n", (
void*)expr);
3870 if( consdata->nlrow !=
NULL )
3884 consdata->linvardecr =
NULL;
3885 consdata->linvarincr =
NULL;
4010 SCIP_Bool integral =
TRUE;
4041 if( naddconss !=
NULL )
4052 if( naddconss !=
NULL )
4066 if( naddconss !=
NULL )
4079 if( naddconss !=
NULL )
4253 for(
i = 0;
i < nchildren; ++
i )
4322 strcpy(name,
"binreform");
4323 for(
i = 0;
i < nchildren; ++
i )
4368 if( naddconss !=
NULL )
4380 if( naddconss !=
NULL )
4438 SCIPdebugMsg(
scip,
" product expression %p has been considered for the first time\n", (
void*)prodexpr);
4440 if( nchildren == 2 )
4466 if( nchgcoefs !=
NULL )
4478 if( nchgcoefs !=
NULL )
4498 if( nchgcoefs !=
NULL )
4519 if( nchgcoefs !=
NULL )
4589 if( conshdlrdata->reformbinprodsfac > 1 )
4602 assert(naddconss ==
NULL || *naddconss > 0 || nchgcoefs ==
NULL || *nchgcoefs > 0);
4611 consdata->issimplified =
FALSE;
4687 for(
c = 0;
c < nconss; ++
c )
4698 if( conshdlrdata->reformbinprodsfac > 1 )
4710 consdata->issimplified =
FALSE;
4759 if( nchildren == 1 && constant == 0.0 && coefs[0] == -1.0 )
4762 expr = consdata->expr;
4770 consdata->lhs = -consdata->lhs;
4771 consdata->rhs = -consdata->rhs;
4779 for(
i = 0;
i < nchildren; ++
i )
4780 counter += coefs[
i] > 0 ? 1 : -1;
4790 for(
i = 0;
i < nchildren; ++
i )
4798 consdata->expr = expr;
4800 consdata->lhs = -consdata->lhs;
4801 consdata->rhs = -consdata->rhs;
4836 for(
c = 0;
c < nconss; ++
c )
4888 SCIP_Bool* infeasible,
4911 ++(conshdlrdata->ncanonicalizecalls);
4915 *infeasible =
FALSE;
4918 havechange = conshdlrdata->ncanonicalizecalls == 1;
4928 for(
i = 0;
i < nconss; ++
i )
4936 nlockspos[
i] = consdata->nlockspos;
4937 nlocksneg[
i] = consdata->nlocksneg;
4941 assert(consdata->nlockspos == 0);
4942 assert(consdata->nlocksneg == 0);
4947 for(
i = 0;
i < nconss; ++
i )
4981 if( naddconss !=
NULL )
4983 if( nchgcoefs !=
NULL )
4991 for(
i = 0;
i < nconss; ++
i )
4997 if( !consdata->issimplified && consdata->expr !=
NULL )
5004 consdata->issimplified =
TRUE;
5055 if( ndelconss !=
NULL )
5071 for(
i = 0;
i < nconss; ++
i )
5080 for(
i = 0;
i < nconss; ++
i )
5095 for(
i = nconss-1;
i >= 0; --
i )
5104 for(
i = 0;
i < nconss; ++
i )
5123 for(
i = 0;
i < nconss; ++
i )
5137 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
5162 SCIP_Bool* updatelocks;
5180 for(
c = 0;
c < nconss; ++
c )
5202 assert(idx >= 0 && idx < nconss);
5208 SCIPdebugMsg(
scip,
"merge constraint %g <= %s <= %g with %g <= %s <= %g\n", consdata->lhs,
5218 updatelocks[idx] =
TRUE;
5234 for(
c = 0;
c < nconss; ++
c )
5236 if( updatelocks[
c] )
5270 if( conshdlrdata->globalbounds )
5356 ++conshdlrdata->curboundstag;
5357 assert(conshdlrdata->curboundstag > 0);
5358 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
5359 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
5365 for(
i = 0;
i < nconss; ++
i )
5399 SCIP_Bool tightened;
5466 SCIPdebugMsg(
scip,
" -> redundant: activity [%g,%g] within sides [%g,%g]\n", activity.
inf, activity.
sup, consdata->lhs, consdata->rhs);
5474 SCIPdebugMsg(
scip,
" -> not redundant: activity [%g,%g] not within sides [%g,%g]\n", activity.
inf, activity.
sup, consdata->lhs, consdata->rhs);
5479 ++conshdlrdata->curboundstag;
5480 conshdlrdata->lastvaractivitymethodchange = conshdlrdata->curboundstag;
5481 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
5493 SCIP_Bool* upgraded,
5521 if( conshdlrdata->nconsupgrades == 0 )
5535 for(
i = 0;
i < conshdlrdata->nconsupgrades; ++
i )
5537 if( !conshdlrdata->consupgrades[
i]->active )
5540 assert(conshdlrdata->consupgrades[
i]->consupgd !=
NULL);
5661 SCIP_Bool* infeasible
5682 *infeasible =
FALSE;
5706 for(
i = 0;
i < consdata->nvarexprs; ++
i )
5732 for(
i = 0;
i < nchildren; ++
i )
5737 child = children[
i];
5773 valid = exponent > 1.0 &&
fmod(exponent, 2.0) == 0.0;
5805 SCIP_Real bounds[2];
5811 SCIPdebugMsg(
scip,
"found single locked variable %s in [%g,%g] that can be fixed to one of its bounds\n",
5865 SCIP_Bool* infeasible
5876 *infeasible =
FALSE;
5886 for(
c = 0;
c < nconss; ++
c )
5915 if( nchildren <= 1 )
5921 for(
i = 0;
i < nchildren; ++
i )
5943 for(
i = 0;
i < nchildren; ++
i )
5945 if( children[
i] ==
cand )
5966 SCIPdebugMsg(
scip,
"make variable <%s> implicit integer due to constraint <%s>\n",
6004 assert(ownerdata->nauxvaruses > 0);
6007 if( ownerdata->auxvar !=
NULL )
6022 assert(conshdlrdata->auxvarid >= 0);
6032 ++conshdlrdata->auxvarid;
6082#ifdef WITH_DEBUG_SOLUTION
6116 SCIP_Bool* infeasible
6125 int nreductions = 0;
6138 ++conshdlrdata->curpropboundstag;
6144 *infeasible =
FALSE;
6145 for(
c = 0;
c < nconss; ++
c )
6154#ifdef WITH_DEBUG_SOLUTION
6183 if( auxvar !=
NULL )
6185 SCIPdebugMsg(
scip,
"tighten auxvar <%s> bounds using constraint sides [%g,%g]\n",
6218 for(
c = 0;
c < nconss && !*infeasible; ++
c )
6234 if( ownerdata->nauxvaruses == 0 )
6237 for(
e = 0;
e < ownerdata->nenfos; ++
e )
6240 SCIP_Bool underestimate;
6241 SCIP_Bool overestimate;
6247 if( ownerdata->enfos[
e]->issepainit )
6254 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
6262 overestimate = ownerdata->nlocksneg > 0;
6263 underestimate = ownerdata->nlockspos > 0;
6264 assert(underestimate || overestimate);
6266 SCIPdebugMsg(
scip,
"initsepa under=%u over=%u for expression %p\n", underestimate, overestimate, (
void*)expr);
6270 ownerdata->enfos[
e]->nlhdlrexprdata, overestimate, underestimate, infeasible) );
6271 ownerdata->enfos[
e]->issepainit =
TRUE;
6322 switch( conshdlrdata->branchviolsplit )
6331 return MAX(0.05, weight);
6342 return 10.0*
log10(width);
6344 return 0.1/(-
log10(width));
6349 SCIPerrorMessage(
"invalid value for parameter constraints/expr/branching/violsplit");
6375 SCIP_Real weightsum = 0.0;
6394 for(
i = 0;
i < nexprs; ++
i )
6406 for(
i = 0;
i < nexprs; ++
i )
6482 if( auxvar ==
NULL )
6488 assert(auxvars[pos] == auxvar);
6491 exprs[nexprs++] = expr;
6533 for(
c = 0;
c < nconss; ++
c )
6546 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6588 for(
c = 0;
c < nconss; ++
c )
6607 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6739 for(
c = 0;
c < nconss; ++
c )
6769 for(
i = 0;
i < consdata->nvarexprs; ++
i )
6792 cands[*ncands].
expr = consdata->varexprs[
i];
6829 cands[*ncands].
expr = expr;
6915 for(
r = 0;
r < nrows; ++
r )
6994 for(
c = 0;
c < ncands; ++
c )
6996 if( conshdlrdata->branchviolweight > 0.0 )
7002 if( conshdlrdata->branchdomainweight > 0.0 )
7027 if( conshdlrdata->branchdualweight > 0.0 )
7059 strategy = conshdlrdata->branchpscostupdatestrategy;
7139 if( conshdlrdata->branchvartypeweight > 0.0 )
7168 for(
c = 0;
c < ncands; ++
c )
7170 SCIP_Real weightsum;
7178 cands[
c].weighted = 0.0;
7184 weightsum += conshdlrdata->branchviolweight;
7192 weightsum += conshdlrdata->branchdomainweight;
7200 weightsum += conshdlrdata->branchdualweight;
7211 weightsum += conshdlrdata->branchpscostweight;
7225 weightsum += conshdlrdata->branchvartypeweight;
7245 if( cands[
ind1].weighted != cands[
ind2].weighted )
7280 if( conshdlrdata->branchexternal )
7325 threshold = conshdlrdata->branchhighscorefactor * cands[perm[0]].weighted;
7326 while( left < right )
7328 int mid = (left + right) / 2;
7338 if( cands[perm[left]].weighted >=
threshold )
7340 assert(left + 1 == ncands || cands[perm[left + 1]].weighted <
threshold);
7358 if( conshdlrdata->branchrandnumgen ==
NULL )
7410 SCIP_Bool overestimate,
7468 for(
r = minidx;
r <= maxidx; ++
r )
7511 SCIP_Bool underestimate;
7512 SCIP_Bool overestimate;
7539 if( !overestimate && !underestimate )
7545 for(
e = 0;
e < ownerdata->nenfos; ++
e )
7553 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
7581 "auxviolation %g << origviolation %g under:%d over:%d\n",
SCIPnlhdlrGetName(nlhdlr), (
void*)expr,
7593 underestimate, overestimate); )
7617 ownerdata->lastenforced = conshdlrdata->enforound;
7625 ownerdata->lastenforced = conshdlrdata->enforound;
7634 ownerdata->lastenforced = conshdlrdata->enforound;
7647 ownerdata->lastenforced = conshdlrdata->enforound;
7665 ownerdata->lastenforced = conshdlrdata->enforound;
7673 ownerdata->lastenforced = conshdlrdata->enforound;
7682 ownerdata->lastenforced = conshdlrdata->enforound;
7695 ownerdata->lastenforced = conshdlrdata->enforound;
7747 SCIP_Bool infeasible;
7770 if( ownerdata->auxvar ==
NULL )
7773 assert(ownerdata->lastenforced <= conshdlrdata->enforound);
7774 if( ownerdata->lastenforced == conshdlrdata->enforound )
7789 if( ownerdata->lastenforced == conshdlrdata->enforound )
7851 ++(conshdlrdata->enforound);
7858 for(
c = 0;
c < nconss; ++
c )
7884 for(
i = 0;
i < consdata->nvarexprs; ++
i )
7911 ++conshdlrdata->nweaksepa;
7983 for(
c = 0;
c < nconss; ++
c )
8020 if( ownerdata->auxvar ==
NULL )
8089 for(
e = 0;
e < ownerdata->nenfos; ++
e )
8097 nlhdlr = ownerdata->enfos[
e]->nlhdlr;
8150 for(
c = 0;
c < nconss; ++
c )
8169 "auxviolations in %g..%g, variable bounds violated by at most %g, LP feastol=%e\n",
8176 if( conshdlrdata->propinenforce )
8197 ++conshdlrdata->ntightenlp;
8213 ++conshdlrdata->ntightenlp;
8236 ++conshdlrdata->ntightenlp;
8258 ++conshdlrdata->ndesperatetightenlp;
8268 if( !conshdlrdata->propinenforce )
8290 ++conshdlrdata->ndesperatebranch;
8310 ++conshdlrdata->ndesperatecutoff;
8335 for(
c = 0;
c < nconss; ++
c )
8375 idx = ((int)(
size_t)
elem) - 1;
8378 return (
void*)&conshdlrdata->bilinterms[idx];
8431 for(
i = 0;
i < 3; ++
i )
8457 if(
term->nauxexprs == 0 )
8469 if(
term->nauxexprs >= conshdlrdata->bilinmaxnauxexprs )
8476 for(
i =
term->nauxexprs;
i > pos; --
i )
8481 ++(
term->nauxexprs);
8486 term->aux.exprs[pos]->underestimate |=
auxexpr->underestimate;
8487 term->aux.exprs[pos]->overestimate |=
auxexpr->overestimate;
8515 if( conshdlrdata->bilinterms !=
NULL )
8524 for(
c = 0;
c < nconss; ++
c )
8605 assert(conshdlrdata->bilinterms[*idx].x ==
x);
8606 assert(conshdlrdata->bilinterms[*idx].y ==
y);
8609 term = &conshdlrdata->bilinterms[*idx];
8611 term->nlockspos += nlockspos;
8612 term->nlocksneg += nlocksneg;
8619 *idx = conshdlrdata->nbilinterms;
8622 term = &conshdlrdata->bilinterms[*idx];
8626 term->nauxexprs = 0;
8627 term->auxexprssize = 0;
8628 term->nlockspos = nlockspos;
8629 term->nlocksneg = nlocksneg;
8630 term->existing = existing;
8637 ++(conshdlrdata->nbilinterms);
8640 if( conshdlrdata->bilinhashtable ==
NULL )
8644 (
void*)conshdlrdata) );
8646 assert(conshdlrdata->bilinhashtable !=
NULL);
8674 if( conshdlrdata->bilinterms ==
NULL )
8677 assert(conshdlrdata->nbilinterms == 0);
8678 assert(conshdlrdata->bilintermssize == 0);
8684 for(
i = 0;
i < conshdlrdata->nbilinterms; ++
i )
8689 for(
j = 0;
j < conshdlrdata->bilinterms[
i].nauxexprs; ++
j )
8691 if( conshdlrdata->bilinterms[
i].aux.exprs[
j]->auxvar !=
NULL )
8698 if( conshdlrdata->bilinterms[
i].nauxexprs > 0 )
8707 if( conshdlrdata->bilinterms[
i].aux.var !=
NULL )
8714 if( conshdlrdata->bilinhashtable !=
NULL )
8721 conshdlrdata->nbilinterms = 0;
8722 conshdlrdata->bilintermssize = 0;
8756 SCIPdebugMsg(
scip,
"Building LP for computing facets of convex envelope of vertex-polyhedral function\n");
8761 nrows = (
unsigned int)
nvars + 1;
8763 nnonz = (ncols * (nrows + 1)) / 2;
8774 for(
i = 0,
k = 0;
i < ncols; ++
i )
8808 ind[
k] = (int)nrows - 1;
8819 (
int)ncols,
obj, lb, ub,
NULL,
8820 (
int)nrows, lb, lb,
NULL,
8821 (
int)nnonz,
beg,
ind, val) );
8824 ind[0] = (int)nrows - 1;
8846 SCIP_Bool overestimate,
8875 for(
i = 0;
i < (
unsigned int) nallvars; ++
i )
8901 while( (
diff >>= 1) != 0 )
8935 SCIP_Bool overestimate,
8942 SCIP_Real targetvalue,
8976 if( conshdlrdata->vp_randnumgen ==
NULL && conshdlrdata->vp_maxperturb > 0.0 )
8982 if( conshdlrdata->vp_lp[
nvars] ==
NULL )
8986 lp = conshdlrdata->vp_lp[
nvars];
9004 for(
i = 0;
i < ncols; ++
i )
9009 for(
i = 0;
i < nrows-1; ++
i )
9019 lb =
box[2 * varpos];
9020 ub =
box[2 * varpos + 1];
9021 solval =
xstar[varpos];
9029 else if( solval >= ub )
9032 aux[
i] = (solval - lb) / (ub - lb);
9035 if( conshdlrdata->vp_maxperturb > 0.0 )
9040 aux[
i] -=
SCIPrandomGetReal(conshdlrdata->vp_randnumgen, 0.0, conshdlrdata->vp_maxperturb);
9041 else if( aux[
i] == 0.0 )
9042 aux[
i] +=
SCIPrandomGetReal(conshdlrdata->vp_randnumgen, 0.0, conshdlrdata->vp_maxperturb);
9051 assert(0.0 < aux[
i] && aux[
i] < 1.0);
9084 if( conshdlrdata->vp_dualsimplex )
9118 for(
i = 0;
i < nallvars; ++
i )
9139 lb =
box[2 * varpos];
9140 ub =
box[2 * varpos + 1];
9166 if( overestimate == (
facetvalue > targetvalue) )
9168 SCIPdebugMsg(
scip,
"missed the target, facetvalue %g targetvalue %g, overestimate=%u\n",
facetvalue, targetvalue, overestimate);
9297 SCIPdebugMsg(
scip,
"numerical troubles - try to solve the linear system via an LU factorization\n");
9337 SCIP_Bool overestimate,
9347 SCIP_Real targetvalue,
9375 targetvalue = -targetvalue;
9398 SCIP_CALL(
computeHyperplaneThreePoints(
scip,
p2[0],
p2[1],
p2val,
p3[0],
p3[1],
p3val,
p4[0],
p4[1],
p4val,
9407 SCIP_CALL(
computeHyperplaneThreePoints(
scip,
p1[0],
p1[1],
p1val,
p3[0],
p3[1],
p3val,
p4[0],
p4[1],
p4val,
9416 SCIP_CALL(
computeHyperplaneThreePoints(
scip,
p1[0],
p1[1],
p1val,
p2[0],
p2[1],
p2val,
p4[0],
p4[1],
p4val,
9425 SCIP_CALL(
computeHyperplaneThreePoints(
scip,
p1[0],
p1[1],
p1val,
p2[0],
p2[1],
p2val,
p3[0],
p3[1],
p3val,
9523 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
9529 conshdlrdata->nlhdlrssize = 0;
9532 for(
i = 0;
i < conshdlrdata->nconsupgrades; ++
i )
9543 if( conshdlrdata->vp_randnumgen !=
NULL )
9549 if( conshdlrdata->vp_lp[
i] !=
NULL )
9555 assert(conshdlrdata->branchrandnumgen ==
NULL);
9578 conshdlrdata->lastboundrelax = ++conshdlrdata->curboundstag;
9580 conshdlrdata->enforound = 1;
9582 conshdlrdata->auxvarid = 0;
9584 for(
i = 0;
i < nconss; ++
i )
9591 if( conshdlrdata->nnlhdlrs > 1 )
9599 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
9605 conshdlrdata->nweaksepa = 0;
9606 conshdlrdata->ntightenlp = 0;
9607 conshdlrdata->ndesperatebranch = 0;
9608 conshdlrdata->ndesperatecutoff = 0;
9609 conshdlrdata->ndesperatetightenlp = 0;
9610 conshdlrdata->nforcelp = 0;
9612 conshdlrdata->ncanonicalizecalls = 0;
9639 for(
i = 0;
i < nconss; ++
i )
9648 conshdlrdata->subnlpheur =
NULL;
9649 conshdlrdata->trysolheur =
NULL;
9651 if( conshdlrdata->vp_randnumgen !=
NULL )
9657 if( conshdlrdata->vp_lp[
i] !=
NULL )
9663 if( conshdlrdata->branchrandnumgen !=
NULL )
9667 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
9684#ifdef SCIP_DISABLED_CODE
9688 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
9694#define consInitpreNonlinear NULL
9702 SCIP_Bool infeasible;
9753 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
9759 if( nconss != 0 && conshdlrdata->linearizeheursol !=
'o' )
9767 eventhdlr, (
SCIP_EVENTDATA*)conshdlr, &conshdlrdata->newsoleventfilterpos) );
9771 if( conshdlrdata->branchpscostweight > 0.0 )
9774 if(
strchr(
"lds", conshdlrdata->branchpscostupdatestrategy) ==
NULL )
9776 SCIPerrorMessage(
"branching/lpgainnormalize strategy %c unknown\n", conshdlrdata->branchpscostupdatestrategy);
9801 conshdlrdata->checkedvarlocks =
FALSE;
9804 if( conshdlrdata->newsoleventfilterpos >= 0 )
9812 conshdlrdata->newsoleventfilterpos = -1;
9828 assert((*consdata)->nlockspos == 0);
9829 assert((*consdata)->nlocksneg == 0);
9837 if( (*consdata)->nlrow !=
NULL )
9952 for(
c = 0;
c < nconss; ++
c )
9984 SCIPdebugMsg(
scip,
"could not find branching candidates, forcing to solve LP\n");
10021 for(
c = 0;
c < nconss; ++
c )
10066 if( !(consdata->linvarincr !=
NULL && consdata->linvarincrcoef > 0.0) &&
10067 !(consdata->linvardecr !=
NULL && consdata->linvardecrcoef < 0.0) )
10076 if( !(consdata->linvarincr !=
NULL && consdata->linvarincrcoef < 0.0) &&
10077 !(consdata->linvardecr !=
NULL && consdata->linvardecrcoef > 0.0) )
10124 SCIP_Bool infeasible;
10184 for(
c = 0;
c < nconss; ++
c )
10186 SCIP_Bool upgraded;
10210 && !conshdlrdata->checkedvarlocks && conshdlrdata->checkvarlocks !=
'd' )
10215 conshdlrdata->checkedvarlocks =
TRUE;
10217 for(
c = 0;
c < nconss; ++
c )
10223 SCIPdebugMsg(
scip,
"presolSingleLockedVars() for %s: nchgvartypes=%d naddconss=%d infeas=%u\n",
10238 if( *ndelconss > 0 || *nchgbds > 0 || *nupgdconss > 0 || *naddconss > 0 || *nchgvartypes > 0 )
10248#ifdef SCIP_DISABLED_CODE
10252 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
10258#define consRespropNonlinear NULL
10283 if( ownerdata->nenfos >= 0 )
10285 if( (consdata->nlockspos == 0) != (nlockspos == 0) )
10287 if( (consdata->nlocksneg == 0) != (nlocksneg == 0) )
10313 SCIP_Bool infeasible =
FALSE;
10323 if( !consdata->issimplified )
10333 consdata->issimplified =
TRUE;
10382 assert(consdata->nlockspos == 0);
10383 assert(consdata->nlocksneg == 0);
10469#ifdef SCIP_DISABLED_CODE
10473 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
10479#define consDelvarsNonlinear NULL
10543 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
10679 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
10710 for(
i = 0;
i < consdata->nvarexprs; ++
i )
10733 *
nvars = consdata->nvarexprs;
10740#ifdef SCIP_DISABLED_CODE
10744 SCIPerrorMessage(
"method of nonlinear constraint handler not implemented yet\n");
10750#define consGetDiveBdChgsNonlinear NULL
10767 SCIPinfoMessage(
scip, file,
"Nonlinear Conshdlr : %10s %10s %10s %10s %10s %10s %10s\n",
"WeakSepa",
"TightenLP",
"DespTghtLP",
"DespBranch",
"DespCutoff",
"ForceLP",
"CanonTime");
10827 for(
i = 0;
i < conshdlrdata->nnlhdlrs; ++
i )
10862 conshdlrdata->curboundstag = 1;
10863 conshdlrdata->lastboundrelax = 1;
10864 conshdlrdata->curpropboundstag = 1;
10865 conshdlrdata->newsoleventfilterpos = -1;
10890 "limit on number of propagation rounds for a set of constraints within one round of SCIP propagation",
10894 "whether to check bounds of all auxiliary variable to seed reverse propagation",
10898 "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",
10899 &conshdlrdata->varboundrelax,
TRUE,
'r',
"nabr",
NULL,
NULL) );
10902 "by how much to relax variable bounds during bound tightening if strategy 'a', 'b', or 'r'",
10906 "by how much to relax constraint sides during bound tightening",
10910 "maximal relative perturbation of reference point when computing facet of envelope of vertex-polyhedral function (dim>2)",
10914 "adjust computed facet of envelope of vertex-polyhedral function up to a violation of this value times LP feasibility tolerance",
10918 "whether to use dual simplex instead of primal simplex for LP that computes facet of vertex-polyhedral function",
10922 "maximal number of auxiliary expressions per bilinear term",
10926 "whether to reformulate products of binary variables during presolving",
10930 "whether to use the AND constraint handler for reformulating binary products",
10934 "minimum number of terms to reformulate bilinear binary products by factorizing variables (<= 1: disabled)",
10938 "whether to forbid multiaggregation of nonlinear variables",
10942 "whether to tighten LP feasibility tolerance during enforcement, if it seems useful",
10946 "whether to (re)run propagation in enforcement",
10950 "threshold for when to regard a cut from an estimator as weak (lower values allow more weak cuts)",
10951 &conshdlrdata->weakcutthreshold,
TRUE, 0.2, 0.0, 1.0,
NULL,
NULL) );
10954 "\"strong\" cuts will be scaled to have their maximal coef in [1/strongcutmaxcoef,strongcutmaxcoef]",
10958 "consider efficacy requirement when deciding whether a cut is \"strong\"",
10962 "whether to force \"strong\" cuts in enforcement",
10966 "an expression will be enforced if the \"auxiliary\" violation is at least this factor times the \"original\" violation",
10967 &conshdlrdata->enfoauxviolfactor,
TRUE, 0.01, 0.0, 1.0,
NULL,
NULL) );
10970 "retry enfo of constraint with weak cuts if violation is least this factor of maximal violated constraints",
10971 &conshdlrdata->weakcutminviolfactor,
TRUE, 0.5, 0.0, 2.0,
NULL,
NULL) );
10974 "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",
10975 &conshdlrdata->rownotremovable,
TRUE,
'o',
"oea",
NULL,
NULL) );
10978 "method how to scale violations to make them comparable (not used for feasibility check): (n)one, (a)ctivity and side, norm of (g)radient",
10979 &conshdlrdata->violscale,
TRUE,
'n',
"nag",
NULL,
NULL) );
10982 "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)",
10983 &conshdlrdata->checkvarlocks,
TRUE,
't',
"bdt",
NULL,
NULL) );
10986 "from which depth on in the tree to allow branching on auxiliary variables (variables added for extended formulation)",
10990 "whether to use external branching candidates and branching rules for branching",
10994 "consider a constraint highly violated if its violation is >= this factor * maximal violation among all constraints",
10995 &conshdlrdata->branchhighviolfactor,
FALSE, 0.0, 0.0, 1.0,
NULL,
NULL) );
10998 "consider a variable branching score high if its branching score >= this factor * maximal branching score among all variables",
10999 &conshdlrdata->branchhighscorefactor,
FALSE, 0.9, 0.0, 1.0,
NULL,
NULL) );
11002 "weight by how much to consider the violation assigned to a variable for its branching score",
11006 "weight by how much to consider the dual values of rows that contain a variable for its branching score",
11010 "weight by how much to consider the pseudo cost of a variable for its branching score",
11014 "weight by how much to consider the domain width in branching score",
11018 "weight by how much to consider variable type (continuous: 0, binary: 1, integer: 0.1, impl-integer: 0.01) in branching score",
11022 "how to aggregate several branching scores given for the same expression: 'a'verage, 'm'aximum, 's'um",
11023 &conshdlrdata->branchscoreagg,
FALSE,
's',
"ams",
NULL,
NULL) );
11026 "method used to split violation in expression onto variables: 'u'niform, 'm'idness of solution, 'd'omain width, 'l'ogarithmic domain width",
11027 &conshdlrdata->branchviolsplit,
FALSE,
'm',
"umdl",
NULL,
NULL) );
11030 "minimum pseudo-cost update count required to consider pseudo-costs reliable",
11034 "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)",
11035 &conshdlrdata->linearizeheursol,
FALSE,
'o',
"oie",
NULL,
NULL) );
11038 "whether to assume that any constraint is convex",
11099 if( conshdlr ==
NULL )
11109 for(
i = conshdlrdata->nconsupgrades - 1;
i >= 0; --
i )
11111 if( conshdlrdata->consupgrades[
i]->consupgd ==
nlconsupgd )
11128 assert(conshdlrdata->nconsupgrades+1 <= conshdlrdata->consupgradessize);
11130 for(
i = conshdlrdata->nconsupgrades;
i > 0 && conshdlrdata->consupgrades[
i-1]->priority <
consupgrade->priority; --
i )
11131 conshdlrdata->consupgrades[
i] = conshdlrdata->consupgrades[
i-1];
11134 conshdlrdata->nconsupgrades++;
11159 SCIP_Bool separate,
11169 SCIP_Bool modifiable,
11175 SCIP_Bool removable
11184 if( conshdlr ==
NULL )
11192 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
11230 SCIP_Real* lincoefs,
11239 SCIP_Bool separate,
11249 SCIP_Bool modifiable,
11255 SCIP_Bool removable
11267 if( conshdlr ==
NULL )
11274 SCIP_CALL(
SCIPcreateExprQuadratic(
scip, &expr, nlinvars, linvars, lincoefs,
nquadterms,
quadvars1,
quadvars2,
quadcoefs,
exprownerCreate, (
void*)conshdlr) );
11279 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable) );
11301 SCIP_Real* lincoefs,
11310 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, cons, name, nlinvars, linvars, lincoefs,
nquadterms,
quadvars1,
quadvars2,
quadcoefs, lhs, rhs,
11329 SCIP_Real* offsets,
11330 SCIP_Real constant,
11339 SCIP_Real termcoefs[2];
11351 if( offsets !=
NULL && offsets[
i] != 0.0 )
11370 termcoefs[0] = 1.0;
11399 SCIP_Real exponent,
11408 SCIP_Real coefs[2];
11453 return conshdlrdata->curboundstag;
11466 return conshdlrdata->lastboundrelax;
11485 ++conshdlrdata->curboundstag;
11486 assert(conshdlrdata->curboundstag > 0);
11489 conshdlrdata->lastboundrelax = conshdlrdata->curboundstag;
11509 SCIP_Bool overestimate,
11511 SCIP_Real auxvalue,
11524 SCIP_Real mincutviolation;
11567 ( overestimate && (-
cutviol >= conshdlrdata->weakcutthreshold * (auxvalue -
auxvarvalue))) )
11570 "weak: auxvarvalue %g estimateval %g auxvalue %g (over %d)\n",
11671#ifdef BRSCORE_ABSVIOL
11696 if( conshdlrdata->branchdualweight > 0.0 )
11724 SCIP_Bool infeasible;
11735 if( conshdlrdata->rownotremovable ==
'a' || (conshdlrdata->rownotremovable ==
'e' &&
inenforcement) )
11784 return conshdlrdata->assumeconvex;
11822 return conshdlrdata->nbilinterms;
11841 return conshdlrdata->bilinterms;
11866 if( conshdlrdata->bilinhashtable ==
NULL )
11915 return &conshdlrdata->bilinterms[idx];
11962 term = &conshdlrdata->bilinterms[idx];
11968 if( auxvar !=
NULL )
11970 term->aux.var = auxvar;
11988 SCIP_Bool overestimate
12004 nlockspos = overestimate ? 1 : 0;
12005 nlocksneg = overestimate ? 0 : 1;
12009 term = &conshdlrdata->bilinterms[idx];
12020 if( conshdlrdata->bilinmaxnauxexprs <= 1 )
12043 auxexpr->underestimate = !overestimate;
12044 auxexpr->overestimate = overestimate;
12067 else if( auxvar !=
NULL )
12079 SCIP_Bool overestimate,
12085 SCIP_Real targetvalue,
12114 for(
j = 0;
j < nallvars; ++
j )
12136 for(
j = 0;
j < nallvars; ++
j )
12150 if( (
i >>
j) & 0x1 )
12183 else if(
nvars == 2 )
12192 SCIP_Real coefs[2] = { 0.0, 0.0 };
12194 SCIP_CALL(
computeVertexPolyhedralFacetBivariate(
scip, overestimate,
p1,
p2,
p3,
p4,
funvals[0],
funvals[1],
funvals[2],
funvals[3],
xstar2, targetvalue,
success, coefs,
facetconstant) );
12201 SCIP_CALL(
computeVertexPolyhedralFacetLP(
scip, conshdlr, overestimate,
xstar,
box, nallvars,
nonfixedpos,
funvals,
nvars, targetvalue,
success,
facetcoefs,
facetconstant) );
12279 return consdata->expr;
12295 return consdata->lhs;
12311 return consdata->rhs;
12330 if( consdata->nlrow ==
NULL )
12335 *nlrow = consdata->nlrow;
12356 return consdata->curv;
12410 SCIPerrorMessage(
"SCIPchgLhsNonlinear can only be called in problem stage.\n");
12420 if( consdata->lhs == lhs )
12423 consdata->lhs = lhs;
12426 consdata->ispropagated =
FALSE;
12449 SCIPerrorMessage(
"SCIPchgLhsNonlinear can only be called in problem stage.\n");
12459 if( consdata->rhs == rhs )
12462 consdata->rhs = rhs;
12465 consdata->ispropagated =
FALSE;
12489 SCIPerrorMessage(
"SCIPchgExprNonlinear can only be called in problem stage.\n");
12507 assert(consdata->nvarexprs == 0);
12509 assert(!consdata->catchedevents);
12518 consdata->issimplified =
FALSE;
12519 consdata->ispropagated =
FALSE;
12544 SCIPerrorMessage(
"SCIPaddLinearVarNonlinear can only be called in problem stage.\n");
12565 assert(consdata->nvarexprs == 0);
12567 assert(!consdata->catchedevents);
12580 SCIP_Real coefs[2] = { 1.0, coef };
12591 consdata->issimplified =
FALSE;
12592 consdata->ispropagated =
FALSE;
12617 SCIPerrorMessage(
"SCIPaddLinearVarNonlinear can only be called in problem stage.\n");
12638 assert(consdata->nvarexprs == 0);
12640 assert(!consdata->catchedevents);
12654 SCIP_Real coefs[2] = { 1.0, coef };
12665 consdata->issimplified =
FALSE;
12666 consdata->ispropagated =
FALSE;
12736 *
var = consdata->linvardecr;
12737 *coef = consdata->linvardecrcoef;
12760 *
var = consdata->linvarincr;
12761 *coef = consdata->linvarincrcoef;
12806 return ownerdata->filterpos >= -1 ?
SCIPgetVarExprVar(expr) : ownerdata->auxvar;
12827 SCIP_Bool* sepabelowusesactivity,
12828 SCIP_Bool* sepaaboveusesactivity,
12829 SCIP_Real* auxvalue
12843 *nlhdlr = ownerdata->enfos[idx]->nlhdlr;
12845 if( nlhdlrexprdata !=
NULL )
12846 *nlhdlrexprdata = ownerdata->enfos[idx]->nlhdlrexprdata;
12848 if( nlhdlrparticipation !=
NULL )
12849 *nlhdlrparticipation = ownerdata->enfos[idx]->nlhdlrparticipation;
12851 if( sepabelowusesactivity !=
NULL )
12852 *sepabelowusesactivity = ownerdata->enfos[idx]->sepabelowusesactivity;
12854 if( sepaaboveusesactivity !=
NULL )
12855 *sepaaboveusesactivity = ownerdata->enfos[idx]->sepaaboveusesactivity;
12857 if( auxvalue !=
NULL )
12858 *auxvalue = ownerdata->enfos[idx]->auxvalue;
12879 ownerdata->enfos[idx]->auxvalue = auxvalue;
12957 if( ownerdata->nenfos >= 0 &&
12959 (ownerdata->nauxvaruses == 0 &&
useauxvar)
12971 ++ownerdata->nauxvaruses;
12974 ++ownerdata->nactivityusesprop;
12977 ++ownerdata->nactivityusessepa;
13065 SCIP_Real auxvalue,
13097 SCIP_Real auxvalue,
13151 if( ownerdata->propboundstag == conshdlrdata->curpropboundstag )
13153 bounds = ownerdata->propbounds;
13166 if( ownerdata->auxvar !=
NULL )
13171 auxvarbounds = conshdlrdata->intevalvar(
scip, ownerdata->auxvar, conshdlrdata);
13254 if( ownerdata->propboundstag == conshdlrdata->curpropboundstag )
13267 SCIPdebugMsg(
scip,
" applied %s: [%.20g,%.20g]\n", ownerdata->propboundstag == conshdlrdata->curpropboundstag ?
"previous propbounds" :
"activity",
newbounds.inf,
newbounds.sup);
13273 SCIPdebugMsg(
scip,
" cut off due to empty intersection with previous propbounds or activity\n");
13286 ownerdata->propboundstag = conshdlrdata->curpropboundstag;
13300 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);
13305 if(
SCIPexprGetNChildren(expr) > 0 && !ownerdata->inpropqueue && (ownerdata->nactivityusesprop > 0 || ownerdata->nactivityusessepa > 0 || ownerdata->nenfos < 0) )
13314 ownerdata->inpropqueue =
TRUE;
13361 for(
c = 0;
c < ownerdata->nconss; ++
c )
13365 consdata->ispropagated =
FALSE;
13410 if( ownerdata->violscoretag != conshdlrdata->enforound )
13414 ownerdata->nviolscores = 1;
13415 ownerdata->violscoretag = conshdlrdata->enforound;
13420 if(
violscore > ownerdata->violscoremax )
13422 ++ownerdata->nviolscores;
13471 for(
i = 0;
i < nexprs; ++
i )
13480 if( varssize ==
nvars )
13517 if( conshdlrdata->enforound != ownerdata->violscoretag )
13520 if( ownerdata->nviolscores == 0 )
13523 switch( conshdlrdata->branchscoreagg )
13527 return ownerdata->violscoresum / ownerdata->nviolscores;
13531 return ownerdata->violscoremax;
13535 return ownerdata->violscoresum;
13538 SCIPerrorMessage(
"Invalid value %c for branchscoreagg parameter\n", conshdlrdata->branchscoreagg);
13646 SCIP_Real auxvalue;
13648 SCIP_Real* lincoefs;
13660 for(
i = 0;
i < nlinexprs; ++
i )
13667 for(
i = 0;
i < nquadexprs; ++
i )
13679 auxvalue += (lincoef + sqrcoef * solval) * solval;
13709 int detectpriority,
13725 if( conshdlr ==
NULL )
13740 conshdlrdata->nlhdlrs[conshdlrdata->nnlhdlrs] = *nlhdlr;
13741 ++conshdlrdata->nnlhdlrs;
13764 return conshdlrdata->nnlhdlrs;
13779 return conshdlrdata->nlhdlrs;
13797 for(
h = 0;
h < conshdlrdata->nnlhdlrs; ++
h )
13799 return conshdlrdata->nlhdlrs[
h];
13822 for(
e = 0;
e < ownerdata->nenfos; ++
e )
13823 if( ownerdata->enfos[
e]->nlhdlr == nlhdlr )
13824 return ownerdata->enfos[
e]->nlhdlrexprdata;
static GRAPHNODE ** active
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)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
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 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)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE registerBranchingCandidates(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
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_RESULT *result, 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)
#define consRespropNonlinear
static SCIP_RETCODE addTightEstimatorCut(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_EXPR *expr, EXPRENFO *exprenfo, SCIP_SOL *sol, SCIP_Bool overestimate, SCIP_PTRARRAY *rowpreps)
static SCIP_RETCODE consSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
#define CONSHDLR_PROP_TIMING
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)
#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)
#define CONSHDLR_MAXPREROUNDS
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 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_RESULT *result)
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 void scoreBranchingCandidates(SCIP *scip, SCIP_CONSHDLR *conshdlr, BRANCHCAND *cands, int ncands, SCIP_SOL *sol)
#define CONSHDLR_SEPAPRIORITY
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)
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_RESULT *result)
#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 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_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 createNlRow(SCIP *scip, SCIP_CONS *cons)
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 addTightEstimatorCuts(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol)
static SCIP_RETCODE presolveSingleLockedVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, int *nchgvartypes, int *naddconss, SCIP_Bool *infeasible)
#define VERTEXPOLY_USEDUALSIMPLEX
#define CONSHDLR_PROPFREQ
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)
#define CONSHDLR_PRESOLTIMING
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)
#define CONSHDLR_EAGERFREQ
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)
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
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 enforceConstraints(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Bool inenforcement, SCIP_Real maxrelconsviol, SCIP_RESULT *result)
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)
#define TABLE_POSITION_NLHDLR
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 CONSHDLR_DELAYPROP
#define BILIN_MAXNAUXEXPRS
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for variable bound constraints .
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIP_INTERVAL_INFINITY
default user interface dialog
power and signed power expression handlers
constant value expression handler
variable expression handler
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)
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)
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)
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)
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)
SCIP_RETCODE SCIPincludeConshdlrNonlinear(SCIP *scip)
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
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_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 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 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 SCIPsolveLinearEquationsIpopt(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
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_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_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_CONSHDLRDATA *conshdlrdata)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
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 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_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
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 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)
SCIP_RETCODE SCIPclearPtrarray(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_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 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_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)
void SCIPexprSetIntegrality(SCIP_EXPR *expr, SCIP_Bool isintegral)
SCIP_RETCODE SCIPprintExpr(SCIP *scip, SCIP_EXPR *expr, FILE *file)
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)
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)
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)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
#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)
void SCIPnlrowSetCurvature(SCIP_NLROW *nlrow, SCIP_EXPRCURV curvature)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
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)
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_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_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_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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_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_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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_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_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
void SCIPvarMarkRelaxationOnly(SCIP_VAR *var)
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)
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)
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)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
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)
SCIP_Real SCIProwprepGetSide(SCIP_ROWPREP *rowprep)
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_Bool SCIProwprepIsLocal(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)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
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
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)
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
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPdebugPrintCons(x, y, z)
SCIP_DECL_NONLINCONSUPGD((*consupgd))
SCIP_NLHDLR_METHOD nlhdlrparticipation
SCIP_Bool sepaaboveusesactivity
SCIP_Bool sepabelowusesactivity
SCIP_NLHDLREXPRDATA * nlhdlrexprdata
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#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)
#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)
#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)
#define SCIP_DECL_DIALOGEXEC(x)
#define SCIP_EVENTTYPE_BOUNDCHANGED
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_BOUNDTIGHTENED
#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
#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
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_BoundType SCIP_BOUNDTYPE
@ SCIP_LPSOLSTAT_UNBOUNDEDRAY
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_SORTINDCOMP(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
#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_NlhdlrExprData SCIP_NLHDLREXPRDATA
#define SCIP_NLHDLR_METHOD_ALL
#define SCIP_NLHDLR_METHOD_SEPABELOW
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_INITPRESOLVE
@ SCIP_STAGE_EXITPRESOLVE
#define SCIP_DECL_TABLEOUTPUT(x)
#define SCIP_PRESOLTIMING_ALWAYS
#define SCIP_PRESOLTIMING_MEDIUM
unsigned int SCIP_PRESOLTIMING
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE