JustSchedule: A Project with Helsingborg

Andreas Röhl - Feb 17, 2021 10:13:41 AM

In the spring of 2020, Reeinvent took the initiative to work together with the Nursing and Caring Department at Helsingborg municipality to develop a model for AI-driven scheduling that evolved into the JustSchedule product concept. JustSchedule can automatically generate complex schedules faster and more efficient, but more importantly, generate schedules that are non-biased allowing full transparency leading to healthy schedules.

Background

Last year we got the project funded by Vinnova and it was also well received and in line with the overall goals Helsingborg has; support human-centered and need-driven open innovation in collaboration with the private sector.

The existing situation with sick leave and the spread of infection puts the need for a better system support for scheduling. The crisis has created a lot of pain but also a readiness to try new ways of working and thinking that must not be wasted. In this case, the goal from the beginning was to explore the possibilities if AI-supported scheduling could offer a less stressful health care situation.

Johan Müllern-Aspegren - Innovation Leader

The project was carried out during the autumn and winter 2020 at the health care home Murteglet in Helsingborg. The project group consisted of Murteglet's unit manager,  administrator responsible for creating schedules and finally service designers from Helsingborg municipality administration.

Planning phase

The projects hypothesis was to create a system that enables more organisational dynamics around scheduling that makes healthcare more resilient and adaptive to crisis. A system that supports quick adjustments of constraining parameters such as "Vaccinated" and can quickly generate new schedules that considers these new "rules" and it's importance. It's also about creating a sound work conditions for the employees so they can focus on the operational challenges and what they are good at by relying on healthy schedules.

An AI-driven scheduling system has many benefits, some of which can mentioned, such as:

  • Non-biased: there is no human involved so the system can not be blamed for favouritism.

  • Responsive: an AI engine can generate new schedule suggestions on a very short time and thus make the business less vulnerable during crisis situations. The current pandemic is one example, but we can expect that both major and minor crises will reoccur and challenge the organisations responsiveness.

  • Effective: a system powered by AI algorithms can take into account many more set of rules than a human can. A major advantage here is that the system can also take into consideration individual wishes without breaking any existing operational requirement.

  • Transparent: by logically describing schedule rules, or constraints, you can increase the understanding for all employees on why a possible schedule solution look the way it does. The system can also aid in explaining why certain constraints could not be met. 

  • Adaptive: It is possible to quickly add attributes such as "immunity to a virus" in the AI model, but also adjust the importance of existing rules to focus on new conditions.

  • Learning, this type of design allows for learning from historical data and feedback to further develop its algorithms based on that.

The model description

The model consists of three parts, employees which should be assigned to one work shifts by some rules. The employees include different servicecontrcts that stipulates maximum number of permitted long shifts, expected total amout of working hours and others similar. Shifts also have different characteristics such as the type of shift It is (emergency shift for example) but also all the obvious ones such as weekend shifts, extented shifts (10 hours or more). These shifts must then be assigned by an employee during planning period over four weeks via certain rules. Depending on the number rules and what restriction they inforce, all of them can not be fulfilled completely, so it's about finding the “best” results (highest score) given these rules. Some rules are also usually more important than others such as the Working Hours Act, trade unions agreements as well as business requirements that must be met before others can be even considered. To achieve this, rules are divided into three groups, hard, medium and soft.

  • Hard rules must be met to be able to classify the result as acceptable. Obvious limitations to us is that an employee can of course not work two shifts at the same time, for example. Even trivial hard requirements like this must be provided.

  • Medium rules are one or more soft rules that are more important than other none-hard rules and must be tried to be fulfilled before trying to meet the rest of soft rules. One type of medium rule can be a fair distribution of certain types of shift among the employees, such as emergency duty during weekends.

  • Soft rules are more flexible constrints you want to achieve, like finish early before on a shift before you have a day off, working at the most three nights in a row. No soft rules needs to be met for the schedule to be acceptable but the more you can achivie the more optimal it becomes (given the existing rules).

An AI-constraint solver can then try to solve this enormously difficult puzzle (its complexity is classified as NP-Hard difficulty) where the possible combinations are in often on the order of greater than 10100. In order to assess how well all the rules are met, results are calculated in the following style 0 / -100 / - 2000 where 0 is the value for the hard rules, -100 for medium and - 2000 for the soft rule. Optimal is to reach 0/0/0 because then all the rules are met, however this is usually only true for very simple rule sets. Values can only be compared witin the same group where a -50 is better than -100 for the soft rules for example. A complete score can only be compared if all values are higher, therefore a score of 0 / - 50 / -200 is not comparable to 0 / -25 / - 300. 

Of course, some soft rules can also have mutual importance and this can be reflected by weights. These rule weights describes how hard you want to punish that rule if not met (harder punishment gives a greater negative number). Rules can also reward certain outcome and thus providing a higher sorce if met. This could be that some employees prefer to work long hours on mondays. This result is only a mathematical calculation based on the given rules and weights. It is therefore important to connect the result (schedule) to the employees and get their interpretation of it. The purpose is that their views and wishes should be reflected in the best outcome of the AI ​​optimization, and if not weights might need to be adjusted. Therefor this is an iterative process of adjusting weights and rules until a good balance is reached.

Project Kick off

Together with the unit manager and schedule responsible we outlined the hard rules for the organisation during several interviews, most of those rules we designed to ensure the schedules were compliant with the legal and union laws that exists.

Then interviews with selected employees at Murteglet were conducted by service designers from Helsingborgs Nursing and Caring Department with the intention of understanding what the current pain points are in existing schedules. Based on the interviews a set of additional soft and medium rules were prioritised and added to the AI model to further demonstrate the potential of employee wishes.

Hard rules

  • All work shifts assigned

  • Max one work shift per day

  • "Day rest" - At least 11 hours before or after the work shift

  • Total working time for calculation period is 37 * 4 = 148 hours (max 48h week over a four week period)

  • The maximum number of work shifts per calculation period must be 19 if you are full-time employee

  • At least 36 consecutive hours of rest in a seven-day period

  • Available every other weekend (Saturday + Sunday)

  • Max four work shifts in a row

  • End your work shift no later than 16:00 before having a day off

  • Only one long shift per three working days

Medium and soft rules

  • Fair distribution of day / evening / weekend and long shifts

  • Not to start with an availability shift after a day off

  • After a long work shift (08-21), start earliest 08:00 the next day

Project results

We achieved and created several iterations of the schedule that contained all the rules defined by the project, demonstrating, although very constrained, that we could easily generate a schedule within 40 minutes with highest possible score on a local machine. This execution time can be decreased a lot by deploying the solution in the cloud. We also demonstrated that it's very quick to add or adjust rules and it's weighting, allowing for very high flexibility in the organisation.

The long-term effects of the project can not be measured yet, but several early results can noted;

  • Completely new and innovative ways of working to outline the rule and how to increase the transparency around scheduling in general.

  • The possibility to iterate and optimise schedule with an ease, taking into consideration employee demands.

Pandemic

A potential in AI-generated schedules is also to be able to help quickly adapt to businesses that need to quickly change how, but especially when works, given completely different requirements and conditions compared to what usually prevails. A good example of this is a pandemic like Covid-19.

Together with Murteglet, we decided to create a fictional schedule where you prioritized;

  • Limit the number of contact surfaces to reduce the spread of infections by associating patients and care givers for each work shift. By doing so we reduce unnecessary rotation of staff.

  • Classify schedules as high or low risk depending on whether an employee have been vaccinated or not.

This was done with minimal effort and the generated schedules shows that concept holds.

JustSchedule

Reeinvent plans to continue to develop our model and applications around it, as we believe there is a huge need for healthy schedules for a lot our health care workers. To read more about Just Schedule, download the presentation and reach out if you're interested in collaborating with us!

nurse2

We would also like to thank Helsingborg municipality for the excellent collaboration.

Topics: #connected-devices

Previous Post

Sesam Self Storage Goes Digital

Next Post

Freelancing at Reeinvent