Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CHANGELOG
## Unreleased
### Added
- add SCIP function `getPseudoBranchCands`

### Fixed
### Changed
### Removed
Expand Down
19 changes: 19 additions & 0 deletions src/pyscipopt/scip.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3750,6 +3750,25 @@ cdef class Model:
return ([Variable.create(lpcands[i]) for i in range(nlpcands)], [lpcandssol[i] for i in range(nlpcands)],
[lpcandsfrac[i] for i in range(nlpcands)], nlpcands, npriolpcands, nfracimplvars)

def getPseudoBranchCands(self):
"""gets branching candidates for pseudo solution branching (non-fixed variables)
along with the number of candidates.

:return tuple (pseudocands, npseudocands, npriopseudocands) where

pseudocands: list of variables of pseudo branching candidates
npseudocands: number of pseudo branching candidates
npriopseudocands: number of candidates with maximal priority

"""
cdef int npseudocands
cdef int npriopseudocands

cdef SCIP_VAR** pseudocands

PY_SCIP_CALL(SCIPgetPseudoBranchCands(self._scip, &pseudocands, &npseudocands, &npriopseudocands))

return ([Variable.create(pseudocands[i]) for i in range(npseudocands)], npseudocands, npriopseudocands)

def branchVar(self, variable):
"""Branch on a non-continuous variable.
Expand Down