Skip to content

Commit c952b3a

Browse files
MaximSmolskiysvigerske
authored andcommitted
Fix max matrix size in SCIPexprComputeQuadraticCurvature
1 parent e2237d4 commit c952b3a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/scip/expr.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3681,10 +3681,10 @@ SCIP_RETCODE SCIPexprComputeQuadraticCurvature(
36813681
n = quaddata->nquadexprs;
36823682

36833683
/* do not check curvature if nn will be too large
3684-
* we want nn * sizeof(real) to fit into an unsigned int, so n must be <= sqrt(unit_max/sizeof(real))
3685-
* sqrt(2*214748364/8) = 7327.1475350234
3684+
* we want nn * sizeof(real) to fit into an unsigned int, so n must be <= sqrt(uint_max/sizeof(real))
3685+
* sqrt(4294967295/8) = 23170.47500322339
36863686
*/
3687-
if( n > 7000 )
3687+
if( n > 23000 )
36883688
{
36893689
SCIPmessageFPrintVerbInfo(messagehdlr, set->disp_verblevel, SCIP_VERBLEVEL_FULL, NULL,
36903690
"number of quadratic variables is too large (%d) to check the curvature\n", n);

src/scip/nlhdlr_soc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ SCIP_RETCODE detectSocQuadraticComplex(
21482148
}
21492149

21502150
/* check that nvars*nvars doesn't get too large, see also SCIPcomputeExprQuadraticCurvature() */
2151-
if( nvars > 7000 )
2151+
if( nvars > 23000 )
21522152
{
21532153
SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "nlhdlr_soc - number of quadratic variables is too large (%d) to check the curvature\n", nvars);
21542154
SCIPfreeBufferArray(scip, &occurringexprs);

0 commit comments

Comments
 (0)