I’m working on a system where several resources are scheduled (users, rooms, and equipment). Each appointment is scheduled for a user, and may also take a room and/or equipment. Appointments are scheduled over time, slowly filling up the calendar. It’s thus not a classic scheduling problem where everything can be scheduled at once.
My problem is determining ‘optimal’ availability slots that clients may choose from when booking an appointment.
It’s easy to determine all availability slots: it’s the overlap of the availability for the requested user(s)/room(s)/equipment(s). However, I want to prevent introducing 5/10 minute gaps in the schedule that cannot be filled later.
Relevant properties of the system are:
- A 5-minute interval is used
- Different appointment types have different (predefined) lengths (multiples of 5 minutes)
- Users/rooms/equipments can perform/have several appointments types with different lengths
The system should take this into account when determining availability slots that are offered for appointment bookings.
I think there is no ‘real’ optimal solution for this, since there are many factors and it’s not known in advance which appointments types will be scheduled later on. However, I want to prevent offering availability slots that introduce useless gaps (or other suboptimal situations) in the schedule.
I created a solution that only takes the availability of one resource (users) into account. It first determines the least common multiple (LCM) of the appointments durations the user can perform. It then generates availability slots in the total available time of that user, using the LCM as step size. This seems better than just offering all availability options at each 5-minute step, though it isn’t ideal. (E.g., if the LCM is high, few options will be offered.) Additionally, it doesn’t take the other resources (rooms/equipment) into account.
Are there any known algorithms/methods/best-practices for determining availability slots in such a situation?