Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix example
  • Loading branch information
lperron committed Dec 14, 2021
1 parent dd8998a commit 65dfdd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/python/knapsack_2d_sat.py
Expand Up @@ -127,7 +127,7 @@ def solve_with_duplicate_items(data, max_height, max_width):
model.AddNoOverlap2D(x_intervals, y_intervals)

## Objective.
model.Maximize(cp_model.DoubleLinearExpr.ScalProd(is_used, item_values))
model.Maximize(cp_model.LinearExpr.ScalProd(is_used, item_values))

# Output proto to file.
if FLAGS.output_proto:
Expand Down Expand Up @@ -217,7 +217,7 @@ def solve_with_duplicate_optional_items(data, max_height, max_width):
model.AddNoOverlap2D(x_intervals, y_intervals)

## Objective.
model.Maximize(cp_model.DoubleLinearExpr.ScalProd(is_used, item_values))
model.Maximize(cp_model.LinearExpr.ScalProd(is_used, item_values))

# Output proto to file.
if FLAGS.output_proto:
Expand Down Expand Up @@ -330,7 +330,7 @@ def solve_with_rotations(data, max_height, max_width):
model.AddNoOverlap2D(x_intervals, y_intervals)

# Objective.
model.Maximize(cp_model.DoubleLinearExpr.ScalProd(is_used, item_values))
model.Maximize(cp_model.LinearExpr.ScalProd(is_used, item_values))

# Output proto to file.
if FLAGS.output_proto:
Expand Down

0 comments on commit 65dfdd2

Please sign in to comment.