You are on page 1of 19

Queueing Theory

Lab 10
Installation of Omnet
in Ubuntu
Note:
 OMnet++ version is 4.6.
 Ubuntu version is 14.6 LTS.

Necessary Package to install:

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Commands for Necessary Packages to install:

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Going to the directory where Omnet4.6.tar is placed:

Install using the comand: tar -xvzf omnetpp-4.6-src.tgz

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Opening the Omnet++

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Exercise
Question 01: When do we need to simulate?
Answer: The basic concept of simulation is to imitate the behavior of a system in time.In order to
simulate, we need to develop a simulation model, and a simulation model is made using a set of
hypothesis on the system and its behavior that describes a dynamic system as a set of components that
interact according to specific rules.

Question 02: What are the applications of simulation?


Answer: Simulation software can be used for a number of applications, including but not limited to: 1.Advanced
Analytics.
2.Airports.
3.Manufacturing.
4.Supply Chain.
5.Military.
6.Mining.
7.Ports
Question 03: What is discrete-event simulation?
Answer: A simulation using a discrete-state model of the system is called a discrete event simulation.
This is opposite of continuous-event simulations in which the state of the system takes continuous values.
The continuous state models are used in chemical simulations where the state of the system is described
by the concentration of a chemical substance. In computer systems, discrete-event models are used since
the state of the system is described by the number of jobs at various devices. Notice that the term
“discrete” does not apply to the time values used in the simulation. A discrete-event simulation may use
discrete- or continuous-time values.
Question 04: What are the merits and demerits of analytical versus simulation models?
Answer:
Merits of simulation
1.Simulation is best suited to analyze complex and large practical problems when it is not possible to solve
them through a mathematical method.

2.Simulation is flexible, hence changes in the system variables can be made to select the best solution
among the various alternatives.

3.In simulation, the experiments are carried out with the model without disturbing the system.
Policy decisions can be made much faster by knowing the options well in advance and by reducing the
risk of experimenting in the real system.

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Demerits
1.Simulation does not generate optimal solutions.
2.It may take a long time to develop a good simulation model.
3.In certain cases, simulation models can be very expensive.
4.The decision-maker must provide all information (depending on the model) about the constraints and
conditions for examination, as simulation does not give the answers by itself.

Question 05: What are the steps required to perform simulation study and common issues?
Answer: The Basic Steps of a Simulation are:
1.Problem Definition
2.Project Planning
3.System Definition
4.Model Formulation
5.Model Translation
6.Verification & Validation
7.Experimentation & Analysis
8.Documentation & Implementation

Common Issues:
Improper Language
Unverified Models
Invalid Models
Improperly Handled Initial Conditions
Too Short Simulations

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Question 06: Open OMNeT++ and explore the dyna project and describe the functionality
and working mechanism of it by going through README.txt?
Ans:

Tictoc1 is a network, which is assembled from two submodules, tic and toc. tic and toc are instances of
the same module type called Txc1. We connect tic's output gate (named out) to toc's input gate (named
in), and vica versa (network ... { ... }). There will be a 100ms propagation delay both ways; Txc1 is a
simple module type (which means it is atomic on NED level, and will be implemented in C++). Txc1 has
one input gate named in, and one output gate named out (simple ... { ... }).
In initialize() we create a message object (cMessage), and send it out on gate out. Since this gate is
connected to the other module's input gate, the simulation kernel will deliver this message to the other
module in the argument to handleMessage() – after a 100ms propagation delay assigned to the link in the
NED file. The other module just sends it back (another 100ms delay), so it will result in a continuous
ping-pong.Messages (packets, frames, jobs, etc) and events (timers, timeouts) are all represented by
cMessage objects (or its subclasses) in OMNeT++. After you send or schedule them, they will be held by
the simulation kernel in the "scheduled events" or "future events" list until their time comes and they are
delivered to the modules via handleMessage()

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10
Question 07: Explore the GUI by running the simulation several times. Try Run, Run
Until, Rebuild Network, and other functions.
Ans:

The IDE will build your project automatically. If there are compilation errors, you need to rectify those
until you get an error-free compilation and linking. You can manually trigger a build by hitting
choosing Project -> Build All from the menu, or hitting Ctrl+B.
Press the Run button on the toolbar to start the simulation. What you should see is that tic and toc are
exchanging messages with each other.

Try Run, Run Until, Rebuild Network, and other functions.

Submitted By Saad Khan 
Roll No. 17‐16TL20 
 
Queueing Theory
Lab 10

Run command run the simulation of tictoc.

Run Untill function we can define time to stop the simulation and also can define the meassage to stop:

.
Submitted By Saad Khan 
Roll No. 17‐16TL20 
 

You might also like