1 Introduction

Hospitals, whose production output is service, often come across issues of long waiting times, surgeries cancellation for patients and even worst resource overload occur frequently. Within every Hospital, Operating Rooms (ORs) are an important unit. As indicated in [30], the ORs account for approximately 33% of the total hospital budget because it includes high staff costs (e.g., surgeons, anaesthetists, nurses) and material cost. Nowadays, in most modern Hospitals, long surgical waiting lists are present because of inefficient planning. Therefore, it is extremely important to improve the efficiency of ORs to enhance the survival rate and satisfaction of patients, thereby improving the overall quality of healthcare system. The Operating Room Scheduling (ORS) [1, 6, 29, 30] problem is the task of assigning patients to ORs by considering specialties, surgery durations, shift durations, beds availability and, most importantly the availability of surgical teams for the entire duration of the surgery. Further, the solution must prioritise patients based on health urgency. In recent years a solution based on Answer Set Programming (ASP) [8, 21, 22] was proposed and is used for solving such problem [14, 15], together with other similar scheduling problems in this context, given its intuitive semantics [9] and the availability of efficient solvers put forward by ASP Competitions (see, e.g., [10, 18, 19]). We have recently enhanced the first solution by incorporating beds management [12]. However, the drawback with these solutions is that they do not consider availability of surgical teams which are an important part of the surgical process.

In this paper we improve our basic solution [14, 15] following another direction, and present an enhanced encoding that takes into explicit account the availability of surgical teams for planning surgical procedures. The problem is expressed in ASP as modular additions to previous, more limited, encoding of ASP rules implementing the surgical teams, and then efficient solvers like clingo [17] are used to solve the resulting ASP encoding. Results for planning horizons up to the target 5-days planning, obtained on different benchmarks and scenario with realistic parameters for a small-medium-sized Hospital, are positive and inline with Hospital needs, and further confirm that ASP is a suitable methodology for solving scheduling problems in this context.

The paper is structured as follows. Section 2 presents needed preliminary about ASP. Then, Sect. 3 describes the target problem in an informal way and as a mathematical formulation, whose ASP encoding is presented in Sect. 4. Section 5 shows the results of our experiments. The paper ends in Sect. 6 and 7 by discussing related work, and by showing conclusions and possible topics for further research.

2 Answer Set Programming

Answer Set Programming (ASP) is a programming paradigm developed in the field of non monotonic reasoning and logic programming. It is a form of declarative programming oriented towards difficult primarily NP-hard search problems and is based on the stable model (answer set) semantics. This section presents in the first paragraph the syntax of the ASP language, for easy the readability of the encoding, and then a widely used shortcut in the second paragraph. The semantics is presented informally while describing the encoding, and details can be found in [9].

Syntax. The syntax of ASP is similar to the one of Prolog. Variables are strings starting with uppercase letter and constants are non-negative integers or strings starting with lowercase letters. A term is either a variable or a constant. A standard atom is an expression \(p(t_1, \ldots , t_n)\), where p is a predicate of arity n and \(t_1, \ldots , t_n\) are terms. An atom \(p(t_1, \ldots , t_n)\) is ground if \(t_1, \ldots , t_n\) are constants. A ground set is a set of pairs of the form \(\langle consts\, :\,conj \rangle \), where consts is a list of constants and conj is a conjunction of ground standard atoms. A symbolic set is a set specified syntactically as \(\{Terms_1 : Conj_1; \cdots ; Terms_t : Conj_t \}\), where \(t>0\), and for all \(i \in [1,t]\), each \(Terms_i\) is a list of terms such that \(|Terms_i| = k > 0\), and each \(Conj_i\) is a conjunction of standard atoms. A set term is either a symbolic set or a ground set. Intuitively, a set term \(\{X\, :\, a(X,c), p(X);Y\, :\, b(Y,m)\}\) stands for the union of two sets: the first one contains the X-values making the conjunction a(Xc), p(X) true, and the second one contains the Y-values making the conjunction b(Ym) true. An aggregate function is of the form f(S), where S is a set term, and f is an aggregate function symbol. Basically, aggregate functions map multisets of constants to a constant. The most common functions implemented in ASP systems are the following:

  • #count, number of terms;

  • #sum, sum of integers.

An aggregate atom is of the form \(f(S) \prec T\), where f(S) is an aggregate function, \(\prec \ \in \{<, \le , >, \ge , \ne , =\}\) is a comparison operator, and T is a term called guard. An aggregate atom \(f(S) \prec T\) is ground if T is a constant and S is a ground set. An atom is either a standard atom or an aggregate atom. A rule r has the following form:

$$a_1 \ \vee \ \ldots \ \vee \ a_n \ \text { :-- }\ b_1,\ldots , b_k, not\ b_{k+1},\ldots , not\ b_m.$$

where \(a_1,\ldots ,a_n\) are standard atoms, \(b_1,\ldots ,b_k\) are atoms, \(b_{k+1},\ldots ,b_m\) are standard atoms, and \(n,k,m\ge 0\). A literal is either a standard atom a or its negation \(not\ a\). The disjunction \(a_1 \vee \ldots \vee a_n\) is the head of r, while the conjunction \(b_1 , \ldots , b_k, not\ b_{k+1} ,\) \(\ldots , not\ b_m\) is its body. Rules with empty body are called facts. Rules with empty head are called constraints. A variable that appears uniquely in set terms of a rule r is said to be local in r, otherwise it is a global variable of r. An ASP program is a set of safe rules, where a rule r is safe if both the following conditions hold: (i) for each global variable X of r there is a positive standard atom \(\ell \) in the body of r such that X appears in \(\ell \); and (ii) each local variable of r appearing in a symbolic set \(\{ Terms \, :\, Conj \}\) also appears in \( Conj \).

A weak constraint \(\omega \) is of the form:

$$:\sim b_1,\ldots , b_k, not\ b_{k+1},\ldots , not\ b_m.\ [w@l] $$

where w and l are the weight and level of \(\omega \), respectively. (Intuitively, [w@l] is read “as weight w at level l”, where weight is the “cost” of violating the condition in the body of w, whereas levels can be specified for defining a priority among preference criteria). An ASP program P is a finite set of rules. An ASP program with weak constraints is \(\varPi = \langle P,W \rangle \), where P is a program and W is a set of weak constraints.

A standard atom, a literal, a rule, a program or a weak constraint is ground if no variables appear in it.

Syntactic Shortcuts. We will also use choice rules of the form \(\{p\}\), where p is an atom. Choice rules can be viewed as a syntactic shortcut for the rule \(p \vee p'\), where \(p'\) is a fresh new standard atom not appearing elsewhere in the program.

3 Problem Description

This section provides the description and the requirements of our problem, both informally and as a mathematical formulation, in two separate subsections.

3.1 Informal Description

The elements of the waiting list are called registrations. Moreover, registrations are not all equal, as they can belong to different specialties and they can have different priorities and duration. All ORs are available for a specialty according to the Hospital Master Surgical Schedule (MSS), and for 5 consecutive hours (300 min) in a single shift, while a full day consists of two shifts. Of course, the assignments must guarantee that the sum of the predicted duration of surgeries assigned to a particular OR shift does not exceed the length of the shift itself. For each registration we consider three priority score P1, P2, and P3, where P1 is for high priority registrations or very urgent, P2 is for medium priority and P3 is for low priority. Since P1 gathers high priority registrations, they must be all assigned to an OR, followed by P2 registrations over the P3. Additionally, in each specialty (considered to be 5 as target in small-medium-sized Hospitals) surgical teams are allocated with number of surgeons and anaesthetists every day as shown in Table 1. Tables 2 and 3, instead, show how many surgeons/anesthetists are available in each shift and for each specialty. However, surgeons assigned to a shift in a day are different from the ones assigned for the other shift of the same day, while the same anesthetists cover both shifts of the same day. Every surgeon works specifically for a number of hours every day; also surgeons in each specialty are assigned only to a single shift in a day, i.e., they either work in the morning (represented as shift 1, 3, 5, 7 and 9) or in evening shift (represented as shift 2, 4, 6, 8 and 10) as shown in Table 2. The anaesthetists are also linked to specialty and they also work for a fixed number of hours every day, but they can work together with surgeons during any shift of the day as shown in Table 3. In our model, we also assume that once a surgery is started in an OR it cannot be interrupted. Further, surgeons cannot operate on more than one patient at the same time. The overall goal is to assign the maximum number of registrations to the ORs, respecting the priorities, and taking into account the availability of respective surgical teams in a particular specialty for the complete surgery duration.

Table 1. Total number of surgeons and anaesthetists in each specialty.
Table 2. Surgeons availability for each specialty and in each day.
Table 3. Anaesthetists availability for each specialty and in each day.

3.2 Mathematical Formulation

In this subsection we proceed by expressing our ORS problem in a more rigorous mathematical formulation. The first step is to describe more rigorously the elements we are dealing with. Let

  • R be a set of registrations,

  • SP be a set of specialties,

  • O be a set of operating rooms,

  • SU be a set of surgeons,

  • A be a set of anaesthetists,

  • SH be a set of shifts,

  • D be the set of days in the planning period,

  • \( shift\_duration \) be a constant equal to 300 and representing the duration in minutes of each shift,

  • \( slot\_duration \) be a number in the set \(\{10, 20, 40, 60\}\) representing the duration in minutes of each slot,

  • \(ST=\{0, 1, \ldots , shift\_duration \div slot\_duration \}\) be the set of time slots.

We are ready to define the functions that can help establish the relations between the elements of the ORS problem.

Definition 1

(ORS problem) Let

  • \(p:R\mapsto \{1,2,3\}\) be a function associating each registration to a priority;

  • \(\delta :R\mapsto [1, shift\_duration ]\) be a function associating each registration to a duration;

  • \(\sigma :R \mapsto SP\) be a function associating each registration to a specialty;

  • \(mss:O \times SH \times SP \times D\mapsto \{0, 1\}\) be a function such that \(mss(o, sh, sp, d)=1\) if the OR o is reserved to the shift sh and the specialty sp during the day d, and 0 otherwise;

  • \( surg : SU \times SP \times SH \mapsto \{0, 1\}\) be a function such that \( surg (su, sp, sh)=1\) if the surgeon su is associated to the specialty sp during the shift sh, and 0 otherwise;

  • \( an : A \times SP \times SH \mapsto \{0, 1\}\) be a function such that \( an (a, sp, sh)=1\) if the anaesthetist a is associated to the specialty sp during the shift sh, and 0 otherwise;

  • \( surgWT : SU \times D \mapsto \mathbb {N}\) be a function associating each surgeon and day to a working time;

  • \( anWT : A \times D \mapsto \mathbb {N}\) be a function associating each anaesthetist and day to a working time.

Let \(x:R \times SU \times A \times O \times SH \times D \times ST \mapsto \{0, 1\}\) be a function such that \(x(r, su, a, o, sh, d, st)=1\) if the registration r is assigned to the surgeon su, the anaesthetist a and the operating room o during the shift sh of the day d and the time slot st, and 0 otherwise. Moreover, for a scheduling x let \(A_x = \{(r,su, a, o, sh, d, st) \mid r \in R, su \in SU, a \in A, o \in O, sh \in SH, d \in D, st \in ST, x(r,su, a, o, sh, d, st) = 1\}\) and \(R^*_x = \{r \mid (r, su, a, o, sh, d, st) \in A_x\}\). Then, given sets R, SP, O, SU, A, SH, D, ST and functions p, \(\delta \), \(\sigma \), \( surg \), \( an \), \( surgWT \), \( anWT \), and \( shift\_duration = 300\) and \( slot\_duration \in \{10, 20, 40, 60\}\), the ORS problem is defined as the problem of finding a schedule x, such that

(c1):

\(st \cdot slot\_duration + \delta (r) \le shift\_duration \;\;\; \forall (r,su, a, o, sh, d, st) \in A_x\);

(c2):

\( mss (o, sh, \sigma (r), d)\cdot surg (su, \sigma (r), sh)\cdot an (a, \sigma (r), sh)=1\;\;\; \forall (r,su, a, o, sh, d, st) \in A_x\);

(c3):

\(|\{(su, a, o, sh, d, st) : (r,su, a, o, sh, d, st) \in A_x\}| \le 1 \;\;\;\forall r \in R\);

(c4):

\(x(r_1,su_1,a_1,o,sh,d,st) \cdot x(r_2,su_2,a_2,o,sh,d,st) = 0 \;\;\;\forall r_1, r_2 \in R : r_1 \ne r_2\);

(c5):

\(|\{r : (r,su,a,o,sh,d,st) \in A_x, st \le t < st+\delta (r) \div slot\_duration \}| \le 1 \;\;\; \forall o \in O, sh \in SH, t \in ST : mss(o, sh, sp, d) = 1\);

(c6):

\(|\{r : (r,su,a,o,sh,d,st) \in A_x\}| \le 1 \;\;\; \forall su \in SU : surg (su, sp, sh)=1, sp \in SP\);

(c7):

\(|\{r : (r,su,a,o,sh,d,st) \in A_x, st \le t < st+\delta (r) \div slot\_duration \}| \le 1 \;\;\; \forall su \in SU : surg (su, sp, sh)=1, sp \in SP\);

(c8):

\(|\{r : (r,su,a,o,sh,d,st) \in A_x\}| \le 1 \;\;\; \forall a \in A : an (a, sp, sh)=1, sp \in SP\);

(c9):

\(|\{r : (r,su,a,o,sh,d,st) \in A_x, st \le t < st+\delta (r) \div slot\_duration \}| \le 1 \;\;\; \forall a \in A : an (a, sp, sh)=1, sp \in SP\);

(c10):

\(\sum _{(r,su,a,o,sh,d,st) \in A_x} \delta (r) \le surgWT (su, d) \;\;\; \forall su \in SU, d \in D\);

(c11):

\(\sum _{(r,su,a,o,sh,d,st) \in A_x} \delta (r) \le anWT (a, d) \;\;\; \forall a \in A, d \in D\);

(c12):

(\(c_{12}\)) \(\{r : r \in R, p(r)=1\} \subseteq R^*_x\);

  • Condition (c1) ensures that each registration is assigned to a time slot only if it does not exceed the shift duration.

  • Condition (c2) ensures that each registration is assigned to an OR, surgeon and anaesthetist that are in the same specialty of the registration.

  • Condition (c3) ensures that each registration is scheduled at most once.

  • Condition (c4) ensures that two different registrations cannot be scheduled in the same OR, shift and time slot.

  • Condition (c5) extends condition (c4) to take into account the duration of each registration.

  • Condition (c6) ensures that a surgeon cannot work at the same time slot and shift in different ORs.

  • Condition (c7) extends condition (c6) to take into account the duration of each registration.

  • Conditions (c8) and (c9) are similar to (c6) and (c7), respectively, by considering anaesthetists instead of surgeons.

  • Condition (c10) (resp. (c11)) ensures that surgeons (resp. anaesthetists) do not exceed their daily number of working hours.

Finally, condition (c12) imposes all priority 1 registrations to be assigned.

Definition 2

(Solution) A solution \(\psi \) is a schedule x that satisfies all conditions from (c1) to (c12).

Definition 3

(Unassigned registrations) Given a solution \(\psi \), let \(R^{pr}_\psi = \{r \mid r \in R, p(r) = pr, r \not \in R^*_\psi \}\). Intuitively, \(R^{pr}_\psi \) represents the set of registrations of priority pr that were not assigned to any OR.

Definition 4

(Minimal scheduling solution) A solution \(\psi \) is said to dominate solution \(\psi '\) if \(|R^2_\psi | < |R^2_{\psi '}|\), or if \(|R^2_\psi | = |R^2_{\psi '}|\) and \(|R^3_\psi | < |R^3_{\psi '}|\). A solution is minimal, if it is not dominated by any other scheduling solutions.

4 ASP Encoding for ORS with Surgical Teams

In this section we present the input predicates and our ASP encoding for representing data and our solution, in two different subsections.

4.1 Data Model

The input data to our model is specified by means of the following atoms:

  • Instances of time(S,ST) show the time slots (ST) for each shift (S), i.e., each shift is divided it into a certain number of time slots, say n. In our case, we have exactly n instances of time(S,ST) for each shift, where ST ranges from 1 to n. Note that n is set to \( shift\_duration \div slot\_duration \) as described in Sect. 3.

  • Instances of registration(R,P,SU,SP) represent the registrations, with an identifier (R), a priority score (P), the duration of the surgery expressed in terms of time slots (SU), and the id of the specialty it belongs to (SP).

  • Instances of mss(O,S,SP,D) link each operating room (O) to a shift (S) for each specialty (SP) and planning day (D), as established by the MSS.

  • Instances of surgeon(SR,SP,S) represent the surgeons with an id (SR) for each specialty (SP) and shift (S).

  • Instances of an(AN,SP,S) show the anaesthetists with an id (AN) for each specialty (SP) and shift (S).

  • Instances of surgWT(SWT,SR,D) represent the total work time (SWT) expressed in time slots for surgeons with id (SR) for each day (D).

  • Instances of anWT(AWT,AN,D) represent the total work time (AWT) expressed in time slots for anaesthetists with id (AN) for each day (D).

The output is stored in an assignment to atom of the following form:

figure a

representing that the registration (R) with priority (P) is assigned with surgeon id (SR) and anaesthetist id (AN) to the operating room (O) during the shift (S) of the day (D) with a time slot (ST).

4.2 Encoding

The related ASP encoding is shown in Fig. 1, and is described in this subsection. The encoding is based on the Guess&Check programming methodology.

Fig. 1.
figure 1

ASP encoding of the ORS problem with surgical teams.

Rule (\(r_1\)) guesses an assignment for the registrations, surgeons and anaesthetists to an OR in a given day, shift and with a time slot among the ones permitted by the MSS for the particular specialty the registrations, surgeons and anaesthetists belongs to, such that the registrations assigned with a slot time and surgery duration should be less than slots of OR, where slots represents the total number of slots in the shift. Note that (\(r_1\)) encodes conditions (c1) and (c2) thanks to the minimality property of the ASP semantics.

After guessing an assignment for the registrations, the encoding presents constraints from (\(r_2\)) to (\(r_{11}\)) to discard some unwanted assignments. Note that each constraint \(r_{i}\) \((i=2..11)\) encodes condition (cN), N = i+1.

Table 4. Total number of randomly generated registrations for each benchmark.

Finally, weak constraints (\(r_{12}\)) and (\(r_{13}\)) are used to give preference to registrations having priority 2 over those having priority 3, where totRegsP2 and totRegsP3 are constants representing the total number of registrations having priority 2 and 3, respectively.

5 Experimental Results

This section reports about the results of an empirical analysis of the ORS problem with surgical teams. In the first subsection we present the benchmarks we have employed, whose results coupled with our encoded are shown in the second subsection. The third subsection reports about a further analyses focused on anesthetists WT efficiency.

5.1 Benchmarks

For each scenario, the characteristics of the tests are as follows:

  • 4 scenarios for testing the dimension of the slot interval: A, B, C, and D for slot interval of 10, 20, 30, and 60 min, respectively.

  • 4 different benchmarks, with a planning period of 1, 2, 3 and 5 working days;

  • For each benchmark the total number of randomly generated registrations are 350 for 5 days, 210 for 3 days, 140 for 2 days and 70 for 1 day, respectively;

  • 5 specialties;

  • 20 surgeons assigned to the 5 specialties;

  • 20 anaesthetists assigned to the 5 specialties;

  • 4 h of work time in a day for each surgeon;

  • 6 h of work time in a day for each anaesthetist;

  • 10 ORs distributed among the specialties;

  • 5 h morning and afternoon shifts for each OR summing up to 500, 300, 200 and 100 h of OR available time for the four benchmarks, resp..

Table 4 shows the distribution of the total number of randomly generated registrations for each benchmark of 5, 3, 2 and 1 day, for each specialty, together with the distribution of ORs for each specialty.

5.2 Results

Experiments have been run on a HP 630 Notebook with Intel(R) Core(TM) i3 CPU M380@2.53GHz. The ASP system used is clingo [17]. Results of the experiments are reported for scenario A in Table 5, for scenario B in Table 6, for scenario C in Table 7 and for scenario D in Table 8, respectively.

Each benchmark was tested 10 times with different randomly generated inputs. A time limit of 300 s was set for each experiment. In each table averages for 10 instances for each benchmark are reported. The first three columns show the number of assigned registrations out of the generated ones for each priority P1, P2 and P3, the fourth column shows the cumulative assigned registrations, while the last three columns show a measure of the total time occupied by the assigned registrations as a percentage of the total OR time available (indicated as OR time Eff in the tables) and the total percentage of surgeons and anesthetists working time (indicated as Surg WT Eff and Anest WT Eff in the tables, respectively).

As we can see in scenario A (Table 5), with slot interval of 10 min, we obtain results only for schedules up to 3 days, while in the case of the 5-day benchmark the computation time exceeds our time limit on all instances. Scenario B (Table 6) details the scheduling results with slot interval of 20 min. It can be seen that OR efficiency is 75% while the Surgeons and Anesthetists WT efficiency remain greater than 90% and 60%, respectively, for all benchmarks in this scenario. In scenario C (Table 7) with a slot interval of 30 min, the OR efficiency is around 76% while the Surgeons and Anesthetists WT efficiency are enhanced up to 95% and 63% for all benchmarks, respectively. In scenario D (Table 8) with a slot interval of 60 min, OR efficiency is almost 79% while the Surgeons WT efficiency is further enhanced to more than 95%, and Anesthetists WT efficiency is up to 65%.

In all the evaluated benchmarks for different scenarios we observed that the OR efficiency and the anesthetists WT efficiency are limited by the fact that we reached the ceiling of the surgeons maximum working hours. Considering that in our setup we had one anesthetist for each surgeon, the ratio between anesthetist and surgeon efficiencies coincides to the ratio between their maximum working time of the surgeons and the anesthetists, i.e., 2/3. In a real application, this would be a useful information for the Hospital manager to quantify the excess of anesthetists and reorganize their numbers or their working times.

Overall, we obtained satisfying results but for the 5-day schedule length for the more fine-grained slot interval of Scenario A. In order to further investigate the issue, we moved on a different dimension and tested the Scenario A configuration with half the number of registrations (35 instead of 70 for each planning day), surgeons (10 instead of 20), anesthetists (10 instead of 20) and ORs (5 instead of 10). With these numbers we can reach acceptable solutions after 60 s of computation time (see Table 9) for every benchmark, including the 5-day one.

Table 5. Averages of the results for 5, 3, 2 and 1 day benchmarks for Scenario A.
Table 6. Averages of the results for 5, 3, 2 and 1 day benchmarks for Scenario B.
Table 7. Averages of the results for 5, 3, 2 and 1 day benchmarks for Scenario C.
Table 8. Averages of the results for 5, 3, 2 and 1 day benchmarks for Scenario D.

5.3 Extended Analysis

In order to improve the anesthetists WT efficiency, we further analysed our solution considering the new setting introduced at the end of the previous analysis, and introducing 3 alternative scenarios wrt number of surgeons and anesthetists:

  • Scenario 1: 10 surgeons and 8 anesthetists

  • Scenario 2: 10 surgeons and 7 anesthetists

  • Scenario 3: 10 surgeons and 5 anesthetists

Overall, for each new scenario, the characteristics of the tests performed that were modified wrt the analysis in the previous subsection are:

  • For each benchmark the total number of randomly generated registrations were 175 for 5 days, 105 for 3 days, 70 for 2 days and 35 for 1 day;

  • 10 surgeons assigned to the 5 specialties;

  • 10 anaesthetists assigned to the 5 specialties;

  • 5 ORs, unevenly distributed among the specialties;

Results of the extended analysis are reported in this section for Scenario 1 in Table 10, for Scenario 2 in Table 11 and for Scenario 3 in Table 12, respectively, organized as Tables 5, 6, 7 and 8. Each benchmark was tested 10 times with different randomly generated inputs with a time limit of 60 s set for each experiment, and averages over 10 instances.

As we can see, in Scenario 1 (Table 10) the OR efficiency is greater than 64% while the Surgeons and Anesthetists WT efficiency remain greater than 80% and 67%, respectively. In Scenario 2 (Table 11) OR efficiency is again between 64% and 68%, with the Surgeons WT efficiency of around 84% and improved Anesthetists WT efficiency up to 80%. Finally, on Scenario 3 (Table 12) the OR efficiency decreases around 50%, while the Surgeons WT efficiency is still from 64% to 67%, and Anesthetists WT efficiency is further enhanced up tp 90%.

6 Related Work

Table 9. Averages of the results for 5, 3, 2 and 1 day benchmarks with slot interval 10 min and reduced number of registrations.
Table 10. Averages of the results for 5, 3, 2 and 1 day benchmarks with 10 surgeons and 8 anesthetists for Scenario 1.
Table 11. Averages of the results for 5, 3, 2 and 1 day benchmarks with 10 surgeons and 7 anesthetists for Scenario 2.
Table 12. Averages of the results for 5, 3, 2 and 1 day benchmarks with 10 surgeons and 5 anesthetists for Scenario 3.

In this section we discuss some relevant works related to this research. Meskens et al. [30] considered the surgical teams in the computation of an OR schedule, and developed a model using Constraint Programming (CP) with multiple constraints such as availability, staff preferences and affinities among surgical teams. They optimize the use of ORs by minimizing makespan and maximizing affinities among surgical team members. The effectiveness of their proposed method for improving surgical cases was evaluated using real data from an Hospital. Hamid et al. [29] incorporated the decision-making styles (DMS) of the surgical team to improve the compatibility level by considering constraints such as the availability of material resources, priorities of patients, and availability, skills, and competencies of the surgical team. They developed a multi-objective mathematical model to schedule surgeries. Two metaheuristics, namely Non-dominated Sorting Genetic Algorithm and Multi-Objective Particle Swarm Optimization, were developed to find pareto-optimal solutions. Xiang et al. [34] proposed an Ant Colony Optimization (ACO) approach to surgical scheduling taking into account all resources in the entire process of a surgery. The problem was represented as an extended multi-resource constrained flexible job shop scheduling problem, which was solved using a two-level hierarchical graph to integrate sequencing job and allocating resources. To evaluate the efficiency of ACO, a Discrete Event System (DES) model of an OR system was developed in the simulation platform SIMIO. Monteiro et al. [31] developed a comprehensive multi-objective mathematical model using epsilon-constraint method coupled to the CPLEX solver. Vijayakumar et al. [33] used Mixed Integer Programming (MIP) model for multi-day, multi-resource, patient-priority-based surgery scheduling. A First Fit Decreasing algorithm was developed. From a solution time perspective, their model took hours and in most cases was unable to optimally solve the problem. Belkhamsa et al. [7] proposed two meta heuristics, an Iterative Local Search (ILS) approach and Hybrid Genetic Algorithm (HGA) to solve a daily surgery scheduling problem. Zhou et al. [35] developed an Integer Programming model for optimal surgery schedule of assigning patients to different resources in any surgical stage. They used Lagrangian Relaxation algorithm and solved the subproblem by using branch and bound. They verified their model using real data instances from an Hospital. A common issue with all such solutions seem to be computation time and scalability.

About, instead, other scheduling problems in which ASP have been proficiently employed: Nurse Scheduling Problem [3, 4, 16], where the goal is to create a scheduling for nurses working in Hospitals; Team Building Problem [32], where the goal is to allocate the available personnel of a seaport for serving the incoming ships; the Conference Paper Assignment Problem [5], which deals with the problem of assigning reviewers in the PC to submitted conference papers; and scheduling production materials between storage locations and assembly station [20].

Finally, this is an extended and revised version of a paper appearing in [13], with the following main improvements: (i) the mathematical formulation (Sect. 3.2), (ii) the precise definition of the problem (still Sect. 3.2), and (iii) the extended experimental analysis (Sect. 5.3).

7 Conclusions

In this paper we employed ASP for solving ORS problems with surgical teams. The results of our experiments confirm that ASP is a suitable methodology for addressing planning and scheduling problems in healthcare system. We presented the results of an experimental analysis on several directions to check scalability of our solution in terms of efficiency, considering shift duration, surgeons and anesthetist working hours. This solution achieved satisfied ORs, surgeons’ and anaesthetists’ efficiency also for the planning length of 5 days. As a future work we would like first to analyze the performance of our solution on real data, that we only recently obtained. We also want to integrate the extension of the ORS model with beds management with the one presented in this paper, in order to have a more complete unified solution. We also plan to compare to alternative methods, assuming this is possible (i.e., availability of alternative solutions), and viable (i.e., very same problem solved). Finally, through results are satisfying, we plan to work also on improving performance by both evaluating more solvers, e.g., WASP [2], other than Clingo actually used, and employing SAT techniques (e.g., [11, 25,26,27,28]), given the strong existing relation between ASP and SAT [23, 24].