This commit is contained in:
Laurent Perron
2019-07-04 11:10:47 +02:00
parent 1449aa0fb3
commit 0dded8f12b

View File

@@ -92,7 +92,7 @@ def add_soft_sequence_constraint(model, works, hard_min, soft_min, min_cost,
# Forbid sequences that are too short.
for length in range(1, hard_min):
for start in range(len(works) - length - 1):
for start in range(len(works) - length):
model.AddBoolOr(negated_bounded_span(works, start, length))
# Penalize sequences that are below the soft limit.