Skip to content

Commit ad26a0a

Browse files
committed
SCIPgetNLPBranchCands
1 parent b4a70f5 commit ad26a0a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Added SCIP_LOCKTYPE, addVarLocksType(), getNLocksDown(), getNLocksUp(), getNLocksDownType(), getNLocksUpType(), and tests
99
- Added addMatrixConsIndicator(), and tests
1010
- Added SCIPvarMarkRelaxationOnly, SCIPvarIsRelaxationOnly, SCIPvarMarkDeletable, SCIPvarIsDeletable, and tests
11+
- Wrapped SCIPgetNLPBranchCands
1112
### Fixed
1213
- Raised an error when an expression is used when a variable is required
1314
### Changed

src/pyscipopt/scip.pxi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9106,6 +9106,12 @@ cdef class Model:
91069106
return ([Variable.create(lpcands[i]) for i in range(nlpcands)], [lpcandssol[i] for i in range(nlpcands)],
91079107
[lpcandsfrac[i] for i in range(nlpcands)], nlpcands, npriolpcands, nfracimplvars)
91089108

9109+
def getNLPBranchCands(self):
9110+
"""
9111+
Gets number of branching candidates for LP solution branching (number of fractional variables)
9112+
"""
9113+
return SCIPgetNLPBranchCands(self._scip)
9114+
91099115
def getPseudoBranchCands(self):
91109116
"""
91119117
Gets branching candidates for pseudo solution branching (non-fixed variables)

tests/test_gomory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def sepaexeclp(self):
187187
if not scip.isLPSolBasic():
188188
return {"result": result}
189189

190-
#TODO: add SCIPgetNLPBranchCands
190+
self.model.getNLPBranchCands()
191191
# get var data ---> this is the same as getVars!
192192
vars = scip.getVars(transformed = True)
193193

0 commit comments

Comments
 (0)