29 #define _USE_MATH_DEFINES 48 #define CONSHDLR_NAME "soc" 49 #define CONSHDLR_DESC "constraint handler for second order cone constraints" 50 #define CONSHDLR_SEPAPRIORITY 10 51 #define CONSHDLR_ENFOPRIORITY -40 52 #define CONSHDLR_CHECKPRIORITY -10 53 #define CONSHDLR_SEPAFREQ 1 54 #define CONSHDLR_PROPFREQ 1 55 #define CONSHDLR_EAGERFREQ 100 57 #define CONSHDLR_MAXPREROUNDS -1 58 #define CONSHDLR_DELAYSEPA FALSE 59 #define CONSHDLR_DELAYPROP FALSE 60 #define CONSHDLR_NEEDSCONS TRUE 62 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 63 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS 65 #define QUADCONSUPGD_PRIORITY 10000 106 struct SCIP_ConshdlrData
111 int newsoleventfilterpos;
150 assert(scip !=
NULL);
151 assert(cons !=
NULL);
152 assert(eventhdlr !=
NULL);
155 assert(consdata !=
NULL);
157 assert(varidx < consdata->nvars);
158 assert(consdata->lhsbndchgeventdata !=
NULL);
160 consdata->lhsbndchgeventdata[
varidx].cons =
cons;
180 assert(scip !=
NULL);
181 assert(cons !=
NULL);
182 assert(eventhdlr !=
NULL);
185 assert(consdata !=
NULL);
187 consdata->rhsbndchgeventdata.cons =
cons;
188 consdata->rhsbndchgeventdata.varidx = -1;
208 assert(scip !=
NULL);
209 assert(cons !=
NULL);
210 assert(eventhdlr !=
NULL);
213 assert(consdata !=
NULL);
214 assert(consdata->lhsbndchgeventdata ==
NULL);
218 for( i = 0; i < consdata->nvars; ++i )
220 if( consdata->vars[i] !=
NULL )
226 if( consdata->rhsvar !=
NULL )
245 assert(scip !=
NULL);
246 assert(cons !=
NULL);
247 assert(eventhdlr !=
NULL);
250 assert(consdata !=
NULL);
252 assert(varidx < consdata->nvars);
253 assert(consdata->lhsbndchgeventdata !=
NULL);
254 assert(consdata->lhsbndchgeventdata[
varidx].varidx ==
varidx);
271 assert(scip !=
NULL);
272 assert(cons !=
NULL);
273 assert(eventhdlr !=
NULL);
276 assert(consdata !=
NULL);
277 assert(consdata->rhsbndchgeventdata.varidx == -1);
295 assert(scip !=
NULL);
296 assert(eventhdlr !=
NULL);
297 assert(cons !=
NULL);
300 assert(consdata !=
NULL);
302 for( i = 0; i < consdata->nvars; ++i )
304 if( consdata->vars[i] !=
NULL )
312 if( consdata->rhsvar !=
NULL )
326 assert(scip !=
NULL);
327 assert(event !=
NULL);
328 assert(eventdata !=
NULL);
329 assert(eventhdlr !=
NULL);
332 assert(cons !=
NULL);
353 assert(scip !=
NULL);
354 assert(cons !=
NULL);
357 assert(conshdlrdata !=
NULL);
360 assert(consdata !=
NULL);
362 if( consdata->nlrow !=
NULL )
367 nlpform = conshdlrdata->nlpform;
374 if( consdata->nvars < 100 && conshdlrdata->haveexprint )
386 if( consdata->nvars > 0 )
393 if( consdata->constant != 0.0 )
402 for( i = 0; i < consdata->nvars; ++i )
405 if( consdata->offsets[i] != 0.0 )
411 if( consdata->coefs[i] != 1.0 )
416 if( exprterm !=
NULL )
428 if( consdata->rhsvar !=
NULL )
431 if( consdata->rhsoffset != 0.0 )
436 if( consdata->rhscoeff != 1.0 )
479 if( consdata->constant != 0.0 )
488 for( i = 0; i < consdata->nvars; ++i )
491 if( consdata->offsets[i] != 0.0 )
497 if( consdata->coefs[i] != 1.0 )
502 if( exprterm !=
NULL )
512 if( exprterm !=
NULL )
520 assert(consdata->nvars == 0);
521 assert(consdata->constant == 0.0);
526 lincoef = -consdata->rhscoeff;
528 -consdata->rhscoeff * consdata->rhsoffset,
529 1, &consdata->rhsvar, &lincoef,
553 consdata->nvars, consdata->vars, 0,
NULL,
558 rhs = -consdata->constant;
559 for( i = 0; i < consdata->nvars; ++i )
563 sqrterm.
coef = consdata->coefs[i] * consdata->coefs[i];
566 if( !
SCIPisZero(scip, consdata->offsets[i]) )
568 rhs -= consdata->offsets[i] * consdata->offsets[i];
575 if( rhsvarpos == -1 )
579 assert(rhsvarpos >= 0);
583 sqrterm.
idx1 = rhsvarpos;
584 sqrterm.
idx2 = rhsvarpos;
585 sqrterm.
coef = -consdata->rhscoeff * consdata->rhscoeff;
588 if( consdata->rhsoffset != 0.0 )
590 rhs += consdata->rhsoffset * consdata->rhsoffset;
618 for( i = 0; i < consdata->nvars; ++i )
622 if( consdata->offsets[i] != 0.0 )
639 assert(consdata->rhsvar !=
NULL);
643 if( consdata->rhscoeff != 1.0 || consdata->rhsoffset != 0.0 )
656 lincoef = -consdata->rhscoeff;
658 -consdata->rhscoeff * consdata->rhsoffset,
659 1, &consdata->rhsvar, &lincoef,
674 SCIPdebugMsg(scip,
"created nonlinear row representation of SOC constraint\n");
694 assert(scip !=
NULL);
695 assert(cons !=
NULL);
698 assert(consdata !=
NULL);
700 consdata->lhsval = consdata->constant;
702 for( i = 0; i < consdata->nvars; ++i )
704 var = consdata->vars[i];
713 val = consdata->coefs[i] * (val + consdata->offsets[i]);
714 consdata->lhsval += val * val;
716 consdata->lhsval =
sqrt(consdata->lhsval);
733 assert(scip !=
NULL);
734 assert(cons !=
NULL);
737 assert(consdata !=
NULL);
740 for( i = 0; i < consdata->nvars; ++i )
744 h =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
745 h *= consdata->coefs[i] * consdata->coefs[i];
748 g /= consdata->lhsval * consdata->lhsval;
749 g += consdata->rhscoeff * consdata->rhscoeff;
767 assert(scip !=
NULL);
768 assert(conshdlr !=
NULL);
769 assert(cons !=
NULL);
772 assert(conshdlrdata !=
NULL);
775 assert(consdata !=
NULL);
786 consdata->violation = 0.0;
795 consdata->violation = consdata->rhscoeff > 0.0 ? 0.0 :
SCIPinfinity(scip);
800 consdata->violation = consdata->rhscoeff < 0.0 ? 0.0 :
SCIPinfinity(scip);
804 consdata->violation = consdata->lhsval - consdata->rhscoeff * (rhsval + consdata->rhsoffset);
805 if( consdata->violation <= 0.0 )
808 consdata->violation = 0.0;
812 switch( conshdlrdata->scaling )
823 if( consdata->violation > 0.0 )
830 consdata->violation /= norm;
838 if( consdata->violation > 0.0 )
839 consdata->violation /=
MAX(1.0, consdata->rhscoeff * consdata->rhsoffset);
870 assert(scip !=
NULL);
871 assert(conss !=
NULL || nconss == 0);
873 if( maxviolcons !=
NULL )
876 for( c = 0; c < nconss; ++c )
879 if( maxviolcons !=
NULL )
882 assert(consdata !=
NULL);
883 if( consdata->violation > maxviol &&
SCIPisGT(scip, consdata->violation,
SCIPfeastol(scip)) )
885 maxviol = consdata->violation;
886 *maxviolcons = conss[c];
910 assert(scip !=
NULL);
911 assert(cons !=
NULL);
915 assert(consdata !=
NULL);
922 for( i = 0; i < consdata->nvars; ++i )
924 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
925 val *= consdata->coefs[i] * consdata->coefs[i];
927 rowcoeff[i] = val / consdata->lhsval;
932 rhs /= consdata->lhsval;
933 rhs -= consdata->lhsval - consdata->rhscoeff * consdata->rhsoffset;
963 assert(scip !=
NULL);
964 assert(cons !=
NULL);
968 assert(consdata !=
NULL);
970 lhsval = consdata->constant;
971 for( i = 0; i < consdata->nvars; ++i )
975 val = consdata->coefs[i] * (x[i] + consdata->offsets[i]);
978 lhsval =
sqrt(lhsval);
987 for( i = 0; i < consdata->nvars; ++i )
989 val = x[i] + consdata->offsets[i];
995 val *= consdata->coefs[i] * consdata->coefs[i];
997 rowcoeff[i] = val / lhsval;
1003 rhs -= lhsval - consdata->rhscoeff * consdata->rhsoffset;
1059 assert(scip !=
NULL);
1060 assert(cons !=
NULL);
1061 assert(row !=
NULL);
1064 assert(consdata !=
NULL);
1075 A = consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
1076 A /= consdata->lhsval;
1078 lambda = (1.0 - A) / (1.0 + A);
1082 SCIPdebugMsg(scip,
"A = %g \t lambda = %g\n", A, lambda);
1092 for( i = 0; i < consdata->nvars; ++i )
1094 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
1095 val *= consdata->coefs[i] * consdata->coefs[i];
1097 rowcoeff[i] = val / consdata->lhsval;
1099 val *=
SCIPgetSolVal(scip, sol, consdata->vars[i]) + lambda * consdata->offsets[i];
1102 rhs /= consdata->lhsval;
1103 rhs -= consdata->lhsval;
1104 rhs /= 1.0 - lambda;
1105 rhs -= consdata->rhscoeff * consdata->rhsoffset;
1135 int maxnz, nextmaxnz;
1139 assert(scip !=
NULL);
1140 assert(conshdlr !=
NULL);
1141 assert(cons !=
NULL);
1142 assert(row !=
NULL);
1145 assert(conshdlrdata !=
NULL);
1148 assert(consdata !=
NULL);
1153 if( consdata->nvars <= 3 )
1159 goodefficacy =
MAX((1.0-conshdlrdata->sparsifymaxloss) * consdata->violation, minefficacy);
1167 for( i = 0; i < consdata->nvars; ++i )
1170 dist[i] = ABS(x[i] + consdata->offsets[i]);
1171 dist[i] *= consdata->coefs[i] * consdata->coefs[i];
1179 for( i = 0; i < consdata->nvars - maxnz; ++i )
1180 x[ind[i]] = -consdata->offsets[i];
1192 switch( conshdlrdata->scaling )
1202 efficacy /=
MAX(1.0, norm);
1212 efficacy /=
MAX(1.0, minval);
1222 if(
SCIPisGT(scip, efficacy, goodefficacy) ||
1223 (maxnz >= consdata->nvars &&
SCIPisGT(scip, efficacy, minefficacy)) )
1226 SCIPdebugMsg(scip,
"accepted cut with %d of %d nonzeros, efficacy = %g\n", maxnz, consdata->nvars, efficacy);
1233 if( maxnz >= consdata->nvars )
1236 nextmaxnz = (int)(conshdlrdata->sparsifynzgrowth * maxnz);
1237 if( nextmaxnz == consdata->nvars - 1)
1238 nextmaxnz = consdata->nvars;
1239 else if( nextmaxnz == maxnz )
1243 for( i =
MAX(0, consdata->nvars - nextmaxnz); i < consdata->nvars - maxnz; ++i )
1244 x[ind[i]] =
SCIPgetSolVal(scip, sol, consdata->vars[ind[i]]);
1277 assert(scip !=
NULL);
1278 assert(conss !=
NULL || nconss == 0);
1279 assert(nusefulconss <= nconss);
1280 assert(cutoff !=
NULL);
1281 assert(success !=
NULL);
1286 assert(conshdlrdata !=
NULL);
1292 for( c = 0; c < nconss; ++c )
1295 assert(consdata !=
NULL);
1304 if( conshdlrdata->sparsify )
1313 if( conshdlrdata->projectpoint )
1323 switch( conshdlrdata->scaling )
1337 efficacy /=
MAX(1.0, norm);
1347 efficacy /=
MAX(1.0, minval);
1363 assert(row !=
NULL);
1374 if( inenforcement && !conshdlrdata->enfocutsremovable )
1386 if( c >= nusefulconss && *success )
1415 assert(scip !=
NULL);
1416 assert(conshdlr !=
NULL);
1417 assert(conss !=
NULL || nconss == 0);
1418 assert(cutoff !=
NULL);
1421 if( separatedlpsol !=
NULL )
1422 *separatedlpsol =
FALSE;
1424 for( c = 0; c < nconss && !(*cutoff); ++c )
1426 assert(conss[c] !=
NULL);
1432 assert(consdata !=
NULL);
1451 if( separatedlpsol !=
NULL )
1458 assert(conshdlrdata !=
NULL);
1461 switch( conshdlrdata->scaling )
1472 efficacy /=
MAX(1.0, norm);
1481 efficacy /=
MAX(1.0, minval);
1491 if( efficacy >= minefficacy )
1493 *separatedlpsol =
TRUE;
1521 assert(scip !=
NULL);
1522 assert(event !=
NULL);
1523 assert(eventdata !=
NULL);
1524 assert(eventhdlr !=
NULL);
1536 assert(sol !=
NULL);
1539 assert(conshdlrdata !=
NULL);
1549 assert(conss !=
NULL);
1586 assert(scip !=
NULL);
1587 assert(conshdlr !=
NULL);
1588 assert(cons !=
NULL);
1589 assert(iscutoff !=
NULL);
1590 assert(isdeleted !=
NULL);
1596 assert(consdata !=
NULL);
1599 assert(conshdlrdata !=
NULL);
1605 haveremovedvar =
FALSE;
1608 for( i = 0; i < consdata->nvars; ++i )
1610 x = consdata->vars[i];
1625 offset = consdata->offsets[i];
1628 SCIPdebugMsg(scip,
" lhs term at position %d is replaced by %g * <%s> + %g\n",
1632 if( coef == 0.0 || x ==
NULL )
1634 consdata->constant += consdata->coefs[i] * consdata->coefs[i] * offset * offset;
1635 consdata->offsets[i] = 0.0;
1636 haveremovedvar =
TRUE;
1643 consdata->offsets[i] = offset;
1646 consdata->coefs[i] =
REALABS(coef * consdata->coefs[i]);
1647 consdata->offsets[i] /= coef;
1649 consdata->vars[i] = x;
1658 x = consdata->rhsvar;
1675 if( coef == 0.0 || x ==
NULL )
1678 consdata->rhsoffset += offset;
1685 consdata->rhsoffset = (consdata->rhsoffset + offset) / coef;
1686 consdata->rhscoeff *= coef;
1687 consdata->rhsvar = x;
1700 if( consdata->nlrow !=
NULL )
1706 if( haveremovedvar )
1713 oldnvars = consdata->nvars;
1714 for( i = 0; i < consdata->nvars; ++i )
1717 while( consdata->nvars && consdata->vars[consdata->nvars-1] ==
NULL )
1721 if( i == consdata->nvars )
1724 if( consdata->vars[i] !=
NULL )
1729 assert(consdata->nvars >= 1);
1730 assert(consdata->vars[consdata->nvars-1] !=
NULL);
1732 consdata->vars[i] = consdata->vars[consdata->nvars-1];
1733 consdata->offsets[i] = consdata->offsets[consdata->nvars-1];
1734 consdata->coefs[i] = consdata->coefs[consdata->nvars-1];
1739 assert(consdata->nvars < oldnvars);
1752 if( consdata->nvars == 0 )
1755 if( consdata->rhsvar ==
NULL )
1757 if(
SCIPisFeasLE(scip,
sqrt(consdata->constant), consdata->rhscoeff*consdata->rhsoffset) )
1773 sqrt(consdata->constant) - consdata->rhscoeff * consdata->rhsoffset,
SCIPinfinity(scip),
1782 else if( consdata->rhscoeff > 0.0 )
1788 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1790 else if( tightened )
1792 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1807 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1809 else if( tightened )
1811 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1825 if( consdata->rhsvar ==
NULL )
1827 if( consdata->nvars > 1 )
1835 rhs = consdata->rhscoeff * consdata->rhsoffset;
1836 rhs = rhs * rhs - consdata->constant;
1838 for( i = 0; i < consdata->nvars; ++i )
1840 quadvarterms[i].
var = consdata->vars[i];
1841 quadvarterms[i].
sqrcoef = consdata->coefs[i] * consdata->coefs[i];
1842 if( consdata->offsets[i] != 0.0 )
1844 quadvarterms[i].
lincoef = 2 * consdata->offsets[i] * quadvarterms[i].
sqrcoef;
1845 rhs -= quadvarterms[i].
sqrcoef * consdata->offsets[i]*consdata->offsets[i];
1872 -
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1873 +
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1887 assert(consdata->nvars == 1);
1888 rhs = consdata->rhscoeff * consdata->rhsoffset;
1892 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables in <%s>\n",
SCIPconsGetName(cons));
1897 rhs -= consdata->constant;
1898 rhs = rhs < 0.0 ? 0.0 :
sqrt(rhs);
1902 SCIP_CALL(
SCIPfixVar(scip, consdata->vars[0], -consdata->offsets[0], iscutoff, &tightened) );
1905 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables and fixing remaining lhs var in <%s>\n",
SCIPconsGetName(cons));
1907 else if( tightened )
1909 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1914 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1919 rhs /= ABS(consdata->coefs[0]);
1923 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));
1932 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));
1934 else if( tightened )
1939 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));
1950 if( consdata->nvars == 1 &&
SCIPisZero(scip, consdata->constant) )
1956 assert(consdata->rhsvar !=
NULL);
1958 vars[0] = consdata->vars[0];
1959 vars[1] = consdata->rhsvar;
1960 coefs[0] = consdata->coefs[0];
1961 coefs[1] = -consdata->rhscoeff;
1962 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
1972 coefs[0] = -coefs[0];
1973 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
2015 const char* basename,
2029 assert(scip !=
NULL);
2030 assert(cons !=
NULL);
2036 assert(basename !=
NULL);
2038 assert(naddconss !=
NULL);
2040 SCIPdebugMsg(scip,
"Creating linear Glineur outer-approximation for <%s>.\n", basename);
2041 SCIPdebugMsg(scip,
"sqr(%g(%s+%g)) + sqr(%g(%s+%g)) <= sqr(%g(%s+%g)).\n",
2048 for( i = 1; i <= N; ++i )
2050 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
2055 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
2073 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
2092 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
2109 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
2126 if( infeas ==
TRUE )
2128 SCIPwarningMessage(scip,
"creating glineur outer approximation of SOC3 constraint found problem infeasible.\n");
2134 for( i = 1; i < N; ++i )
2142 vars[2] = avars[i+1];
2145 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
2158 vals[0] = -
sin(val);
2161 vars[2] = bvars[i+1];
2164 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2177 vals[0] = -
sin(val);
2180 vars[2] = bvars[i+1];
2183 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2199 vals[0] = -
cos(val);
2201 vals[1] = -
sin(val);
2205 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2217 for( i = 1; i <= N; ++i )
2248 const char* basename,
2261 assert(scip !=
NULL);
2262 assert(cons !=
NULL);
2268 assert(basename !=
NULL);
2270 assert(naddconss !=
NULL);
2272 SCIPdebugMsg(scip,
"Creating linear Ben-Tal Nemirovski outer-approximation for <%s>.\n", basename);
2278 for( i = 0; i <= N; ++i )
2280 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
2285 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
2297 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
2313 (void)
SCIPsnprintf(linname, 255,
"soc#%s#A%d", basename, 0);
2331 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
2347 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
2371 for( i = 1; i <= N; ++i )
2375 val =
M_PI /
pow(2.0, (
double) (i+1));
2377 vars[0] = avars[i-1];
2379 vars[1] = bvars[i-1];
2384 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
2395 vars[0] = avars[i-1];
2397 vars[1] = bvars[i-1];
2398 vals[1] = -
cos(val);
2402 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2413 vars[0] = avars[i-1];
2414 vals[0] = -
sin(val);
2415 vars[1] = bvars[i-1];
2420 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2438 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2450 vals[0] = tan(
M_PI /
pow(2.0, (
double) (N+1)) );
2454 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2465 for( i = 0; i <= N; ++i )
2495 const char* basename,
2501 SCIP_CALL(
presolveCreateGlineurApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2505 SCIP_CALL(
presolveCreateBenTalNemirovskiApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2527 const char* basename,
2529 int soc3_nr_auxvars,
2538 assert(scip !=
NULL);
2539 assert(lhsvars !=
NULL);
2540 assert(nlhsvars >= 1);
2541 assert(lhscoefs !=
NULL);
2542 assert(lhsoffsets !=
NULL);
2543 assert(rhsvar !=
NULL);
2544 assert(basename !=
NULL);
2546 assert(naddconss !=
NULL);
2552 lhsvars[0],
NULL, rhsvar,
2553 lhscoefs[0], 1.0, rhscoeff,
2554 lhsoffsets[0],
sqrt(constant), rhsoffset,
2555 soc3_nr_auxvars, glineur, basename, naddconss) );
2560 if( nlhsvars == 2 &&
SCIPisZero(scip, constant) )
2562 assert(lhsvars[0] !=
NULL);
2563 assert(lhsvars[1] !=
NULL);
2564 assert(rhsvar !=
NULL);
2566 lhsvars[0], lhsvars[1], rhsvar,
2567 lhscoefs[0], lhscoefs[1], rhscoeff,
2568 lhsoffsets[0], lhsoffsets[1], rhsoffset,
2569 soc3_nr_auxvars, glineur, basename, naddconss) );
2574 if( nlhsvars == 3 || (nlhsvars == 2 && !
SCIPisZero(scip, constant)) )
2585 lhsvars[0], lhsvars[1], auxvar1,
2586 lhscoefs[0], lhscoefs[1], 1.0,
2587 lhsoffsets[0], lhsoffsets[1], 0.0,
2588 soc3_nr_auxvars, glineur, name, naddconss) );
2594 lhsvars[2], auxvar1, rhsvar,
2595 lhscoefs[2], 1.0, rhscoeff,
2596 lhsoffsets[2], 0.0, rhsoffset,
2597 soc3_nr_auxvars, glineur, name, naddconss) );
2602 auxvar1,
NULL, rhsvar,
2604 0.0,
sqrt(constant), rhsoffset,
2605 soc3_nr_auxvars, glineur, name, naddconss) );
2622 nlhsvars/2, lhsvars, lhscoefs, lhsoffsets,
2624 constant, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2633 nlhsvars-nlhsvars/2, &lhsvars[nlhsvars/2], &lhscoefs[nlhsvars/2], &lhsoffsets[nlhsvars/2],
2635 0.0, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2640 auxvar1, auxvar2, rhsvar,
2642 0.0, 0.0, rhsoffset,
2643 soc3_nr_auxvars, glineur, name, naddconss) );
2670 assert(scip !=
NULL);
2671 assert(cons !=
NULL);
2672 assert(result !=
NULL);
2675 assert(consdata !=
NULL);
2696 for( i = 0; i < consdata->nvars; ++i )
2701 if( consdata->offsets[i] != 0.0 )
2703 if( consdata->coefs[i] != 1.0 )
2713 if( consdata->rhscoeff != 1.0 )
2715 if( consdata->rhsoffset != 0.0 )
2723 else if( tightened )
2736 if( consdata->rhsoffset != 0.0 )
2738 if( consdata->rhscoeff != 1.0 )
2743 if( lhsrange.
inf > rhsrange.
sup )
2745 SCIPdebugMsg(scip,
"propagation found constraint <%s> infeasible: lhs = [%.15g,%.15g] > rhs = [%.15g,%.15g]\n",
2754 for( i = 0; i < consdata->nvars; ++i )
2781 assert(consdata->coefs[i] >= 0.0);
2784 if( consdata->coefs[i] != 1.0 )
2786 if( consdata->offsets[i] != 0.0 )
2796 else if( tightened )
2805 if( consdata->offsets[i] != 0.0 )
2815 else if( tightened )
2846 assert(scip !=
NULL);
2847 assert(cons !=
NULL);
2848 assert(sol !=
NULL);
2849 assert(success !=
NULL);
2852 assert(consdata !=
NULL);
2853 assert(!
SCIPisZero(scip, consdata->rhscoeff));
2857 rhsval = consdata->lhsval / consdata->rhscoeff - consdata->rhsoffset;
2861 if( consdata->rhscoeff > 0.0 )
2953 assert(naddconss !=
NULL);
2954 assert(ndelconss !=
NULL);
2955 assert(success !=
NULL);
2960 if( consdata->nvars < 3 )
2966 if( consdata->rhsvar ==
NULL )
2979 scale = 1.0 * (consdata->nvars + 1)/4.0;
2987 aggvars[0] = consdata->rhsvar;
2988 scalars[0] = consdata->rhscoeff;
2989 for( i = 0; i < consdata->nvars; ++i )
3006 aggvars[1] = disvars[i];
3008 constant = consdata->rhscoeff * consdata->rhsoffset;
3011 assert(!infeas && *success);
3015 assert(!infeas && *success);
3018 lhsvars[0] = difvars[i];
3021 lhsvars[1] = consdata->vars[i];
3022 coefs[1] = scale * 2 * consdata->coefs[i];
3023 offsets[1] = consdata->offsets[i];
3026 SCIP_CALL(
SCIPcreateConsBasicSOC(scip, &discons, name, 2, lhsvars, coefs, offsets, 0.0, sumvars[i], scale, 0.0) );
3035 discoefs[ndisvars] = 1.0;
3038 assert(ndisvars == consdata->nvars);
3063 aggvars[1] = disvars[i];
3065 constant = consdata->rhscoeff * consdata->rhsoffset;
3067 assert(!infeas && *success);
3071 assert(!infeas && *success);
3074 lhsvars[0] = difvars[ndisvars];
3077 constant = 4.0 * SQR(scale) * consdata->constant;
3080 sumvars[ndisvars], scale, 0.0) );
3086 discoefs[ndisvars] = 1.0;
3091 discoefs[ndisvars] = -1.0 * consdata->rhscoeff;
3092 disvars[ndisvars] = consdata->rhsvar;
3096 consdata->rhscoeff * consdata->rhsoffset) );
3103 for( i = ndisvars - 1; i >= 0; --i )
3144 assert(scip !=
NULL);
3145 assert(conshdlr !=
NULL);
3146 assert(conss !=
NULL || nconss == 0);
3148 assert(result !=
NULL);
3151 assert(conshdlrdata !=
NULL);
3155 if( maxviolcons ==
NULL )
3170 if( conshdlrdata->nenforounds > 100 )
3183 ++conshdlrdata->nenforounds;
3188 conshdlrdata->nenforounds = 0;
3206 for( c = 0; c < nconss; ++c )
3221 SCIPwarningMessage(scip,
"could not enforce feasibility by separating or branching; declaring solution with viol %g feasible\n",
SCIPconsGetData(maxviolcons)->violation);
3232 #ifdef QUADCONSUPGD_PRIORITY 3285 assert(scip !=
NULL);
3286 assert(cons !=
NULL);
3287 assert(nupgdconss !=
NULL);
3288 assert(upgdconss !=
NULL);
3324 trygeneralupg =
FALSE;
3327 if( nbilinterms > 1 )
3329 trygeneralupg =
TRUE;
3334 if ( nbilinterms == 1 )
3337 bilinvar1 = bilinterm->
var1;
3338 bilinvar2 = bilinterm->
var2;
3339 bilincoef = bilinterm->
coef;
3344 trygeneralupg =
TRUE;
3351 trygeneralupg =
TRUE;
3356 if ( !
SCIPisEQ(scip, bilincoef, -1.0) )
3358 trygeneralupg =
TRUE;
3364 for (i = 0; i < nquadvars; ++i)
3366 term = &quadterms[i];
3370 trygeneralupg =
TRUE;
3376 trygeneralupg =
TRUE;
3384 assert( quadterms !=
NULL );
3391 for( i = 0; i < nquadvars; ++i )
3393 term = &quadterms[i];
3401 if( lhscount >= nquadvars - 1 )
3407 lhsvars[lhscount] = term->
var;
3417 lhsoffsets[lhscount] = 0.0;
3422 else if( rhsvar !=
NULL ||
3445 if ( nbilinterms == 1 )
3455 if ( rhsvar !=
NULL )
3463 if ( *nupgdconss > upgdconsssize )
3466 *nupgdconss = -*nupgdconss;
3483 consvars[0] = bilinvar1;
3484 consvars[1] = bilinvar2;
3485 consvars[2] = auxvarsum;
3500 consvars[0] = bilinvar1;
3501 consvars[1] = bilinvar2;
3502 consvars[2] = auxvardiff;
3517 lhsvars[lhscount] = auxvardiff;
3518 lhscoefs[lhscount] = 0.5;
3519 lhsoffsets[lhscount] = 0.0;
3522 lhscount + 1, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3523 auxvarsum, 0.5, 0.0,
3544 for (i = 0; i < lhscount; ++i)
3559 if( *nupgdconss > upgdconsssize )
3562 *nupgdconss = -*nupgdconss;
3567 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3568 rhsvar, rhscoef, rhsoffset,
3594 for( i = 0; i < nquadvars; ++i )
3606 if( lhscount >= nquadvars - 1 )
3612 lhsvars[lhscount] = term->
var;
3622 lhsoffsets[lhscount] = 0.0;
3627 else if( rhsvar !=
NULL ||
3648 if( rhsvar && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3655 if( *nupgdconss > upgdconsssize )
3658 *nupgdconss = -*nupgdconss;
3663 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3664 rhsvar, rhscoef, rhsoffset,
3686 if( !trygeneralupg )
3691 assert(conshdlr !=
NULL);
3693 assert(conshdlrdata !=
NULL);
3695 if( !conshdlrdata->generalsocupg )
3698 SCIPdebugMsg(scip,
"Trying general method of upgrade to a soc const\n");
3703 #ifndef SCIP_STATISTIC 3725 for( i = 0; i < nquadvars; ++i )
3728 a[i*nquadvars + i] = term->
sqrcoef;
3729 quadvars[i] = term->
var;
3733 for( i = 0; i < nbilinterms; ++i )
3745 assert(idx1 != idx2);
3747 a[
MIN(idx1,idx2) * nquadvars +
MAX(idx1,idx2)] = bilinterm->
coef / 2.0;
3762 for( i = 0; i < nquadvars; ++i )
3764 for( j = 0; j < nquadvars; ++j )
3767 bp[i] += term->
lincoef * a[i * nquadvars + j];
3781 else if( eigvals[i] > 0.0 )
3788 if( npos + nneg < 3 )
3796 if( !rhsissoc && !lhsissoc )
3799 assert(rhsissoc != lhsissoc);
3807 for( i = 0; i < nquadvars; ++i )
3809 eigvals[i] = -eigvals[i];
3820 rhsvarfound =
FALSE;
3821 for( i = 0; i < nquadvars; ++i )
3826 if( eigvals[i] > 0.0 )
3829 lhsoffsets[lhscount] = bp[i] / (2 * eigvals[i]);
3830 lhsconstant -= bp[i] * bp[i] / (4 * eigvals[i]);
3837 assert(rhsvarfound ==
FALSE);
3839 rhsoffset = bp[i] / (2 * eigvals[i]);
3844 for( j = 0; j < nquadvars; ++j )
3848 if( a[i * nquadvars + j] > 0.0 )
3865 rhsvarlb += a[i * nquadvars + j] * aux;
3867 rhsvarlb += rhsoffset;
3869 for( j = 0; j < nquadvars; ++j )
3873 if( a[i * nquadvars + j] > 0.0 )
3890 rhsvarub += a[i * nquadvars + j] * aux;
3892 rhsvarub += rhsoffset;
3899 lhsconstant -= rhsoffset * rhsoffset * eigvals[i];
3900 rhscoef =
SCIPisLE(scip, rhsvarub, 0.0) ? -
sqrt(-eigvals[i]) :
sqrt(-eigvals[i]);
3904 SCIPdebugMsg(scip,
"Failed because rhsvar [%g, %g] changes sign.\n", rhsvarlb, rhsvarub);
3905 rhsvarfound =
FALSE;
3911 if( rhsvarfound && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3922 if( *nupgdconss > upgdconsssize )
3925 *nupgdconss = -*nupgdconss;
3931 for( i = 0; i < nquadvars; ++i )
3933 if( eigvals[i] <= 0.0 )
3941 lhsoffsets[lhsnvars], &infeas, &success) );
3943 if( infeas || !success )
3948 for( j = 0; j <= lhsnvars; ++j )
3955 assert(lhsnvars == lhscount);
3956 assert(negeigpos >= 0);
3962 rhsoffset, &infeas, &success) );
3964 if( infeas || !success )
3970 for( j = 0; j < lhsnvars; ++j )
3980 rhsvar, rhscoef * UPGSCALE, 0.0,
3988 for( i = 0; i < lhsnvars; ++i )
4024 SCIPdebugMsg(scip,
"Failed because there are not enough lhsvars (%d)\n", lhscount);
4028 SCIPdebugMsg(scip,
"Failed because lhsconstant is negative (%g)\n", lhsconstant);
4054 assert(scip !=
NULL);
4055 assert(conshdlr !=
NULL);
4072 assert( scip !=
NULL );
4073 assert( conshdlr !=
NULL );
4077 assert(conshdlrdata !=
NULL);
4092 assert(scip !=
NULL);
4093 assert(conshdlr !=
NULL);
4094 assert(conss !=
NULL || nconss == 0);
4097 assert(conshdlrdata !=
NULL);
4099 conshdlrdata->subnlpheur =
SCIPfindHeur(scip,
"subnlp");
4100 conshdlrdata->trysolheur =
SCIPfindHeur(scip,
"trysol");
4104 for( c = 0; c < nconss; ++c )
4119 assert(scip !=
NULL);
4120 assert(conshdlr !=
NULL);
4123 assert(conshdlrdata !=
NULL);
4125 conshdlrdata->subnlpheur =
NULL;
4126 conshdlrdata->trysolheur =
NULL;
4127 conshdlrdata->haveexprint =
FALSE;
4138 assert(scip !=
NULL);
4139 assert(conshdlr !=
NULL);
4140 assert(conss !=
NULL || nconss == 0);
4143 for( c = 0; c < nconss; ++c )
4164 assert(scip !=
NULL);
4165 assert(conshdlr !=
NULL);
4168 assert(conshdlrdata !=
NULL);
4169 assert(conshdlrdata->eventhdlr !=
NULL);
4174 for( c = 0; c < nconss; ++c )
4179 assert(consdata !=
NULL);
4181 if( consdata->nlrow ==
NULL )
4184 assert(consdata->nlrow !=
NULL);
4191 conshdlrdata->newsoleventfilterpos = -1;
4197 assert(eventhdlr !=
NULL);
4203 conshdlrdata->sepanlp =
FALSE;
4204 conshdlrdata->lastenfonode =
NULL;
4205 conshdlrdata->nenforounds = 0;
4219 assert(scip !=
NULL);
4220 assert(conshdlr !=
NULL);
4223 assert(conshdlrdata !=
NULL);
4224 assert(conshdlrdata->eventhdlr !=
NULL);
4226 if( conshdlrdata->newsoleventfilterpos >= 0 )
4231 assert(eventhdlr !=
NULL);
4234 conshdlrdata->newsoleventfilterpos = -1;
4237 for( c = 0; c < nconss; ++c )
4240 assert(consdata !=
NULL);
4243 if( consdata->nlrow !=
NULL )
4259 assert(scip !=
NULL);
4260 assert(conshdlr !=
NULL);
4261 assert(cons !=
NULL);
4262 assert(consdata !=
NULL);
4263 assert(*consdata !=
NULL);
4265 assert((*consdata)->nlrow ==
NULL);
4274 assert(conshdlrdata !=
NULL);
4279 for( i = 0; i < (*consdata)->nvars; ++i )
4287 assert((*consdata)->lhsbndchgeventdata ==
NULL);
4289 if( (*consdata)->rhsvar !=
NULL )
4310 assert(scip !=
NULL);
4311 assert(conshdlr !=
NULL);
4313 assert(sourcecons !=
NULL);
4314 assert(targetcons !=
NULL);
4318 assert(conshdlrdata !=
NULL);
4324 assert(sourcedata !=
NULL);
4325 assert(sourcedata->vars !=
NULL);
4326 assert(sourcedata->coefs !=
NULL);
4327 assert(sourcedata->offsets !=
NULL);
4332 consdata->nvars = sourcedata->nvars;
4335 for( i = 0; i < consdata->nvars; ++i )
4342 consdata->constant = sourcedata->constant;
4345 consdata->rhsoffset = sourcedata->rhsoffset;
4346 consdata->rhscoeff = sourcedata->rhscoeff;
4350 consdata->nlrow =
NULL;
4351 consdata->lhsbndchgeventdata =
NULL;
4352 consdata->isapproxadded =
FALSE;
4377 assert(scip !=
NULL);
4378 assert(conshdlr !=
NULL);
4379 assert(conss !=
NULL || nconss == 0);
4380 assert(result !=
NULL);
4385 assert(conshdlrdata !=
NULL);
4388 if( maxviolcon ==
NULL )
4394 if(
SCIPgetDepth(scip) == 0 && !conshdlrdata->sepanlp &&
4408 if( conshdlrdata->subnlpheur !=
NULL )
4423 SCIPdebugMsg(scip,
"solved NLP relax, solution status: %d\n", solstat);
4428 conshdlrdata->sepanlp =
TRUE;
4432 SCIPdebugMsg(scip,
"NLP relaxation is globally infeasible, thus can cutoff node\n");
4444 assert(nlpsol !=
NULL);
4447 if( solvednlp && conshdlrdata->trysolheur !=
NULL )
4457 if( nfracvars == 0 )
4474 if( lpsolseparated )
4476 SCIPdebugMsg(scip,
"linearization cuts separate LP solution\n");
4491 else if ( sepasuccess )
4506 assert(scip !=
NULL);
4507 assert(conss !=
NULL || nconss == 0);
4508 assert(result !=
NULL);
4509 assert(sol !=
NULL);
4514 if( maxviolcon ==
NULL )
4520 else if ( sepasuccess )
4553 assert(scip !=
NULL);
4554 assert(conss !=
NULL || nconss == 0);
4555 assert(result !=
NULL);
4559 if( maxviolcons ==
NULL )
4579 assert(scip !=
NULL);
4580 assert(conshdlr !=
NULL);
4582 assert(conss !=
NULL || nconss == 0);
4583 assert(result !=
NULL );
4586 assert(conshdlrdata !=
NULL);
4591 dolinfeasshift = conshdlrdata->linfeasshift && (conshdlrdata->trysolheur !=
NULL);
4594 for( c = 0; c < nconss; ++c )
4599 assert(consdata !=
NULL);
4607 if( consdata->violation > maxviol )
4608 maxviol = consdata->violation;
4614 unscaledviol = consdata->lhsval;
4616 unscaledviol -= consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
4619 SCIPinfoMessage(scip,
NULL,
";\n\tviolation: %g (scaled: %g)\n", unscaledviol, consdata->violation);
4623 if( dolinfeasshift )
4632 if( polishedsol ==
NULL )
4647 dolinfeasshift = success;
4651 dolinfeasshift =
FALSE;
4657 if( !dolinfeasshift && (conshdlrdata->subnlpheur ==
NULL || sol ==
NULL) && !completely )
4662 if( !dolinfeasshift && polishedsol !=
NULL )
4667 if( polishedsol !=
NULL )
4690 assert(scip !=
NULL);
4691 assert(conss !=
NULL || ((nconss == 0) && (nmarkedconss == 0)));
4692 assert(result !=
NULL);
4697 for( c = 0; c < nmarkedconss && *result !=
SCIP_CUTOFF; ++c )
4701 *result = propresult;
4719 assert(scip !=
NULL);
4720 assert(conss !=
NULL || nconss == 0);
4721 assert(conshdlr !=
NULL);
4722 assert(result !=
NULL);
4727 assert(conshdlrdata !=
NULL);
4729 for( c = 0; c < nconss; ++c )
4732 assert(consdata !=
NULL);
4747 if( conshdlrdata->nauxvars > 0 && !consdata->isapproxadded && consdata->nvars > 1 )
4749 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) );
4750 consdata->isapproxadded =
TRUE;
4756 switch( propresult )
4803 assert(scip !=
NULL);
4804 assert(conshdlr !=
NULL);
4805 assert(cons !=
NULL);
4808 assert(consdata !=
NULL);
4813 for( i = 0; i < consdata->nvars; ++i )
4819 if( consdata->rhsvar !=
NULL )
4821 SCIP_CALL(
SCIPaddVarLocks(scip, consdata->rhsvar, consdata->rhscoeff > 0.0 ? nlockspos : nlocksneg, consdata->rhscoeff > 0.0 ? nlocksneg : nlockspos) );
4834 assert(scip !=
NULL);
4835 assert(conshdlr !=
NULL);
4836 assert(cons !=
NULL);
4840 assert(consdata !=
NULL);
4843 if( consdata->constant != 0.0 )
4848 for( i = 0; i < consdata->nvars; ++i )
4856 if( consdata->rhsvar !=
NULL )
4864 SCIPinfoMessage(scip, file,
"%.15g", consdata->rhscoeff*consdata->rhsoffset);
4879 assert(scip !=
NULL);
4880 assert(cons !=
NULL);
4881 assert(sourcescip !=
NULL);
4882 assert(sourceconshdlr !=
NULL);
4883 assert(sourcecons !=
NULL);
4884 assert(varmap !=
NULL);
4885 assert(valid !=
NULL);
4886 assert(stickingatnode ==
FALSE);
4889 assert(consdata !=
NULL);
4896 for( i = 0; i < consdata->nvars && *valid; ++i )
4899 assert(!(*valid) || vars[i] !=
NULL);
4906 assert(!(*valid) || rhsvar !=
NULL);
4913 consdata->nvars, vars, consdata->coefs, consdata->offsets, consdata->constant,
4914 rhsvar, consdata->rhscoeff, consdata->rhsoffset,
4915 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
4942 assert(scip !=
NULL);
4943 assert(success !=
NULL);
4944 assert(str !=
NULL);
4945 assert(name !=
NULL);
4946 assert(cons !=
NULL);
4949 if( strncmp(str,
"sqrt( ", 6) != 0 )
4972 while( *str !=
'\0' )
4975 while( isspace((
int)*str) )
4979 if( strncmp(str,
"+ (", 3) != 0 )
4993 if( strncmp(str,
"*(", 2) != 0 )
5020 if( strncmp(str,
"))^2", 4) != 0 )
5028 if( varssize <= nvars )
5036 coefs[nvars] = coef;
5037 offsets[nvars] = offset;
5041 if( strncmp(str,
") <=", 4) != 0 )
5054 while( isspace((
int)*str) )
5065 while( isspace((
int)*str) )
5074 if( strncmp(str,
"*(", 2) != 0 )
5089 if( rhsvar ==
NULL )
5126 rhsoffset = rhscoef;
5133 assert(!stickingatnode);
5134 SCIP_CALL(
SCIPcreateConsSOC(scip, cons, name, nvars, vars, coefs, offsets, constant, rhsvar, rhscoef, rhsoffset,
5135 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
5152 assert(consdata !=
NULL);
5154 if( varssize < consdata->nvars + 1 )
5159 vars[consdata->nvars] = consdata->rhsvar;
5172 assert(cons !=
NULL);
5175 assert(consdata !=
NULL);
5177 (*nvars) = consdata->nvars + 1;
5198 conshdlrdata->subnlpheur =
NULL;
5199 conshdlrdata->trysolheur =
NULL;
5202 "signals a bound change to a second order cone constraint",
5203 processVarEvent,
NULL) );
5204 conshdlrdata->eventhdlr = eventhdlr;
5207 "handles the event that a new primal solution has been found",
5208 processNewSolutionEvent,
NULL) );
5213 consEnfolpSOC, consEnfopsSOC, consCheckSOC, consLockSOC,
5215 assert(conshdlr !=
NULL);
5245 "whether scaling of infeasibility is 'o'ff, by sup-norm of function 'g'radient, or by left/right hand 's'ide",
5246 &conshdlrdata->scaling,
TRUE,
'o',
"ogs",
NULL,
NULL) );
5249 "whether the reference point of a cut should be projected onto the feasible set of the SOC constraint",
5253 "number of auxiliary variables to use when creating a linear outer approx. of a SOC3 constraint; 0 to turn off",
5254 &conshdlrdata->nauxvars,
FALSE, 0, 0, INT_MAX,
NULL,
NULL) );
5257 "whether the Glineur Outer Approximation should be used instead of Ben-Tal Nemirovski",
5261 "minimal efficacy of a cut to be added to LP in separation",
5265 "whether to sparsify cuts",
5269 "maximal loss in cut efficacy by sparsification",
5270 &conshdlrdata->sparsifymaxloss,
TRUE, 0.2, 0.0, 1.0,
NULL,
NULL) );
5273 "growth rate of maximal allowed nonzeros in cuts in sparsification",
5277 "whether to try to make solutions feasible in check by shifting the variable on the right hand side",
5281 "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)",
5285 "minimal required fraction of continuous variables in problem to use solution of NLP relaxation in root for separation",
5286 &conshdlrdata->sepanlpmincont,
FALSE, 1.0, 0.0, 2.0,
NULL,
NULL) );
5289 "are cuts added during enforcement removable from the LP in the same node?",
5293 "try to upgrade more general quadratics to soc?",
5297 "try to completely disaggregate soc?",
5345 assert(scip !=
NULL);
5346 assert(cons !=
NULL);
5347 assert(modifiable ==
FALSE);
5351 if( conshdlr ==
NULL )
5357 assert(vars !=
NULL);
5359 assert(constant >= 0.0);
5368 consdata->nvars = nvars;
5370 for( i = 0; i < nvars; ++i )
5378 for( i = 0; i < nvars; ++i )
5379 if( consdata->coefs[i] < 0.0 )
5380 consdata->coefs[i] = -consdata->coefs[i];
5385 for( i = 0; i < nvars; ++i )
5386 consdata->coefs[i] = 1.0;
5389 if( offsets !=
NULL )
5399 consdata->constant = constant;
5400 consdata->rhsvar = rhsvar;
5401 consdata->rhscoeff = rhscoeff;
5402 consdata->rhsoffset = rhsoffset;
5404 if( rhsvar !=
NULL )
5409 consdata->nlrow =
NULL;
5411 consdata->lhsbndchgeventdata =
NULL;
5412 consdata->isapproxadded =
FALSE;
5415 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
5416 local, modifiable, dynamic, removable,
FALSE) );
5421 assert(conshdlrdata !=
NULL);
5449 rhsvar, rhscoeff, rhsoffset,
5465 assert(cons !=
NULL);
5466 assert(nlrow !=
NULL);
5469 assert(consdata !=
NULL);
5471 if( consdata->nlrow ==
NULL )
5475 assert(consdata->nlrow !=
NULL);
5476 *nlrow = consdata->nlrow;
5488 assert(cons !=
NULL);
5501 assert(cons !=
NULL);
5514 assert(cons !=
NULL);
5527 assert(cons !=
NULL);
5540 assert(cons !=
NULL);
5553 assert(cons !=
NULL);
5566 assert(cons !=
NULL);
5579 assert(cons !=
NULL);
5609 assert(scip !=
NULL);
5610 assert(cons !=
NULL);
5611 assert(nlpi !=
NULL);
5612 assert(nlpiprob !=
NULL);
5613 assert(scipvar2nlpivar !=
NULL);
5616 assert(consdata !=
NULL);
5619 rhs = -consdata->constant;
5622 nlininds = consdata->rhsoffset != 0.0 ? 1 : 0;
5623 for( j = 0; j < consdata->nvars; ++j )
5624 if( consdata->offsets[j] != 0.0 )
5636 nquadelems = consdata->nvars + 1;
5639 for( j = 0; j < consdata->nvars; ++j )
5642 quadelems[j].
idx2 = quadelems[j].
idx1;
5643 quadelems[j].
coef = consdata->coefs[j] * consdata->coefs[j];
5645 if( consdata->offsets[j] != 0.0 )
5647 assert(lininds !=
NULL);
5648 assert(linvals !=
NULL);
5649 lininds[lincnt] = quadelems[j].
idx1;
5650 linvals[lincnt] = 2 * quadelems[j].
coef * consdata->offsets[j];
5653 rhs -= quadelems[j].
coef * consdata->offsets[j] * consdata->offsets[j];
5657 quadelems[consdata->nvars].
idx2 = quadelems[consdata->nvars].
idx1;
5658 quadelems[consdata->nvars].
coef = - consdata->rhscoeff * consdata->rhscoeff;
5660 if( consdata->rhsoffset != 0.0 )
5662 assert(lininds !=
NULL);
5663 assert(linvals !=
NULL);
5664 lininds[lincnt] = quadelems[consdata->nvars].
idx1;
5665 linvals[lincnt] = -2.0 * consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset;
5668 rhs += consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset;
5671 assert(lincnt == nlininds);
5677 &nlininds, &lininds, &linvals,
5678 &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)
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)
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)))
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 SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
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 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)
static SCIP_RETCODE generateCutSol(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROW **row)
SCIPInterval cos(const SCIPInterval &x)
SCIP_Real SCIPgetRelaxFeastolFactor(SCIP *scip)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
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)
static SCIP_RETCODE generateCutProjectedPoint(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROW **row)
SCIP_Real SCIPepsilon(SCIP *scip)
#define SCIP_PRESOLTIMING_FAST
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
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)
static SCIP_RETCODE generateSparseCut(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROW **row, SCIP_Real minefficacy)
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
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)
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_Bool SCIProwIsLocal(SCIP_ROW *row)
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)
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 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_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)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
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_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
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)
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)
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_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
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)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
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_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
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)
static SCIP_RETCODE generateCutPoint(SCIP *scip, SCIP_CONS *cons, SCIP_Real *x, SCIP_ROW **row)
#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)