Simulation Modeling and Discrete Event Simulation Project report Staffing Simulation of Save-a-lot Drug Store Using Promodel Pengju Kang 12/19/2002 1 Contents Problem statement .............................................................. 3 Model development ............................................................. 4 One operator two queue model ....................................................................................... 4 Two Operator Two Queue Model ................................................................................... 6 Three Operator Two Queue Model ................................................................................. 7 Performance Optimization.................................................. 9 Conclusions ...................................................................... 12 Appendix ........................................................................... 13 2 Staffing Simulation of Save-a-lot Drug Store Using Promodel Pengju Kang Problem statement In a recent business plan, it was proposed that a drugstore be built on the Park Street. According to the plan, the store has walk-in entrance and a drive-in entrance. The store is intended to serve the needs of customers living in local area. It is expected that the future store should have a staffing plan that will guarantee minimum customer lost, which is dependent on the time customer waiting for service. The time a customer spent in the drugstore is dependent on the time, which a pharmacist fills a prescription, which, in turn, is determined by the number of items in a prescription varying from customer to customer. It is the objective of the present project to model the operation of the drug store to provide the data regarding various performances of the drug store responsive to the staffing plan. The following measures are used to assess performance of the business operation of the store. 1. The average number of customers waiting for service at the drug store. 2. The average time of a customer spends at the drug store. 3. The utilization rate of the pharmacists. If the average time a customer waiting for service is too long, it may be necessary to add one or more pharmacists to the store. Through simulation, the optimal number of pharmacist added to the drug store will be identified. If dedicated pharmacists are assigned to walk-in and drive-in customers, a comparison will be made on the performance differences of this arrangement from the previous one. As a matter of fact, there will be errors in the estimation of process models due to the limited number of data are used to fit the distribution function. A number of experiments will be run to generate a profile, which can be used to adjust the business plan in accordance with the model parameter changes (model uncertainties). This is known as the robust design. Model based simulation techniques make it possible to accomplish the robust design of the staffing plan for the store. It is decided that Promodel package be selected as simulation platform. Statistical models are to be developed for the processes involved in the drugstore business. The derivation of the models comes from the analysis of the historical data collected by a store located in 3 a different area. Based on the statistical model, different scenarios of staffing plan will be investigated to identify the optimal plan for the present store. The present section gives an introduction of the problem the author is studying. In Section 2, the statistical nature of this problem is analyzed, which includes the process data collection and processing. Section 3 is dedicated to the description to the implementation of the model developed for the drug store using Promodel. In Section 4, the numerical results are given regarding various issues listed above. The final section is the conclusion of the present work. Listed in the appendix are the text files of Promodel programs used in this projects. Model development One operator two queue model Starting with one pharmacist working in the store, the drugstore is modeled as a process with one operator and two queues, one for walk-in customers and one for drive-in customers. To describe the statistical property of the server, we need to know the service time of the operator, more exactly the time required by a pharmacist to fill a prescription, which depends on the number of items in a prescription. The historical records of a similar store located in a different area were used to identify a statistical model for the time spent by a pharmacist on filling up a prescription. The data was analyzed using the Stat::fit utility of Promodel, and the statistic, time required to fill up a prescription, was found to be best described with a uniform distribution. The fitted distribution function is shown in Fig. 1. To investigate the utilization rate of the operator, we need to know the arrival rates of the drive-in and walk-in customers. Historical data of the same store were used to identify the statistical models for these two statistics. It has been shown using the Stat::fit that they can be modeled as two exponential processes. The fitting results are given in Figs. 2 and 3. 4 Fig.1 The fitted distribution for the service time of pharmacist. Fig.2 The fiited distribution for the interarrival time of walk_in customers. Fig. 3 The fitted distribution for the interarrival time of drive_in customers. Three locations were selected to model the save-a-lot drugstore. The layout of the drugstore is given in Fig. 4. Two queues were used to model the entrances of walk in customers and drive in customers respectively. The queues have limited capacities to emulate the realistic situation that when there are too many people lining in the queue, incoming customer may leave for a different store. The capacity of the walk in queue is 10, and the capacity for the drive in queue is 6. The text file for the model layout is provided in the Appendix. To evaluate the performance of the drugstore, two global variables are used to track the customers lost due to the overcrowded queues. The pharmacist is modeled as an operator, whose service time varies according to uniform distribution. 5 Fig. 4 The layout of the save a lot drug store. To reduce the variance on the estimates of performance measures, random numbers of the same string were used for simulation. The number of replication is 10 for each simulation presented in this report, unless specified. The simulation length is 2000 hours, which corresponds one year business period. The simulation results for the layout shown in Fig.4 are given in Table 1. With only one pharmacist working in the drugstore, it is obvious that the store will not be able to deliver a satisfactory service to its customers. First of all, the waiting times for the customers are too long. Secondly the pharmacist is overwhelmingly busy, and thirdly too many customers will be lost due to the long queue. Table 1. Performance measures for one pharmacist scenario Average time in Average time in Utilization rate Walk-in store for walk-in store drive-in (pharmacist) customer lost customer [min] customer [min] [%] 303 161 100 7967 Drive-in customer lost 1981 Two Operator Two Queue Model From the simulation results of the previous section, we know the store needs additional staff to improve the waiting time of the customer. For that reason, an additional pharmacist is included into the simulation. The Promodel text file is provided in the Appendix of this report. The presumption made in this simulation is that the two pharmacists have identical prescription filing time distribution. The results of two pharmacists scenario is provided in Table 2. 6 Table 2. Performance measures for two-pharmacist scenario. Average time in Average time in Utilization rate Walk-in store for walk-in store drive-in (pharmacist) customer lost customer [min] customer [min] [%] 99 44 99% 2054 Drive-in customer lost 71 From Table 2, it is observed that the customer waiting time has been reduced after adding one more pharmacist. Also reduced is the number of customers lost. The utilization rate is basically the same as the one pharmacist scenario. However this staffing arrangement is still not good enough to satisfy the customers, due to long queuing time, and the business interest the store, due to a large number of customers went to other stores for business. Three Operator Two Queue Model To further improve the performance of the store, another pharmacist is added into the simulation. The Promodel text file is given in the Appendix. The service time distributions of the three pharmacists are considered identical. The simulation results are given in Table 3. Table 3. Performance measures for three-pharmacist scenario. Average time in Average time in Utilization rate Walk-in store for walk-in store drive-in (pharmacist) customer lost customer [min] customer [min] [%] 21.7 20 75% 6 Drive customer lost 1 From Table 3, it is observed that the customer waiting time has been reduced significantly after the adding two extra pharmacists. There are virtually no customers lost due to the significantly reduced queuing time. The utilization rate is has been reduced to 75%. It is believed that this staffing arrangement is good enough to satisfy the customer, due to the fact that customer wait time is reasonable, and the business interest of the store, due to fact that the store does not lose any customers. The utilization rate of the pharmacists is considered to be acceptable, since 75% utilization rate means that a pharmacist is totally busying serving the customers 6 hours a day. The remaining two hours are enough to cover the lunch break time and morning and afternoon coffee time. It is expected that addition of more pharmacists will not be helpful to the improvement of the store business operation. Instead, more money will be spent on paying the workers with low utilization rates. Table 4 gives the simulation results of four pharmacists working in the store. As expected, there are no significant changes in customer waiting times, but the utilization rate of the workers has been reduced to 60%, which is apparently not good to have pharmacists staying idle for 40% part of a year. It is 7 therefore concluded that the three-pharmacist staffing arrangement is the best choice for this store. Table 4. Performance measures for four-pharmacist scenario. Average time in Average time in Utilization rate Walk-in store for walk-in store drive-in (pharmacist) customer lost customer [min] customer [min] [%] 18.24 18.0 60% 0 Drive-in customer lost 0 Considering the fact walk-in and drive-in customers have two different arriving rates, simulation was also conducted to compare the scenario of three pharmacists serving the customers by turn, and the scenario of two pharmacists dedicated to walk-in customers and one pharmacist dedicated to drive-in customers. The Promodel text file is provided in the Appendix. The simulation results are given in Tables 5. It is observed that there may be a significant difference between the two staffing plans. To further confirm the difference, a hypothesis test was conducted. Table 5. Performance measures for dedicated pharmacist scenario. Average time in store for walk-in customer [min] 25.1 Average time in store drivein customer [min] 35.1 Utilization rate Utilization rate Walk-in Drive-in (%) of server (%) of server customer customer for walk-in for drive-in lost lost customer customer 75% 74% 10 55 Two models for the two scenarios were merged together, and 10 replications of simulations were run. The results are shown in Table 6, in which the 95% confidence intervals for the difference (D) in customer arrival times are calculated. Because the confidence interval does not contain 0, it is asserted with 95% confidence that there is a statistically significant difference between the two scenarios. It is suggested that the dedicated pharmacist arrangement should not be used. 8 Table 6. The results of hypothesis test for two different staffing scenarios. Walk-in Scenario 1 Scenario 2 23.98011 24.51343 25.05688 25.83777 25.59524 25.20082 25.68196 25.42603 24.45226 24.96743 21.78467 21.3518 21.52622 22.4179 21.8097 21.69891 22.28685 22.50528 21.75792 21.67911 D 2.195445 3.161626 3.530657 3.419874 3.785537 3.501914 3.395115 2.920747 2.694331 3.28832 (D- D Drive in Scenario 1 Scenario 2 )^2 0.109904 0.000805 0.116047 0.052842 0.354664 0.09729 0.042072 0.072497 0.245688 0.009667 D 34.96908 34.95903 36.76688 34.51466 35.25138 34.71155 34.83501 36.29225 33.76848 34.72336 21.60459 22.15908 20.04892 19.98993 20.18548 20.3703 19.91889 20.1979 20.42942 20.71888 (D- D )^2 13.36449 12.79994 16.71796 14.52473 15.06589 14.34125 14.91612 16.09435 13.33906 14.00448 0.145798 0.324922 0.541678 2.41E-05 0.034335 0.003164 0.018326 0.278905 0.152345 0.028394 D D 3.189357 s(D) 0.349838 14.51683 s(D) 0.412026 s( D ) 0.110628 h 0.229842 95% CI 2.959515 3.419198 s( D ) 0.130294 h 0.270699 95% CI 14.24613 14.78753 Scenario 1: three pharmacists, two dedicated to walk-in customers, and one dedicated to drive-in customers. Scenario 2: three pharmacists serving both types of customers by turn. Performance Optimization The staffing plans investigated in the previous section are based on the assumption that the service times of all pharmacists are the same. It is possible that the pharmacist may be better trained, or supported with sorting equipment, the service time may be reduced. The management wants to know if the service time is reduced into the range of 3 and 15 with a uniform distribution, what will be the optimal plan. Reexamining the performance measures of the store, the expected staffing plan would be one that has acceptable queuing time and at the same time the utilization rate of the operators should not be less than 75%. This staffing planning procedure is modeled as a multi-objective optimization problem. The objective function terms that were measured are: Min: 1 * Walk –in customer (Avg Time in Sys) Min: 1 * Drive –in customer (Avg Time in Sys) Max: 0.8 * Service-time (operator 1) (% Utilization) Max: 0.8 * Service-time (operator 2) (% Utilization) 9 Different weights are assigned to the objective functions. Unit weight is assigned to the customer wait time in the system, while 0.8 is assigned to the utilization rate. The variable in the objective function is the service time of the operator. Starting with twopharmacist plan, the optimization results are partially shown in Table 7, which shows that if the mean service time is reduced to approximately 10 minutes, the customer waiting time can be reduced significantly compared with a mean service time of 15 minutes, while a 75% utilization rate is ensured. With the mean service time being less than 10, although the customer waiting time is reduced, the utilization becomes too low. Since the service time of a pharmacist depends on the number of prescription items, as well as the time to locate and sort the drugs. It is generally difficult to reduce the service time considerably. However the optimization results provide the management a profile on which the optimal staffing plan can be established, if the store decides to explore the option of reducing service time. Table 8. The multi-objective optimization of the two-operator staffing plan. Service time Walk-in customer avg. time in sys. 98.88 76.29 54.3 36.46 24.85 17.91 13.84 11.02 15 14 13 12 11 10 9 8 Drive-in customer avg. time in sys. 44.06 37.34 30.64 24.67 19.67 15.75 12.91 10.59 Objective function Utilization rate (pharmacist 1) 99.21 97.78 94.62 89.26 82.41 75.06 67.44 60.17 15.8 42.8 66.47 81.69 87.29 86.37 81.15 74.59 Aervage wait time (walk-in) Aervage wait time (drive-in) Objective function Utilization rate Utilization rate (pharmacist 2) 99.21 97.76 94.63 89.26 82.35 74.99 67.43 60.08 100 100 80 80 60 60 40 40 20 20 0 0 8 10 12 14 utilization rate & objective function value 120 Average wait time [min] 120 16 Mean Service Time [min] Fig.5 The optimization results. The detailed optimization results are shown in Fig. 5, which shows how the total objective function, utilization rate, and average time in system change with the variations 10 in service time. At a service time approximately 10-11 min, the objective function reaches its peak, which is regarded as the optimal solution. It also observed that is the service time is reduced below 10 min, the wait time for both customers are roughly the same. The performance optimization was also investigated from a different angle. Instead of considering the customer wait time in the system as the objective function terms, the number of both types of customers and the server utilization rates are selected as the objective functions terms. The objective function terms that were measured are: Min: 1 * total exits of walk-in-customer Min: 1 * total number of drive-in-customer Max: 0.8 * server 1 utilization rate (%) Max: 0.8 * server 2 utilization rate (%) A number of experiments were run to examine the sensitivity of those terms in response to the change of service times. The results are provided in Fig. 6. It is interesting to observe that from the perspective of number of customer having been served, the total number of drive-in customers is not sensitive to the variations of service time. If the service time is below 10 minutes, the total number of walk-in customers served is also insensitive to the change of the service time. It is concluded that the optimal mean service time is 10 minutes. Continued reduction of service time below 10 will not improve the operational performance much instead of incurring additional cost required to accomplish the reduction. Drive-in Customer Utlization (1) Utilization (2) 14000 120 12000 100 10000 80 8000 60 6000 40 4000 20 2000 0 Utilization rate (%) Customer number Walk-in Customer 0 8 10 12 14 16 Mean service time [min] Fig. 6 Optimization results of alternative objective function terms. 11 Conclusions This report describes the Promodel simulations carried out for a drugstore to be built on the Park Street. The focus of simulation has been on the staffing arrangement for the store. The data collected for a drugstore located in a different neighborhood were used to establish a Promodel for the present drugstore. Different scenarios of simulations were carried out to investigate the effect of number of pharmacists to be hired in the store on the performance of the business. It has been found that the plan, three pharmacists working in the store will deliver the best operation performance in terms of customer waiting time and operator utilization rate, based on the existing data. Simulations were also conducted to investigate the sensitivity of the service time variation on the performance on the store. It has been found that if the mean service time could be reduced, the number of working pharmacists in the store could be reduced to 2, while ensuring an acceptable business operating performance. Sensitivity simulation is necessary, since there are always model uncertainties involved in the model derivation, no mentioning that fact that the primary data are from a another store. Through simulation experiments, various business plans can be established in response to possible parameters variations, It has been demonstrated through this simple project that discrete simulation supported with the flexibility provided by Promodel is valuable technique for business operation planning. 12 Appendix The text files and model files used in this project. The files are saved under the directory of final project. The model and text file for 1-operator scenario Final project_1_operator.mod FinPjt_1_operator.TXT The model and text file for 2-operator scenario Final project_2_operator.mod FinPjt_1_operator.TXT The model and text file for 3-operator scenario Final project_3_operator.mod FinPjt_1_operator.TXT The model and text file for 4-operator scenario Final project_4_operator.mod FinPjt_1_operator.TXT The model and text file for 2-operator optimization scenario Final project_2_operator_optimization FinPjt_2_operator_optimization.TXT The model and text file for hypothesis test of two 3-operator scenarios Final project_merge_model.mod FinPjt_3_operator_MergedModel.TXT 13