Optimization example: workforce scheduling model

In staff scheduling, a nurse manager may be trying to staff her floor in the best way for the coming week. What can happen if this is done informally, by a “seat of the pants” approach?

Building an optimizing model

For one, the floor can end up understaffed, in which case at some point overtime becomes an issue and slip-ups — and potentially, harm to patients — due to staff tiredness are more likely.  Alternatively, if the manager over-staffs her floor to be on the safe side, a greater coordination effort is needed and staff dissatisfaction can mount when sent home unexpectedly when suddenly not needed. In either case, costs incurred exceed the minimum potentially achievable — and who can afford that today?

Another undesirable effect for the manager is the feeling that one is merely grappling with complex issues, not dealing effectively with them, and all too often on the verge of being overwhelmed. This adds to the perceived borderline chaos of the work environment and, of course, reflects upon morale.

Can one do better? For the sake of argument, assume that there is a variable (but anticipated) demand for staff depending on the day of the week, and that staff need to be given two consecutive days off in a one-week period. Then, what is the minimum number of people needed for a weekly rotation? This can be answered quickly and also experimented with once a staffing model is built. Many such models exist, and the output of one is shown below.  Note that the demand may not be known exactly ahead of time. Still, one can use a range of inputs and run the model under different conditions to gain an understanding of what may be the best staffing approach to follow.

The model below is built in MS Excel, and uses the Solver add-in (Data Analysis tools).  One cell, Payroll_minimum,  is designated as the target cell, while cells showing how many staff start their workweek on a given day are allowed to change for the model to converge to the mentioned minimum, and others are used to express constraints (ex. staff working on a given day must be greater than the demand forecast for that day).  Because this is a scheduling model, it all starts with the user inputting the expected daily staffing demand and also entering some trial values for the decision variables referring to how many employees begin their 5-day workweek on a specific day — say, Wednesday vs. Saturday.  These trial values are changed by the model during its run. After a few hundred iterations (done in milliseconds), the model converges to the final recommended values. With the staff rotation suggested by the model, staffing is kept to an overall minimum — on certain days this minimum matches the expected demand exactly, whereas on others it is slightly higher.  Coverage is ensured — those “working” are always at least as many as those “needed” on any given day — while still respecting the time-off schedule constraint. One may try to vary (technically, relax) the constraints and inputs to the model and explore different planning scenarios, but still get near-optimal answers.


This linear optimizing model is an example of integer programming. It is harder to solve for than a similar problem where non-integer values are allowed for a solution. Here, all values arrived at must be positive integers. If fractional FTEs were allowed (i.e. with 0.5 FTE meaning 1 FTE for half a day), the model would have more “wiggle room” to adjust the output, and it is likely the minimum weekly payroll would be even lower.

An optimal solution does not always exist that meets all of a problem’s requirements and constraints. This, however, would not be apparent if one did not have a model at one’s disposal to begin with.  One could be trying to solve a problem — under various simultaneous constraints — to which there is no feasible solution, but not know it!  Striving to meet a patient coverage requirement via an arbitrary yet insufficient number of staff while also not incurring overtime and respecting the days-off HR policy could be a non-starter for a nurse manager, but how could she prove it without a model of this sort?

To recap, the quick elimination of wasteful approaches to planning and scheduling is a benefit of having a properly designed model for analysis.  Adopting the model can of course ensure that time off for everyone is respected — a well-rested staff is less likely to get careless, make mistakes, and inflict harm.  Having an optimal or near-optimal workforce scheduling plan also minimizes the waste of money associated with excess resources and the additional work in managing them.

Models such as this are but the tip of the optimization iceberg.


Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *