diff --git a/CHANGELOG.md b/CHANGELOG.md index 4280e772c..0ab002ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi index 14741531d..da23028f9 100644 --- a/src/pyscipopt/scip.pxi +++ b/src/pyscipopt/scip.pxi @@ -2780,7 +2780,7 @@ cdef class IIS: ## 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 @@ -2797,7 +2797,7 @@ cdef class Model: 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 diff --git a/tests/test_copy.py b/tests/test_copy.py index dd5aed8ae..6a64dabe0 100644 --- a/tests/test_copy.py +++ b/tests/test_copy.py @@ -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) @@ -19,4 +19,5 @@ def test_copy(): s2.optimize() assert s.getObjVal() == s2.getObjVal() + assert s.getConss()[0].isModifiable() and s2.getConss()[0].isModifiable()