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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased
### Added
### Fixed
- revert change from #543 to fix #570 (closing file descriptors)
- use correct offset value when updating the objective function
### Changed
### Removed
Expand Down
5 changes: 1 addition & 4 deletions src/pyscipopt/scip.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cimport cython
from cpython cimport Py_INCREF, Py_DECREF
from cpython.pycapsule cimport PyCapsule_New, PyCapsule_IsValid, PyCapsule_GetPointer
from libc.stdlib cimport malloc, free
from libc.stdio cimport fdopen, fclose
from libc.stdio cimport fdopen

from collections.abc import Iterable
from itertools import repeat
Expand Down Expand Up @@ -4240,7 +4240,6 @@ cdef class Model:
with open(filename, "w") as f:
cfile = fdopen(f.fileno(), "w")
PY_SCIP_CALL(SCIPprintBestSol(self._scip, cfile, write_zeros))
fclose(cfile)

def writeBestTransSol(self, filename="transprob.sol", write_zeros=False):
"""Write the best feasible primal solution for the transformed problem to a file.
Expand Down Expand Up @@ -4268,7 +4267,6 @@ cdef class Model:
with open(filename, "w") as f:
cfile = fdopen(f.fileno(), "w")
PY_SCIP_CALL(SCIPprintSol(self._scip, solution.sol, cfile, write_zeros))
fclose(cfile)

def writeTransSol(self, Solution solution, filename="transprob.sol", write_zeros=False):
"""Write the given transformed primal solution to a file.
Expand Down Expand Up @@ -4628,7 +4626,6 @@ cdef class Model:
with open(filename, "w") as f:
cfile = fdopen(f.fileno(), "w")
PY_SCIP_CALL(SCIPprintStatistics(self._scip, cfile))
fclose(cfile)

def getNLPs(self):
"""gets total number of LPs solved so far"""
Expand Down