Skip to content

Commit 62a89ae

Browse files
committed
subtract from original column cost in reduced cost calculation
Former-commit-id: 78c4d19 [formerly b75b615] Former-commit-id: 2158150
1 parent e29284a commit 62a89ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/cutting_stock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def cg():
8989

9090
# checking if columns with negative reduced cost were produced and
9191
# adding them into the restricted master problem
92-
if pricing.objective_value < - EPS:
92+
if 1 + pricing.objective_value < - EPS:
9393
coeffs = [a[i].x for i in range(m)]
9494
column = Column(constraints, coeffs)
9595
lambdas.append(master.add_var(obj=1, column=column, name='lambda_%d' % (len(lambdas) + 1)))

0 commit comments

Comments
 (0)