Unleash the full potential of your business in the digital world

Scheduling Algorithm

James Huang | 2021.08.13

We are completing the solution for our client and  we discover a common issues which has not been optimise in the Digital world.  In real-life where several resources are scheduled (appointees, rooms, and equipment); each "Services" may consume different time-slot and therefore each appointment is scheduled for an appointee, and may also take a room and/or equipment(s). In a traditional approach, the schedule is driven by end-customers, appointments are scheduled over time, slowly filling up the calendar.

We think it is NOT an optimal way to fulfil the operation.  The optimal approach is determining ‘optimal’ availability slots that end-customer may choose from when booking an appointment.

It’s easy to determine all availability slots from Algorithm: it’s the overlap of the availability for the requested appointee(s)/room(s)/equipment(s). However, we want to prevent introducing 5/10/15 minute gaps in the schedule that cannot be filled later.  (Imagine people buy Cinema ticket seat on purposely to buy in-between slot.

We start with 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.

Another approach that we think can work well for incremental scheduling is to implement a pricing strategy. If end-customer takes a resource that leaves a gap, and that gap may be left unsold as a result, add a portion of the price of the gap to the resource cost. In the limit, at 100% of the gap cost, you will not have any loss as a result of any schedule.

And then we look into change-making problem and forecasting approach. 

Coin values can be modeled by a set of n distinct positive integer values (whole numbers), arranged in increasing order as w1 through wn. The problem is: given an amount W, also a positive integer, to find a set of non-negative (positive or zero) integers {x1, x2, ..., xn}, with each xj representing how often the coin with value wj is used, which minimize the total number of coins f(W)...

And we realised why there is no Advanced booking engine widely available in the market.  It simply because the way to "optimise" can be different by client and you need a solid understanding on what problem/ issues you would like to resolve.

Thank you again to EastWood Health on this interesting opportunity to let us learn.

Scheduling Algorithm
MERCURY TECHNOLOGY SOLUTION, James Huang 13 August, 2021
Share this post
COVID-19 impact to Commercial Real Estate