Skip to content

Commit 94492d4

Browse files
committed
Merge branch 'debug_sol_for_subscips' into 'master'
Add SCIPdebugClearSol() See merge request integer/scip!3472
2 parents 8029662 + ab48274 commit 94492d4

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Interface changes
3636
- SCIPclearSymgraph() and SCIPcopySymgraphAsSubgraph() to clear and copy as symmetry detection graph, respectively
3737
- SCIPincludeSepaMultilinear() to include the new multilinear cut separator
3838
- SCIPhypergraphCreate(), SCIPhypergraphClear(), SCIPhypergraphFree(), SCIPhypergraphAddVertex(), SCIPhypergraphAddEdge(), SCIPhypergraphIsValid() and SCIPhypergraphComputeVerticesEdges() for building and deleting hypergraphs, SCIPhypergraphComputeOverlaps(), SCIPhypergraphOverlapFind(), SCIPhypergraphIntersectEdges(), SCIPhypergraphComputeOverlapsEdges(), SCIPhypergraphComputeVerticesOverlaps(), SCIPhypergraphOverlapsDisjoint() to deal with pair-wise intersections of hyperedges, SCIPhypergraphIterInit(), SCIPhypergraphIterClear(), SCIPhypergraphIterStart(), SCIPhypergraphIterValid(), SCIPhypergraphIterNext(), SCIPhypergraphIterBase(), SCIPhypergraphIterAdjacent(), SCIPhypergraphIterMinVertex(), SCIPhypergraphIterOverlap() for iterating over adjacent edges, SCIPhypergraphHasVertexEdges() SCIPhypergraphHasOverlaps(), SCIPhypergraphHasOverlapsEdges(), SCIPhypergraphHasVertexOverlaps(), SCIPhypergraphGetNVertices(), SCIPhypergraphGetNEdges(), SCIPhypergraphBlkmem(), SCIPhypergraphGetNOverlaps(), SCIPhypergraphVertexData(), SCIPhypergraphEdgeData(), SCIPhypergraphEdgeSize(), SCIPhypergraphEdgeVertices(), SCIPhypergraphVertexEdgesFirst(), SCIPhypergraphVertexEdgesBeyond(), SCIPhypergraphVertexEdgesGetAtIndex(), SCIPhypergraphOverlapData(), SCIPhypergraphOverlapSize(), SCIPhypergraphOverlapVertices() SCIPhypergraphEdgesOverlapsFirst(), SCIPhypergraphEdgesOverlapsBeyond(), SCIPhypergraphEdgesOverlapsGetAtIndex(), SCIPhypergraphOverlapsEdgesFirst(), SCIPhypergraphOverlapsEdgesBeyond(), SCIPhypergraphOverlapsEdgesGetAtIndex(), SCIPhypergraphVertexOverlapsFirst(), SCIPhypergraphVertexOverlapsBeyond() and SCIPhypergraphVertexOverlapsGetAtIndex() to query information about vertices, edges and overlaps as well as their incidences.
39+
- SCIPdebugClearSol() for clearing the debug solution
3940

4041
### Command line interface
4142

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set(SCIP_VERSION_MAJOR 10)
1717
set(SCIP_VERSION_MINOR 0)
1818
set(SCIP_VERSION_PATCH 0)
1919
set(SCIP_VERSION_SUB 0)
20-
set(SCIP_VERSION_API 120)
20+
set(SCIP_VERSION_API 121)
2121

2222
project(SCIP
2323
VERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR}.${SCIP_VERSION_PATCH}.${SCIP_VERSION_SUB}

make/make.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ SCIP_VERSION_MAJOR = 10
9797
SCIP_VERSION_MINOR = 0
9898
SCIP_VERSION_PATCH = 0
9999
SCIP_VERSION_SUB = 0
100-
SCIP_VERSION_API = 120
100+
SCIP_VERSION_API = 121
101101
SCIP_VERSION = $(SCIP_VERSION_MAJOR).$(SCIP_VERSION_MINOR).$(SCIP_VERSION_PATCH).$(SCIP_VERSION_SUB)
102102

103103
# compiling and linking parameters

src/scip/debug.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,35 @@ SCIP_RETCODE SCIPdebugFreeSol(
717717
return SCIP_OKAY;
718718
}
719719

720+
/** clears the debug solution */
721+
SCIP_RETCODE SCIPdebugClearSol(
722+
SCIP* scip /**< SCIP data structure */
723+
)
724+
{
725+
SCIP_DEBUGSOLDATA* debugsoldata;
726+
int s;
727+
728+
assert(scip != NULL);
729+
730+
debugsoldata = SCIPsetGetDebugSolData(scip->set);
731+
assert(debugsoldata != NULL);
732+
733+
if( debugsoldata->debugsol != NULL )
734+
{
735+
SCIP_CALL( SCIPfreeSol(scip, &debugsoldata->debugsol) );
736+
}
737+
SCIP_CALL( SCIPcreateOrigSol(scip, &debugsoldata->debugsol, NULL) );
738+
739+
for( s = debugsoldata->nsolvals - 1; s >= 0; --s )
740+
BMSfreeMemoryArrayNull(&(debugsoldata->solnames[s]));
741+
742+
debugsoldata->nsolvals = 0;
743+
debugsoldata->debugsolval= 0.0;
744+
debugsoldata->solisachieved = FALSE;
745+
746+
return SCIP_OKAY;
747+
}
748+
720749
/** resets the data structure after restart */
721750
SCIP_RETCODE SCIPdebugReset(
722751
SCIP_SET* set

src/scip/debug.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ SCIP_RETCODE SCIPdebugFreeSol(
7070
SCIP_SET* set
7171
);
7272

73+
/** clears the debug solution */
74+
SCIP_RETCODE SCIPdebugClearSol(
75+
SCIP* scip /**< SCIP data structure */
76+
);
77+
7378
/** resets the data structure after restart */
7479
SCIP_RETCODE SCIPdebugReset(
7580
SCIP_SET* set

0 commit comments

Comments
 (0)