Skip to content

Commit 2dd3799

Browse files
authored
Merge pull request #428 from AntoinePrv/NTotalNodes
Bind SCIPgetNTotalNodes
2 parents ae5642f + 09c6c03 commit 2dd3799

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/pyscipopt/scip.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ cdef extern from "scip/scip.h":
12021202
# Statistic Methods
12031203
SCIP_RETCODE SCIPprintStatistics(SCIP* scip, FILE* outfile)
12041204
SCIP_Longint SCIPgetNNodes(SCIP* scip)
1205+
SCIP_Longint SCIPgetNTotalNodes(SCIP* scip)
12051206
SCIP_Longint SCIPgetNFeasibleLeaves(SCIP* scip)
12061207
SCIP_Longint SCIPgetNInfeasibleLeaves(SCIP* scip)
12071208
SCIP_Longint SCIPgetNLPs(SCIP* scip)

src/pyscipopt/scip.pyx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,13 @@ cdef class Model:
10761076
return SCIPgetNLPIterations(self._scip)
10771077

10781078
def getNNodes(self):
1079-
"""Retrieve the total number of processed nodes."""
1079+
"""gets number of processed nodes in current run, including the focus node."""
10801080
return SCIPgetNNodes(self._scip)
10811081

1082+
def getNTotalNodes(self):
1083+
"""gets number of processed nodes in all runs, including the focus node."""
1084+
return SCIPgetNTotalNodes(self._scip)
1085+
10821086
def getNFeasibleLeaves(self):
10831087
"""Retrieve number of leaf nodes processed with feasible relaxation solution."""
10841088
return SCIPgetNFeasibleLeaves(self._scip)

0 commit comments

Comments
 (0)