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;
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;
181 assert(scip != NULL);
182 assert(cons != NULL);
183 assert(eventhdlr != NULL);
186 assert(consdata != NULL);
188 consdata->rhsbndchgeventdata.cons =
cons;
189 consdata->rhsbndchgeventdata.varidx = -1;
191 (
SCIP_EVENTDATA*)&consdata->rhsbndchgeventdata, &consdata->rhsbndchgeventdata.filterpos) );
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);
274 assert(scip != NULL);
275 assert(cons != NULL);
276 assert(eventhdlr != NULL);
279 assert(consdata != NULL);
280 assert(consdata->rhsbndchgeventdata.varidx == -1);
283 (
SCIP_EVENTDATA*)&consdata->rhsbndchgeventdata, consdata->rhsbndchgeventdata.filterpos) );
299 assert(scip != NULL);
300 assert(eventhdlr != NULL);
301 assert(cons != NULL);
304 assert(consdata != NULL);
306 for( i = 0; i < consdata->nvars; ++i )
308 if( consdata->vars[i] != NULL )
316 if( consdata->rhsvar != NULL )
330 assert(scip != NULL);
331 assert(event != NULL);
332 assert(eventdata != NULL);
333 assert(eventhdlr != NULL);
336 assert(cons != NULL);
357 assert(scip != NULL);
358 assert(cons != NULL);
361 assert(conshdlrdata != NULL);
364 assert(consdata != NULL);
366 if( consdata->nlrow != NULL )
371 nlpform = conshdlrdata->nlpform;
378 if( consdata->nvars < 100 && conshdlrdata->haveexprint )
390 if( consdata->nvars > 0 )
397 if( consdata->constant != 0.0 )
406 for( i = 0; i < consdata->nvars; ++i )
409 if( consdata->offsets[i] != 0.0 )
415 if( consdata->coefs[i] != 1.0 )
420 if( exprterm != NULL )
432 if( consdata->rhsvar != NULL )
435 if( consdata->rhsoffset != 0.0 )
440 if( consdata->rhscoeff != 1.0 )
483 if( consdata->constant != 0.0 )
492 for( i = 0; i < consdata->nvars; ++i )
495 if( consdata->offsets[i] != 0.0 )
501 if( consdata->coefs[i] != 1.0 )
506 if( exprterm != NULL )
516 if( exprterm != NULL )
524 assert(consdata->nvars == 0);
525 assert(consdata->constant == 0.0);
530 lincoef = -consdata->rhscoeff;
532 -consdata->rhscoeff * consdata->rhsoffset,
533 1, &consdata->rhsvar, &lincoef,
557 consdata->nvars, consdata->vars, 0, NULL,
562 rhs = -consdata->constant;
563 for( i = 0; i < consdata->nvars; ++i )
567 sqrterm.
coef = consdata->coefs[i] * consdata->coefs[i];
570 if( !
SCIPisZero(scip, consdata->offsets[i]) )
572 rhs -= consdata->offsets[i] * consdata->offsets[i];
579 if( rhsvarpos == -1 )
583 assert(rhsvarpos >= 0);
587 sqrterm.
idx1 = rhsvarpos;
588 sqrterm.
idx2 = rhsvarpos;
589 sqrterm.
coef = -consdata->rhscoeff * consdata->rhscoeff;
592 if( consdata->rhsoffset != 0.0 )
594 rhs += consdata->rhsoffset * consdata->rhsoffset;
621 for( i = 0; i < consdata->nvars; ++i )
625 if( consdata->offsets[i] != 0.0 )
642 assert(consdata->rhsvar != NULL);
646 if( consdata->rhscoeff != 1.0 || consdata->rhsoffset != 0.0 )
659 lincoef = -consdata->rhscoeff;
661 -consdata->rhscoeff * consdata->rhsoffset,
662 1, &consdata->rhsvar, &lincoef,
677 SCIPdebugMsg(scip,
"created nonlinear row representation of SOC constraint\n");
697 assert(scip != NULL);
698 assert(cons != NULL);
701 assert(consdata != NULL);
703 consdata->lhsval = consdata->constant;
705 for( i = 0; i < consdata->nvars; ++i )
707 var = consdata->vars[i];
716 val = consdata->coefs[i] * (val + consdata->offsets[i]);
717 consdata->lhsval += val * val;
719 consdata->lhsval =
sqrt(consdata->lhsval);
739 assert(scip != NULL);
740 assert(conshdlr != NULL);
741 assert(cons != NULL);
744 assert(consdata != NULL);
755 consdata->violation = 0.0;
764 consdata->violation = consdata->rhscoeff > 0.0 ? 0.0 :
SCIPinfinity(scip);
769 consdata->violation = consdata->rhscoeff < 0.0 ? 0.0 :
SCIPinfinity(scip);
773 rhs = consdata->rhscoeff * (rhsval + consdata->rhsoffset);
774 consdata->violation = consdata->lhsval - rhs;
775 absviol = consdata->violation;
777 if( consdata->violation <= 0.0 )
780 consdata->violation = 0.0;
805 assert(scip != NULL);
806 assert(conss != NULL || nconss == 0);
808 if( maxviolcons != NULL )
811 for( c = 0; c < nconss; ++c )
814 if( maxviolcons != NULL )
817 assert(consdata != NULL);
818 if( consdata->violation > maxviol &&
SCIPisGT(scip, consdata->violation,
SCIPfeastol(scip)) )
820 maxviol = consdata->violation;
821 *maxviolcons = conss[c];
842 assert(scip != NULL);
843 assert(cons != NULL);
844 assert(rowprep != NULL);
847 assert(consdata != NULL);
856 for( i = 0; i < consdata->nvars; ++i )
858 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
859 val *= consdata->coefs[i] * consdata->coefs[i];
866 (*rowprep)->side /= consdata->lhsval;
867 (*rowprep)->side -= consdata->lhsval - consdata->rhscoeff * consdata->rhsoffset;
888 assert(scip != NULL);
889 assert(cons != NULL);
890 assert(rowprep != NULL);
893 assert(consdata != NULL);
895 lhsval = consdata->constant;
896 for( i = 0; i < consdata->nvars; ++i )
900 val = consdata->coefs[i] * (x[i] + consdata->offsets[i]);
903 lhsval =
sqrt(lhsval);
914 for( i = 0; i < consdata->nvars; ++i )
916 val = x[i] + consdata->offsets[i];
920 val *= consdata->coefs[i] * consdata->coefs[i];
927 (*rowprep)->side /= lhsval;
928 (*rowprep)->side -= lhsval - consdata->rhscoeff * consdata->rhsoffset;
975 assert(scip != NULL);
976 assert(cons != NULL);
977 assert(rowprep != NULL);
980 assert(consdata != NULL);
991 A = consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
992 A /= consdata->lhsval;
994 lambda = (1.0 - A) / (1.0 + A);
998 SCIPdebugMsg(scip,
"A = %g \t lambda = %g\n", A, lambda);
1010 for( i = 0; i < consdata->nvars; ++i )
1012 val =
SCIPgetSolVal(scip, sol, consdata->vars[i]) + consdata->offsets[i];
1013 val *= consdata->coefs[i] * consdata->coefs[i];
1017 val *=
SCIPgetSolVal(scip, sol, consdata->vars[i]) + lambda * consdata->offsets[i];
1020 (*rowprep)->side /= consdata->lhsval;
1021 (*rowprep)->side-= consdata->lhsval;
1022 (*rowprep)->side /= 1.0 - lambda;
1023 (*rowprep)->side -= consdata->rhscoeff * consdata->rhsoffset;
1047 int maxnz, nextmaxnz;
1051 assert(scip != NULL);
1052 assert(conshdlr != NULL);
1053 assert(cons != NULL);
1054 assert(rowprep != NULL);
1057 assert(conshdlrdata != NULL);
1060 assert(consdata != NULL);
1065 if( consdata->nvars <= 3 )
1071 goodefficacy =
MAX((1.0-conshdlrdata->sparsifymaxloss) * consdata->violation, minefficacy);
1079 for( i = 0; i < consdata->nvars; ++i )
1082 dist[i] = ABS(x[i] + consdata->offsets[i]);
1083 dist[i] *= consdata->coefs[i] * consdata->coefs[i];
1091 for( i = 0; i < consdata->nvars - maxnz; ++i )
1092 x[ind[i]] = -consdata->offsets[i];
1101 if( *rowprep != NULL )
1104 if(
SCIPisGT(scip, efficacy, goodefficacy) ||
1105 (maxnz >= consdata->nvars &&
SCIPisGT(scip, efficacy, minefficacy)) )
1108 SCIPdebugMsg(scip,
"accepted cut with %d of %d nonzeros, efficacy = %g\n", maxnz, consdata->nvars, efficacy);
1116 if( maxnz >= consdata->nvars )
1119 nextmaxnz = (int)(conshdlrdata->sparsifynzgrowth * maxnz);
1120 if( nextmaxnz == consdata->nvars - 1)
1121 nextmaxnz = consdata->nvars;
1122 else if( nextmaxnz == maxnz )
1126 for( i =
MAX(0, consdata->nvars - nextmaxnz); i < consdata->nvars - maxnz; ++i )
1127 x[ind[i]] =
SCIPgetSolVal(scip, sol, consdata->vars[ind[i]]);
1161 assert(scip != NULL);
1162 assert(conss != NULL || nconss == 0);
1163 assert(nusefulconss <= nconss);
1164 assert(cutoff != NULL);
1165 assert(success != NULL);
1170 assert(conshdlrdata != NULL);
1176 for( c = 0; c < nconss; ++c )
1179 assert(consdata != NULL);
1188 if( conshdlrdata->sparsify )
1192 else if( conshdlrdata->projectpoint )
1201 if( rowprep == NULL )
1211 if(
SCIPisLE(scip, efficacy, minefficacy) )
1229 if( inenforcement && !conshdlrdata->enfocutsremovable )
1243 if( c >= nusefulconss && *success )
1273 assert(scip != NULL);
1274 assert(conshdlr != NULL);
1275 assert(conss != NULL || nconss == 0);
1276 assert(cutoff != NULL);
1279 if( separatedlpsol != NULL )
1280 *separatedlpsol =
FALSE;
1282 for( c = 0; c < nconss && !(*cutoff); ++c )
1284 assert(conss[c] != NULL);
1290 assert(consdata != NULL);
1301 if( rowprep == NULL )
1307 if( separatedlpsol != NULL )
1317 *separatedlpsol =
TRUE;
1322 if( !addedtolp && !rowprep->
local )
1348 assert(scip != NULL);
1349 assert(event != NULL);
1350 assert(eventdata != NULL);
1351 assert(eventhdlr != NULL);
1363 assert(sol != NULL);
1366 assert(conshdlrdata != NULL);
1376 assert(conss != NULL);
1414 assert(scip != NULL);
1415 assert(conshdlr != NULL);
1416 assert(cons != NULL);
1417 assert(iscutoff != NULL);
1418 assert(isdeleted != NULL);
1424 assert(consdata != NULL);
1427 assert(conshdlrdata != NULL);
1433 haveremovedvar =
FALSE;
1436 for( i = 0; i < consdata->nvars; ++i )
1438 x = consdata->vars[i];
1453 offset = consdata->offsets[i];
1456 SCIPdebugMsg(scip,
" lhs term at position %d is replaced by %g * <%s> + %g\n",
1460 if( coef == 0.0 || x == NULL )
1462 consdata->constant += consdata->coefs[i] * consdata->coefs[i] * offset * offset;
1463 consdata->offsets[i] = 0.0;
1464 haveremovedvar =
TRUE;
1471 consdata->offsets[i] = offset;
1474 consdata->coefs[i] =
REALABS(coef * consdata->coefs[i]);
1475 consdata->offsets[i] /= coef;
1477 consdata->vars[i] = x;
1486 x = consdata->rhsvar;
1503 if( coef == 0.0 || x == NULL )
1506 consdata->rhsoffset += offset;
1513 consdata->rhsoffset = (consdata->rhsoffset + offset) / coef;
1514 consdata->rhscoeff *= coef;
1515 consdata->rhsvar = x;
1528 if( consdata->nlrow != NULL )
1534 if( haveremovedvar )
1541 oldnvars = consdata->nvars;
1542 for( i = 0; i < consdata->nvars; ++i )
1545 while( consdata->nvars && consdata->vars[consdata->nvars-1] == NULL )
1549 if( i == consdata->nvars )
1552 if( consdata->vars[i] != NULL )
1557 assert(consdata->nvars >= 1);
1558 assert(consdata->vars[consdata->nvars-1] != NULL);
1560 consdata->vars[i] = consdata->vars[consdata->nvars-1];
1561 consdata->offsets[i] = consdata->offsets[consdata->nvars-1];
1562 consdata->coefs[i] = consdata->coefs[consdata->nvars-1];
1567 assert(consdata->nvars < oldnvars);
1580 if( consdata->nvars == 0 )
1583 if( consdata->rhsvar == NULL )
1585 if(
SCIPisFeasLE(scip,
sqrt(consdata->constant), consdata->rhscoeff*consdata->rhsoffset) )
1601 sqrt(consdata->constant) - consdata->rhscoeff * consdata->rhsoffset,
SCIPinfinity(scip),
1610 else if( consdata->rhscoeff > 0.0 )
1616 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1618 else if( tightened )
1620 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening lower bound of rhs var\n",
SCIPconsGetName(cons));
1635 SCIPdebugMsg(scip,
"found problem infeasible after fixing all lhs variables in <%s> and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1637 else if( tightened )
1639 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing all lhs variables and tightening upper bound of rhs var\n",
SCIPconsGetName(cons));
1653 if( consdata->rhsvar == NULL )
1655 if( consdata->nvars > 1 )
1663 rhs = consdata->rhscoeff * consdata->rhsoffset;
1664 rhs = rhs * rhs - consdata->constant;
1666 for( i = 0; i < consdata->nvars; ++i )
1668 quadvarterms[i].
var = consdata->vars[i];
1669 quadvarterms[i].
sqrcoef = consdata->coefs[i] * consdata->coefs[i];
1670 if( consdata->offsets[i] != 0.0 )
1672 quadvarterms[i].
lincoef = 2 * consdata->offsets[i] * quadvarterms[i].
sqrcoef;
1673 rhs -= quadvarterms[i].
sqrcoef * consdata->offsets[i]*consdata->offsets[i];
1679 consdata->nvars, quadvarterms, 0, NULL, -
SCIPinfinity(scip), rhs,
1700 -
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1701 +
sqrt(consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset - consdata->constant) - consdata->coefs[0] * consdata->offsets[0],
1715 assert(consdata->nvars == 1);
1716 rhs = consdata->rhscoeff * consdata->rhsoffset;
1720 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables in <%s>\n",
SCIPconsGetName(cons));
1725 rhs -= consdata->constant;
1726 rhs = rhs < 0.0 ? 0.0 :
sqrt(rhs);
1730 SCIP_CALL(
SCIPfixVar(scip, consdata->vars[0], -consdata->offsets[0], iscutoff, &tightened) );
1733 SCIPdebugMsg(scip,
"found problem infeasible after fixing rhs and all except one lhs variables and fixing remaining lhs var in <%s>\n",
SCIPconsGetName(cons));
1735 else if( tightened )
1737 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1742 SCIPdebugMsg(scip,
"remove redundant constraint <%s> after fixing rhs and all except one lhs variables and fixing remaining lhs var\n",
SCIPconsGetName(cons));
1747 rhs /= ABS(consdata->coefs[0]);
1751 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));
1760 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));
1762 else if( tightened )
1767 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));
1778 if( consdata->nvars == 1 &&
SCIPisZero(scip, consdata->constant) )
1784 assert(consdata->rhsvar != NULL);
1786 vars[0] = consdata->vars[0];
1787 vars[1] = consdata->rhsvar;
1788 coefs[0] = consdata->coefs[0];
1789 coefs[1] = -consdata->rhscoeff;
1790 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
1800 coefs[0] = -coefs[0];
1801 rhs = consdata->rhscoeff * consdata->rhsoffset - coefs[0] * consdata->offsets[0];
1843 const char* basename,
1857 assert(scip != NULL);
1858 assert(cons != NULL);
1860 assert(x2 != NULL || !
SCIPisZero(scip, offset2));
1864 assert(basename != NULL);
1866 assert(naddconss != NULL);
1868 SCIPdebugMsg(scip,
"Creating linear Glineur outer-approximation for <%s>.\n", basename);
1869 SCIPdebugMsg(scip,
"sqr(%g(%s+%g)) + sqr(%g(%s+%g)) <= sqr(%g(%s+%g)).\n",
1876 for( i = 1; i <= N; ++i )
1878 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
1883 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
1901 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
1920 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
1937 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
1954 if( infeas ==
TRUE )
1956 SCIPwarningMessage(scip,
"creating glineur outer approximation of SOC3 constraint found problem infeasible.\n");
1962 for( i = 1; i < N; ++i )
1970 vars[2] = avars[i+1];
1973 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
1986 vals[0] = -
sin(val);
1989 vars[2] = bvars[i+1];
1992 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2005 vals[0] = -
sin(val);
2008 vars[2] = bvars[i+1];
2011 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2027 vals[0] = -
cos(val);
2029 vals[1] = -
sin(val);
2033 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2045 for( i = 1; i <= N; ++i )
2076 const char* basename,
2089 assert(scip != NULL);
2090 assert(cons != NULL);
2092 assert(x2 != NULL || !
SCIPisZero(scip, offset2));
2096 assert(basename != NULL);
2098 assert(naddconss != NULL);
2100 SCIPdebugMsg(scip,
"Creating linear Ben-Tal Nemirovski outer-approximation for <%s>.\n", basename);
2106 for( i = 0; i <= N; ++i )
2108 (void)
SCIPsnprintf(varname, 255,
"soc#%s_a%d", basename, i);
2113 (void)
SCIPsnprintf(varname, 255,
"soc#%s_b%d", basename, i);
2125 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, 0);
2141 (void)
SCIPsnprintf(linname, 255,
"soc#%s#A%d", basename, 0);
2159 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, 0);
2175 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, 0);
2199 for( i = 1; i <= N; ++i )
2203 val =
M_PI /
pow(2.0, (
double) (i+1));
2205 vars[0] = avars[i-1];
2207 vars[1] = bvars[i-1];
2212 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, i);
2223 vars[0] = avars[i-1];
2225 vars[1] = bvars[i-1];
2226 vals[1] = -
cos(val);
2230 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2241 vars[0] = avars[i-1];
2242 vals[0] = -
sin(val);
2243 vars[1] = bvars[i-1];
2248 (void)
SCIPsnprintf(linname, 255,
"soc#%s#B%d", basename, i);
2266 (void)
SCIPsnprintf(linname, 255,
"soc#%s#a%d", basename, N);
2278 vals[0] = tan(
M_PI /
pow(2.0, (
double) (N+1)) );
2282 (void)
SCIPsnprintf(linname, 255,
"soc#%s#b%d", basename, i);
2293 for( i = 0; i <= N; ++i )
2323 const char* basename,
2329 SCIP_CALL(
presolveCreateGlineurApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2333 SCIP_CALL(
presolveCreateBenTalNemirovskiApproxDim3(scip, cons, x1, x2, x3, alpha1, alpha2, alpha3, offset1, offset2, offset3, N, basename, naddconss) );
2355 const char* basename,
2357 int soc3_nr_auxvars,
2366 assert(scip != NULL);
2367 assert(lhsvars != NULL);
2368 assert(nlhsvars >= 1);
2369 assert(lhscoefs != NULL);
2370 assert(lhsoffsets != NULL);
2371 assert(rhsvar != NULL);
2372 assert(basename != NULL);
2374 assert(naddconss != NULL);
2380 lhsvars[0], NULL, rhsvar,
2381 lhscoefs[0], 1.0, rhscoeff,
2382 lhsoffsets[0],
sqrt(constant), rhsoffset,
2383 soc3_nr_auxvars, glineur, basename, naddconss) );
2388 if( nlhsvars == 2 &&
SCIPisZero(scip, constant) )
2390 assert(lhsvars[0] != NULL);
2391 assert(lhsvars[1] != NULL);
2392 assert(rhsvar != NULL);
2394 lhsvars[0], lhsvars[1], rhsvar,
2395 lhscoefs[0], lhscoefs[1], rhscoeff,
2396 lhsoffsets[0], lhsoffsets[1], rhsoffset,
2397 soc3_nr_auxvars, glineur, basename, naddconss) );
2402 if( nlhsvars == 3 || (nlhsvars == 2 && !
SCIPisZero(scip, constant)) )
2413 lhsvars[0], lhsvars[1], auxvar1,
2414 lhscoefs[0], lhscoefs[1], 1.0,
2415 lhsoffsets[0], lhsoffsets[1], 0.0,
2416 soc3_nr_auxvars, glineur, name, naddconss) );
2422 lhsvars[2], auxvar1, rhsvar,
2423 lhscoefs[2], 1.0, rhscoeff,
2424 lhsoffsets[2], 0.0, rhsoffset,
2425 soc3_nr_auxvars, glineur, name, naddconss) );
2430 auxvar1, NULL, rhsvar,
2432 0.0,
sqrt(constant), rhsoffset,
2433 soc3_nr_auxvars, glineur, name, naddconss) );
2450 nlhsvars/2, lhsvars, lhscoefs, lhsoffsets,
2452 constant, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2461 nlhsvars-nlhsvars/2, &lhsvars[nlhsvars/2], &lhscoefs[nlhsvars/2], &lhsoffsets[nlhsvars/2],
2463 0.0, name, origcons, soc3_nr_auxvars, glineur, naddconss) );
2468 auxvar1, auxvar2, rhsvar,
2470 0.0, 0.0, rhsoffset,
2471 soc3_nr_auxvars, glineur, name, naddconss) );
2499 assert(scip != NULL);
2500 assert(cons != NULL);
2501 assert(result != NULL);
2502 assert(nchgbds != NULL);
2503 assert(redundant != NULL);
2506 assert(consdata != NULL);
2529 for( i = 0; i < consdata->nvars; ++i )
2534 if( consdata->offsets[i] != 0.0 )
2536 if( consdata->coefs[i] != 1.0 )
2548 if( consdata->rhsoffset != 0.0 )
2550 if( consdata->rhscoeff != 1.0 )
2557 SCIPdebugMsg(scip,
"propagation found constraint <%s> infeasible: lhs = [%.15g,%.15g]-feastol-eps > rhs = [%.15g,%.15g]\n",
2566 SCIPdebugMsg(scip,
"propagation found constraint <%s> redundant: lhs = [%.15g,%.15g] <= rhs = [%.15g,%.15g]\n",
2576 if( consdata->rhscoeff != 1.0 )
2578 if( consdata->rhsoffset != 0.0 )
2597 for( i = 0; i < consdata->nvars; ++i )
2624 assert(consdata->coefs[i] >= 0.0);
2627 if( consdata->coefs[i] != 1.0 )
2629 if( consdata->offsets[i] != 0.0 )
2648 if( consdata->offsets[i] != 0.0 )
2689 assert(scip != NULL);
2690 assert(cons != NULL);
2691 assert(sol != NULL);
2692 assert(success != NULL);
2695 assert(consdata != NULL);
2696 assert(!
SCIPisZero(scip, consdata->rhscoeff));
2700 rhsval = consdata->lhsval / consdata->rhscoeff - consdata->rhsoffset;
2704 if( consdata->rhscoeff > 0.0 )
2796 assert(naddconss != NULL);
2797 assert(ndelconss != NULL);
2798 assert(success != NULL);
2803 if( consdata->nvars < 3 )
2809 if( consdata->rhsvar == NULL )
2822 scale = 1.0 * (consdata->nvars + 1)/4.0;
2830 aggvars[0] = consdata->rhsvar;
2831 scalars[0] = consdata->rhscoeff;
2832 for( i = 0; i < consdata->nvars; ++i )
2836 NULL, NULL, NULL, NULL, NULL) );
2841 NULL, NULL, NULL, NULL, NULL) );
2849 aggvars[1] = disvars[i];
2851 constant = consdata->rhscoeff * consdata->rhsoffset;
2854 assert(!infeas && *success);
2858 assert(!infeas && *success);
2861 lhsvars[0] = difvars[i];
2864 lhsvars[1] = consdata->vars[i];
2865 coefs[1] = scale * 2 * consdata->coefs[i];
2866 offsets[1] = consdata->offsets[i];
2869 SCIP_CALL(
SCIPcreateConsBasicSOC(scip, &discons, name, 2, lhsvars, coefs, offsets, 0.0, sumvars[i], scale, 0.0) );
2878 discoefs[ndisvars] = 1.0;
2881 assert(ndisvars == consdata->nvars);
2898 NULL, NULL, NULL, NULL, NULL) );
2906 aggvars[1] = disvars[i];
2908 constant = consdata->rhscoeff * consdata->rhsoffset;
2910 assert(!infeas && *success);
2914 assert(!infeas && *success);
2917 lhsvars[0] = difvars[ndisvars];
2920 constant = 4.0 * SQR(scale) * consdata->constant;
2923 sumvars[ndisvars], scale, 0.0) );
2929 discoefs[ndisvars] = 1.0;
2934 discoefs[ndisvars] = -1.0 * consdata->rhscoeff;
2935 disvars[ndisvars] = consdata->rhsvar;
2939 consdata->rhscoeff * consdata->rhsoffset) );
2946 for( i = ndisvars - 1; i >= 0; --i )
2988 assert(scip != NULL);
2989 assert(conshdlr != NULL);
2990 assert(conss != NULL || nconss == 0);
2992 assert(result != NULL);
2995 assert(conshdlrdata != NULL);
2999 if( maxviolcons == NULL )
3014 if( conshdlrdata->nenforounds > 100 )
3027 ++conshdlrdata->nenforounds;
3032 conshdlrdata->nenforounds = 0;
3050 for( c = 0; c < nconss; ++c )
3066 SCIPwarningMessage(scip,
"could not enforce feasibility by separating or branching; declaring solution with viol %g feasible\n",
SCIPconsGetData(maxviolcons)->violation);
3077 #ifdef QUADCONSUPGD_PRIORITY 3130 assert(scip != NULL);
3131 assert(cons != NULL);
3132 assert(nupgdconss != NULL);
3133 assert(upgdconss != NULL);
3169 trygeneralupg =
FALSE;
3172 if( nbilinterms > 1 )
3174 trygeneralupg =
TRUE;
3179 if ( nbilinterms == 1 )
3182 bilinvar1 = bilinterm->
var1;
3183 bilinvar2 = bilinterm->
var2;
3184 bilincoef = bilinterm->
coef;
3189 trygeneralupg =
TRUE;
3196 trygeneralupg =
TRUE;
3201 if ( !
SCIPisEQ(scip, bilincoef, -1.0) )
3203 trygeneralupg =
TRUE;
3209 for (i = 0; i < nquadvars; ++i)
3211 term = &quadterms[i];
3215 trygeneralupg =
TRUE;
3221 trygeneralupg =
TRUE;
3229 assert( quadterms != NULL );
3236 for( i = 0; i < nquadvars; ++i )
3238 term = &quadterms[i];
3246 if( lhscount >= nquadvars - 1 )
3252 lhsvars[lhscount] = term->
var;
3262 lhsoffsets[lhscount] = 0.0;
3267 else if( rhsvar != NULL ||
3290 if ( nbilinterms == 1 )
3300 if ( rhsvar != NULL )
3308 if ( *nupgdconss > upgdconsssize )
3311 *nupgdconss = -*nupgdconss;
3328 consvars[0] = bilinvar1;
3329 consvars[1] = bilinvar2;
3330 consvars[2] = auxvarsum;
3345 consvars[0] = bilinvar1;
3346 consvars[1] = bilinvar2;
3347 consvars[2] = auxvardiff;
3362 lhsvars[lhscount] = auxvardiff;
3363 lhscoefs[lhscount] = 0.5;
3364 lhsoffsets[lhscount] = 0.0;
3367 lhscount + 1, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3368 auxvarsum, 0.5, 0.0,
3389 for (i = 0; i < lhscount; ++i)
3397 if( rhsvar != NULL && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3404 if( *nupgdconss > upgdconsssize )
3407 *nupgdconss = -*nupgdconss;
3412 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3413 rhsvar, rhscoef, rhsoffset,
3439 for( i = 0; i < nquadvars; ++i )
3451 if( lhscount >= nquadvars - 1 )
3457 lhsvars[lhscount] = term->
var;
3467 lhsoffsets[lhscount] = 0.0;
3472 else if( rhsvar != NULL ||
3493 if( rhsvar && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3500 if( *nupgdconss > upgdconsssize )
3503 *nupgdconss = -*nupgdconss;
3508 lhscount, lhsvars, lhscoefs, lhsoffsets,
MAX(lhsconstant, 0.0),
3509 rhsvar, rhscoef, rhsoffset,
3531 if( !trygeneralupg )
3536 assert(conshdlr != NULL);
3538 assert(conshdlrdata != NULL);
3540 if( !conshdlrdata->generalsocupg )
3543 SCIPdebugMsg(scip,
"Trying general method of upgrade to a soc const\n");
3548 #ifndef SCIP_STATISTIC 3570 for( i = 0; i < nquadvars; ++i )
3573 a[i*nquadvars + i] = term->
sqrcoef;
3574 quadvars[i] = term->
var;
3578 for( i = 0; i < nbilinterms; ++i )
3590 assert(idx1 != idx2);
3592 a[MIN(idx1,idx2) * nquadvars +
MAX(idx1,idx2)] = bilinterm->
coef / 2.0;
3607 for( i = 0; i < nquadvars; ++i )
3609 for( j = 0; j < nquadvars; ++j )
3612 bp[i] += term->
lincoef * a[i * nquadvars + j];
3626 else if( eigvals[i] > 0.0 )
3633 if( npos + nneg < 3 )
3641 if( !rhsissoc && !lhsissoc )
3644 assert(rhsissoc != lhsissoc);
3652 for( i = 0; i < nquadvars; ++i )
3654 eigvals[i] = -eigvals[i];
3665 rhsvarfound =
FALSE;
3666 for( i = 0; i < nquadvars; ++i )
3671 if( eigvals[i] > 0.0 )
3674 lhsoffsets[lhscount] = bp[i] / (2 * eigvals[i]);
3675 lhsconstant -= bp[i] * bp[i] / (4 * eigvals[i]);
3682 assert(rhsvarfound ==
FALSE);
3684 rhsoffset = bp[i] / (2 * eigvals[i]);
3691 for( j = 0; j < nquadvars; ++j )
3695 if( a[i * nquadvars + j] > 0.0 )
3712 rhsvarlb += a[i * nquadvars + j] * aux;
3714 rhsvarlb += rhsoffset;
3716 for( j = 0; j < nquadvars; ++j )
3720 if( a[i * nquadvars + j] > 0.0 )
3737 rhsvarub += a[i * nquadvars + j] * aux;
3739 rhsvarub += rhsoffset;
3744 if( rhsvarub < rhsvarlb )
3746 assert(
SCIPisEQ(scip, rhsvarub, rhsvarlb));
3755 lhsconstant -= rhsoffset * rhsoffset * eigvals[i];
3756 rhscoef =
SCIPisLE(scip, rhsvarub, 0.0) ? -
sqrt(-eigvals[i]) :
sqrt(-eigvals[i]);
3760 SCIPdebugMsg(scip,
"Failed because rhsvar [%g, %g] changes sign.\n", rhsvarlb, rhsvarub);
3761 rhsvarfound =
FALSE;
3767 if( rhsvarfound && lhscount >= 2 && !
SCIPisNegative(scip, lhsconstant) )
3778 if( *nupgdconss > upgdconsssize )
3781 *nupgdconss = -*nupgdconss;
3787 for( i = 0; i < nquadvars; ++i )
3789 if( eigvals[i] <= 0.0 )
3797 lhsoffsets[lhsnvars], &infeas, &success) );
3799 if( infeas || !success )
3804 for( j = 0; j <= lhsnvars; ++j )
3811 assert(lhsnvars == lhscount);
3812 assert(negeigpos >= 0);
3818 rhsoffset, &infeas, &success) );
3820 if( infeas || !success )
3826 for( j = 0; j < lhsnvars; ++j )
3836 rhsvar, rhscoef * UPGSCALE, 0.0,
3844 for( i = 0; i < lhsnvars; ++i )
3880 SCIPdebugMsg(scip,
"Failed because there are not enough lhsvars (%d)\n", lhscount);
3884 SCIPdebugMsg(scip,
"Failed because lhsconstant is negative (%g)\n", lhsconstant);
3910 assert(scip != NULL);
3911 assert(conshdlr != NULL);
3928 assert( scip != NULL );
3929 assert( conshdlr != NULL );
3933 assert(conshdlrdata != NULL);
3948 assert(scip != NULL);
3949 assert(conshdlr != NULL);
3950 assert(conss != NULL || nconss == 0);
3953 assert(conshdlrdata != NULL);
3955 conshdlrdata->subnlpheur =
SCIPfindHeur(scip,
"subnlp");
3956 conshdlrdata->trysolheur =
SCIPfindHeur(scip,
"trysol");
3960 for( c = 0; c < nconss; ++c )
3975 assert(scip != NULL);
3976 assert(conshdlr != NULL);
3979 assert(conshdlrdata != NULL);
3981 conshdlrdata->subnlpheur = NULL;
3982 conshdlrdata->trysolheur = NULL;
3983 conshdlrdata->haveexprint =
FALSE;
3994 assert(scip != NULL);
3995 assert(conshdlr != NULL);
3996 assert(conss != NULL || nconss == 0);
3999 for( c = 0; c < nconss; ++c )
4020 assert(scip != NULL);
4021 assert(conshdlr != NULL);
4024 assert(conshdlrdata != NULL);
4025 assert(conshdlrdata->eventhdlr != NULL);
4030 for( c = 0; c < nconss; ++c )
4035 assert(consdata != NULL);
4037 if( consdata->nlrow == NULL )
4040 assert(consdata->nlrow != NULL);
4047 conshdlrdata->newsoleventfilterpos = -1;
4053 assert(eventhdlr != NULL);
4059 conshdlrdata->sepanlp =
FALSE;
4060 conshdlrdata->lastenfonode = NULL;
4061 conshdlrdata->nenforounds = 0;
4075 assert(scip != NULL);
4076 assert(conshdlr != NULL);
4079 assert(conshdlrdata != NULL);
4080 assert(conshdlrdata->eventhdlr != NULL);
4082 if( conshdlrdata->newsoleventfilterpos >= 0 )
4087 assert(eventhdlr != NULL);
4090 conshdlrdata->newsoleventfilterpos = -1;
4093 for( c = 0; c < nconss; ++c )
4096 assert(consdata != NULL);
4099 if( consdata->nlrow != NULL )
4115 assert(scip != NULL);
4116 assert(conshdlr != NULL);
4117 assert(cons != NULL);
4118 assert(consdata != NULL);
4119 assert(*consdata != NULL);
4129 assert(conshdlrdata != NULL);
4134 for( i = 0; i < (*consdata)->nvars; ++i )
4142 assert((*consdata)->lhsbndchgeventdata == NULL);
4144 if( (*consdata)->rhsvar != NULL )
4152 if( (*consdata)->nlrow != NULL )
4173 assert(scip != NULL);
4174 assert(conshdlr != NULL);
4176 assert(sourcecons != NULL);
4177 assert(targetcons != NULL);
4181 assert(conshdlrdata != NULL);
4187 assert(sourcedata != NULL);
4188 assert(sourcedata->vars != NULL);
4189 assert(sourcedata->coefs != NULL);
4190 assert(sourcedata->offsets != NULL);
4195 consdata->nvars = sourcedata->nvars;
4198 for( i = 0; i < consdata->nvars; ++i )
4205 consdata->constant = sourcedata->constant;
4208 consdata->rhsoffset = sourcedata->rhsoffset;
4209 consdata->rhscoeff = sourcedata->rhscoeff;
4213 consdata->nlrow = NULL;
4214 consdata->lhsbndchgeventdata = NULL;
4215 consdata->isapproxadded =
FALSE;
4240 assert(scip != NULL);
4241 assert(conshdlr != NULL);
4242 assert(conss != NULL || nconss == 0);
4243 assert(result != NULL);
4248 assert(conshdlrdata != NULL);
4251 if( maxviolcon == NULL )
4257 if(
SCIPgetDepth(scip) == 0 && !conshdlrdata->sepanlp &&
4271 if( conshdlrdata->subnlpheur != NULL )
4286 SCIPdebugMsg(scip,
"solved NLP relax, solution status: %d\n", solstat);
4291 conshdlrdata->sepanlp =
TRUE;
4295 SCIPdebugMsg(scip,
"NLP relaxation is globally infeasible, thus can cutoff node\n");
4307 assert(nlpsol != NULL);
4310 if( solvednlp && conshdlrdata->trysolheur != NULL )
4319 if( nfracvars == 0 )
4336 if( lpsolseparated )
4338 SCIPdebugMsg(scip,
"linearization cuts separate LP solution\n");
4353 else if ( sepasuccess )
4368 assert(scip != NULL);
4369 assert(conss != NULL || nconss == 0);
4370 assert(result != NULL);
4371 assert(sol != NULL);
4376 if( maxviolcon == NULL )
4382 else if ( sepasuccess )
4415 assert(scip != NULL);
4416 assert(conss != NULL || nconss == 0);
4417 assert(result != NULL);
4421 if( maxviolcons == NULL )
4441 assert(scip != NULL);
4442 assert(conshdlr != NULL);
4444 assert(conss != NULL || nconss == 0);
4445 assert(result != NULL );
4448 assert(conshdlrdata != NULL);
4453 dolinfeasshift = conshdlrdata->linfeasshift && (conshdlrdata->trysolheur != NULL);
4456 for( c = 0; c < nconss; ++c )
4461 assert(consdata != NULL);
4469 if( consdata->violation > maxviol )
4470 maxviol = consdata->violation;
4476 unscaledviol = consdata->lhsval;
4478 unscaledviol -= consdata->rhscoeff * (
SCIPgetSolVal(scip, sol, consdata->rhsvar) + consdata->rhsoffset);
4481 SCIPinfoMessage(scip, NULL,
";\n\tviolation: %g (scaled: %g)\n", unscaledviol, consdata->violation);
4485 if( dolinfeasshift )
4494 if( polishedsol == NULL )
4509 dolinfeasshift = success;
4513 dolinfeasshift =
FALSE;
4519 if( !dolinfeasshift && (conshdlrdata->subnlpheur == NULL || sol == NULL) && !completely )
4524 if( !dolinfeasshift && polishedsol != NULL )
4529 if( polishedsol != NULL )
4553 assert(scip != NULL);
4554 assert(conss != NULL || ((nconss == 0) && (nmarkedconss == 0)));
4555 assert(result != NULL);
4560 for( c = 0; c < nmarkedconss && *result !=
SCIP_CUTOFF; ++c )
4564 *result = propresult;
4582 assert(scip != NULL);
4583 assert(conss != NULL || nconss == 0);
4584 assert(conshdlr != NULL);
4585 assert(result != NULL);
4590 assert(conshdlrdata != NULL);
4592 for( c = 0; c < nconss; ++c )
4595 assert(consdata != NULL);
4610 if( conshdlrdata->nauxvars > 0 && !consdata->isapproxadded && consdata->nvars > 1 )
4613 consdata->rhsvar, consdata->rhscoeff, consdata->rhscoeff, consdata->constant,
SCIPconsGetName(conss[c]), conss[c],
4614 conshdlrdata->nauxvars, conshdlrdata->glineur, naddconss) );
4615 consdata->isapproxadded =
TRUE;
4623 switch( propresult )
4672 assert(scip != NULL);
4673 assert(conshdlr != NULL);
4674 assert(cons != NULL);
4677 assert(consdata != NULL);
4682 for( i = 0; i < consdata->nvars; ++i )
4688 if( consdata->rhsvar != NULL )
4690 SCIP_CALL(
SCIPaddVarLocks(scip, consdata->rhsvar, consdata->rhscoeff > 0.0 ? nlockspos : nlocksneg, consdata->rhscoeff > 0.0 ? nlocksneg : nlockspos) );
4703 assert(scip != NULL);
4704 assert(conshdlr != NULL);
4705 assert(cons != NULL);
4709 assert(consdata != NULL);
4712 if( consdata->constant != 0.0 )
4717 for( i = 0; i < consdata->nvars; ++i )
4725 if( consdata->rhsvar != NULL )
4733 SCIPinfoMessage(scip, file,
"%.15g", consdata->rhscoeff*consdata->rhsoffset);
4748 assert(scip != NULL);
4749 assert(cons != NULL);
4750 assert(sourcescip != NULL);
4751 assert(sourceconshdlr != NULL);
4752 assert(sourcecons != NULL);
4753 assert(varmap != NULL);
4754 assert(valid != NULL);
4755 assert(stickingatnode ==
FALSE);
4758 assert(consdata != NULL);
4765 for( i = 0; i < consdata->nvars && *valid; ++i )
4768 assert(!(*valid) || vars[i] != NULL);
4775 assert(!(*valid) || rhsvar != NULL);
4782 consdata->nvars, vars, consdata->coefs, consdata->offsets, consdata->constant,
4783 rhsvar, consdata->rhscoeff, consdata->rhsoffset,
4784 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
4811 assert(scip != NULL);
4812 assert(success != NULL);
4813 assert(str != NULL);
4814 assert(name != NULL);
4815 assert(cons != NULL);
4818 if( strncmp(str,
"sqrt( ", 6) != 0 )
4841 while( *str !=
'\0' )
4844 while( isspace((
int)*str) )
4848 if( strncmp(str,
"+ (", 3) != 0 )
4862 if( strncmp(str,
"*(", 2) != 0 )
4889 if( strncmp(str,
"))^2", 4) != 0 )
4897 if( varssize <= nvars )
4905 coefs[nvars] = coef;
4906 offsets[nvars] = offset;
4910 if( strncmp(str,
") <=", 4) != 0 )
4923 while( isspace((
int)*str) )
4934 while( isspace((
int)*str) )
4943 if( strncmp(str,
"*(", 2) != 0 )
4958 if( rhsvar == NULL )
4995 rhsoffset = rhscoef;
5002 assert(!stickingatnode);
5003 SCIP_CALL(
SCIPcreateConsSOC(scip, cons, name, nvars, vars, coefs, offsets, constant, rhsvar, rhscoef, rhsoffset,
5004 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable) );
5021 assert(consdata != NULL);
5023 if( varssize < consdata->nvars + 1 )
5028 vars[consdata->nvars] = consdata->rhsvar;
5041 assert(cons != NULL);
5044 assert(consdata != NULL);
5046 (*nvars) = consdata->nvars + 1;
5067 conshdlrdata->subnlpheur = NULL;
5068 conshdlrdata->trysolheur = NULL;
5071 "signals a bound change to a second order cone constraint",
5072 processVarEvent, NULL) );
5073 conshdlrdata->eventhdlr = eventhdlr;
5076 "handles the event that a new primal solution has been found",
5077 processNewSolutionEvent, NULL) );
5082 consEnfolpSOC, consEnfopsSOC, consCheckSOC, consLockSOC,
5084 assert(conshdlr != NULL);
5114 "whether the reference point of a cut should be projected onto the feasible set of the SOC constraint",
5115 &conshdlrdata->projectpoint,
TRUE,
FALSE, NULL, NULL) );
5118 "number of auxiliary variables to use when creating a linear outer approx. of a SOC3 constraint; 0 to turn off",
5119 &conshdlrdata->nauxvars,
FALSE, 0, 0, INT_MAX, NULL, NULL) );
5122 "whether the Glineur Outer Approximation should be used instead of Ben-Tal Nemirovski",
5123 &conshdlrdata->glineur,
FALSE,
TRUE, NULL, NULL) );
5126 "whether to sparsify cuts",
5127 &conshdlrdata->sparsify,
TRUE,
FALSE, NULL, NULL) );
5130 "maximal loss in cut efficacy by sparsification",
5131 &conshdlrdata->sparsifymaxloss,
TRUE, 0.2, 0.0, 1.0, NULL, NULL) );
5134 "growth rate of maximal allowed nonzeros in cuts in sparsification",
5135 &conshdlrdata->sparsifynzgrowth,
TRUE, 1.3, 1.000001,
SCIPinfinity(scip), NULL, NULL) );
5138 "whether to try to make solutions feasible in check by shifting the variable on the right hand side",
5139 &conshdlrdata->linfeasshift,
FALSE,
TRUE, NULL, NULL) );
5142 "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)",
5143 &conshdlrdata->nlpform,
FALSE,
'a',
"aqsed", NULL, NULL) );
5146 "minimal required fraction of continuous variables in problem to use solution of NLP relaxation in root for separation",
5147 &conshdlrdata->sepanlpmincont,
FALSE, 1.0, 0.0, 2.0, NULL, NULL) );
5150 "are cuts added during enforcement removable from the LP in the same node?",
5151 &conshdlrdata->enfocutsremovable,
TRUE,
FALSE, NULL, NULL) );
5154 "try to upgrade more general quadratics to soc?",
5155 &conshdlrdata->generalsocupg,
TRUE,
TRUE, NULL, NULL) );
5158 "try to completely disaggregate soc?",
5159 &conshdlrdata->disaggregate,
TRUE,
TRUE, NULL, NULL) );
5206 assert(scip != NULL);
5207 assert(cons != NULL);
5208 assert(modifiable ==
FALSE);
5212 if( conshdlr == NULL )
5218 assert(vars != NULL);
5220 assert(constant >= 0.0);
5229 consdata->nvars = nvars;
5231 for( i = 0; i < nvars; ++i )
5239 for( i = 0; i < nvars; ++i )
5241 if( consdata->coefs[i] < 0.0 )
5242 consdata->coefs[i] = -consdata->coefs[i];
5248 for( i = 0; i < nvars; ++i )
5249 consdata->coefs[i] = 1.0;
5252 if( offsets != NULL )
5262 consdata->constant = constant;
5263 consdata->rhsvar = rhsvar;
5264 consdata->rhscoeff = rhscoeff;
5265 consdata->rhsoffset = rhsoffset;
5267 if( rhsvar != NULL )
5272 consdata->nlrow = NULL;
5274 consdata->lhsbndchgeventdata = NULL;
5275 consdata->isapproxadded =
FALSE;
5278 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
5279 local, modifiable, dynamic, removable,
FALSE) );
5284 assert(conshdlrdata != NULL);
5312 rhsvar, rhscoeff, rhsoffset,
5327 assert(cons != NULL);
5328 assert(nlrow != NULL);
5331 assert(consdata != NULL);
5333 if( consdata->nlrow == NULL )
5337 assert(consdata->nlrow != NULL);
5338 *nlrow = consdata->nlrow;
5349 assert(cons != NULL);
5361 assert(cons != NULL);
5373 assert(cons != NULL);
5385 assert(cons != NULL);
5397 assert(cons != NULL);
5409 assert(cons != NULL);
5421 assert(cons != NULL);
5433 assert(cons != NULL);
5463 assert(scip != NULL);
5464 assert(cons != NULL);
5465 assert(nlpi != NULL);
5466 assert(nlpiprob != NULL);
5467 assert(scipvar2nlpivar != NULL);
5470 assert(consdata != NULL);
5473 rhs = -consdata->constant;
5476 nlininds = consdata->rhsoffset != 0.0 ? 1 : 0;
5477 for( j = 0; j < consdata->nvars; ++j )
5478 if( consdata->offsets[j] != 0.0 )
5490 nquadelems = consdata->nvars + 1;
5493 for( j = 0; j < consdata->nvars; ++j )
5496 quadelems[j].
idx2 = quadelems[j].
idx1;
5497 quadelems[j].
coef = consdata->coefs[j] * consdata->coefs[j];
5499 if( consdata->offsets[j] != 0.0 )
5501 assert(lininds != NULL);
5502 assert(linvals != NULL);
5503 lininds[lincnt] = quadelems[j].
idx1;
5504 linvals[lincnt] = 2 * quadelems[j].
coef * consdata->offsets[j];
5507 rhs -= quadelems[j].
coef * consdata->offsets[j] * consdata->offsets[j];
5511 quadelems[consdata->nvars].
idx2 = quadelems[consdata->nvars].
idx1;
5512 quadelems[consdata->nvars].
coef = - consdata->rhscoeff * consdata->rhscoeff;
5514 if( consdata->rhsoffset != 0.0 )
5516 assert(lininds != NULL);
5517 assert(linvals != NULL);
5518 lininds[lincnt] = quadelems[consdata->nvars].
idx1;
5519 linvals[lincnt] = -2.0 * consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset;
5522 rhs += consdata->rhscoeff * consdata->rhscoeff * consdata->rhsoffset * consdata->rhsoffset;
5525 assert(lincnt == nlininds);
5531 &nlininds, &lininds, &linvals,
5532 &nquadelems, &quadelems,
5533 NULL, NULL, &name) );
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)
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)
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_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
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)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
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_Real SCIPgetRowprepViolation(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol)
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_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
static SCIP_RETCODE propagateBounds(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result, int *nchgbds, SCIP_Bool *redundant)
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)
SCIP_Real SCIPgetSepaMinEfficacy(SCIP *scip)
static SCIP_DECL_CONSGETVARS(consGetVarsSOC)
static SCIP_RETCODE generateCutSol(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_ROWPREP **rowprep)
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 SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
#define CONSHDLR_MAXPREROUNDS
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)
SCIP_Real SCIPlpfeastol(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)
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.
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
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)