Hello!
Could there be an error when calculating the constraint that we specified should not be less than 10 hours between two shifts? Although 10 hours are calculated in seconds, why do we divide by 60 again after the total_seconds() method in line 68, where we get the difference between the 2nd shift and the 1st shift? Could you please explain that part to me?
Thanks in advance!
|
(TEN_HOURS_IN_SECONDS - (second_shift.start - first_shift.end).total_seconds()) // 60) |
Hello!
Could there be an error when calculating the constraint that we specified should not be less than 10 hours between two shifts? Although 10 hours are calculated in seconds, why do we divide by 60 again after the total_seconds() method in line 68, where we get the difference between the 2nd shift and the 1st shift? Could you please explain that part to me?
Thanks in advance!
optapy-quickstarts/employee-scheduling/constraints.py
Line 68 in 4bdf9cc