Simulator of Closed Queueing Networks

Introduction
Simulation methodology
Simulation control
Service station
System results
Saving & loading
Random generators

Introduction

This interactive simulator supports simulation based analysis of closed queueing networks made of interconnected service stations. There can be practically any number of them. 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 service station. So the simulator always shows one service station and global simulation results. For the selected service station the simulator displays both distributions (see later), parameters, and simulation results. There is a selection list in the Control panel, so it is very easy to switch among 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, 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 service stations numbered increasingly starting from 1 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 service stations. These objects are created by simply entering the required number in the Control panel. After (re)loadig the simulator, 2 stations are 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: unlimited FIFO queue, one service channel with exponential service time with mean 1, all customers directed from station 1 to station 2 and from station 2 back to station 1.
  3. Modify all objects that includes random routing after service. So the only global parameter except simulation control is the number of servers. Save longer user defined distribution tables or alternatively whole stations. The whole network can also be saved.
  4. Set simulation control. Start with a shorter experiment length. Do not generate reports 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


Service station

Servers 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. For closed networks global results are limited to just the total numbers of initially present and lost customers. 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 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 and service stations are saved in distinct cookies. The whole network is also saved in one cookie. If the network name is "n1", the cookie is called "n1s". 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 service station, one for service times and one for output routing. The seeds are initialized (randomized) at document loading and after entering the number of servers (even the same number as the current one). You can also randomize the seeds manually. The current values of the two seeds are saved with the 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 (even the same number as the current one). 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.