An Optimization Model and Computer Simulation for Allocation Planning of Hospital Bed Resources

Aim. ­is study intends to improve the arrangement of hospital beds, make rational use of limited beds to minimize the time for patients to seek medical care, improve service quality, and reduce hospital operating costs. Methods. ­is study determines the reasonable evaluation indices, established a reasonable evaluation index system, and assesses the merits and demerits of the bed arrangement model for this problem. After observing and dealing with various types of patients’ conditions in the ophthalmology outpatient department of the hospital, some eective hospitalization rules are proposed. ­e coecients of each evaluation index under the FCFS (rst-come rst-service) and hospitalization rules are obtained, and a mathematical model of evaluation indices is constructed. ­e merits and demerits of the evaluation index system under each rule are found with MATLAB programming. At the same time, considering that the ve types of patients are in a certain serial sequence during the queuing process for medical treatments, a random planning model with the least average stay time of patient is established via introducing the corresponding joint probability density function for the stay time of each patient. ­e proportional allocation of beds is obtained by genetic algorithms with the speed and convenience of computer calculations. Results. ­e proportions of beds allocated to the ve categories of patients with trauma, cataract in one eye, cataract in both the eyes, glaucoma, and retina are 15%, 16%, 28%, 11%, and 29%, respectively. Conclusion. ­e results are in good agreement with the actual situation, and the optimization model has a certain degree of reference signicance for the reasonable allocation of beds.


Problem Statement
Queuing in hospitals for medical treatments is a common phenomenon in the society today. It is a prominent manifestation of the contradiction between patient needs and insu cient resources in hospitals and also an important fuse for the tension between doctors and patients. How to rationally arrange limited beds and make use of relatively insu cient resources to reduce patients' queuing time for medical treatments to the maximum degree and extent has always been a concern of scholars and hospital management. Queuing theory is widely used in the design, operation, and analysis of medical systems [1], such as to determine the number of medical personnel [2], hospital bed allocation [3,4], medical sta scheduling [5][6][7], and patient waiting time [8][9][10]. In response to issues related to inpatient bed planning, research studies mainly focused on increasing the utilization rate of inpatient beds and reducing the waiting time of patients. Beds are one of the most important resources in a hospital. Berry Jaeker and Tucker found an inverted U-shaped relationship between utilization and throughput time. Meanwhile, patient' length of stay (LOS) increased as occupancy increases, until a tipping point, after which patients were discharged early to alleviate congestion. More interestingly, the two years of inpatient data from 203 California hospitals revealed the second tipping point of 93% occupancy, beyond which additional occupancy leads to a longer LOS. omas Schneider et al. employed discrete event simulation (DES) to evaluate the impact of allocating beds in inpatient wards to accommodate emergency admissions and analyze the impact of pooling the number of beds allocated for emergency admissions in inpatient wards. Kao and Tung adopted a queuing model to approximate the patient population dynamics for each service, with admission rates provided by forecasts, the expected overflows under each configuration are computed via a normal loss integral. Bed allocation was done in two stages. First, they established a baseline requirement for each service, so that it can handle a prescribed amount of patient load based on a yearly projection of demand. ey then employed marginal analysis to distribute the remaining beds to minimize the expected total average overflows while taking month-to-month demand fluctuations into account. Xie et al. proposed the bed shortage index (BSI) to capture more facets of bed shortage risk than traditional metrics such as the occupancy rate, the probability of shortages, and expected shortages; they also proposed optimization models to plan for bed capacity via this metric. Meanwhile, [15,16] took an eye hospital as an example; they established comparatively perfect decisionmaking models of the patient admission scheduling and based on overall analysis on waiting times for hospital admission, waiting times for surgery, and the length of waiting list for hospital admission, and they also introduced the genetic algorithm and overall satisfaction evaluation model to optimize patient admission scheduling.
Considering all above, in this study, we take the same eye hospital used by [15,16] to collect the data, and we adopt a reasonable mathematical model to solve the problem of reasonably arranging its beds and maximizing its resource benefits. e specific situation of the ophthalmology hospital is as follows. e ophthalmology clinic of this hospital is open every day, and there are 79 beds in the inpatient department. e ophthalmological operations of the hospital can only perform the following four types of surgery: cataract, retinal disease, glaucoma, and trauma. e specific conditions of various ophthalmic operations in the ophthalmology department of the hospital are as follows. Cataract surgery is relatively simple, and there is no emergency. At present, the hospital offers cataract surgeries every Monday and Wednesday. e preparation time for such patients is only one or two days. ere are more patients with surgery for two eyes than those with one eye, accounting for about 60%. If a person needs surgeries for both the eyes, the surgery on one eye is on Monday and then the other is on Wednesday. Trauma disease is usually an emergency, so hospital admission will be arranged immediately when the bed is available, and surgery will be arranged the next day after admission. e surgeries for other eye diseases are more complicated, and there are various conditions, but surgery can be performed within 2-3 days after admission, and usually, the observation time after surgery is longer. e operation time for this type of disease can be arranged according to needs and generally not on Monday or Wednesday. Considering the rationality of FCFS basis for patient admission scheduling, we assume the following: patients with the same type of disease will be admitted according to the order in which they arrive and patients with the same type of disease will have surgery in the order of their admissions [17].
According to the specific conditions of the various types of patients in the hospital, this study intends to solve the following three problems: determine a reasonable evaluation index system, establish a reasonable bed arrangement model, and establish the proportional hospital bed allocation model that keep all patients in the system with the shortest average stay time.

Model Assumptions
(1) It is assumed that the impact of seasons and weather changes on the condition of the disease is not considered (2) It is assumed that other ophthalmic diseases other than traumas are not considered for emergencies (3) It is assumed that the serious illness caused by delay in treatment is not considered (4) It is assumed that the referral of patients due to too long waiting time or waiting team is not considered within a certain time frame (5) It is assumed that there will be no sporadic largescale sudden eye surgery (6) It is assumed that the ophthalmic surgery technique has not been significantly improved, resulting in a significant reduction in the length of stay (LOS)

Symbol
Description. n is the evaluation index unit, m is the evaluation index exponent, a ij is the raw data of the i th evaluation index and the j th evaluation exponent, r ij is the rated value of a ij , T G is the expected LOS of glaucoma patients, T R is the expected LOS of retinal patients, T C1 is the expected LOS of patients with cataract in one eye, T C2 is the expected LOS for cataract patients with cataract in both the eyes, and T T is the expected LOS for trauma patients.

Mathematical Model Establishment and Solution
First, it is required to determine reasonable evaluation indices and then establish a reasonable evaluation index system to evaluate the pros and cons of the bed arrangement model for this problem. Second, observe and deal with the various types of patients' conditions in the ophthalmology outpatient department of the hospital, propose some effective hospitalization rules, and obtain the coefficients of each evaluation index under the FCFS rules and these hospitalization rules. Based on the evaluation index mathematical model, MATLAB programming is employed to find the pros and cons of the evaluation index system under each rule. Determine which patients should be hospitalized the next day using this model according to the known number of patients to be discharged on the second day. e recursive method could assist in predicting the admission time interval of outpatients according to the specific situation of the patients who have been discharged from the hospital and the patients' hospitalization. At the same time, considering that the five types of patients are in a certain serial sequence during the queuing process for medical treatment, a random planning model with the least average stay time of patient can be established via introducing the corresponding joint probability density function for the stay time of each patient, and the speed and convenience of computer calculations can be employed to solve the proportional allocation of beds by genetic algorithms.

Selection of Evaluation Indices.
In order to effectively evaluate the pros and cons of the ophthalmological bed arrangement model of the hospital, this study selects the following four important evaluation indices: number of bed turnovers, number of discharges, average bed working days, and the average length of stay (LOS) of discharged patients.

Evaluation Index Model Based on the TOPSIS Method.
It is found from the literature review that the average LOS has an inverse effect on the number of bed turnovers [18,19]. erefore, shortening the average LOS of discharged patients and accelerating bed turnover can reduce the patient's medical care expenses, expand the capacity of hospitals to admit and treat patients and improve social and economic benefits, and improve the current shortage of beds to a certain extent. Evaluation index mathematical model: based on the TOPSIS method [20], through the same trending and normalization of the original data, the closeness of the index is reflected in the calculation of the ratio of the distance between the actual value and the optimal value. e sorting result makes full use of the original data and can be applied to multilevel evaluation of multiple indicators.
(1) Build the original data matrix (2) Same trending to establish high-quality indices and low-quality indices: Among them, the number of bed turnovers, the number of discharged patients, and the average bed working days are high-quality indices, and the average LOS of discharged patients is a low-quality index. e average LOS of discharged patients is an absolute number index, using the reciprocal method, that is, (1/a i4 ) is transformed into a high-quality index.
(4) Normalization processing to normalize the matrix after the same trending (5) Define the "optimal value" and "worst value" of each evaluation index e optimal value is the maximum rated value of each evaluation index: e worst value is the minimum rated value of each evaluation index: e optimal value and the worst value of each evaluation index are as follows: e optimal value: Calculate the distance between each evaluation index and the optimal value and the worst value: e close value is zero-dimensional, in which the maximum distance and the minimum distance between the optimal value and the worst value of each unit are mentioned.
en, it makes its own comparison and comprehensive evaluation of the closeness of the optimal value and the worst value of this problem. Denoted The close value: Mathematical Problems in Engineering When the value of c i becomes larger and larger, the evaluation unit gets closer and closer to the optimal point and farther and farther away from the worst point. erefore, C can be adopted to measure the pros and cons of the bed arrangement model.

Queuing System Model ([21, 22])
(1) Average patient arrival rate per day: (2) Average interval of patient arrival time: (3) Average number of people completing inspections per day: (4) Average time for each patient to see a doctor: Perform a statistical test (χ 2 inspection) for λ, μ. First, assume that the arrival law conforms to the parameter λ Poisson distribution: (5) Service intensity and idle probability: (b) Average number of patients waiting in the queue (expected value of queue length): (c) Expected value of patient stay time in the system: (d) Expected waiting time of patients in the queue: (e) Patient loss of time: Based on this, the following hospitalization rules are proposed: (1) Priority queuing rules based on waiting time: for traumatic diseases, hospital admission will be arranged immediately when the bed is available, and surgery will be arranged the next day after admission; patients of cataract (one eye) are only admitted on Saturday, Sunday, Monday, or Tuesday, patients of cataract (both eyes) are only admitted on Saturday or Sunday; patients of cataract (both eyes) have a higher priority between patients of cataract (one eye) and cataract (both eyes); for patients with glaucoma and retinal diseases, if there is a cataract surgery on Monday or Wednesday on the 4th and 5th day after their admission, the admission will be postponed, and the admission is made if not. Glaucoma has a higher priority between glaucoma and retinal diseases. is rule is abbreviated as Rule 1. (2) First-come, first-served rule for classification discussion: divide all kinds of patients into 5 situations according to their conditions and then arrange the beds according to the principle of first-come, firstserved for all kinds of patients. is rule is abbreviated as Rule 2. (3) Rules based on the principle of priority of each illness using the expert scoring method: the priority of each illness condition is set according to the expert scoring method. Among them, trauma is the highest priority, cataract is the second priority, retina is the third priority, and glaucoma is the lowest priority. Hospital beds are arranged for all types of patients according to this priority.     According to Table 6, the coefficients of each evaluation index are found under this rule as follows. e number of bed turnovers is 5.4 (persons/piece); the number of discharged patients is 428 (persons); the average number of bed working days is 53 (days); the average LOS of discharged patients is 7.3 (days); in the same way, the coefficients of various evaluation indices based on other rules can be obtained, as given in Table 6.
According to the mathematical model of the evaluation index, the evaluation index system under various rules is calculated via programming with MATLAB: From this calculation, C i � 0.0285 0.9715 0.5008 0.2668 Combine the data obtained above into a table, as given in Table 7.
Based on this study, it is concluded that the bed arrangement model of Rule 1 is the best. According to this model, which patients should be arranged for hospitalization on the next day could be determined based on the known number of patients to be discharged on the next day.

e Proportional Hospital Bed Allocation Model.
e establishment of the model of f (u, v, w, l, m) is to express the combined probability density function [23] of the stay time of the five types of patients: trauma, cataract in one eye, cataract in both the eyes, glaucoma, and retina. e five types of patients have a certain priority in the process of queuing for medical treatment, so the process is sequential and belongs to a series of activities. e stay time of the five types of patients is equal to the sum of their stay time; thus, At the same time : where f l1 (t), f l2 (t), f l3 (t), f l4 (t), and f l5 (t) are, respectively, the probability density functions of the stay time of the five types of patients, T 1 , T 2 , T 3 , T 4 , and T 5 are the stay time of those five types of patients, and E(T) means the average stay time of the five types of patients. e goal of this article is to find how the hospital should provide a matrix of bed numbers [m 1 , m 2 , m 3 , m 4 , m 5 ] for the five types of patients in order to minimize the average stay time of patients.
Suppose that when a certain patient (glaucoma) arrives, the number of beds used for glaucoma in the hospital is n. When n < m 4 , the patient does not need to wait and can be directly prepared for admission, and the admission time is t λ ≥ 2. When n ≥ m 4 , the patient can choose the shortest time to wait, and the stay time is subject to the round(n/m 4 ) + 1 order of Erlang distribution. It is easy to calculate the probability of the patient's stay time as To minimize the average stay time of patients, it is necessary to make min T

Solve the Model
Due to the growing complexity of the structure of the stochastic programming model, the traditional precise algorithms become unworkable, leaving only computer simulation algorithms available.
is study employs genetic 6 Mathematical Problems in Engineering algorithms to solve the problem. e steps are given in the following sections.

Data Distribution.
e selected samples are divided into two parts: one part is used as a training sample set to train the model and the other part is used to test whether the model met the basic skills required to implement the model. In the research, 3-8 training samples are selected for each weight in a small sample, whereas 5-10 training samples are selected for each weight in a large sample. In practical applications, to ensure that the subspace of the test sample is included in the training, there are roughly two methods for selecting the number of nodes in the middle hidden layer at present: One type is the static construction method, that is, the structure does not change during the process of updating and learning of the weight and threshold of the network [24]. In this method, the appropriate number of hidden layer nodes for the network model at the beginning is not known, and the appropriate weights under the optimized network structure are not known either. So, the network structure can only be determined based on past experiences. e constructed network space is large and the training time is long. e other is the dynamic construction method, that is, the number of input and output nodes is unchanged, while the number of hidden layer nodes is variable. Initially put enough hidden layer nodes and then gradually delete those inoperative nodes until the nodes cannot be contracted. is study employs the second method. Substitute the SCG and COB algorithms [25] with the best BP network iteration effect into the MATLAB program to run 10 times, take the average, and finally get the best number of hidden layer nodes of the network model as 5. According to this, the optimal network topology based on the BP neural network bed allocation model is 6 × 5 × 1.

Establishment of the Mathematical Model of the BP Neural Network.
First, based on the following most basic mathematical formulas along the direction of information propagation, the state equation of the network is given.
Using in (i) j and out (i) j , the input and output relationships of the various layers of the network [26] can be described as follows.
Layer 1 (input layer): introduce the input to the neural network.
Layer 2 (hidden layer): different forms can be taken for g(x), such as Gaussian function g(x) � e (x− a) 2 /b 2 , as well as radial basis function, spline basis function, and wavelet function. Gaussian function is adopted for the convenience and effectiveness of research.
Layer 3 (output layer): Based on the conditions of the model in this article, i � 6, l � 4, k � 1, the basic network construction of the neural network is completed above.

Determining the Learning Algorithm of the Network.
e basic idea of learning is adjust the weight of the network through a certain algorithm, so that the actual output of the network is as close as possible to the expected output. In this network, the error back propagation (BP) algorithm is adopted to adjust the weight (that is, the BP neural network). e basic principle is when the input of the network, that is, the corresponding influence factor X � (x 1, x 2 , x 3 , x 4 , x 5 ), the actual output of the network is Y � (y 1 , y 2 , y 3 , y 4 , y 5 ), the expected output of the network (that is, the actual number of wards allocated) D � (d 1 , d 2 , d 3 , d 4 , d 5 ) [26]. e objective function to define learning is (mean square error method used by [27]) At the same time, the BP algorithm employs the following formula to adjust the weight to minimize the objective function (steepest descent method used by [26]):

Conclusion
e bed is an indispensable factor of hospital medical resources. With the gradual deepening of public hospital reforms and the accelerated development of the medical market, the competition among major hospitals has become increasingly fierce. At the same time, the contradiction between the needs of patients for medical treatment and the shortage of beds has become increasingly prominent, which has aggravated the tension between doctors and patients to a certain extent. According to the latest statistics, the utilization efficiency of hospital beds in our country is generally low, with an average utilization rate of less than 85% [28]. It can be seen that on the one hand, there is a shortage of beds and a serious shortage of medical resources; on the other hand, there is a serious waste of health resources. erefore, it has been a topic worthy of exploration and research for the scientific, reasonable, and effective allocation of hospital beds to improve the efficiency of the use of hospital beds and alleviate the excessive demand for medical treatment. is study established a reasonable bed arrangement model by determining a reasonable evaluation index system, established a bed proportional allocation model for the hospital by constructing a bed proportional allocation model that minimizes the average stay time of all patients in the system, and adopted the MATLAB programming algorithm to get the calculation results.
e results obtained are in good agreement with the actual situation, which has a certain significance for reference. is model can be widely applied in related fields of hospital management. For general hospitals, the above methods can be adopted to build a bed allocation system suitable for the hospital according to the specific conditions of the beds for each hospital, the waiting period of the disease and other factors to improve service capabilities, reduce patient waiting time, and save health resources.

Data Availability
e data used to support the findings of this study can be accessed in https://www.mcm.edu.cn/html_cn/node/ 50a7a9fc36c5ce6fd242dbbc1da5878e.html. ( e Chinese college mathematical modeling contest organizing committee, 2009, Chinese national college mathematical modeling contest B topic-ophthalmic hospital of reasonable arrangement (Chinese)) and are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.