Skip to content

Commit c451d48

Browse files
committed
fix forgotten stuff
1 parent 3412228 commit c451d48

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/pyscipopt/scip.pxi

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,37 @@ cdef class Variable(Expr):
18041804
mayround = SCIPvarMayRoundUp(self.scip_var)
18051805
return mayround
18061806

1807+
def getNBranchings(self, branchdir):
1808+
"""
1809+
returns the number of times a bound of the variable was changed in given direction due to branching
1810+
1811+
Parameters
1812+
----------
1813+
branchdir : PY_SCIP_BRANCHDIR
1814+
branching direction (downwards, or upwards)
1815+
1816+
Returns
1817+
-------
1818+
int
1819+
"""
1820+
return SCIPvarGetNBranchings(self.scip_var, branchdir)
1821+
1822+
def getNBranchingsCurrentRun(self, branchdir):
1823+
"""
1824+
returns the number of times a bound of the variable was changed in given direction due to branching in the
1825+
current run
1826+
1827+
Parameters
1828+
----------
1829+
branchdir : PY_SCIP_BRANCHDIR
1830+
branching direction (downwards, or upwards)
1831+
1832+
Returns
1833+
-------
1834+
int
1835+
"""
1836+
return SCIPvarGetNBranchingsCurrentRun(self.scip_var, branchdir)
1837+
18071838
class MatrixVariable(MatrixExpr):
18081839

18091840
def vtype(self):

0 commit comments

Comments
 (0)