Simulation Tool for Queuing Models: QSIM

This paper proposes simulation software QSIM (Queuing Simulation) to simulate queuing models. QSIM is a tool which simulates and compares the results of different queuing models. This tool is programmed in JAVA and is based on analytical approach to guide optimization strategy. In Qsim, Simulation is carried out by providing the inputs for arrival rate, service rate and number of servers and using these values the performance measurement of a particular model is stored in the database for further comparisons and study. Simulation results are stored in excel file and it also provides graphical results to compare the outcome


INTRODUCTION
Queuing modeling is very important for optimization of length queue, customer time and for best use of resources. Simulation, however, does take into account the randomness and interdependence which characterize the behavior of real-life business environment. Using simulation, randomness can be included through properly identified probability distributions taken directly from study data. However, as the complexity of the analysis increases, so does the need to employ computer-based tools. While spreadsheets can perform many calculations to determine the operational status of simple systems but it uses averages to represent schedules, activity times, and resource availability. This does not accurately reflect the randomness and interdependence present in reality with resources and other system elements. In 1960, at the initial stage of the development of packet-switched telecommunication networks, queueing theory was applied to models of such networks (Kleinrock L. 1964). A number of queuing models have been studied for commercial applications (Iliadis, I. and Denzel W.E. 1993). QNs are generated as powerful modeling notation and can be applied to many different domains, including computer networks, supply chain analysis, software systems, street traffic and others (Serazzi G. 2008). An overview of large-deviations theory and its applications to telecommunication systems is provided by Alan Weiss (Weiss A. 1995). Simulation of queues for a hospital is optimized by using simulation (Hang J. 1998). The use of queuing analysis and simulation of various hospital departments, such as inpatient, ICU (Green, L. V. 2003) and (Kaplan, E.H. et al 1981), obstetrics units and ED has been widely discussed in the literature (Kim, S. et al 1999). The application of basic queuing principles and models to the hospital inpatient admitting process has been studied by Green ; and others) have addressed the core principles for performing a discrete-event simulation study of a healthcare system (Banks, J. and Carson, J.S. 1987). A QuickPass model is proposed to improve bank queuing system based on queuing theory (Wang Y. et al 2000). A large scale simulation model for estimating the system behavior for capacity planning before real establishment or execution is proposed (Wang X. et al 2008). A model for bank counter is proposed with queuing models (Yang M. 2009). This paper proposes a simulation tool to calculate and analyze the performance measurement for five queuing models. It discusses single server, multi server, first-in-first-out, service in random order, poisson arrivals, and exponential service time queuing model. This is a JAVA based simulation tool which calculates output measurements on providing the inputs and stores the result to the database for further analysis. QSIM also compares the output for different models and provides optimized result. It also facilitates comparison of single and multi server results. In the first phase algorithm and flowchart is described for QSIM. Second phase represents working of QSIM and third phase shows comparison of results for a study data. w w w . i j c t o n l i n e . c o m

MATERIAL AND METHODS
QSIM supported operating systems are Windows XP (32-bit), Vista (32-or 64-bit), or Windows 7 (32-or 64-bit). It supports 64-bit distributions capable of running 32-bit applications. QSIM is developed in Netbeans (IDE-Integrated development environment) version 6.8. This simulation tool is designed in Java (J2SE) JDK 1.7 and MS Access is used as database. Fundamental SQL queries are used in the program.
QSIM includes five queuing models; . Algorithms for these models are described as: Step1: Design a frame having defined space to show outputs of the models. Say framework().
Step2: Get the values of µ and λ. Convert to Double if required. Use Double.parseDouble().
Step4: Call the method to connect the framework to database.
Step5 Insert calculated values of model into model2 table of database.
Step7: Show results on framework and End. Step2: Get the values of µ, λ and S. Convert µ and λ to Double and S to Integer if required.
Use Math.pow() methods to implement power functions.
Step4: Call the method to connect the framework to database.

Step5: Check if Selected item in drop down is :-M/M/S : ∞/FCFS (model 4)
Insert calculated values of model into model4 table of database.
Step6: Show results on framework and End. Step6: Show results on framework and End.

Fig. 1 Flowchart for QSIM
For connecting to database: Step 1: call class.forName method addressing the JdbcOdbcDriver.
Step 2: initiate an object of DriveManager addressing database name, user name and password.
Step 3: put all these statements in try catch and handle the exceptions.
Flowchart shown in fig. 1 represents simulation steps of QSIM.

DISCUSSION
QSim calculates the output measurements and stores these variables in excess file for analysis of result. Output of QSIM stored in various variables as Average server utilization(ρ), Average number of customers waiting(Lq), Average number in system(Ls), Average waiting time(Wq), Average time in the system(Ws), Probability of zero customers in system(P0), Probability of exactly n customers in system(Pn).
The evaluation of systems performance consists of the following steps:  After that, it calculates result according to selected model in drop down box. Fig. 3 represents drop down box from main interface of QSIM.

Fig. 3 Choice of model in interface
Results appear in the new adjacent window and also stored in database simultaneously. It calculates six values of output measurements for different queuing models say ρ, ρo, Ls, Lq, Wq, Ws. Fig. 5 represents working of QSIM and substitution of input values.

Fig. 4 Input values for model
Now, If we select the PERFORMANCE in drop down list, a new window appears which has two drop down lists to compare two queuing models. With the help of this feature, performance of two queuing models and be compared by selecting models from drop downs. These two models are compared on the basis of µ, λ, s and N. Fig. 5 represents calculation interface of QSIM.

Fig. 5 Calculation interface
On substitution of input variables µ, λ, s and N for two models, it provides comparison of results for two models on the basis of their ρ, ρo, Ls, Lq, Wq and Ws. Then it also draws a comparison graph between these two models and stores the comparison results in back end database MS-Access. This feature helps to optimize the number of servers for the study. Fig. 6 represents comparison of results and graph representation of QSIM.

Fig. 6 Comparison of results
Every calculated result (µ, λ, Ls, Lq, Ws, Wq) and comparison result of two models are stored in back-end database (MS Access). These results can be retrieved for further calculation and comparison.

Numerical Experiment
Result calculation and analysis is explained with the help of a numerical experiment. Data is provided for input parameters S , ,   and N.
There are six different tables in the database, five for each model and one to store comparison results. Once we calculate the results these results are stored for future purpose and so these can be retrieved any time for future calculation.
Calculations for QSIM are shown in Fig. 7. Table 1 represents compilation of input and output values for all the models of QSIM. For both models I and II results are same. In model III when number of allowed length in queue is fixed say 12, length of queue is decreases with some fraction although waiting time is increasing. For same input in model IV when number of servers is fixed to 6, length of queue in system falls down drastically from 1.4 to 0.6 and waiting time in system falls from 0.058 to 0.040. For model V, with similar input values all the output variables are at the lower end as compared to results of IV say lesser length of queue, waiting time.

Fig. 7 Result storage interface
These results can be analyzed as;


Length of queue is at minimum value in case of model III.
 Length of queue in system is least in case of model V.