Bug - Lunchbug & breakbug mk2
We still have a bug issue with breaks and lunchtimes.
Attached case for a meeting room, 4 breaks of 30 minutes and 1 hour lunch, the 2nd break falls just before lunch - and lunch is ignored in the graphs. I've put a 3rd attachment showing what happens when we have 4 15 minute breaks scheduled in 1 hour of work.
New lunch/break splitting algo proposal in pseudocode:
If (lunchbreak) { morning_break_delay = ((lunch_start - activity_start) - (Number_of_breaks * break_length))/((Number_of_breaks/2)+1) afternoon_break_delay = ((activity_finish - lunch_finish) - (Number_of_breaks * break_length))/((Number_of_breaks/2)+1) } else { break_delay = (activity_finish - activity_start) - (Number_of_breaks * break_length) / (Number_of_breaks+1) }
The morning breaks start at activity_start + morning_break_delay (1st)
and activity_start + 2*morning_break_delay + break_length
(2nd).
Afternoon breaks start at lunch_finish + afternoon_break_delay
(1st) and activity_start + 2*afternoon_break_delay + break_length
(2nd).
We need to do it twice (morning/afternoon split) as lunchtime is not necessarily in the middle of the day.
For a no lunch scenario, breaks start at activity_start + n*break_delay + (n-1)*break_length
.
It would also be nice to have a warning (in the report) if we have a crash between breaks and lunch/working time, something like: "Warning: The break times you have defined are overlapping. Please check your input data accurately represents the case you wish to simulate" (for example if we select 4 breaks of 30 minutes during a 1 hour work slot).