Skip to content

Commit 64aa9bc

Browse files
svigerskestephenjmaher
authored andcommitted
add some asserts for earlier fail when using fixed vars in MIR of optcuts
- check earlier that variables problem index is nonnegative - MIR routine seems to require that variables are active
1 parent cc662c1 commit 64aa9bc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/scip/benderscut_opt.c

+1
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ SCIP_RETCODE computeMIRForOptimalityCut(
309309
for( i = 0; i < nvars; i++ )
310310
{
311311
rowinds[i] = SCIPvarGetProbindex(vars[i]);
312+
assert(rowinds[i] >= 0);
312313
rowvals[i] = -vals[i];
313314
}
314315

src/scip/cuts.c

+1
Original file line numberDiff line numberDiff line change
@@ -9275,6 +9275,7 @@ SCIP_RETCODE constructSNFRelaxation(
92759275

92769276
probidx = rowinds[i];
92779277
/* variable should be binary */
9278+
assert(probidx >= 0);
92789279
assert(probidx < nbinvars);
92799280

92809281
/* binary variable was processed together with a non-binary variable */

0 commit comments

Comments
 (0)