Skip to content

Commit fb6db8c

Browse files
enablepricing default set to True (#1137)
* enablepricing default set to True * mini test
1 parent 2f473ba commit fb6db8c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66
- all fundamental callbacks now raise an error if not implemented
77
### Changed
8+
- changed default value of enablepricing flag to True
89
### Removed
910

1011
## 6.0.0 - 2025.xx.yy

src/pyscipopt/scip.pxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,7 @@ cdef class IIS:
27802780
##
27812781
cdef class Model:
27822782

2783-
def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=False, createscip=True, threadsafe=False):
2783+
def __init__(self, problemName='model', defaultPlugins=True, Model sourceModel=None, origcopy=False, globalcopy=True, enablepricing=True, createscip=True, threadsafe=False):
27842784
"""
27852785
Main class holding a pointer to SCIP for managing most interactions
27862786
@@ -2797,7 +2797,7 @@ cdef class Model:
27972797
globalcopy : bool, optional
27982798
whether to create a global or a local copy (default True)
27992799
enablepricing : bool, optional
2800-
whether to enable pricing in copy (default False)
2800+
whether to enable pricing in copy (default True)
28012801
createscip : bool, optional
28022802
initialize the Model object and creates a SCIP instance (default True)
28032803
threadsafe : bool, optional

tests/test_copy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_copy():
1010
y = s.addVar("y", vtype = 'C', obj = 2.0)
1111
s.setObjective(4.0 * y, clear = False)
1212

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

1515
s2 = Model(sourceModel=s)
1616

@@ -19,4 +19,5 @@ def test_copy():
1919
s2.optimize()
2020

2121
assert s.getObjVal() == s2.getObjVal()
22+
assert s.getConss()[0].isModifiable() and s2.getConss()[0].isModifiable()
2223

0 commit comments

Comments
 (0)