Skip to content

Commit

Permalink
Merge branch 'fix-debug-sol' into 'v92-bugfix'
Browse files Browse the repository at this point in the history
fix check whether a debug solution has been read already

See merge request integer/scip!3722
  • Loading branch information
svigerske committed Mar 2, 2025
2 parents 6b4c457 + 13074a4 commit 322e589
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/scip/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ SCIP_Bool debugSolutionAvailable(
assert(set != NULL);

debugsoldata = SCIPsetGetDebugSolData(set);
assert(debugsoldata != NULL);

/* check whether a debug solution is specified */
if( strcmp(set->misc_debugsol, "-") == 0 )
Expand Down Expand Up @@ -348,13 +349,15 @@ SCIP_RETCODE readSolution(

assert(set != NULL);

debugsoldata = SCIPsetGetDebugSolData(set);

/* check whether a debug solution is available */
if( !debugSolutionAvailable(set) )
return SCIP_OKAY;

if( debugsoldata == NULL || debugsoldata->nsolvals > 0 )
debugsoldata = SCIPsetGetDebugSolData(set);
assert(debugsoldata != NULL);

/* check whether no debug solution is read */
if( debugsoldata->debugsol != NULL )
return SCIP_OKAY;

SCIP_CALL( readSolfile(set, set->misc_debugsol, &debugsoldata->debugsol, &debugsoldata->debugsolval,
Expand Down

0 comments on commit 322e589

Please sign in to comment.