Beginners Tutorial
Simulating a M/M/1 queuing system.
More...
Welcome to the openWNS tutorial. This tutorial consists of several incremental parts that will guide you through all the major parts of the openWNS simulator. We will start with a very simple implementation of a M/M/1 queuing system and will step by step expand it. The following list shows the contents of this tutorial.
- Implementing a SimulationModel
- Calculating sojurn time
- wns::queuingsystem::mm1step3
- wns::queuingsystem::mm1step4
- wns::queuingsystem::mm1step5
The M/M/1 system consists of a queue with unlimited size and a worker (server) with* negative-exponentially distributed job processing time. The jobs arrive at the system with an inter arrival time that is negative-exponentially distributed. This is illustrated below
- You should have some UNIX knowledge at this point.
- The directory layout you will experience is as follows:
- Your current working directory should be the base directory where you installed your copy of openwns into your home directory.
- From here you see (with "ls -lag") the following directories, among others:
./bin/ This must be in your PATH environment variable
./documentation/ Here you find text, PDF and PPT files that may help you
./examples/ This is where you start the MM1 tutorial. Change dir to here and look
./framework/ Here the main source code (C++ and Python) is located
./modules/ Here is the source code for blocks of specific ISO-OSI layers
./sandbox/ This is where your compilation results (and header and Python files) will be copied into when you run "./playground.py install"
./tests/ Here are the files for UnitTests and SystemTests
./playground.py This is the main script for handling the openwns
- Call "./playground.py install" in the OpenWNS base directory
- This compiles all C++ files, and copies the result into the ./sandbox/ directory
- If there are compiler errors, try to find the file where the compiler stopped and edit it with emacs. Then go to the line number shown and use your C++ skills.
- After compilation, there is now an executable called "openwns" (formerly wns-core)
- In many directories a symbolic link is made to point to this executable file.
- To execute the individual tutorial steps follow this:
- change directory to ./examples/
- open and read the file README for newest notes
- call "./openwns -f MM1Step1.py" to start the first tutorial step.
- You will now see approximately 500 lines of output written to STDOUT
- The output lines are formatted into four columns:
-
The current simulated time
-
The module name where the code that runs is implemented
-
The name of the "logger" object; usually a hierarchically given name
-
The output of MESSAGE_SINGLE() calls in the code
- Which files are involved?