Given the new legal regulations due to covid-19 the daycare of my child and all involved parents are overwhelmed and we need to come up with a schedule of when which child can be cared for.
Given the demanded care time per child (s. below), We need an algorithm to optimize the following:
- Minimal total contacts / fixed groups. If children meet, it is best if they stay in that group and do not see children of other groups.
- While point 1 is more important, the 2nd prio would be to reduce the size per group or maybe it should be phrased as minimal count of different children met per child
- Even less important: reduce total contact time.
(Maybe there are other requirements, that I overlooked?)
The demands are of following nature (Timespan and type) :
Case | Child | Timespan | Type |
---|---|---|---|
(1) Fixed time, Required | 1 | Monday, 8:30 - 13:00 | Required |
(2) Fixed time, nice to have | 1 | Tuesday, 8:30 - 13:00 | Nice to have |
(see (1)) | 1 | Tuesday, 13:00 - 16:00 | Required |
(see (1)) | 1 | Thursday, 8:30 - 13:00 | Required |
(see (1)) | 2 | Monday 8:30 - 13:00 | Required |
(3) Flexibel date, required | 2 | Any 2 other days 8:30 - 13:00 | Required |
(4) Flexibel date, nice to have | 2 | Any day 13:00 - 16:00 | Nice to have |
(5) Flexibel datetime, Required | 3 | 3 hours | Required |
(6) Flexibel datetime, Nice to have | 3 | 3 additional hours | Nice to have |
... | ... | ... |
- Required = The child must have daycare
- Nice to have = daycare is demanded but not required. E.g. if child 1 meets child 2 and 3 on Monday and Thursday, it would be fine to meet the same children on Tuesday morning as well, but if it is a completely different group of children than this would not make sense.
- All provided timespans must stay in one continuous piece (meaning that 3 hours cannot be split up into multiple slots).
Additional Information
There is only one room available.
There are 15 children in total.
If a solution is much better than the other it is ok-ish to violate "Required" demands for a few cases. We might be able to find a different solution for the parents in few situations. The algorithm should hence contain a parameter like
maxAllowedViolations
- let's say it's3
and it should compare how much the solution is better than without the errors.The demand is provided per week and might change from week to week. I only know the demand one week in advance. The ideal grouping hence might change per week, but it might be better to respect the grouping of the last week as a guidance, because corona has about 7 to 10 days of incubation time.
The caregivers are tested for covid-19 twice a week, the children are not.
I do not care in which language or pseudo-code-ish way the algorithm is, but I will try to implement the algorithm in a web-based format so other daycare centers can use it as well.