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 @@ -5,6 +5,7 @@
### Fixed
- all fundamental callbacks now raise an error if not implemented
### Changed
- changed default value of enablepricing flag to True
### Removed

## 6.0.0 - 2025.xx.yy
Expand Down
4 changes: 2 additions & 2 deletions src/pyscipopt/scip.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
if rc == SCIP_OKAY:
pass
elif rc == SCIP_ERROR:
raise Exception('SCIP: unspecified error!')

Check failure on line 319 in src/pyscipopt/scip.pxi

View workflow job for this annotation

GitHub Actions / test-coverage (3.11)

SCIP: unspecified error!
elif rc == SCIP_NOMEMORY:
raise MemoryError('SCIP: insufficient memory error!')
elif rc == SCIP_READERROR:
Expand All @@ -335,7 +335,7 @@
raise Exception('SCIP: method cannot be called at this time'
+ ' in solution process!')
elif rc == SCIP_INVALIDDATA:
raise Exception('SCIP: error in input data!')

Check failure on line 338 in src/pyscipopt/scip.pxi

View workflow job for this annotation

GitHub Actions / test-coverage (3.11)

SCIP: error in input data!
elif rc == SCIP_INVALIDRESULT:
raise Exception('SCIP: method returned an invalid result code!')
elif rc == SCIP_PLUGINNOTFOUND:
Expand Down Expand Up @@ -2780,7 +2780,7 @@
##
cdef class Model:

def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=False, createscip=True, threadsafe=False):
def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=True, createscip=True, threadsafe=False):
"""
Main class holding a pointer to SCIP for managing most interactions

Expand All @@ -2797,7 +2797,7 @@
globalcopy : bool, optional
whether to create a global or a local copy (default True)
enablepricing : bool, optional
whether to enable pricing in copy (default False)
whether to enable pricing in copy (default True)
createscip : bool, optional
initialize the Model object and creates a SCIP instance (default True)
threadsafe : bool, optional
Expand Down
3 changes: 2 additions & 1 deletion tests/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_copy():
y = s.addVar("y", vtype = 'C', obj = 2.0)
s.setObjective(4.0 * y, clear = False)

c = s.addCons(x + 2 * y >= 1.0)
c = s.addCons(x + 2 * y >= 1.0, modifiable = True)

s2 = Model(sourceModel=s)

Expand All @@ -19,4 +19,5 @@ def test_copy():
s2.optimize()

assert s.getObjVal() == s2.getObjVal()
assert s.getConss()[0].isModifiable() and s2.getConss()[0].isModifiable()