changes from issue http://code.google.com/p/pulp-or/issues/detail?id=45 LpProblem.deepcopy()
This commit is contained in:
@@ -1125,7 +1125,7 @@ class LpProblem(object):
|
||||
def deepcopy(self):
|
||||
"""Make a copy of self. Expressions are copied by value"""
|
||||
lpcopy = LpProblem(name = self.name, sense = self.sense)
|
||||
if lpcopy.objective != None:
|
||||
if lpcopy.objective is not None:
|
||||
lpcopy.objective = self.objective.copy()
|
||||
lpcopy.constraints = {}
|
||||
for k,v in self.constraints.iteritems():
|
||||
|
||||
Reference in New Issue
Block a user