29 #define _USE_MATH_DEFINES 36 #define SCIP_PRIVATE_ROWPREP 50 #define CONSHDLR_NAME "soc" 51 #define CONSHDLR_DESC "constraint handler for second order cone constraints" 52 #define CONSHDLR_SEPAPRIORITY 10 53 #define CONSHDLR_ENFOPRIORITY -40 54 #define CONSHDLR_CHECKPRIORITY -10 55 #define CONSHDLR_SEPAFREQ 1 56 #define CONSHDLR_PROPFREQ 1 57 #define CONSHDLR_EAGERFREQ 100 59 #define CONSHDLR_MAXPREROUNDS -1 60 #define CONSHDLR_DELAYSEPA FALSE 61 #define CONSHDLR_DELAYPROP FALSE 62 #define CONSHDLR_NEEDSCONS TRUE 64 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 65 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS 67 #define QUADCONSUPGD_PRIORITY 10000 108 struct SCIP_ConshdlrData
113 int newsoleventfilterpos;
152 assert(scip !=
NULL);
153 assert(cons !=
NULL);
154 assert(eventhdlr !=
NULL);
157 assert(consdata !=
NULL);
159 assert(varidx < consdata->nvars);
160 assert(consdata->lhsbndchgeventdata !=
NULL);
162 consdata->lhsbndchgeventdata[
varidx].cons =
cons;
182 assert(scip !=
NULL);
183 assert(cons !=
NULL);
184 assert(eventhdlr !=
NULL);
187 assert(consdata !=
NULL);
189 consdata->rhsbndchgeventdata.cons =
cons;
190 consdata->rhsbndchgeventdata.varidx = -1;
210 assert(scip !=
NULL);
211 assert(cons !=
NULL);
212 assert(eventhdlr !=
NULL);
215 assert(consdata !=
NULL);
216 assert(consdata->lhsbndchgeventdata ==
NULL);
220 for( i = 0; i < consdata->nvars; ++i )
222 if( consdata->vars[i] !=
NULL )
228 if( consdata->rhsvar !=
NULL )
247 assert(scip !=
NULL);
248 assert(cons !=
NULL);
249 assert(eventhdlr !=
NULL);
252 assert(consdata !=
NULL);
254 assert(varidx < consdata->nvars);
255 assert(consdata->lhsbndchgeventdata !=
NULL);
256 assert(consdata->lhsbndchgeventdata[
varidx].varidx ==
varidx);
273 assert(scip !=
NULL);
274 assert(cons !=
NULL);
275 assert(eventhdlr !=
NULL);
278 assert(consdata !=
NULL);
279 assert(consdata->rhsbndchgeventdata.varidx == -1);
297 assert(scip !=
NULL);
298 assert(eventhdlr !=
NULL);
299 assert(cons !=
NULL);
302 assert(consdata !=
NULL);
304 for( i = 0; i < consdata->nvars; ++i )
306 if( consdata->vars[i] !=
NULL )
314 if( consdata->rhsvar !=
NULL )
328 assert(scip !=
NULL);
329 assert(event !=
NULL);
330 assert(eventdata !=
NULL);
331 assert(eventhdlr !=
NULL);
334 assert(cons !=
NULL);
355 assert(scip !=
NULL);
356 assert(cons !=
NULL);
359 assert(conshdlrdata !=
NULL);
362 assert(consdata !=
NULL);
364 if( consdata->nlrow !=
NULL )
369 nlpform = conshdlrdata->nlpform;
376 if( consdata->nvars < 100 && conshdlrdata->haveexprint )
388 if( consdata->nvars > 0 )
395 if( consdata->constant != 0.0 )
404 for( i = 0; i < consdata->nvars; ++i )
407 if( consdata->offsets[i] != 0.0 )
413 if( consdata->coefs[i] != 1.0 )
418 if( exprterm !=
NULL )
430 if( consdata->rhsvar !=
NULL )
433 if( consdata->rhsoffset != 0.0 )
438 if( consdata->rhscoeff != 1.0 )
481 if( consdata->constant != 0.0 )
490 for( i = 0; i < consdata->nvars; ++i )
493 if( consdata->offsets[i] != 0.0 )
499 if( consdata->coefs[i] != 1.0 )
504 if( exprterm !=
NULL )
514 if( exprterm !=
NULL )
522 assert(consdata->nvars == 0);
523 assert(consdata->constant == 0.0);
528 lincoef = -consdata->rhscoeff;
530 -consdata->rhscoeff * consdata->rhsoffset,
531 1, &consdata->rhsvar, &lincoef,
555 consdata->nvars, consdata->vars, 0,
NULL,
560 rhs = -consdata->constant;
561 for( i = 0; i < consdata->nvars; ++i )
565 sqrterm.
coef = consdata->coefs[i] * consdata->coefs[i];
568 if( !
SCIPisZero(scip, consdata->offsets[i]) )
570 rhs -= consdata->offsets[i] * consdata->offsets[i];
577 if( rhsvarpos == -1 )
581 assert(rhsvarpos >= 0);
585 sqrterm.
idx1 = rhsvarpos;
586 sqrterm.
idx2 = rhsvarpos;
587 sqrterm.
coef = -consdata->rhscoeff * consdata->rhscoeff;
590 if( consdata->rhsoffset != 0.0 )
592 rhs += consdata->rhsoffset * consdata->rhsoffset;
620 for( i = 0; i < consdata->nvars; ++i )
624 if( consdata->offsets[i] != 0.0 )
641 assert(consdata->rhsvar !=
NULL);
645 if( consdata->rhscoeff != 1.0 || consdata->rhsoffset != 0.0 )
658 lincoef = -consdata->rhscoeff;
660 -consdata->rhscoeff * consdata->rhsoffset,
661 1, &consdata->rhsvar, &lincoef,
676 SCIPdebugMsg(scip,
"created nonlinear row representation of SOC constraint\n");
696 assert(scip !=
NULL);
697 assert(cons !=
NULL);
700 assert(consdata !=
NULL);
702 consdata->lhsval = consdata->constant;
704 for( i = 0; i < consdata->nvars; ++i )
706 var = consdata->vars[i];
715 val = consdata->coefs[i] * (val + consdata->offsets[i]);
716 consdata->lhsval += val * val;
718 consdata->lhsval =
sqrt(consdata->lhsval);
735 assert(scip !=
NULL);
736 assert(cons !=
NULL);
739 assert(consdata !=
NULL);
742 for( i = 0; i < consdata->nvars; ++i )
746 h =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
747 h *= consdata->coefs[i] * consdata->coefs[i];
750 g /= consdata->lhsval * consdata->lhsval;
751 g += consdata->rhscoeff * consdata->rhscoeff;
769 assert(scip !=
NULL);
770 assert(conshdlr !=
NULL);
771 assert(cons !=
NULL);
774 assert(conshdlrdata !=
NULL);
777 assert(consdata !=
NULL);
788 consdata->violation = 0.0;
797 consdata->violation = consdata->rhscoeff > 0.0 ? 0.0 :
SCIPinfinity(scip);
802 consdata->violation = consdata->rhscoeff < 0.0 ? 0.0 :
SCIPinfinity(scip);
806 consdata->violation = consdata->lhsval - consdata->rhscoeff * (rhsval + consdata->rhsoffset);
807 if( consdata->violation <= 0.0 )
810 consdata->violation = 0.0;
814 switch( conshdlrdata->scaling )
825 if( consdata->violation > 0.0 )
832 consdata->violation /= norm;
840 if( consdata->violation > 0.0 )
841 consdata->violation /=
MAX(1.0, consdata->rhscoeff * consdata->rhsoffset);
872 assert(scip !=
NULL);
873 assert(conss !=
NULL || nconss == 0);
875 if( maxviolcons !=
NULL )
878 for( c = 0; c < nconss; ++c )
881 if( maxviolcons !=
NULL )
884 assert(consdata !=
NULL);
885 if( consdata->violation > maxviol &&
SCIPisGT(scip, consdata->violation,
SCIPfeastol(scip)) )
887 maxviol = consdata->violation;
888 *maxviolcons = conss[c];
909 assert(scip !=
NULL);
910 assert(cons !=
NULL);
911 assert(rowprep !=
NULL);
914 assert(consdata !=
NULL);
923 for( i = 0; i < consdata->nvars; ++i )
925 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
926 val *= consdata->coefs[i] * consdata->coefs[i];
933 (*rowprep)->side /= consdata->lhsval;
934 (*rowprep)->side -= consdata->lhsval - consdata->rhscoeff * consdata->rhsoffset;
955 assert(scip !=
NULL);
956 assert(cons !=
NULL);
957 assert(rowprep !=
NULL);
960 assert(consdata !=
NULL);
962 lhsval = consdata->constant;
963 for( i = 0; i < consdata->nvars; ++i )
967 val = consdata->coefs[i] * (x[i] + consdata->offsets[i]);
970 lhsval =
sqrt(lhsval);
981 for( i = 0; i < consdata->nvars; ++i )
983 val = x[i] + consdata->offsets[i];
987 val *= consdata->coefs[i] * consdata->coefs[i];
994 (*rowprep)->side /= lhsval;
995 (*rowprep)->side -= lhsval - consdata->rhscoeff * consdata->rhsoffset;
1042 assert(scip !=
NULL);
1043 assert(cons !=
NULL);
1044 assert(rowprep !=
NULL);
1047 assert(consdata !=
NULL);
1058 A = consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
1059 A /= consdata->lhsval;
1061 lambda = (1.0 - A) / (1.0 + A);
1065 SCIPdebugMsg(scip,
"A = %g \t lambda = %g\n", A, lambda);
1077 for( i = 0; i < consdata->nvars; ++i )
1079 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
1080 val *= consdata->coefs[i] * consdata->coefs[i];
1084 val *=
SCIPgetSolVal(scip, sol, consdata->vars[i]) + lambda * consdata->offsets[i];
1087 (*rowprep)->side /= consdata->lhsval;
1088 (*rowprep)->side-= consdata->lhsval;
1089 (*rowprep)->side /= 1.0 - lambda;
1090 (*rowprep)->side -= consdata->rhscoeff * consdata->rhsoffset;
1114 int maxnz, nextmaxnz;
1118 assert(scip !=
NULL);
1119 assert(conshdlr !=
NULL);
1120 assert(cons !=
NULL);
1121 assert(rowprep !=
NULL);
1124 assert(conshdlrdata !=
NULL);
1127 assert(consdata !=
NULL);
1132 if( consdata->nvars <= 3 )
1138 goodefficacy =
MAX((1.0-conshdlrdata->sparsifymaxloss) * consdata->violation, minefficacy);
1146 for( i = 0; i < consdata->nvars; ++i )
1149 dist[i] = ABS(x[i] + consdata->offsets[i]);
1150 dist[i] *= consdata->coefs[i] * consdata->coefs[i];
1158 for( i = 0; i < consdata->nvars - maxnz; ++i )
1159 x[ind[i]] = -consdata->offsets[i];
1168 if( *rowprep !=
NULL )
1172 if(
SCIPisGT(scip, efficacy, goodefficacy) ||
1173 (maxnz >= consdata->nvars &&
SCIPisGT(scip, efficacy, minefficacy)) )
1176 SCIPdebugMsg(scip,
"accepted cut with %d of %d nonzeros, efficacy = %g\n", maxnz, consdata->nvars, efficacy);
1184 if( maxnz >= consdata->nvars )
1187 nextmaxnz = (int)(conshdlrdata->sparsifynzgrowth * maxnz);
1188 if( nextmaxnz == consdata->nvars - 1)
1189 nextmaxnz = consdata->nvars;
1190 else if( nextmaxnz == maxnz )
1194 for( i =
MAX(0, consdata->nvars - nextmaxnz); i < consdata->nvars - maxnz; ++i )
1195 x[ind[i]] =
SCIPgetSolVal(scip, sol, consdata->vars[ind[i]]);
1229 assert(scip !=
NULL);
1230 assert(conss !=
NULL || nconss == 0);
1231 assert(nusefulconss <= nconss);
1232 assert(cutoff !=
NULL);
1233 assert(success !=
NULL);
1238 assert(conshdlrdata !=
NULL);
1244 for( c = 0; c < nconss; ++c )
1247 assert(consdata !=
NULL);
1256 if( conshdlrdata->sparsify )
1260 else if( conshdlrdata->projectpoint )
1269 if( rowprep ==
NULL )
1279 if( conshdlrdata->scaling !=
'o' )
1281 if(
SCIPisLE(scip, efficacy, minefficacy) )
1299 if( inenforcement && !conshdlrdata->enfocutsremovable )
1313 if( c >= nusefulconss && *success )
1342 assert(scip !=
NULL);
1343 assert(conshdlr !=
NULL);
1344 assert(conss !=
NULL || nconss == 0);
1345 assert(cutoff !=
NULL);
1348 if( separatedlpsol !=
NULL )
1349 *separatedlpsol =
FALSE;
1351 for( c = 0; c < nconss && !(*cutoff); ++c )
1353 assert(conss[c] !=
NULL);
1359 assert(consdata !=
NULL);
1370 if( rowprep ==
NULL )
1376 if( separatedlpsol !=
NULL )
1381 assert(conshdlrdata !=
NULL);
1391 *separatedlpsol =
TRUE;
1396 if( !addedtolp && !rowprep->
local )
1422 assert(scip !=
NULL);
1423 assert(event !=
NULL);
1424 assert(eventdata !=
NULL);
1425 assert(eventhdlr !=
NULL);
1437 assert(sol !=
NULL);
1440 assert(conshdlrdata !=
NULL);
1450 assert(conss !=
NULL);
1487 assert(scip !=
NULL);
1488 assert(conshdlr !=
NULL);
1489 assert(cons !=
NULL);
1490 assert(iscutoff !=
NULL);
1491 assert(isdeleted !=
NULL);
1497 assert(consdata !=
NULL);
1500 assert(conshdlrdata !=
NULL);
1506 haveremovedvar =
FALSE;
1509 for( i = 0; i < consdata->nvars; ++i )
1511 x = consdata->vars[i];
1526 offset = consdata->offsets[i];
1529 SCIPdebugMsg(scip,
" lhs term at position %d is replaced by %g * <%s> + %g\n",
1533 if( coef == 0.0 || x ==
NULL )
1535 consdata->constant += consdata->coefs[i] * consdata->coefs[i] * offset * offset;
1536 consdata->offsets[i] = 0.0;
1537 haveremovedvar =
TRUE;
1544 consdata->offsets[i] = offset;
1547 consdata->coefs[i] =
REALABS(coef * consdata->coefs[i]);
1548 consdata->offsets[i] /= coef;
1550 consdata->vars[i] = x;
1559 x = consdata->rhsvar;
1576 if( coef == 0.0 || x ==
NULL )
1579 consdata->rhsoffset += offset;
1586 consdata->rhsoffset = (consdata->rhsoffset + offset) / coef;
1587 consdata->rhscoeff *= coef;
1588 consdata->rhsvar = x;
1601 if( consdata->nlrow !=
NULL )
1607 if( haveremovedvar )
1614 oldnvars = consdata->nvars;
1615 for( i = 0; i < consdata->nvars; ++i )
1618 while( consdata->nvars && consdata->vars[consdata->nvars-1] ==
NULL )
1622 if( i == consdata->nvars )
1625 if( consdata->vars[i] !=
NULL )
1630 assert(consdata->nvars >= 1);
1631 assert(consdata->vars[consdata->nvars-1] !=
NULL);
1633 consdata->vars[i] = consdata->vars[consdata->nvars-1];
1634 consdata->offsets[i] = consdata->offsets[consdata->nvars-1];
1635 consdata->coefs[i] = consdata->coefs[consdata->nvars-1];
1640 assert(consdata->nvars < oldnvars);
1653 if( consdata->nvars == 0 )
1656 if( consdata->rhsvar ==
NULL )
1658 if(
SCIPisFeasLE(scip,
sqrt(consdata->constant), consdata->rhscoeff*consdata->rhsoffset) )
1674 sqrt(consdata->constant) - consdata->rhscoeff * consdata->rhsoffset,
SCIPinfinity(scip),
1683 else if( consdata->rhscoeff > 0.0 )
1689 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1691 else if( tightened )
1693 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1708 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1710 else if( tightened )
1712 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1726 if( consdata->rhsvar ==
NULL )
1728 if( consdata->nvars > 1 )
1736 rhs = consdata->rhscoeff * consdata->rhsoffset;
1737 rhs = rhs * rhs - consdata->constant;
1739 for( i = 0; i < consdata->nvars; ++i )
1741 quadvarterms[i].
var = consdata->vars[i];
1742 quadvarterms[i].
sqrcoef = consdata->coefs[i] * consdata->coefs[i];
1743 if( consdata->offsets[i] != 0.0 )
1745 quadvarterms[i].
lincoef = 2 * consdata->offsets[i] * quadvarterms[i].
sqrcoef;
1746 rhs -= quadvarterms[i].
sqrcoef * consdata->offsets[i]*consdata->offsets[i];
1773 -
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1774 +
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1788 assert(consdata->nvars == 1);
1789 rhs = consdata->rhscoeff * consdata->rhsoffset;
1793 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables in <%s>\n",
SCIPconsGetName(cons));
1798 rhs -= consdata->constant;
1799 rhs = rhs < 0.0 ? 0.0 :
sqrt(rhs);
1803 SCIP_CALL(
SCIPfixVar(scip, consdata->vars[0], -consdata->offsets[0], iscutoff, &tightened) );
1806 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables and fixing remaining lhs var in <%s>\n",
SCIPconsGetName(cons));
1808 else if( tightened )
1810 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1815 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1820 rhs /= ABS(consdata->coefs[0]);
1824 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables and tightening lower bound of remaining lhs var in <%s>\n",
SCIPconsGetName(cons));
1833 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables and tightening upper bound of remaining lhs var in <%s>\n",
SCIPconsGetName(cons));
1835 else if( tightened )
1840 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and tightening bounds on remaining lhs var\n",
SCIPconsGetName(cons));
1851 if( consdata->nvars == 1 &&
SCIPisZero(scip, consdata->constant) )
1857 assert(consdata->rhsvar !=
NULL);
1859 vars[0] = consdata->vars[0];
1860 vars[1] = consdata->rhsvar;
1861 coefs[0] = consdata->coefs[0];
1862 coefs[1] = -consdata->rhscoeff;
1863 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
1873 coefs[0] = -coefs[0];
1874 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
1916 const char* basename,
1930 assert(scip !=
NULL);
1931 assert(cons !=
NULL);
1937 assert(basename !=
NULL);
1939 assert(naddconss !=
NULL);
1941 SCIPdebugMsg(scip,
"Creating linear Glineur outer-approximation for <%s>.\n", basename);
1942 SCIPdebugMsg(scip,
"sqr(%g(%s+%g)) + sqr(%g(%s+%g)) <= sqr(%g(%s+%g)).\n",
1949 for( i = 1; i <= N; ++i )
1951 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
1956 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
1974 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
1993 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
2010 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
2027 if( infeas ==
TRUE )
2029 SCIPwarningMessage(scip,
"creating glineur outer approximation of SOC3 constraint found problem infeasible.\n");
2035 for( i = 1; i < N; ++i )
2043 vars[2] = avars[i+1];
2046 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
2059 vals[0] = -
sin(val);
2062 vars[2] = bvars[i+1];
2065 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2078 vals[0] = -
sin(val);
2081 vars[2] = bvars[i+1];
2084 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2100 vals[0] = -
cos(val);
2102 vals[1] = -
sin(val);
2106 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2118 for( i = 1; i <= N; ++i )
2149 const char* basename,
2162 assert(scip !=
NULL);
2163 assert(cons !=
NULL);
2169 assert(basename !=
NULL);
2171 assert(naddconss !=
NULL);
2173 SCIPdebugMsg(scip,
"Creating linear Ben-Tal Nemirovski outer-approximation for <%s>.\n", basename);
2179 for( i = 0; i <= N; ++i )
2181 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
2186 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
2198 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
2214 (void)
SCIPsnprintf(linname, 255,
"soc#%s#A%d", basename, 0);
2232 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
2248 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
2272 for( i = 1; i <= N; ++i )
2276 val =
M_PI /
pow(2.0, (
double) (i+1));
2278 vars[0] = avars[i-1];
2280 vars[1] = bvars[i-1];
2285 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
2296 vars[0] = avars[i-1];
2298 vars[1] = bvars[i-1];
2299 vals[1] = -
cos(val);
2303 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2314 vars[0] = avars[i-1];
2315 vals[0] = -
sin(val);
2316 vars[1] = bvars[i-1];
2321 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2339 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2351 vals[0] = tan(
M_PI /
pow(2.0, (
double) (N+1)) );
2355 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2366 for( i = 0; i <= N; ++i )
2396 const char* basename,
2402 SCIP_CALL(
presolveCreateGlineurApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2406 SCIP_CALL(
presolveCreateBenTalNemirovskiApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2428 const char* basename,
2430 int soc3_nr_auxvars,
2439 assert(scip !=
NULL);
2440 assert(lhsvars !=
NULL);
2441 assert(nlhsvars >= 1);
2442 assert(lhscoefs !=
NULL);
2443 assert(lhsoffsets !=
NULL);
2444 assert(rhsvar !=
NULL);
2445 assert(basename !=
NULL);
2447 assert(naddconss !=
NULL);
2453 lhsvars[0],
NULL, rhsvar,
2454 lhscoefs[0], 1.0, rhscoeff,
2455 lhsoffsets[0],
sqrt(constant), rhsoffset,
2456 soc3_nr_auxvars, glineur, basename, naddconss) );
2461 if( nlhsvars == 2 &&
SCIPisZero(scip, constant) )
2463 assert(lhsvars[0] !=
NULL);
2464 assert(lhsvars[1] !=
NULL);
2465 assert(rhsvar !=
NULL);
2467 lhsvars[0], lhsvars[1], rhsvar,
2468 lhscoefs[0], lhscoefs[1], rhscoeff,
2469 lhsoffsets[0], lhsoffsets[1], rhsoffset,
2470 soc3_nr_auxvars, glineur, basename, naddconss) );
2475 if( nlhsvars == 3 || (nlhsvars == 2 && !
SCIPisZero(scip, constant)) )
2486 lhsvars[0], lhsvars[1], auxvar1,
2487 lhscoefs[0], lhscoefs[1], 1.0,
2488 lhsoffsets[0], lhsoffsets[1], 0.0,
2489 soc3_nr_auxvars, glineur, name, naddconss) );
2495 lhsvars[2], auxvar1, rhsvar,
2496 lhscoefs[2], 1.0, rhscoeff,
2497 lhsoffsets[2], 0.0, rhsoffset,
2498 soc3_nr_auxvars, glineur, name, naddconss) );
2503 auxvar1,
NULL, rhsvar,
2505 0.0,
sqrt(constant), rhsoffset,
2506 soc3_nr_auxvars, glineur, name, naddconss) );
2523 nlhsvars/2, lhsvars, lhscoefs, lhsoffsets,
2525 constant, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2534 nlhsvars-nlhsvars/2, &lhsvars[nlhsvars/2], &lhscoefs[nlhsvars/2], &lhsoffsets[nlhsvars/2],
2536 0.0, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2541 auxvar1, auxvar2, rhsvar,
2543 0.0, 0.0, rhsoffset,
2544 soc3_nr_auxvars, glineur, name, naddconss) );
2571 assert(scip !=
NULL);
2572 assert(cons !=
NULL);
2573 assert(result !=
NULL);
2576 assert(consdata !=
NULL);
2597 for( i = 0; i < consdata->nvars; ++i )
2602 if( consdata->offsets[i] != 0.0 )
2604 if( consdata->coefs[i] != 1.0 )
2614 if( consdata->rhscoeff != 1.0 )
2616 if( consdata->rhsoffset != 0.0 )
2624 else if( tightened )
2637 if( consdata->rhsoffset != 0.0 )
2639 if( consdata->rhscoeff != 1.0 )
2644 if( lhsrange.
inf > rhsrange.
sup )
2646 SCIPdebugMsg(scip,
"propagation found constraint <%s> infeasible: lhs = [%.15g,%.15g] > rhs = [%.15g,%.15g]\n",
2655 for( i = 0; i < consdata->nvars; ++i )
2682 assert(consdata->coefs[i] >= 0.0);
2685 if( consdata->coefs[i] != 1.0 )
2687 if( consdata->offsets[i] != 0.0 )
2697 else if( tightened )
2706 if( consdata->offsets[i] != 0.0 )
2716 else if( tightened )
2747 assert(scip !=
NULL);
2748 assert(cons !=
NULL);
2749 assert(sol !=
NULL);
2750 assert(success !=
NULL);
2753 assert(consdata !=
NULL);
2754 assert(!
SCIPisZero(scip, consdata->rhscoeff));
2758 rhsval = consdata->lhsval / consdata->rhscoeff - consdata->rhsoffset;
2762 if( consdata->rhscoeff > 0.0 )
2854 assert(naddconss !=
NULL);
2855 assert(ndelconss !=
NULL);
2856 assert(success !=
NULL);
2861 if( consdata->nvars < 3 )
2867 if( consdata->rhsvar ==
NULL )
2880 scale = 1.0 * (consdata->nvars + 1)/4.0;
2888 aggvars[0] = consdata->rhsvar;
2889 scalars[0] = consdata->rhscoeff;
2890 for( i = 0; i < consdata->nvars; ++i )
2907 aggvars[1] = disvars[i];
2909 constant = consdata->rhscoeff * consdata->rhsoffset;
2912 assert(!infeas && *success);
2916 assert(!infeas && *success);
2919 lhsvars[0] = difvars[i];
2922 lhsvars[1] = consdata->vars[i];
2923 coefs[1] = scale * 2 * consdata->coefs[i];
2924 offsets[1] = consdata->offsets[i];
2927 SCIP_CALL(
SCIPcreateConsBasicSOC(scip, &discons, name, 2, lhsvars, coefs, offsets, 0.0, sumvars[i], scale, 0.0) );
2936 discoefs[ndisvars] = 1.0;
2939 assert(ndisvars == consdata->nvars);
2964 aggvars[1] = disvars[i];
2966 constant = consdata->rhscoeff * consdata->rhsoffset;
2968 assert(!infeas && *success);
2972 assert(!infeas && *success);
2975 lhsvars[0] = difvars[ndisvars];
2978 constant = 4.0 * SQR(scale) * consdata->constant;
2981 sumvars[ndisvars], scale, 0.0) );
2987 discoefs[ndisvars] = 1.0;
2992 discoefs[ndisvars] = -1.0 * consdata->rhscoeff;
2993 disvars[ndisvars] = consdata->rhsvar;
2997 consdata->rhscoeff * consdata->rhsoffset) );
3004 for( i = ndisvars - 1; i >= 0; --i )
3045 assert(scip !=
NULL);
3046 assert(conshdlr !=
NULL);
3047 assert(conss !=
NULL || nconss == 0);
3049 assert(result !=
NULL);
3052 assert(conshdlrdata !=
NULL);
3056 if( maxviolcons ==
NULL )
3071 if( conshdlrdata->nenforounds > 100 )
3084 ++conshdlrdata->nenforounds;
3089 conshdlrdata->nenforounds = 0;
3107 for( c = 0; c < nconss; ++c )
3122 SCIPwarningMessage(scip,
"could not enforce feasibility by separating or branching; declaring solution with viol %g feasible\n",
SCIPconsGetData(maxviolcons)->violation);
3133 #ifdef QUADCONSUPGD_PRIORITY 3186 assert(scip !=
NULL);
3187 assert(cons !=
NULL);
3188 assert(nupgdconss !=
NULL);
3189 assert(upgdconss !=
NULL);
3225 trygeneralupg =
FALSE;
3228 if( nbilinterms > 1 )
3230 trygeneralupg =
TRUE;
3235 if ( nbilinterms == 1 )
3238 bilinvar1 = bilinterm->
var1;
3239 bilinvar2 = bilinterm->
var2;
3240 bilincoef = bilinterm->
coef;
3245 trygeneralupg =
TRUE;
3252 trygeneralupg =
TRUE;
3257 if ( !
SCIPisEQ(scip, bilincoef, -1.0) )
3259 trygeneralupg =
TRUE;
3265 for (i = 0; i < nquadvars; ++i)
3267 term = &quadterms[i];
3271 trygeneralupg =
TRUE;
3277 trygeneralupg =
TRUE;
3285 assert( quadterms !=
NULL );
3292 for( i = 0; i < nquadvars; ++i )
3294 term = &quadterms[i];
3302 if( lhscount >= nquadvars - 1 )
3308 lhsvars[lhscount] = term->
var;
3318 lhsoffsets[lhscount] = 0.0;
3323 else if( rhsvar !=
NULL ||
3346 if ( nbilinterms == 1 )
3356 if ( rhsvar !=
NULL )
3364 if ( *nupgdconss > upgdconsssize )
3367 *nupgdconss = -*nupgdconss;
3384 consvars[0] = bilinvar1;
3385 consvars[1] = bilinvar2;
3386 consvars[2] = auxvarsum;
3401 consvars[0] = bilinvar1;
3402 consvars[1] = bilinvar2;
3403 consvars[2] = auxvardiff;
3418 lhsvars[lhscount] = auxvardiff;
3419 lhscoefs[lhscount] = 0.5;
3420 lhsoffsets[lhscount] = 0.0;
3423 lhscount + 1, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3424 auxvarsum, 0.5, 0.0,
3445 for (i = 0; i < lhscount; ++i)
3460 if( *nupgdconss > upgdconsssize )
3463 *nupgdconss = -*nupgdconss;
3468 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3469 rhsvar, rhscoef, rhsoffset,
3495 for( i = 0; i < nquadvars; ++i )
3507 if( lhscount >= nquadvars - 1 )
3513 lhsvars[lhscount] = term->
var;
3523 lhsoffsets[lhscount] = 0.0;
3528 else if( rhsvar !=
NULL ||
3549 if( rhsvar && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3556 if( *nupgdconss > upgdconsssize )
3559 *nupgdconss = -*nupgdconss;
3564 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3565 rhsvar, rhscoef, rhsoffset,
3587 if( !trygeneralupg )
3592 assert(conshdlr !=
NULL);
3594 assert(conshdlrdata !=
NULL);
3596 if( !conshdlrdata->generalsocupg )
3599 SCIPdebugMsg(scip,
"Trying general method of upgrade to a soc const\n");
3604 #ifndef SCIP_STATISTIC 3626 for( i = 0; i < nquadvars; ++i )
3629 a[i*nquadvars + i] = term->
sqrcoef;
3630 quadvars[i] = term->
var;
3634 for( i = 0; i < nbilinterms; ++i )
3646 assert(idx1 != idx2);
3648 a[
MIN(idx1,idx2) * nquadvars +
MAX(idx1,idx2)] = bilinterm->
coef / 2.0;
3663 for( i = 0; i < nquadvars; ++i )
3665 for( j = 0; j < nquadvars; ++j )
3668 bp[i] += term->
lincoef * a[i * nquadvars + j];
3682 else if( eigvals[i] > 0.0 )
3689 if( npos + nneg < 3 )
3697 if( !rhsissoc && !lhsissoc )
3700 assert(rhsissoc != lhsissoc);
3708 for( i = 0; i < nquadvars; ++i )
3710 eigvals[i] = -eigvals[i];
3721 rhsvarfound =
FALSE;
3722 for( i = 0; i < nquadvars; ++i )
3727 if( eigvals[i] > 0.0 )
3730 lhsoffsets[lhscount] = bp[i] / (2 * eigvals[i]);
3731 lhsconstant -= bp[i] * bp[i] / (4 * eigvals[i]);
3738 assert(rhsvarfound ==
FALSE);
3740 rhsoffset = bp[i] / (2 * eigvals[i]);
3745 for( j = 0; j < nquadvars; ++j )
3749 if( a[i * nquadvars + j] > 0.0 )
3766 rhsvarlb += a[i * nquadvars + j] * aux;
3768 rhsvarlb += rhsoffset;
3770 for( j = 0; j < nquadvars; ++j )
3774 if( a[i * nquadvars + j] > 0.0 )
3791 rhsvarub += a[i * nquadvars + j] * aux;
3793 rhsvarub += rhsoffset;
3800 lhsconstant -= rhsoffset * rhsoffset * eigvals[i];
3801 rhscoef =
SCIPisLE(scip, rhsvarub, 0.0) ? -
sqrt(-eigvals[i]) :
sqrt(-eigvals[i]);
3805 SCIPdebugMsg(scip,
"Failed because rhsvar [%g, %g] changes sign.\n", rhsvarlb, rhsvarub);
3806 rhsvarfound =
FALSE;
3812 if( rhsvarfound && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3823 if( *nupgdconss > upgdconsssize )
3826 *nupgdconss = -*nupgdconss;
3832 for( i = 0; i < nquadvars; ++i )
3834 if( eigvals[i] <= 0.0 )
3842 lhsoffsets[lhsnvars], &infeas, &success) );
3844 if( infeas || !success )
3849 for( j = 0; j <= lhsnvars; ++j )
3856 assert(lhsnvars == lhscount);
3857 assert(negeigpos >= 0);
3863 rhsoffset, &infeas, &success) );
3865 if( infeas || !success )
3871 for( j = 0; j < lhsnvars; ++j )
3881 rhsvar, rhscoef * UPGSCALE, 0.0,
3889 for( i = 0; i < lhsnvars; ++i )
3925 SCIPdebugMsg(scip,
"Failed because there are not enough lhsvars (%d)\n", lhscount);
3929 SCIPdebugMsg(scip,
"Failed because lhsconstant is negative (%g)\n", lhsconstant);
3955 assert(scip !=
NULL);
3956 assert(conshdlr !=
NULL);
3973 assert( scip !=
NULL );
3974 assert( conshdlr !=
NULL );
3978 assert(conshdlrdata !=
NULL);
3993 assert(scip !=
NULL);
3994 assert(conshdlr !=
NULL);
3995 assert(conss !=
NULL || nconss == 0);
3998 assert(conshdlrdata !=
NULL);
4000 conshdlrdata->subnlpheur =
SCIPfindHeur(scip,
"subnlp");
4001 conshdlrdata->trysolheur =
SCIPfindHeur(scip,
"trysol");
4005 for( c = 0; c < nconss; ++c )
4020 assert(scip !=
NULL);
4021 assert(conshdlr !=
NULL);
4024 assert(conshdlrdata !=
NULL);
4026 conshdlrdata->subnlpheur =
NULL;
4027 conshdlrdata->trysolheur =
NULL;
4028 conshdlrdata->haveexprint =
FALSE;
4039 assert(scip !=
NULL);
4040 assert(conshdlr !=
NULL);
4041 assert(conss !=
NULL || nconss == 0);
4044 for( c = 0; c < nconss; ++c )
4065 assert(scip !=
NULL);
4066 assert(conshdlr !=
NULL);
4069 assert(conshdlrdata !=
NULL);
4070 assert(conshdlrdata->eventhdlr !=
NULL);
4075 for( c = 0; c < nconss; ++c )
4080 assert(consdata !=
NULL);
4082 if( consdata->nlrow ==
NULL )
4085 assert(consdata->nlrow !=
NULL);
4092 conshdlrdata->newsoleventfilterpos = -1;
4098 assert(eventhdlr !=
NULL);
4104 conshdlrdata->sepanlp =
FALSE;
4105 conshdlrdata->lastenfonode =
NULL;
4106 conshdlrdata->nenforounds = 0;
4120 assert(scip !=
NULL);
4121 assert(conshdlr !=
NULL);
4124 assert(conshdlrdata !=
NULL);
4125 assert(conshdlrdata->eventhdlr !=
NULL);
4127 if( conshdlrdata->newsoleventfilterpos >= 0 )
4132 assert(eventhdlr !=
NULL);
4135 conshdlrdata->newsoleventfilterpos = -1;
4138 for( c = 0; c < nconss; ++c )
4141 assert(consdata !=
NULL);
4144 if( consdata->nlrow !=
NULL )
4160 assert(scip !=
NULL);
4161 assert(conshdlr !=
NULL);
4162 assert(cons !=
NULL);
4163 assert(consdata !=
NULL);
4164 assert(*consdata !=
NULL);
4166 assert((*consdata)->nlrow ==
NULL);
4175 assert(conshdlrdata !=
NULL);
4180 for( i = 0; i < (*consdata)->nvars; ++i )
4188 assert((*consdata)->lhsbndchgeventdata ==
NULL);
4190 if( (*consdata)->rhsvar !=
NULL )
4211 assert(scip !=
NULL);
4212 assert(conshdlr !=
NULL);
4214 assert(sourcecons !=
NULL);
4215 assert(targetcons !=
NULL);
4219 assert(conshdlrdata !=
NULL);
4225 assert(sourcedata !=
NULL);
4226 assert(sourcedata->vars !=
NULL);
4227 assert(sourcedata->coefs !=
NULL);
4228 assert(sourcedata->offsets !=
NULL);
4233 consdata->nvars = sourcedata->nvars;
4236 for( i = 0; i < consdata->nvars; ++i )
4243 consdata->constant = sourcedata->constant;
4246 consdata->rhsoffset = sourcedata->rhsoffset;
4247 consdata->rhscoeff = sourcedata->rhscoeff;
4251 consdata->nlrow =
NULL;
4252 consdata->lhsbndchgeventdata =
NULL;
4253 consdata->isapproxadded =
FALSE;
4278 assert(scip !=
NULL);
4279 assert(conshdlr !=
NULL);
4280 assert(conss !=
NULL || nconss == 0);
4281 assert(result !=
NULL);
4286 assert(conshdlrdata !=
NULL);
4289 if( maxviolcon ==
NULL )
4295 if(
SCIPgetDepth(scip) == 0 && !conshdlrdata->sepanlp &&
4309 if( conshdlrdata->subnlpheur !=
NULL )
4324 SCIPdebugMsg(scip,
"solved NLP relax, solution status: %d\n", solstat);
4329 conshdlrdata->sepanlp =
TRUE;
4333 SCIPdebugMsg(scip,
"NLP relaxation is globally infeasible, thus can cutoff node\n");
4345 assert(nlpsol !=
NULL);
4348 if( solvednlp && conshdlrdata->trysolheur !=
NULL )
4358 if( nfracvars == 0 )
4375 if( lpsolseparated )
4377 SCIPdebugMsg(scip,
"linearization cuts separate LP solution\n");
4392 else if ( sepasuccess )
4407 assert(scip !=
NULL);
4408 assert(conss !=
NULL || nconss == 0);
4409 assert(result !=
NULL);
4410 assert(sol !=
NULL);
4415 if( maxviolcon ==
NULL )
4421 else if ( sepasuccess )
4454 assert(scip !=
NULL);
4455 assert(conss !=
NULL || nconss == 0);
4456 assert(result !=
NULL);
4460 if( maxviolcons ==
NULL )
4480 assert(scip !=
NULL);
4481 assert(conshdlr !=
NULL);
4483 assert(conss !=
NULL || nconss == 0);
4484 assert(result !=
NULL );
4487 assert(conshdlrdata !=
NULL);
4492 dolinfeasshift = conshdlrdata->linfeasshift && (conshdlrdata->trysolheur !=
NULL);
4495 for( c = 0; c < nconss; ++c )
4500 assert(consdata !=
NULL);
4508 if( consdata->violation > maxviol )
4509 maxviol = consdata->violation;
4515 unscaledviol = consdata->lhsval;
4517 unscaledviol -= consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
4520 SCIPinfoMessage(scip,
NULL,
";\n\tviolation: %g (scaled: %g)\n", unscaledviol, consdata->violation);
4524 if( dolinfeasshift )
4533 if( polishedsol ==
NULL )
4548 dolinfeasshift = success;
4552 dolinfeasshift =
FALSE;
4558 if( !dolinfeasshift && (conshdlrdata->subnlpheur ==
NULL || sol ==
NULL) && !completely )
4563 if( !dolinfeasshift && polishedsol !=
NULL )
4568 if( polishedsol !=
NULL )
4591 assert(scip !=
NULL);
4592 assert(conss !=
NULL || ((nconss == 0) && (nmarkedconss == 0)));
4593 assert(result !=
NULL);
4598 for( c = 0; c < nmarkedconss && *result !=
SCIP_CUTOFF; ++c )
4602 *result = propresult;
4620 assert(scip !=
NULL);
4621 assert(conss !=
NULL || nconss == 0);
4622 assert(conshdlr !=
NULL);
4623 assert(result !=
NULL);
4628 assert(conshdlrdata !=
NULL);
4630 for( c = 0; c < nconss; ++c )
4633 assert(consdata !=
NULL);
4648 if( conshdlrdata->nauxvars > 0 && !consdata->isapproxadded && consdata->nvars > 1 )
4650 SCIP_CALL(
presolveCreateOuterApprox(scip, consdata->nvars, consdata->vars, consdata->coefs, consdata->offsets, consdata->rhsvar, consdata->rhscoeff, consdata->rhscoeff, consdata->constant,
SCIPconsGetName(conss[c]), conss[c], conshdlrdata->nauxvars, conshdlrdata->glineur, naddconss) );
4651 consdata->isapproxadded =
TRUE;
4657 switch( propresult )
4704 assert(scip !=
NULL);
4705 assert(conshdlr !=
NULL);
4706 assert(cons !=
NULL);
4709 assert(consdata !=
NULL);
4714 for( i = 0; i < consdata->nvars; ++i )
4720 if( consdata->rhsvar !=
NULL )
4722 SCIP_CALL(
SCIPaddVarLocks(scip, consdata->rhsvar, consdata->rhscoeff > 0.0 ? nlockspos : nlocksneg, consdata->rhscoeff > 0.0 ? nlocksneg : nlockspos) );
4735 assert(scip !=
NULL);
4736 assert(conshdlr !=
NULL);
4737 assert(cons !=
NULL);
4741 assert(consdata !=
NULL);
4744 if( consdata->constant != 0.0 )
4749 for( i = 0; i < consdata->nvars; ++i )
4757 if( consdata->rhsvar !=
NULL )
4765 SCIPinfoMessage(scip, file,
"%.15g", consdata->rhscoeff*consdata->rhsoffset);
4780 assert(scip !=
NULL);
4781 assert(cons !=
NULL);
4782 assert(sourcescip !=
NULL);
4783 assert(sourceconshdlr !=
NULL);
4784 assert(sourcecons !=
NULL);
4785 assert(varmap !=
NULL);
4786 assert(valid !=
NULL);
4787 assert(stickingatnode ==
FALSE);
4790 assert(consdata !=
NULL);
4797 for( i = 0; i < consdata->nvars && *valid; ++i )
4800 assert(!(*valid) || vars[i] !=
NULL);
4807 assert(!(*valid) || rhsvar !=
NULL);
4814 consdata->nvars, vars, consdata->coefs, consdata->offsets, consdata->constant,
4815 rhsvar, consdata->rhscoeff, consdata->rhsoffset,
4816 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
4843 assert(scip !=
NULL);
4844 assert(success !=
NULL);
4845 assert(str !=
NULL);
4846 assert(name !=
NULL);
4847 assert(cons !=
NULL);
4850 if( strncmp(str,
"sqrt( ", 6) != 0 )
4873 while( *str !=
'\0' )
4876 while( isspace((
int)*str) )
4880 if( strncmp(str,
"+ (", 3) != 0 )
4894 if( strncmp(str,
"*(", 2) != 0 )
4921 if( strncmp(str,
"))^2", 4) != 0 )
4929 if( varssize <= nvars )
4937 coefs[nvars] = coef;
4938 offsets[nvars] = offset;
4942 if( strncmp(str,
") <=", 4) != 0 )
4955 while( isspace((
int)*str) )
4966 while( isspace((
int)*str) )
4975 if( strncmp(str,
"*(", 2) != 0 )
4990 if( rhsvar ==
NULL )
5027 rhsoffset = rhscoef;
5034 assert(!stickingatnode);
5035 SCIP_CALL(
SCIPcreateConsSOC(scip, cons, name, nvars, vars, coefs, offsets, constant, rhsvar, rhscoef, rhsoffset,
5036 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
5053 assert(consdata !=
NULL);
5055 if( varssize < consdata->nvars + 1 )
5060 vars[consdata->nvars] = consdata->rhsvar;
5073 assert(cons !=
NULL);
5076 assert(consdata !=
NULL);
5078 (*nvars) = consdata->nvars + 1;
5099 conshdlrdata->subnlpheur =
NULL;
5100 conshdlrdata->trysolheur =
NULL;
5103 "signals a bound change to a second order cone constraint",
5104 processVarEvent,
NULL) );
5105 conshdlrdata->eventhdlr = eventhdlr;
5108 "handles the event that a new primal solution has been found",
5109 processNewSolutionEvent,
NULL) );
5114 consEnfolpSOC, consEnfopsSOC, consCheckSOC, consLockSOC,
5116 assert(conshdlr !=
NULL);
5146 "whether scaling of infeasibility is 'o'ff, by sup-norm of function 'g'radient, or by left/right hand 's'ide",
5147 &conshdlrdata->scaling,
TRUE,
'o',
"ogs",
NULL,
NULL) );
5150 "whether the reference point of a cut should be projected onto the feasible set of the SOC constraint",
5154 "number of auxiliary variables to use when creating a linear outer approx. of a SOC3 constraint; 0 to turn off",
5155 &conshdlrdata->nauxvars,
FALSE, 0, 0, INT_MAX,
NULL,
NULL) );
5158 "whether the Glineur Outer Approximation should be used instead of Ben-Tal Nemirovski",
5162 "minimal efficacy of a cut to be added to LP in separation",
5166 "whether to sparsify cuts",
5170 "maximal loss in cut efficacy by sparsification",
5171 &conshdlrdata->sparsifymaxloss,
TRUE, 0.2, 0.0, 1.0,
NULL,
NULL) );
5174 "growth rate of maximal allowed nonzeros in cuts in sparsification",
5178 "whether to try to make solutions feasible in check by shifting the variable on the right hand side",
5182 "which formulation to use when adding a SOC constraint to the NLP (a: automatic, q: nonconvex quadratic form, s: convex sqrt form, e: convex exponential-sqrt form, d: convex division form)",
5186 "minimal required fraction of continuous variables in problem to use solution of NLP relaxation in root for separation",
5187 &conshdlrdata->sepanlpmincont,
FALSE, 1.0, 0.0, 2.0,
NULL,
NULL) );
5190 "are cuts added during enforcement removable from the LP in the same node?",
5194 "try to upgrade more general quadratics to soc?",
5198 "try to completely disaggregate soc?",
5246 assert(scip !=
NULL);
5247 assert(cons !=
NULL);
5248 assert(modifiable ==
FALSE);
5252 if( conshdlr ==
NULL )
5258 assert(vars !=
NULL);
5260 assert(constant >= 0.0);
5269 consdata->nvars = nvars;
5271 for( i = 0; i < nvars; ++i )
5279 for( i = 0; i < nvars; ++i )
5280 if( consdata->coefs[i] < 0.0 )
5281 consdata->coefs[i] = -consdata->coefs[i];
5286 for( i = 0; i < nvars; ++i )
5287 consdata->coefs[i] = 1.0;
5290 if( offsets !=
NULL )
5300 consdata->constant = constant;
5301 consdata->rhsvar = rhsvar;
5302 consdata->rhscoeff = rhscoeff;
5303 consdata->rhsoffset = rhsoffset;
5305 if( rhsvar !=
NULL )
5310 consdata->nlrow =
NULL;
5312 consdata->lhsbndchgeventdata =
NULL;
5313 consdata->isapproxadded =
FALSE;
5316 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
5317 local, modifiable, dynamic, removable,
FALSE) );
5322 assert(conshdlrdata !=
NULL);
5350 rhsvar, rhscoeff, rhsoffset,
5366 assert(cons !=
NULL);
5367 assert(nlrow !=
NULL);
5370 assert(consdata !=
NULL);
5372 if( consdata->nlrow ==
NULL )
5376 assert(consdata->nlrow !=
NULL);
5377 *nlrow = consdata->nlrow;
5389 assert(cons !=
NULL);
5402 assert(cons !=
NULL);
5415 assert(cons !=
NULL);
5428 assert(cons !=
NULL);
5441 assert(cons !=
NULL);
5454 assert(cons !=
NULL);
5467 assert(cons !=
NULL);
5480 assert(cons !=
NULL);
5510 assert(scip !=
NULL);
5511 assert(cons !=
NULL);
5512 assert(nlpi !=
NULL);
5513 assert(nlpiprob !=
NULL);
5514 assert(scipvar2nlpivar !=
NULL);
5517 assert(consdata !=
NULL);
5520 rhs = -consdata->constant;
5523 nlininds = consdata->rhsoffset != 0.0 ? 1 : 0;
5524 for( j = 0; j < consdata->nvars; ++j )
5525 if( consdata->offsets[j] != 0.0 )
5537 nquadelems = consdata->nvars + 1;
5540 for( j = 0; j < consdata->nvars; ++j )
5543 quadelems[j].
idx2 = quadelems[j].
idx1;
5544 quadelems[j].
coef = consdata->coefs[j] * consdata->coefs[j];
5546 if( consdata->offsets[j] != 0.0 )
5548 assert(lininds !=
NULL);
5549 assert(linvals !=
NULL);
5550 lininds[lincnt] = quadelems[j].
idx1;
5551 linvals[lincnt] = 2 * quadelems[j].
coef * consdata->offsets[j];
5554 rhs -= quadelems[j].
coef * consdata->offsets[j] * consdata->offsets[j];
5558 quadelems[consdata->nvars].
idx2 = quadelems[consdata->nvars].
idx1;
5559 quadelems[consdata->nvars].
coef = - consdata->rhscoeff * consdata->rhscoeff;
5561 if( consdata->rhsoffset != 0.0 )
5563 assert(lininds !=
NULL);
5564 assert(linvals !=
NULL);
5565 lininds[lincnt] = quadelems[consdata->nvars].
idx1;
5566 linvals[lincnt] = -2.0 * consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset;
5569 rhs += consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset;
5572 assert(lincnt == nlininds);
5578 &nlininds, &lininds, &linvals,
5579 &nquadelems, &quadelems,
enum SCIP_Result SCIP_RESULT
static SCIP_DECL_EVENTEXEC(processVarEvent)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
SCIP_VAR ** SCIPgetLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
void SCIPintervalDivScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
int SCIPgetNIntVars(SCIP *scip)
static SCIP_RETCODE catchRhsVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_VAR ** SCIPgetLhsVarsSOC(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
void SCIPintervalSubScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_Real SCIPfeastol(SCIP *scip)
const char * SCIPexprintGetName(void)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
SCIP_Real SCIPgetRowprepViolation(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, char scaling)
static SCIP_RETCODE separatePoint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Bool inenforcement, SCIP_Bool *cutoff, SCIP_Bool *success)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
primal heuristic that tries a given solution
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE generateSparseCut(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROWPREP **rowprep, SCIP_Real minefficacy)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
methods to interpret (evaluate) an expression tree "fast"
SCIP_RETCODE SCIPcreateConsBasicSOC(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_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopySOC)
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)
int SCIPnlrowSearchQuadVar(SCIP_NLROW *nlrow, SCIP_VAR *var)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
#define SCIPallocClearBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPincludeConshdlrSOC(SCIP *scip)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPincludeQuadconsUpgrade(SCIP *scip, SCIP_DECL_QUADCONSUPGD((*quadconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
static SCIP_DECL_CONSENFORELAX(consEnforelaxSOC)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
static SCIP_RETCODE generateCutProjectedPoint(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROWPREP **rowprep)
SCIP_Real * SCIPgetLhsOffsetsSOC(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIPInterval pow(const SCIPInterval &x, const SCIPInterval &y)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_RETCODE SCIPcleanupRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefrange, SCIP_Real minviol, SCIP_Real *coefrange, SCIP_Real *viol)
static SCIP_DECL_CONSPROP(consPropSOC)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgNlRowRhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real rhs)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
internal methods for NLPI solver interfaces
SCIP_RETCODE SCIPaddRowprepTerm(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
SCIP_RETCODE SCIPexprCreateMonomial(BMS_BLKMEM *blkmem, SCIP_EXPRDATA_MONOMIAL **monomial, SCIP_Real coef, int nfactors, int *childidxs, SCIP_Real *exponents)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIPInterval cos(const SCIPInterval &x)
SCIP_Real SCIPgetRelaxFeastolFactor(SCIP *scip)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPnlpiAddConstraints(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nconss, const SCIP_Real *lhss, const SCIP_Real *rhss, const int *nlininds, int *const *lininds, SCIP_Real *const *linvals, const int *nquadelems, SCIP_QUADELEM *const *quadelems, int *const *exprvaridxs, SCIP_EXPRTREE *const *exprtrees, const char **names)
SCIP_RETCODE SCIPaddToNlpiProblemSOC(SCIP *scip, SCIP_CONS *cons, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *scipvar2nlpivar, SCIP_Bool names)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPaddQuadElementToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_QUADELEM quadelem)
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPsolveNLP(SCIP *scip)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
#define SCIP_PRESOLTIMING_EXHAUSTIVE
static SCIP_DECL_CONSDELETE(consDeleteSOC)
static SCIP_DECL_CONSCHECK(consCheckSOC)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
static SCIP_DECL_CONSEXITPRE(consExitpreSOC)
SCIP_RETCODE SCIPexprtreeSetVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
static SCIP_RETCODE dropLhsVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons, int varidx)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
static SCIP_RETCODE dropVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
#define CONSHDLR_SEPAPRIORITY
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPexprtreeCreate(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **tree, SCIP_EXPR *root, int nvars, int nparams, SCIP_Real *params)
constraint handler for second order cone constraints
#define SCIPfreeBufferArray(scip, ptr)
static SCIP_RETCODE catchLhsVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons, int varidx)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PROPFREQ
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
int SCIPgetNContVars(SCIP *scip)
static SCIP_DECL_CONSGETNVARS(consGetNVarsSOC)
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_Real SCIPepsilon(SCIP *scip)
#define SCIP_PRESOLTIMING_FAST
SCIP_Real SCIPcomputeVarUbGlobal(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE polishSolution(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *success)
static SCIP_DECL_CONSINITSOL(consInitsolSOC)
int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
static SCIP_RETCODE presolveCreateGlineurApproxDim3(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *x1, SCIP_VAR *x2, SCIP_VAR *x3, SCIP_Real alpha1, SCIP_Real alpha2, SCIP_Real alpha3, SCIP_Real offset1, SCIP_Real offset2, SCIP_Real offset3, int N, const char *basename, int *naddconss)
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
static SCIP_RETCODE dropRhsVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_SOLFOUND
void SCIPfreeRowprep(SCIP *scip, SCIP_ROWPREP **rowprep)
static SCIP_RETCODE computeViolation(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
static SCIP_RETCODE presolveCreateOuterApproxDim3(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *x1, SCIP_VAR *x2, SCIP_VAR *x3, SCIP_Real alpha1, SCIP_Real alpha2, SCIP_Real alpha3, SCIP_Real offset1, SCIP_Real offset2, SCIP_Real offset3, int N, SCIP_Bool glineur, const char *basename, int *naddconss)
#define SCIP_PRESOLTIMING_MEDIUM
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
SCIP_RETCODE SCIPaddLinearConsToNlpHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_Bool addcombconss, SCIP_Bool addcontconss)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
static SCIP_DECL_CONSEXIT(consExitSOC)
SCIP_RETCODE SCIPfindQuadVarTermQuadratic(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, int *pos)
SCIP_RETCODE SCIPensureRowprepSize(SCIP *scip, SCIP_ROWPREP *rowprep, int size)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPgetNlRowSOC(SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
interval arithmetics for provable bounds
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real * SCIPgetCoefsLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIPInterval sqrt(const SCIPInterval &x)
#define SCIPfreeBufferArrayNull(scip, ptr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
void SCIPaddRowprepSide(SCIP_ROWPREP *rowprep, SCIP_Real side)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
static SCIP_RETCODE computeViolations(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_CONS **maxviolcons)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
static SCIP_RETCODE presolveCreateOuterApprox(SCIP *scip, int nlhsvars, SCIP_VAR **lhsvars, SCIP_Real *lhscoefs, SCIP_Real *lhsoffsets, SCIP_VAR *rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset, SCIP_Real constant, const char *basename, SCIP_CONS *origcons, int soc3_nr_auxvars, SCIP_Bool glineur, int *naddconss)
constraint handler for quadratic constraints
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPcreateRowprep(SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_SIDETYPE sidetype, SCIP_Bool local)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
int SCIPgetNNlpis(SCIP *scip)
SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
static SCIP_RETCODE presolveRemoveFixedVariables(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, int *ndelconss, int *nupgdconss, int *nchgbds, int *nfixedvars, SCIP_Bool *iscutoff, SCIP_Bool *isdeleted)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
static SCIP_DECL_CONSGETVARS(consGetVarsSOC)
static SCIP_RETCODE generateCutSol(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROWPREP **rowprep)
static SCIP_Real getGradientNorm(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
static SCIP_RETCODE disaggregate(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, int *naddconss, int *ndelconss, SCIP_Bool *success)
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPexprCreatePolynomial(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, int nmonomials, SCIP_EXPRDATA_MONOMIAL **monomials, SCIP_Real constant, SCIP_Bool copymonomials)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
#define CONSHDLR_MAXPREROUNDS
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
struct SCIP_ConsData SCIP_CONSDATA
SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
SCIP_RETCODE LapackDsyev(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
#define CONSHDLR_DELAYSEPA
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIPgetRhsOffsetSOC(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
int SCIPgetNLhsVarsSOC(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_NEEDSCONS
SCIPInterval sin(const SCIPInterval &x)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
static SCIP_DECL_CONSEXITSOL(consExitsolSOC)
SCIP_VAR * SCIPgetRhsVarSOC(SCIP *scip, SCIP_CONS *cons)
int SCIPgetDepth(SCIP *scip)
#define CONSHDLR_SEPAFREQ
static SCIP_DECL_CONSLOCK(consLockSOC)
static SCIP_DECL_CONSSEPASOL(consSepasolSOC)
static SCIP_DECL_CONSINIT(consInitSOC)
static SCIP_RETCODE generateCutPoint(SCIP *scip, SCIP_CONS *cons, SCIP_Real *x, SCIP_ROWPREP **rowprep)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
void SCIPintervalSquareRoot(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
#define CONSHDLR_PRESOLTIMING
void SCIPintervalSquare(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
static SCIP_RETCODE createNlRow(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPcomputeVarLbGlobal(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPexprtreeFree(SCIP_EXPRTREE **tree)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
void SCIPintervalAdd(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
static SCIP_RETCODE presolveCreateBenTalNemirovskiApproxDim3(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *x1, SCIP_VAR *x2, SCIP_VAR *x3, SCIP_Real alpha1, SCIP_Real alpha2, SCIP_Real alpha3, SCIP_Real offset1, SCIP_Real offset2, SCIP_Real offset3, int N, const char *basename, int *naddconss)
SCIP_RETCODE SCIPexprtreeAddVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
#define SCIP_EVENTTYPE_UBTIGHTENED
Constraint handler for linear constraints in their most general form, .
SCIP_Bool SCIPisCutApplicable(SCIP *scip, SCIP_ROW *cut)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetRowprepRowCons(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONSHDLR *conshdlr)
int SCIPgetNBinVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
static SCIP_DECL_CONSPRESOL(consPresolSOC)
SCIP_Real SCIPnodeGetEstimate(SCIP_NODE *node)
void SCIPenableNLP(SCIP *scip)
static SCIP_DECL_CONSENFOPS(consEnfopsSOC)
static SCIP_RETCODE propagateBounds(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result, int *nchgbds)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
enum SCIP_ExprCurv SCIP_EXPRCURV
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSENFOLP(consEnfolpSOC)
SCIP_RETCODE SCIPcreateNLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
static SCIP_DECL_CONSTRANS(consTransSOC)
SCIP_RETCODE SCIPaddQuadVarToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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)
static const SCIP_Real scalars[]
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
#define SCIP_EVENTTYPE_FORMAT
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Real SCIPgetLhsConstantSOC(SCIP *scip, SCIP_CONS *cons)
void SCIPintervalSetRoundingModeUpwards(void)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
NLP local search primal heuristic using sub-SCIPs.
SCIP_RETCODE SCIPsortQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsCoefSOC(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetNLPFracVars(SCIP *scip, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
static SCIP_DECL_CONSPRINT(consPrintSOC)
#define CONSHDLR_EAGERFREQ
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
void SCIPintervalMulScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
static SCIP_RETCODE evalLhs(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintNlRow(SCIP *scip, SCIP_NLROW *nlrow, FILE *file)
static SCIP_RETCODE addLinearizationCuts(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *ref, SCIP_Bool *separatedlpsol, SCIP_Real minefficacy, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPcreateConsQuadratic2(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, 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)
#define CONSHDLR_ENFOPRIORITY
SCIP_RETCODE SCIPunlinkSol(SCIP *scip, SCIP_SOL *sol)
void SCIPintervalSub(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
static SCIP_DECL_CONSFREE(consFreeSOC)
static SCIP_DECL_QUADCONSUPGD(upgradeConsQuadratic)
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *solcand, SCIP_Real violation)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
#define BMSclearMemoryArray(ptr, num)
SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *expression, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPexprCreateLinear(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefs, SCIP_Real constant)
void SCIPintervalAddScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_RETCODE SCIPcreateConsSOC(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_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 SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
static SCIP_DECL_CONSPARSE(consParseSOC)
SCIP_SOL * SCIPeventGetSol(SCIP_EVENT *event)
SCIP_Real * SCIPgetLhsCoefsSOC(SCIP *scip, SCIP_CONS *cons)
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)
void SCIPintervalSetRoundingModeDownwards(void)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
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)
#define QUADCONSUPGD_PRIORITY
static SCIP_RETCODE catchVarEvents(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
static SCIP_DECL_CONSCOPY(consCopySOC)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
static SCIP_DECL_CONSSEPALP(consSepalpSOC)
#define SCIPreallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)