@@ -3909,6 +3909,30 @@ SCIP_RETCODE reformulateFactorizedBinaryQuadratic(
3909
3909
SCIP_CALL( SCIPcreateVarBasic(scip, &auxvar, name, minact, maxact, 0.0, integral ? SCIP_VARTYPE_IMPLINT : SCIP_VARTYPE_CONTINUOUS) );
3910
3910
SCIP_CALL( SCIPaddVar(scip, auxvar) );
3911
3911
3912
+ #ifdef WITH_DEBUG_SOLUTION
3913
+ if( SCIPdebugIsMainscip(scip) )
3914
+ {
3915
+ SCIP_Real debugsolval; /* value of auxvar in debug solution */
3916
+ SCIP_Real val;
3917
+
3918
+ /* compute value of new variable in debug solution */
3919
+ /* first \sum_j c_{ij} x_j (coefs[j] * vars[j]) */
3920
+ debugsolval = 0.0;
3921
+ for( i = 0; i < nvars; ++i )
3922
+ {
3923
+ SCIP_CALL( SCIPdebugGetSolVal(scip, vars[i], &val) );
3924
+ debugsolval += coefs[i] * val;
3925
+ }
3926
+
3927
+ /* now multiply by x_i (facvar) */
3928
+ SCIP_CALL( SCIPdebugGetSolVal(scip, facvar, &val) );
3929
+ debugsolval *= val;
3930
+
3931
+ /* store debug solution value of auxiliary variable */
3932
+ SCIP_CALL( SCIPdebugAddSolVal(scip, auxvar, debugsolval) );
3933
+ }
3934
+ #endif
3935
+
3912
3936
/* create and add z - maxact x <= 0 */
3913
3937
if( !SCIPisZero(scip, maxact) )
3914
3938
{
@@ -4213,6 +4237,25 @@ SCIP_RETCODE getBinaryProductExprDo(
4213
4237
SCIP_CALL( SCIPaddVar(scip, w) );
4214
4238
SCIPdebugMsg(scip, " created auxiliary variable %s\n", name);
4215
4239
4240
+ #ifdef WITH_DEBUG_SOLUTION
4241
+ if( SCIPdebugIsMainscip(scip) )
4242
+ {
4243
+ SCIP_Real debugsolval; /* value of auxvar in debug solution */
4244
+ SCIP_Real val;
4245
+
4246
+ /* compute value of new variable in debug solution (\prod_i vars[i]) */
4247
+ debugsolval = 1.0;
4248
+ for( i = 0; i < nchildren; ++i )
4249
+ {
4250
+ SCIP_CALL( SCIPdebugGetSolVal(scip, vars[i], &val) );
4251
+ debugsolval *= val;
4252
+ }
4253
+
4254
+ /* store debug solution value of auxiliary variable */
4255
+ SCIP_CALL( SCIPdebugAddSolVal(scip, w, debugsolval) );
4256
+ }
4257
+ #endif
4258
+
4216
4259
/* use variable bound constraints if it is a bilinear product and there is no empathy for an AND constraint */
4217
4260
if( nchildren == 2 && !empathy4and )
4218
4261
{
0 commit comments