C Program for simulating blocking probabilities in multiservice loss systems ---------------------------------------------------------------------------- Version 2.0 , 29. Sept. 2000 Author: Jan Hlinovsky, jan.hlinovsky@hut.fi Organisation: Laboratory of Telecommunications Technology, Helsinki University of Technology Contents: 1. Copyright information 2. Compiling the program 3. Input file format 4. Running the program 5. References 1. Copyright information ------------------------ The program can be used and modified freely. No claims are made about the correctness of the program and no liability is taken for any damage caused by the use of the program. 2. Compiling the program ------------------------ In Unix, the program can be compiled using the make utility. Make sure you have all the following files: main.c ini.c read.c simu.c ini.h read.h simu.h structs.h Makefile The Makefile is written to be used with gcc, so if you want to use some other compiler and linker, replace the corresponding lines in the Makefile. The program uses two functions for random number generation that are not part of the standard C library, namely srand48() and drand48(). Check that you have these (e.g. "grep [sd]rand48 /usr/include/stdlib.h" ). If you don't have these functions you may want to replace them with some other random number generator that returns a value between 0 and 1. If you have gcc and the above mentioned functions, just type "make" in the directory where the source files and the Makefile are. 3. Input file format -------------------- An input file must be a text file and have the following properties: a) content of an input file is (in following order): number of classes (integer) number of links (integer) load vector rho (real) capacity vector (integer) matrix of bandwidth requirements; (integer) NOTE: nr of rows = nr of classes nr of columns = nr of links b) Every scalar number, vector, or matrix row is on its own line. c) Lines beginning with '%' are ignored (comments). d) Following letters are ignored: []{},; (blocks, braces, comma, semicolon). e) Any number of whitespace (space, tabs, newlines) is allowed, except for rule b): no newlines inside a vector or a matrix row. Examples of input files: ----------------------- The following file is a legal input file: % beginning of example file 1 ----------- 2 3 35 22 100 120 170 2 0 2 0 3 3 % end of example file 1 ------------------ The following is also legal, and more understandable input file: % begining of example file 2 ------------- %number of classes 2 %number of links 3 % load vector rho [35, 22] % capacity C [100, 120, 170] %B [[2, 0, 2] [0, 3, 3]] % end of example file 2 ------------------- 4. Running the program ---------------------- The program is started with the command ./netwsim. The input file may be given as an argument, otherwise it is asked for. Then the program asks for number of batches and batch size. The batches are used for calculating the 95% confidence interval, so the number should be several hundred. The number of samples in one batch should be a multiple of 1000, for optimal allocation of samples. After this the program will ask which class you are interested in. The program will write the point estimate of blocking probability and its 95 % confidence interval for the class that is being simulated, and the amount of processor time used for the simulation. Note that for very long simulations (e.g. hours) the clock may "overflow". example: ~ % ./netwsim inputfile Enter number of batches:400 Enter number of samples in one batch (min. 1000):5000 For which class (number) you want to run the simulation?:2 Traffic class Point estimate of Bk 95% conf int ================================================================== 2 0.0130674 [0.0130644 , 0.0130704] Simulation time: 19.490 sec 5. References ------------- The program uses a sophisticated inverse convolution method for calculating blocking probabilities. The method is described in the following paper: P. Lassila, J. Virtamo, "Nearly Optimal Importance Sampling for Monte Carlo Simulation of Loss Systems", to appear in ACM TOMACS, January 2001. The paper is available from http://www.tct.hut.fi/tutkimus/com2/