From 0dded8f12b1969abb2e8debd83580e8dfeccd90c Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 4 Jul 2019 11:10:47 +0200 Subject: [PATCH] fix example #1399 --- examples/python/shift_scheduling_sat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/shift_scheduling_sat.py b/examples/python/shift_scheduling_sat.py index b859e4e212..2493ab715c 100644 --- a/examples/python/shift_scheduling_sat.py +++ b/examples/python/shift_scheduling_sat.py @@ -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.