Dynamic Surgery Scheduling Based on an Improved Genetic Algorithm

We formulated a new stochastic programming formulation to solve the dynamic scheduling problem in a given set of elective surgeries in the day of operation. The problem is complicated by the fact that the exact surgery durations are not known in advance. Elective surgeries could be performed in parallel in a subset of operating rooms. The appointment times and assignments of surgeries were planned by an experienced nurses in advance. We present a mathematical model to capture the nature of dynamic scheduling problem. We propose an efficient solution based on an improved genetic algorithm (IGA). Our numerical results showed that dynamic scheduling with the IGA improves the resource utilization as measured by surgeon waiting time and operation room idle time.


Introduction
High-quality medical resources in China are scarce, and the inefficient use of medical resources makes the scarcity crisis even severer. Surgeries require several medical resources, including operating rooms and human resources [1,2]. Surgeries are often classified into elective surgery and urgent surgery. Elective surgeries are planned in advance. Compared with elective surgeries, urgent surgeries cannot be planned in advance because of their uncertain nature, and they must be scheduled on a much shorter notice because of the higher priority of urgent surgeries. In many hospitals, urgent surgeries are performed separately. e resources are not shared between elective and urgent surgeries. Urgent surgeries are not taken into consideration in generating a schedule for elective surgeries.
Based on an investigation in Shanghai First People's Hospital, we learned that some operating rooms with special equipment are dedicated to specific types of surgeries. A subset of operating rooms with identical equipment is treated as a common shared resource to serve different elective surgeries. In such a setting, these surgeries can be parallel processed. An experienced nurse must decide on the appointment time for each surgery and the assignment of surgeries to operating rooms prior to the day of surgery. e decisions are made based on estimated surgery durations but are not suitable for practical application. In real situation, the operating process is not as expected. In fact, the duration of surgery is often shortened or lengthened. erefore, reducing the wasted resource cost incurred by idle operating rooms and waiting surgeons is a challenge. Our study is motivated in part by problems faced by the scheduler who is in charge of elective surgery scheduling.
Based on the actual situation, this paper analyzes the main factors of elective surgery scheduling and studies how to deal with it. e scheduler makes the plan based on limited information in advance. e available information was being continually updated until the day ended. A better schedule is possible when the new information acquired by the scheduler is taken into account. We considered dynamic scheduling with the aim of finding the optimal scheduling strategy. e dynamic surgery scheduling problem was formulated as a multistage decision-making optimization process. At each decision point, we must decide on the sequence and assignment of remaining surgeries according to current status information. e article deals with the simultaneous optimization of both decisions dynamically across multiple operating rooms under uncertainty. Higher resource utilization corresponds to lower wasted cost. e reduction in wasted cost through higher resource utilization can be realized by an optimal schedule. e objective of the model was to minimize the weighted sum of operating room idle time and surgeon waiting time. We analyzed the properties of the dynamic scheduling problem. e mean and standard deviation of surgery duration was estimated based on historical data. e state information of the system was being continually updated until the day ended. Specifically, we rescheduled the remaining surgeries at each decision point based on the current-state information. e formulated dynamic scheduling problem is NP-hard. us, we propose an improved genetic algorithm (IGA) to solve the stochastic optimization model. Holland [3] first proposed a genetic algorithm in 1975. e genetic algorithm has some advantages, such as global optimization, parallel searching, intelligence, and robustness. It has a number of distinct components of the chromosome encoding, the fitness function, the genetic operators, selection, and evolution. e standard component can be improved with due adaptation in an IGA. In this paper, a new chromosome-encoding strategy is proposed according to the nature of dynamic scheduling problem. e current status information of the system at a decision point, including the actual release time of the operating room available, the estimated release times of other operating rooms, and the planned starting times of remaining surgeries, is encoded in a specific chromosome. Each chromosome represents a schedule for the remaining surgeries at that time. e initial population of the chromosomes was randomly generated. en, a sequence of successive generations evolved. In this way, the IGA ensures the convergence to a best-fitness solution.
e contributions made in this paper are summarized as follows. First, we rescheduled the remaining surgeries by taking into account the new information available at each decision. Second, we constructed a mathematical model of the rescheduling process at any of the decision points. is model was proposed for the joint optimization of surgery sequencing and assignment. ird, we present an IGA that is essential to solve the problem. We proposed a new chromosome-encoding strategy. Each chromosome contains all the updated system information in real time. We also provided a novel way of transforming the solution into the chromosome embodied by code. At last, we quantified the benefit of dynamic scheduling and analyzed the performance of the IGA. e experimental results indicated that our proposed method can obtain better efficiency and global optimization than other common methods.

Related Work
Khaniyev et al. [4] developed a hybrid heuristic algorithm for the surgery scheduling problem. eir objective was to reduce patient waiting times, operating room idle time, and overtime, and the results showed a 1.22% average performance gap. Lin and Chou [5] proposed a hybrid genetic algorithm that can find near-optimal solutions for the operating room scheduling problem. Zhu et al. [6] proposed a heuristic algorithm incorporated with the grey wolf optimizer with variable neighborhood search to solve operating room scheduling problems. Nasiri et al. [7] developed a fuzzy robust stochastic optimization approach to tackle the multiobjective surgery scheduling model. Hooshmand et al. [8] studied a joint optimization problem of scheduling and rescheduling decisions and developed a genetic algorithm to solve the novel mathematical model. Kamran et al. [9] proposed a sample average approximation method and Benders' decomposition technique to solve the formulated model of two-stage stochastic programming and two-stage chance-constrained stochastic programming. Vali-Siar et al. [10] proposed metaheuristic and heuristic approaches to investigate integrated planning and scheduling problems. e robust counterpart of the problem of allocating operating rooms to surgical cases was solved using a cutting-plane approach [11]. e operating room planning and scheduling problems of a coalition of multiple hospitals were solved by a novel logic-based Benders' decomposition approach [12]. Denton et al. [13] proposed the longest mean service duration fist sequence for sequencing customers. Batun et al. [14] developed a new two-stage stochastic mixed-integer program model to minimize the operation cost under uncertainty. Zhang et al. [15] proposed an algorithm by combining a two-stage stochastic programming approximation and some look-ahead strategies to minimize the total expected cost. Erdogan and Denton [16] scheduled customers dynamically under the condition of first-come-first-served. Erdogan et al. [17] formulated a two-stage stochastic mixed-integer program for the dynamic sequencing and scheduling of appointment requests. Klassen and Yoogalingam [18] developed a simulation optimizing approach to optimize the rules of stochastic appointment scheduling problem. Begen et al. [19] developed a sampling-based approach to determine the planned starting time of each appointment. Hovlid et al. [20] developed a redesigned pathway to reduce the cancellation of planned surgeries. Earlier works on operating room resource utilization concerns service duration under uncertainty [21][22][23]. Scheduling surgeries is challenging because of the random surgery duration [24][25][26][27].
Wasted cost is incurred when operating rooms are idling and surgeons are waiting. Surgeons and other paramedics experience strain differently across the phases of an operation and need effective interventions [28]. Efficient operating room scheduling can lead to cost reduction and utilization improvement [29]. e high utilization of medical resources is necessary to maximize the satisfaction level of patients. Ballestín et al. [30] considered rescheduling patients a few days before the actual period. Some surgeries may be canceled, or other surgeries may be added in the final schedule.
e revision of the initial schedule is called rescheduling process. Essen et al. [31] focused on surgery rescheduling by taking into account the preferences and priorities of the stakeholders.
In this article, we focused on surgery scheduling optimization to maximize resource utilization. e study discusses the dynamic scheduling problem of a given set of elective surgeries on the day of execution. We do not consider cancellations of elective surgeries in this article.
Our surveys showed that the given set of elective surgeries was scheduled by the scheduler the day before the operation. We focused on a dynamic scheduling strategy to capture the stochastic behavior of surgery durations. e original plan needed to be adjusted accordingly.
us, we considered rescheduling the updated set of remaining surgeries at each decision point on the course of the day of surgery. We made optimal decisions that involve assignment and sequencing decisions within the operating rooms.
Some previous studies on dynamic scheduling have assumed several fixed rules, including "First Come, First Served (FCFS)". ese studies show that dynamic scheduling decisions make schedules adaptable to variations in a practical situation. In our surveys, we learned that the scheduler reschedules elective surgeries based on a fixed rule during the day of the operation. e survey results provide the best evidence for the practicality and reality of dynamic scheduling. In this paper, we dynamically revised the original schedule through system status updates during the course of the day. Making rescheduling decisions for the remaining surgeries at each decision point is necessary. We described the process of dynamic surgery scheduling as a series of discrete events. Each event represents the rescheduling of the remaining surgeries at each decision point.

Problem Description.
A given set of elective surgeries are planned prior to the day of surgery. We assume that each surgeon has one surgery a day. e plan includes the start time for each surgery, the assignment of surgeries to operating rooms, and the sequence of surgeries within each operating room. e scheduler is in charge of informing the surgeons of the plan in advance. en, each surgeon can make his own work schedule for the next day. erefore, each surgeon is usually not available before the assigned appointment time. ese surgeons are assumed to arrive on time to avoid any impact on the availability for their other duties. is original plan is often disrupted throughout the day because of the variability of surgery duration. In this paper, we studied how to simultaneously optimize decisions, including the assignment of surgeries to operating rooms and the sequence of surgeries within each operating room. Our goal was to minimize surgeon waiting time and operating room idle time.
In this section, we formulated the dynamic scheduling problem as a multistage stochastic optimization process. (1) We used the conditional probability model to predict the remaining time for ongoing cases at decision point g.
e model is characterized by the following notations in Table 1.

Dynamic Scheduling Model.
e dynamic scheduling process is a group of discrete events. Each event represents the procedure of rescheduling the remaining surgeries at the corresponding decision point. e event was formulated as a mathematical model. e optimization goal of the model was to minimize the total wasted cost related to remaining surgeries. e objective function Θ g includes the total decision cost related to remaining surgeries at decision point g. We aimed to optimize the previous schedule of the remaining surgeries.
Constraint (4) is the cost of scheduling surgery a(u). e cost θ a(u) includes surgeon waiting time cost and operating room idle time cost. Surgery a(u) belongs to the set of current remaining surgeries UA(u). It can be treated as a special stage under the condition, u � g. e surgery a(g) is scheduled next to surgery k(g) , where (x) + � max (0, x) and u is a positive integer.
Journal of Healthcare Engineering 3 Constraint (5) defines the cost related to surgery a(u). Surgery a(u) is scheduled next to surgery k(u).
Constraint (6) defines the updated set of remaining surgeries in real time.
Constraint (7) illustrates the starting time of surgery a(u).
Constraint (8) illustrates the completion time of surgery a (u).

Problem Structure.
In complexity theory, the dynamic scheduling problem is a NP-hard problem. Finding an optimal schedule for such an environment is very difficult because of the extremely large solution space. is problem cannot be solved by general methods in the endurable time.
erefore, heuristic approaches must be used to obtain an optimal approximation solution. An optimal and satisfactory solution for the dynamic scheduling problem is difficult to obtain. We proposed an IGA to solve the problem. e system states at time T g are characterized by the updated state information. First, the real-time data of the system must be encoded in the genes of an individual. e fitness value of the chromosome is determined by the linear order of genes along a chromosome. e ones with least fitness have a greater chance of selection. We provided the chromosome-coding schemes and fitness function to design and realize the surgery rescheduling system. Matrix L g containing (n − g + 1) 2 elements is generated at decision point g. Each element represents the length of a gene fragment. g denotes the number of completed surgeries. In this square matrix, the number of rows is equal to the number of genes. e number of genes is (n − g + 1) ; the number of remaining surgeries is (n − m − g + 1) ; and the number of identical operating rooms is m. e proposed formulas are listed below for evaluating the length of different gene fragments.

Improved Genetic Algorithm.
e IGA with a special chromosome-coding scheme was applied to the dynamic scheduling problem in multiple operating room setting. e crucial part of the proposed method is how to transform the solution into the chromosome embodied by code. Figure 2 depicts an example with three operating rooms and eight surgeries for the first decision point. A randomly generated chromosome represents a schedule of the joint optimization of the assignment and the sequencing of the remaining surgeries at the decision point.
We proposed an IGA for rescheduling the remaining surgeries at time T g . e main steps of the proposed method are as follows: IGA Step 1 (initialization): Set the population number (Q), gene number (n − g + 1) , iteration number (DC),   Journal of Healthcare Engineering selection probability (P s ), crossover probability (P c ), and mutation probability (P m ) Step 2. Randomly generate the initial population of chromosomes; provide the chromosome coding schemes l ri (g) � (B i − T g ) + , r � r(g) l ri (g) � (B i − t r (g)) + , ∀r ∈ R, r ≠ r(g) l ij � (B j − (B i + D i )) + , ∀i ∈ I Step 3. Set fitness function as an indicator. Calculate the length of each chromosome in the population len(i, 1) � length(L g , population(i, : )); calculate the fitness of each chromosome fit(i, 1) � fitness(len(i, 1), a, max len, minlen) Step 4. Conserve the best individual: [len m, len_index] � min(len 1) Step 5. Design the genetic operators: P s , P c , and P m Step 6. Generate a new generation of individuals as the successor population Step 7. Repeat steps 3-6 until the loop termination condition has been reached. e terminating condition is the fixed number of iterations (DC) reached.

Results.
is section presents the results of the experiments to illustrate the structure of the optimal schedule for a specific example and evaluate the performance of the proposed method in different problem instances. e proposed algorithm was coded in MATLAB R2013a. e experiments were conducted on Intel Core i7 PC at 2.40 GHz with 4 GB memory. e instances of this paper were derived from field observations in Shanghai First People's Hospital. First, we considered a specific instance with a given set of 12 different general surgeries on the day of service. ree operating rooms were interchangeable and allotted for general surgeries.
e following are the results of the performance evaluation of the proposed method on the instance. e behavior of the graphs is shown in Figure 3. Figure 3(a) shows the experimental results at decision point, g � 1.
e fitness values of individuals reflect the objective function values. e optimal fitness curve includes points, which represents the fitness value of the best chromosome in every generation of the evolution process. e results in Figure 3 indicate that the algorithm guarantees global convergence and improves the converging rate and stability. e optimal solution of the instance is presented in Table 2. e results are presented in terms of optimal individual, minimum and reference fitness values, and CPU time for the instance. Table 2 shows the optimal schedule of the remaining surgeries at each decision point. e optimal individual that evolved at decision point g represents the optimal schedule obtained for three operating rooms. e set of remaining surgeries was updated in real time. Specifically, the order of A chromosome random generated genes along a chromosome represents the optimal schedule of remaining surgeries. e algorithm has great ascendancy because its ability for the global search of optimal individual is powerful. e experiment results indicated that the algorithm can obtain the optimal schedule in a short time.

Discussion.
is section presents the evaluation results of the benefit of solving the dynamic scheduling problem compared with solving the static scheduling problem. e relative benefit provides a measure of the value of dynamic scheduling related to the commonly used approach in scheduling practice.
An experiment was performed to evaluate the changes in relative benefit according to the workload of the system (WS) and the variance of surgery durations (VD). Table 3 shows the minimum, maximum, and average relative benefits for these runs. According to the results in Table 3, the relative benefit decreases as the WS increases. Experimental results indicated that our proposed method still has a better performance than static planning in high-workload cases. e relative benefit increases as VD increases (Table 3). e results illustrated that our method is appropriate for highuncertainty cases. erefore, our proposed method has practicality, reliability, and stability. A series of revised schedules were sequentially made throughout the day by taking into account the changes in system information.
erefore, the optimal schedule obtained is flexible.
In our next experiment, we compared dynamic scheduling based on IGA with some other methods. We evaluated the computational performance of our proposed method. Table 4 presents the optimality gaps. Our method has superior performance in rescheduling surgeries. e results imply that our proposed method outperforms some other methods. e proposed method has good convergence and excellent robustness. Dynamic scheduling based on a fixed discipline focuses on the decision-making costs of a single stage. Our method takes into account the decision-making costs of all the remaining stages. e optimal schedule depends on many decisions, most of which have an effect on one another. Furthermore, we compared the proposed IGA with local search algorithms. A local search algorithm is a common approximate search algorithm. Many previous studies applied this heuristic algorithm in optimization problems.
We tested 30 instances and randomly selected the results of 3 instances of three operating rooms problem and 3 instances of six operating rooms. Optimality gap provides a measure of the performance of the IGA relative to local search heuristic algorithm in surgery rescheduling. According to the results presented in Table 5, optimality gap increases as the number of operating rooms increases. Our method has better performance than the local search algorithm. Compared with the local search heuristic algorithm, the proposed method can be applied to optimize global parameters. e results showed that our method has a

Method
Optimality gap (%) e longest mean service duration first sequence [13] 9.5 Two-stage stochastic programming approximation [15] 2.7 First-come-first-served strategy [16] 6.0 Journal of Healthcare Engineering 7 potential to find a better solution. e method can work at a blindingly fast speed by adopting an adaptive parallel search strategy.

Conclusions
In this paper, we describe the dynamic scheduling process as a series of discrete events. Each event represents the procedure of rescheduling the remaining surgeries at each decision point. We formulated the rescheduling process as a multistage stochastic optimization model. e dynamic scheduling problem has an extremely large state space; thus, we proposed the IGA to solve the problem. e chromosome-coding schemes and fitness function were provided to design and realize the surgery rescheduling system. Numerical results show that our proposed method has superior performance compared with some common scheduling approaches. e results of different instances also show that our proposed method has good convergence and excellent robustness. e solution space increased with the enlargement of the scale of the problem. We found that the proposed method can converge into a globally optimal solution compared with traditional algorithms in large-scale problems.
We also observed that the estimation of surgery durations influences the schedule optimization, especially in high-workload instances. Moreover, estimating the service times of the remaining surgeries is a challenge. Our method has its limitation. Future studies should consider historical sample sizes with estimated means and variances in log scale.
ere are some limitations of our research, which present opportunities for future work. For example, our proposed method should be robust to a disruption from a single urgent surgical case. ere may be scenarios need to be considered such as no urgent surgeries, single urgent surgery, and multiple urgent surgeries. In the future work, we will focus on the study of global scheduling strategy to improve the quality of medical services and patient satisfaction.

Data Availability
e data utilized to support the findings are available from the corresponding author on reasonable request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.