Keywords

1 Introduction

Parameter uncertainty is common to several health care-related optimization problems, where patients evolve along with time and their future demands are affected by high variability. This is particularly critical in some health care services, e.g. in the Home Care (HC) service, where patients are usually assisted for a long time.

A crucial task in HC is to assign nurses to patients over a planning horizon while taking into account such variability and meeting all requirements from both operators and patients. One of the main requirements, which is crucial for a good quality of service, is the continuity of care, i.e. the assignment of a patient to the same reference nurse during the entire care period. Thus, HC provider managers must assign nurses to patients in order to satisfy the continuity of care, given the available operators and the set of patients in the charge with their uncertain demands.

The HC nurse-to-patient assignment problem is solved over a planning horizon usually divided into time slots. In the literature, this problem has been already tackled under uncertain demands either applying the stochastic programming or the robust optimization. However, to the best of our knowledge, the proposed solutions do not take into account the correlation of each patient’s demands over the time periods. On the contrary, in this work, we solve the problem assuming that the demands are correlated over the periods.

Starting from a deterministic formulation in which three different continuity of care requirements are considered at the same time, we propose a robust model for the time-correlated demands, based on the so-called implementor-adversarial approach introduced by Bienstock for portfolio selection [5]. Briefly, the robust model is viewed as a two-stage game: the implementor computes the nurse-to-patient assignments before the realization of the uncertainty, while the adversary generates the worst demand evolution for that assignment.

The paper is structured as follows. A literature analysis of the HC nurse-to-patient assignment problem is presented in Sect. 1.1. The deterministic assignment model considered in this paper is described in Sect. 2. Then, our robust optimization approach is detailed in Sect. 3 including the formalization of the uncertainty set. The computational tests and the results are presented in Sect. 4. A final discussion is drawn in Sect. 5.

1.1 Related Works

Different features can be considered while solving the HC nurse-to-patient assignment problem. If continuity of care is not required, the assignment problem turns out to be an assignment of operators to visits rather than patients, and the different time periods can be independently considered. In this case, the aim is usually to jointly optimize the assignment of operators to visits and the scheduling and routing problems [12, 13]. On the contrary, when continuity is considered, the decisions related to a time period affect the following ones.

Uncertainty inherently arises in HC due to changes in patients’ conditions and needs, and several models have been developed to predict the uncertain demands in order to support the management of HC services [2, 3, 8].

The nurse-to-patient assignment problem including both continuity of care and uncertain demands has been addressed in the literature with stochastic programming, robust approaches, and also heuristic policies.

The problem has been tackled with stochastic programming based on scenario generation in [9] where, due to the high number of demand scenarios, a limited number of them has been considered for a computationally feasible solution; as a consequence, a high expected value of perfect information and a low value of the stochastic solution were found. Analytical policies have been developed in [10, 11], based on strict assumptions regarding the workload probability density functions, the number of new patients (one at a time), and the number of periods in the planning horizon (equal to only one).

To overcome the drawbacks of the stochastic programming and the analytical policies, a robust model based on the cardinality-constrained approach [4] has been proposed in [6]. This approach avoids the scenario generation and at the same time does not require the strict assumptions of the policies. More in general, the cardinality-constrained approach has been recognized to be a useful tool for health care problems [1]. However, the cardinality-constrained approach assumes that the uncertain parameters in the different constraints are independent of each other. Thus, it is not suitable for dealing with time-related demands in the HC nurse-to-patient assignment problem.

The correlation can be considered with the implementor-adversarial approach [5]. However, such an approach has been never applied to HC and only once in health care, to the hospital master scheduling problem [7].

2 Nurse-to-Patient Assignment Problem

We consider a set of patients \(\mathscr {P}=\{1,\dots ,P\}\) who require care in a discrete planning horizon \(\mathscr {T}=\{1,\dots ,T\}\), and we denote by \(r_{jt}\) the demand required from patient \(j \in \mathscr {P}\) at period \(t \in \mathscr {T}\). Set \(\mathscr {P}\) is partitioned in three different subsets:

  • \(\mathscr {P}_{hc}\): patients requiring hard continuity of care, who must be assigned to a single reference nurse during the entire planning horizon.

  • \(\mathscr {P}_{pc}\): patients requiring partial continuity of care, who must be assigned to a single nurse in each period t but can be assigned to different nurses in different periods. Each time a patient \(j\in \mathscr {P}_{pc}\) is reassigned to a different nurse from period to period, a penalty \(\beta \) affects the total assignment cost.

  • \(\mathscr {P}_{nc}\): patients having no-continuity of care, who can be assigned to different operators even in the same period.

Finally, \(\mathscr {I}=\{1,\dots ,I\}\) is the set of all available nurses, and \(v_i\) the working hours associated with nurse i in each period of the planning horizon. When nurse i works over \(v_i\), an overtime cost \(c_i\) has to be paid for each extra hour.

The goal is to determine the minimum assignment cost (function of nurses’ overtimes and reassignment penalties) while assigning all patients in the charge to one or more available nurses, according to their continuity of care requirements. The following decision variables are used:

  • \(x_{ij}\): equal to 1 if \(j\in \mathscr {P}_{hc}\) is assigned to \(i \in \mathscr {I}\), 0 otherwise;

  • \(\xi _{ij}^t\): equal to 1 if \(j\in \mathscr {P}_{pc}\) is assigned to \(i \in \mathscr {I}\) at period t, 0 otherwise;

  • \(y_j^t\): equal to 1 if \(j\in \mathscr {P}_{pc} \) is reassigned from period \(t-1\) to t, 0 otherwise;

  • \(\chi _{ij}^t\in [0,1]\): fraction of \(r_{jt}\) for \(j\in \mathscr {P}_{nc}\) assigned to \(i \in \mathscr {I}\) at period t;

  • \(w_i^t\ge 0\): extra time of \(i \in \mathscr {I}\) at period t;

  • \(u^t_i\ge 0\): idle time of \(i \in \mathscr {I}\) at period t;

  • \(\eta _i^t\): equal to 1 if nurse i has positive overtime at period t, 0 otherwise.

The deterministic model (based on [6]) is:

$$\begin{aligned} \min \left\{ \sum _{i\in \mathscr {I}}c_i\sum _{t\in \mathscr {T}}w_i^t + \beta \sum _{t\in \mathscr {T}\setminus \{1\}}\sum _{j\in \mathscr {P}_{pc}}y_j^t \right\} \end{aligned}$$
(1)

s.t.

$$\begin{aligned}&\sum _{i\in \mathscr {I}} x_{ij} = 1&j \in \mathscr {P}_{hc}\end{aligned}$$
(2)
$$\begin{aligned}&\sum _{i\in \mathscr {I}} \xi _{ij}^t = 1&j\in \mathscr {P}_{pc}, t\in \mathscr {T}\end{aligned}$$
(3)
$$\begin{aligned}&\sum _{i\in \mathscr {I}} \chi _{ij}^t = 1&j\in \mathscr {P}_{nc}, t\in \mathscr {T}\end{aligned}$$
(4)
$$\begin{aligned}&\xi _{ij}^t-\xi _{ij}^{t-1} \le y_j^t&j\in \mathscr {P}_{pc}, i\in \mathscr {I}, 2 \le t \le T\end{aligned}$$
(5)
$$\begin{aligned}&\sum _{j \in \mathscr {P}_{hc}} r_{jt} x_{ij} + \sum _{j \in \mathscr {P}_{pc}} r_{jt} \xi _{ij}^t + \sum _{j \in \mathscr {P}_{nc}} r_{jt} \chi _{ij}^t - w_i^t + u_i^t = v_i&i \in \mathscr {I}, t \in \mathscr {T}\end{aligned}$$
(6)
$$\begin{aligned}&w_i^t \le v_i \eta _i^t&i\in \mathscr {I}, t\in \mathscr {T}\end{aligned}$$
(7)
$$\begin{aligned}&u_i^t \le v_i \left( 1-\eta _i^t \right)&i\in \mathscr {I}, t\in \mathscr {T} \end{aligned}$$
(8)

Constraints (2)–(4) force the assignments of patients according to their continuity requirements. Constraints (5) keep track of the reassignments for patients in \(\mathscr {P}_{pc}\). Constraints (6) compute nurses’ overtimes and idle times based on the assigned patients and the capacities \(v_i\). Constraints (7) establish the maximum overtime at each time period; without losing generality this maximum value is set equal to the capacity \(v_i\). Finally, constraints (8) prevent \(w_i^t\) and \(u_i^t\) from being both positive in the optimal solution. Objective (1) minimizes the total assignment cost due to overtime and reassignments of patients in \(\mathscr {P}_{pc}\). A reassignment is accepted if the overtime cost would increase too much avoiding the reassignment; \(\beta \) is the maximum overtime cost we are willing to accept for preserving the continuity of care for one patient and for one visit.

3 The Robust Optimization Approach

According to the implementor-adversarial approach, the model is divided in two stages, which are iteratively solved. In the first stage, the service manager (i.e. the implementor) assigns the nurses to the patients according to the current demand and respecting the requirements; in the second stage, the adversary chooses the worst demand pattern for the current assignments selected by the implementor.

We assume that each patient \(j\in \mathscr {P}\) is associated, at each time period t, with a probability distribution describing his/her demand. Such distributions are divided into H equiprobable bands, and a value \(r_{jt}^h\) is associated to each band (e.g. the upper level of the interval). \(\mathscr {H}=\{1, \ldots , H\}\) is the set of these bands. In this way, each patient j is characterized by a set of values \(r_{jt}^h\) (\(h \in \mathscr {H}\)) for each period t. At the beginning of the planning process, we consider that each demand belongs to band \(h^*\), thus defining the nominal demands \(\bar{r}_{jt} = r_{jt}^{h^*}\).

The evolution of the demand for each patient is then modeled considering that the actual demand may move from the nominal band \(h^*\) to another band h in any time period t. For this purpose, we define \(\delta _{jt}^h = r_{jt}^h-\bar{r}_{jt}\) as the deviation affecting the demand when it moves towards band h. By constraining the deviations, we can include the two following aspects in the robust model:

  1. 1.

    cardinality: deviations occur for a limited number of patients;

  2. 2.

    correlation: deviations at consecutive time periods are not independent.

The second one, in particular, is the innovative contribution of this work to the HC nurse-to-patient assignment problem.

We remark that, in our framework, patients’ demands may evolve for two reasons. First, demands at two different periods can be different for a given h (\(r_{jt_1}^h \ne r_{jt_2}^h, t_1 \ne t_2\)) because the probability distribution of the class which the patient belongs to is moving over the periods. Second, the band can h may vary, meaning that the patient is evolving in a different way than the global behavior of his/her class.

3.1 Uncertainty Set

We formalize the uncertainty set U as \(\left\{ \tilde{r}_j^t = \bar{r}_{jt} + \delta _{jt}^h, j\in \mathscr {P}, t\in \mathscr {T}, h\in \mathscr {H} \right\} \), where \(\tilde{r}_{jt}\) represents the true demand of patient j at period t. Further restrictions are taken into account to model the conditions cardinality and correlation mentioned above. To this end, we define the following variables:

  • \(p_{jt}^h\): equal to 1 if demand \(\tilde{r}_{jt}\) belongs to band h, 0 otherwise;

  • \(z_{jt}^{hd}\): equal to 1 if demand \(\tilde{r}_{jt}\) moves from band h towards band \(h+d\) from period \(t-1\) to period t, and 0 otherwise.

The cardinality is modeled by adding to U the constraints:

$$\begin{aligned} \sum _{j\in \mathscr {P}}\sum _{h\in \mathscr {H}} z_{jt}^{hd} \le \alpha _d \quad t\in \mathscr {T}\setminus {1}, 0\le d\le H-h \end{aligned}$$
(9)

where \(\alpha _d\) is the maximum number of patients whose demand is allowed to move from the actual band to another one at distance d. Observe that, as robust approaches search for the worst realization, only forward jumps are of interest.

To model the correlation, we define \(\theta \) as the maximum distance between two demand bands at two consecutive time periods. Indeed, given \(\delta _{j,t-1}^h\) and \(\delta _{jt}^k\) for patient j at periods \(t-1\) and t, then \(\left| k-h \right| \le \theta \). This requirement is expressed through the following constraints:

$$\begin{aligned}&\sum _{k\in \{h+\theta +1, \ldots , H\}}p_{jt}^k + p_{j,t-1}^h \le 1&j\in \mathscr {P}, t\in \mathscr {T}\setminus \{1\}, h\in \mathscr {H}\end{aligned}$$
(10)
$$\begin{aligned}&\sum _{h\in \mathscr {H}}p_{jt}^h = 1&j\in \mathscr {P}, t\in \mathscr {T}\end{aligned}$$
(11)
$$\begin{aligned}&p_{jt}^{h+d} + p_{j,t-1}^h \le 1 + z_{jt}^{hd}&j\in \mathscr {P}, t\in \mathscr {T}\setminus \{1\}, h\in \mathscr {H}, 0 \le d \le \theta \quad \end{aligned}$$
(12)
$$\begin{aligned}&z_{jt}^{hd} \le p_{j,t-1}^h&j\in \mathscr {P}, t\in \mathscr {T}\setminus \{1\}, h \in \mathscr {H}, 0 \le d \le \theta \end{aligned}$$
(13)
$$\begin{aligned}&z_{jt}^{hd} \le p_{jt}^{h+d}&j\in \mathscr {P}, t\in \mathscr {T}, h\in \mathscr {H}, 0 \le d \le \theta \end{aligned}$$
(14)

Observe that, with the definition of \(\theta \), constraint (9) can be rewritten as:

$$\begin{aligned} \sum _{j\in \mathscr {P}}\sum _{h\in \mathscr {H}} z_{jt}^{hd} \le \alpha _d \quad t\in \mathscr {T}\setminus {1}, 0\le d\le \min \{\theta , H-h\} \end{aligned}$$
(15)

Summing up, the uncertainty set U reads:

$$\begin{aligned} U =&\{ \tilde{r}_j^t = \bar{r}_{jt} + \delta _{jt}^h, \quad (10)-(15),\nonumber \\&p_{jt}^h\in \{0,1\}, \;\; z_{jt}^{hd}\in \{0,1\}, \;\; j\in \mathscr {P}, \;\; t\in \mathscr {T}, \;\; h\in \mathscr {H} \} \end{aligned}$$
(16)

3.2 Robust Model

Assuming that demands range in U, the robust assignment problem is:

$$\begin{aligned} \min _{\left\{ x_{ij}, \xi _{ij}^t, \chi _{ij}^t, y_j^t \right\} \in X} \left\{ W\left( U\right) + \beta \sum _{t\in \mathscr {T}\setminus \{1\}} \sum _{j\in \mathscr {P}_{pc}}y_j^t \right\} \end{aligned}$$
(17)

where X defines the feasible assignments induced by constraints (2)–(6) plus the integrality clauses, and \(W\left( U\right) \) is the maximum (worst-case) overtime cost over U for a given assignment solution \(\left\{ x_{ij}, \xi _{ij}^t, \chi _{ij}^t, y_j^t \right\} \), which is determined as follows:

$$\begin{aligned} \max \sum _{i\in \mathscr {I}}c_i\sum _{t\in \mathscr {T}}w_i^t \end{aligned}$$
(18)

s.t.

$$\begin{aligned}&\sum _{j\in \mathscr {P}_{hc}} \tilde{r}_{jt} x_{ij} + \sum _{j\in \mathscr {P}_{pc}} \tilde{r}_{jt} \xi _{ij}^t + \sum _{j\in \mathscr {P}_{nc}} \tilde{r}_{jt} \chi _{ij}^t - w_i^t +u_i^t = v_i&i \in \mathscr {I}, t\in \mathscr {T}\\&w_i^t\le v_i\eta _i^t&i \in \mathscr {I}, t\in \mathscr {T}\\&u_i^t \le v_i(1-\eta _i^t)&i \in \mathscr {I}, t\in \mathscr {T}\\&\eta _i^t \in \{0,1\}&i \in \mathscr {I}, t\in \mathscr {T}\\&w_i^t, u_i^t \ge 0&i \in \mathscr {I}, t\in \mathscr {T}\\&\left\{ \tilde{r}_{jt} \right\} \in U \end{aligned}$$

Thus, problem (17) can be rewritten as:

$$\begin{aligned} \min \quad \gamma + \beta \sum _{t\in \mathscr {T}\setminus \{1\}} \sum _{j\in \mathscr {P}_{pc}} y_j^t \end{aligned}$$
(19)

s.t.

$$\begin{aligned}&\gamma \ge \sum _{i\in \mathscr {I}}c_i\sum _{t\in \mathscr {T}}w_i^t\\&\left\{ x_{ij}, \xi _{ij}^t, \chi _{ij}^t, y_j^t \right\} \in X, \quad \left\{ w_i^t, u_i^t, \eta _i^t \right\} \in V, \quad \left\{ \tilde{r}_{jt} \right\} \in U \end{aligned}$$

where V defines the workloads that generate feasible overtimes, according to constraints (6)–(8) plus the integrality clauses.

3.3 Implementor-Adversarial Algorithm

As introduced above, the robust problem can be interpreted as an implementor-adversarial iterative game. The implementor solves the following problem

$$\begin{aligned} \min&\gamma + \beta \sum _{t\in \mathscr {T}\setminus \{1\}} \sum _{j\in \mathscr {P}_{pc}} y_j^t\nonumber \\&\left\{ x_{ij}, \xi _{ij}^t, \chi _{ij}^t, y_j^t \right\} \in X, \quad \left\{ w_i^t, u_i^t, \eta _i^t \right\} \in V\nonumber \\&\left\{ \tilde{r}_{jt} \right\} \in \text{ realizations } \text{ generated } \text{ so } \text{ far } \end{aligned}$$
(20)

for deciding the assignments \(x_{ij}^*\), \(\xi _{ij}^{t*}\), \(\chi _{ij}^{t*}\) and \(y_j^{t*}\) that minimize the costs over all demand realizations generated so far.

The adversary solves the following problem:

$$\begin{aligned} \max&\sum _{i\in \mathscr {I}} c_i \sum _{t\in \mathscr {T}} w_i^t\nonumber \\&\left\{ w_i^t, u_i^t, \eta _i^t \right\} \in V, \quad \left\{ \tilde{r}_{jt} \right\} \in U\nonumber \\&\text{ last } \text{ assignments } \left\{ x_{ij}, \xi _{ij}^t, \chi _{ij}^t, y_j^t \right\} \text{ from } \text{ the } \text{ implementor } \end{aligned}$$
(21)

for choosing the demands \(r_{jt}^*\) that maximize the cost with respect to the last assignments just selected by the implementor.

Both problems take into account constraints (6); however, the implementor satisfies them by choosing the assignments for fixed values of demand, while the adversary does the very opposite. Let D be the set of constraints (6). We adapt the basic template of the implementor/adversarial algorithm [5] as follows. Each run of the adversarial problem provides a realization of the demand \(\left\{ r_{jt}^* \right\} \in U\) and the corresponding workload variables \(\left\{ w_i^{t*}, u_i^{t*}, \eta _i^{t*} \right\} \in V\). Either \(\sum _{i\in \mathscr {I}} c_i \sum _{t\in \mathscr {T}} w_i^{t*} > \gamma \) or \(\gamma \) is already the maximum cost, where \(\gamma \) is the last cost given by the implementor problem. In the former case, an equation of type

$$\begin{aligned} \sum _{j\in \mathscr {P}_{hc}} r_{jt}^* x_{ij} + \sum _{j\in \mathscr {P}_{pc}} r_{jt}^* \xi _{ij}^t + \sum _{j\in \mathscr {P}_{nc}} r_{jt}^* \chi _{ij}^t - w_i^t + u_i^t = v_i \end{aligned}$$

is added to the implementor formulation, which is consequently reoptimized. A sketch of the algorithm is illustrated in Table 1.

Table 1 Adopted implementor-adversarial algorithm
Fig. 1
figure 1

Boxplots of the robust vs the deterministic solution. Case 98 patients with \(T=5\), \(\theta =4\); \(\alpha _d=4\) (a); case 98 patients with \(T=5\), \(\theta =4\); \(\alpha _d=1\) (b); case 70 patients with \(T=5\), \(\theta =5\); \(\alpha _d=2\) (c); case 70 patients with \(T=8\), \(\theta =5\); \(\alpha _d=1\) (d)

4 Computational Tests and Results

We test our robust approach on several instances generated by assuming several mixes of patients, whose characteristics and demand evolution follow those in [8], with either \(P=70\) or \(P=98\). The number of bands H is chosen either equal to 6 or 10. Parameter \(\alpha _d\) takes the same value \(\alpha \) for any \(d=1,\ldots , H-1\), and we assume \(\alpha \) either equal to 1, 2 or 4. Moreover, we set \(\alpha _0=P\) in such way that all patients have the opportunity to remain in their current band without varying their actual demand. Finally, we set the \(\beta =1\), \(c_i=1\) for each nurse i, and \(\theta =3\).

The commercial framework IBM Cplex 12.5 and the language AMPL have been used to solve and implement the model. Instances have been run on a 2-core Linux processor clocked at 2 GHz with 16 GB of RAM. Time limits of 1200 and 300 s have been imposed for the implementor and the adversarial problem, respectively. On the one hand, we evaluate the choice of the parameters in terms of the computational time spent for finding the optimal robust solution. On the other hand, we measure the quality of the assignments with the aim of finding the best values for all of the parameters involved.

As for the computational times, we found that the maximum time spent for solving a robust problem over the tested instances is 11,777 s, which is acceptable for a weekly solution of the assignment problem in practice. We observed that the length of \(\mathscr {T}\) directly affects the number of the iterations, thus increasing the computational time. Moreover, it seems that there is no correlation between the computational time and the values of H and \(\alpha \).

As for the quality of the robust assignments, we have compared the deterministic and the robust solutions when executed on a set of simulated scenarios. In particular, we have generated 20 simulated scenarios by drawing the demands from their probability density functions with a Monte Carlo approach. Then, we have compared the boxplots of the costs over the 20 scenarios from both solutions. Results are provided in Fig. 1 for four tested configurations. We observed that, in all cases, the robust solutions have a lower cost than the deterministic ones. The robust model is able to decrease the cost needed to cope with the worst demand realization and, thus, it allows to properly represent the real context.

Looking at the parameters, we observed that the best robust results occur when both H and \(\alpha \) take small values.

5 Conclusions

In this work we consider, for the first time in the literature, time-related demands in the HC nurse-to-patient assignment problem under continuity of care and uncertain demands. The adopted implementor-adversarial approach [5] has proved to adequately address the time-dependency of demands, and the results show good quality solutions in terms of costs when executed in several scenarios.

Future work will extend the computational analyses. Moreover, we will improve the approach by postponing the assignment decisions for patients without continuity of care, to adapt the solution based on the actual demands, as in the real practice.