Skip to content

Commit c6e7ca5

Browse files
authored
Merge pull request #490 from jurgen-lentz/reader
add getNReaders method
2 parents 6303b87 + ee7b309 commit c6e7ca5

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Unreleased
4+
### Added
5+
- add Model.getNReaders that returns the number of available readers
6+
37
## 3.1.1 - 2021-03-10
48
### Added
59
- add evaluation of `Expr` in `Solution`.

src/pyscipopt/scip.pxd

+1
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ cdef extern from "scip/scip.h":
857857
SCIP_READERDATA* readerdata)
858858
SCIP_READER* SCIPfindReader(SCIP* scip, const char* name)
859859
SCIP_READERDATA* SCIPreaderGetData(SCIP_READER* reader)
860+
int SCIPgetNReaders(SCIP* scip)
860861

861862
# Event handler plugin
862863
SCIP_RETCODE SCIPincludeEventhdlr(SCIP* scip,

src/pyscipopt/scip.pyx

+4
Original file line numberDiff line numberDiff line change
@@ -4573,6 +4573,10 @@ cdef class Model:
45734573
"""Counts the number of feasible points of problem."""
45744574
PY_SCIP_CALL(SCIPcount(self._scip))
45754575

4576+
def getNReaders(self):
4577+
"""Get number of currently available readers."""
4578+
return SCIPgetNReaders(self._scip)
4579+
45764580
def getNCountedSols(self):
45774581
"""Get number of feasible solution."""
45784582
cdef SCIP_Bool valid

0 commit comments

Comments
 (0)