Simulator of Queueing Networks

Introduction
Simulation methodology
Simulation control
Generator
Service station
System results
Saving & loading
Random generators
Example/tutorial

Introduction

This interactive simulator supports simulation based analysis of queueing networks made of interconnected Generators of customers and Service stations. There can be practically any number of both. The implementation platform (HTML & JavaScript) does not support graphics (at least in a feasible way). That's why the simulator does not visualize the network topology automatically, but you can display a file with network block diagram. There can be a lot of data for each generator and service station. So the simulator always shows one generator, one service station, and global simulation results. For the selected generator and service station the simulator displays both distributions (see later), parameters, and simulation results. There are selection lists in the Control panel, so it is very easy to switch among generators and service stations. Optional report in a separate browser window contains summary of all results. The first version of the simulator is based on these assumptions:

All typical simulation results are supplied. Tables of user defined random distributions, individual generators and service stations, and the whole network can be saved to cookies and loaded within one year. Next chapters describe the details.


Simulation methodology

  1. Prepare a chart with numbered generators and service stations together with their interconnection. This is not necessary, but useful for bigger networks. You can also create a file (like net.gif), store it in your computer and display it in the help window. To do this, press the Show button in the Network group in the Control panel. (In some browsers it is necessary to re-enter the file location in the Location Toolbar of the help window.)
  2. Create the generators and the service stations. These objects are created by simply entering the required numbers in the Control panel. After (re)loadig the simulator, one of each is created automatically. Increasing the number adds more objects, decreasing the number has to be confirmed because data can be lost. Objects are generated with these default properties: So without any further settings after (re)loading, an M/M/1 system is simulated.
  3. Modify all objects that includes random routing on arrival and after service. So the only global parameters except simulation control are the number of generators and the number of servers. Save longer user defined distribution tables or alternatively whole generators and/or stations. The whole network can also be saved.
  4. Set simulation control. Start with a short experiment length and smaller numbers of generated and served customers (if used). Do not generate report until all works well. Speed of simulation depends on your computer and your browser. Typical PCs can simulate even medium complexity networks with reasonable speed. For longer experiments uncheck the status in the Control panel (updating the status bar takes a lot of time).
  5. Create reports for selected experiments. Generated documents can be saved, but Copy-Paste to other documents with subsequent editing is probably the fastest way to use the simulation results.


Simulation control

The window is divided into two panels. The Control panel is used for simulation control, the Network panel displays properties of network objects and all results. The Control panel contains the following inputs organized into groups. For more details read the corresponding paragraphs.

Control

Experiment

Random generators

Network

Cookies


Generator

Generators have two parameters:

Generator results are accompanied by Note buttons displaying a detailed explanation.


Service station

Service stations have these parameters:

Server results are accompanied by Note buttons displaying a detailed explanation.


System results

System (global) results are displayed at the end of each simulation experiment. They try to assess the network as such, but due to different paths through network some figures like for example "Average time in network" are not necessarily meaningful. Anyway use Note buttons that display a detailed explanation. Check Report in the Control panel to generate a summary of all results in a separate browser window.


Saving & loading

You can save tables of user defined distributions, individual generators and/or service stations and the whole network. The Save buttons save the objects to a cookie. All saved objects are given unique names. Confirm this default name or enter any other. So for example you can save a long table both under the default name and another short name. Then it can be fast loaded for all tables with the same distribution. Loading also offers the default name that can be modified. Table status and generation mode (continuous/discrete) are also saved. If possible, save confirmed consistent tables. The cookie expiration is one year, then the cookie will be deleted by the browser. Check (save and immediately load) whether your browser does not disable cookies. Unfortunately browsers limit the cookie size (4KB) and the number of cookies per server or domain (maximum 20). So it can happen that some cookies are deleted during a session (if more than 20 cookies are saved) or truncated during one saving operation (when saving a large network). Distribution tables, generators and service stations are saved in distinct cookies. The whole network is saved in two cookies. If the network name is "n1", the two cookies are "n1g" and "n1s" for generators and stations respectively. To check whether the network has been saved:

Note that sometimes browsers behave strange with respect to processing cookies. In the Control panel there is a section Cookies where you can view and delete cookies of this document. Ignore the values of cookies, just note the names that are followed by "=". Deleting is implemented by setting expiration time to yesterday - cookie is then deleted by the browser.


Random generators

There are two separate underlying random generators for each generator of customers, one for the intervals between arrivals and one for output routing. Similarly there are two separate underlying random generators for each service station, one for service times and one for output routing. All seeds are initialized (randomized) at document loading and after entering the number of servers and/or generators (even the same numbers as the current ones). You can also randomize the seeds manually. The current values of the two seeds are saved with the generator of customers and with the service station, all seeds are saved with the network. Loading of course includes the seeds. So after loading a network you obtain identical results as with the experiment performed just after saving the network. When starting the experiments the seeds are not updated. So if the seeds are neither restored nor randomized, each experiment starts with the seeds left by the previous one. 

You can also record the seeds in RAM. The values are first recorded at document loading and after entering the number of servers and/or generators (even the same numbers as the current ones). Then you can record and restore the seeds at any time. Use this facility especially if there are problems with cookies.

So unless the seeds are restored, repeated experiments provide various results. Reduce the variance by increasing the experiment duration.

Note that the native JSSim generator is the so-called Linear Congruential Generator (LCG) known by the name MINSTD (Minimum Standard) that passed all usual tests. See the code for the values of the constants. You can change the values assigned in the head code of  jssim.js if you prefer another generator.


Example/tutorial

Let's consider the following practical situation: Customers of a certain bank are first served by tellers. If all tellers are busy, customers wait in one not limited FIFO queue. Teller's service time is random, let's assume that the distribution is uniform in the range from 2 to 13 minutes for all tellers. After being served by a teller, customers either leave the bank or proceed to cashiers. It has been observed that 80% of customers proceed to cashiers. Cashier's service time is random, it is assumed that the distribution is normal with mean value 4 minutes and standard deviation 2 minutes. If all cashiers are busy, customers wait again in one not limited FIFO queue. The arrival to the bank is supposed to be approximately Poisson (with exponential intervals). The management wants to know the necessary numbers of tellers and cashiers during peak hours (mean interval between arrivals 2 minutes) and during less busy periods (mean interval between arrivals 5 minutes). The criteria are queue lengths whose average values should not be more than 2 customers. In both cases find also the mean time a customer spends at tellers and the mean time a customer spends at cashiers together with utilization of both.

Outline of the solution:

After (re)loading, there is one generator directing all customers to station 1 and one station directing all customers out of network. Let's assume, that station 1 represents the tellers, station 2 the cashiers. So regarding the generator just change the mean of its exponential intervals from 1 to 5 (let's start with less busy periods). Let one time unit be one minute.

In the Control panel enter 2 as the number of servers, that will create two service stations. Both queues are by default unlimited with FIFO organization, so modify only these:

These are the results of one particular experiment: