Developer’s Manual

v.1.1

 

 

 

 

 

 

 

 

 

 

 

 


 

 

Table of Contents

 

1.     Description of Project 2

2.     Understanding and extending Pamvotis Simulator 3

3.     Creating Simulation Scenarios. 5

3.1. Description of source elements. 7

3.1.1. Generic source. 7

3.1.2. FTP source. 7

3.1.3. HTTP source. 7

3.1.4. Video source. 8

4.     Using Pamvotis as an Embedded Simulator 9

5.     License and Contribution. 10


 

1.                 Description of Project

Pamvotis simulator is designed using a flexible architecture, in order developers to implement their own models or add their own extensions. For this purpose, a number of methods is created which are not all used by the simulator itself, but are useful for developers that want to extend the code.

The Pamvotis project is developed in Java 1.6. In order the executable file to be small and to reduce the resources required, only libraries included in JRE are used.

Pamvotis is created with Eclipse application. If you intend to extend the code of Pamvotis, we recommend that you use Eclipse. If you don’t, keep in mind that you have to set the classpath correctly.

The whole project is constituted of four packages. The first (pamvotis.core) contains the classes required for the simulation execution. The second, (pamvotis.intf) contains the classes that implement the user interface in SWING. The third (pamvotis.sources) contains the classes that implement the various traffic sources. The last (pamvotis.exceptions) contains classes that implement exceptions related to Pamvotis project. It is obvious that developers are not interested in the intf package.

An extended description of each class and each method Pamvotis provides is formally documented in HTML format in the doc/classDoc folder. Open the file index.html existed in classDoc folder with your browser, or access the documentation online at the Pamvotis site.


 

2.                 Understanding and extending Pamvotis Simulator

In order to understand the way by which the Simulator class performs a simulation, a skeleton of the whole procedure is outlined in this section. However, if you want to extend the functionality of Pamvotis (implement your own model or add some other features) then you should also study the comments of the code.

The whole procedure by which a simulation is performed contains the following steps:

  1. Read the simulation scenario parameters from the config/ntConf.xml file and store them to some internal, private variables.
  2. Create and print the headers of the statistical results files.
  3. Run the simulation for a specific time interval( e.g 0..10sec). Mean statistical results will be printed for this interval (0..10sec).
  4. Repeat step 3 as many times as needed. For example, continue running the simulation for another time interval (e.g. 10..20 sec). Mean statistic results will be printed for 10..20sec. Run the simulation for 20..30sec. Statistic results will be printed for 20..30sec.
  5. Print mean statistical results related to the total simulation time. In our example, mean values will be printed for 0..30sec.

For each of the above steps (excluding step 4 obviously), a public method exists that implements it. The first step is implemented with the ConfParams method, which reads the simulation scenario parameters from the config/ntConf.xml file and stores it to some global variables.

The second step is implemented by the PrintHeaders method, which creates some text files and prints some headers in it.

The third step, which is the most important, is implemented by the simulate method. This method takes two arguments; the start time and the end time, in milliseconds. It transforms the start time and the end time in slots. Then, for every slot, from start time to end time, it executes a for loop which does the following:

Step 5 is implemented through the printMeanValues method, which prints the mean values of each statistic and for each node to a text file.


 

3.                 Creating Simulation Scenarios

The parameters of a simulation configuration are read from the config/ntConf.xml file. You create simulation scenarios by editing this file. Put another way, all the interface package does is to collect some user-input parameters and write them to the xml file. You can see the structure of the xml file if you create a simulation scenario run the simulation (it is not necessary to finish, stop it when it begins) and edit the config/ntConf.xml file. The xml file structure was kept as simpler as possible, in order people not familiar with xml to be able to edit it and modify it. Each of the xml parameters is explained below.

Thus, if we want to collect values for the first three results and for the last, we would have to define the outResults parameter as tb_tp_ut_ql_. Actually, the underscore is not necessary, but is useful for separating the substrings. If you do not want any results to be printed, do not leave this parameter empty. Just define it with an underscore or another character.

3.1. Description of source elements

In this subsection, a description of the parameters of each source element is outlined.

3.1.1. Generic source

This source represents a generic (abstract) source, producing abstract traffic, obeying specific parameters. Use this source by specifying type=”generic” in the definition of the source element.

3.1.2. FTP source

This source represents a source generating FTP traffic, as described in 3GPP TR 25.892 V6.0.0 (see Appendix). Use this source by specifying type=”ftp” in the definition of the source element. For the explanation of the parameters that follow, please have a look at the appendix.

3.1.3. HTTP source

This source represents a source generating HTTP traffic, as described in 3GPP TR 25.892 V6.0.0 (see Appendix). Use this source by specifying type=”http” in the definition of the source element. For the explanation of the parameters that follow, please have a look at the appendix.

3.1.4. Video source

This source represents a source generating video traffic, as described in 3GPP TR 25.892 V6.0.0 (see Appendix). Use this source by specifying type=”video” in the definition of the source element. For the explanation of the parameters that follow, please have a look at the appendix.


 

4.                 Using Pamvotis as an Embedded Simulator

Pamvotis Simulator was designed through a flexible architecture that enables developers to use it as an embedded simulator, inside their own simulator. For example, let’s suppose that someone has developed a simulator for the IP layer (or perhaps for some layers above IP) and needs a simulator for the 802.11 MAC layer. Pamvotis can be used inside this simulator without any modification in the code. An other example is that someone has a UMTS simulator and needs to use an 802.11 simulator to simulate cross-system handovers or call access control algorithms. Pamvotis can be controlled through the other simulator without modification in the code.

All the above are feasible through some public methods that Pamvotis provides. All the user needs to do is to create an instance of the Simulator class and call the necessary methods. At the root of the Pamvotis folder, there exists a file named Example.java, which is an example of how to use Pamvotis as an embedded simulator. Another example of how to use Pamvotis is the interface itself. Take a look at the run method of the SimThread inner class, located in the Run class of the pamvotis.intf package.

An extended description of each class and each method Pamvotis provides is formally documented in HTML format in the doc/classDoc folder. Open the file index.html existed in classDoc folder with your browser, or access the documentation online at the Pamvotis site.


 

5.                 License and Contribution

It should be reminded again that Pamvotis may be distributed or modified under the terms of the GNU general Public Lisence.

Moreover, in order to extend and improve Pamvotis, it is kindly asked to contact with the author for any innovative modification performed in the code. References will be added to the web site and another version of Pamvotis will be released, based on the user’s contribution.

For any information, please contact Dimitris Vassis:

support@pamvotis.org

 

Copyright© - 2008 – Dimitris El. Vassis Vassilis Zafeiris - All Rights Reserved