Omnetpp L1. 2. 3
Omnetpp L1. 2. 3
Analysis of Algorithms
using OMNeT++
DR. MOHAMMED HUSSEIN AL HUBAISHI
2
Introduction
3
Outlines
https://docs.omnetpp.org/tutorials/tictoc/part1/
4
Discrete event simulator (DES)
1.Computer Network:
► Computer networks are complex systems connecting
numerous devices like computers, servers, and other
equipment through various communication channels.
► Events: Data packet arrival, router forwarding, link failure
constantly occur, dictating the flow of information.
► Simulation: You can evaluate network
performance, optimize routing protocols, and test new
technologies.
https://en.wikipedia.org/wiki/Computer_network_diagram
6
Examples to illustrate how DES works:
2.Traffic Network:
► Events: Vehicle arrival, lane change, traffic light change.
► Simulation: You can test different traffic management
strategies, predict congestion, and evaluate infrastructure
improvements.
https://www.ironnet.com/blog/the-truth-is-in-the-traffic-the-advantages-of-network-traffic-based-cybersecurity
7
Examples to illustrate how DES works:
3. Manufacturing Line:
► Events: Arrival of raw materials, machine
breakdown, product completion.
► Simulation: You can model the flow of materials, identify
bottlenecks, optimize machine usage, and estimate
production capacity.
https://www.eflexsystems.com/lean-manufacturing-blog/scenarios-of-common-assembly-line-issues
8
Examples to illustrate how DES works:
https://www.ironnet.com/blog/the-truth-is-in-the-traffic-the-advantages-of-network-traffic-based-cybersecurity
9
Key benefits of using DES:
Remember, DES focuses on discrete events, meaning things happen at distinct points in time. If your
system involves continuous processes like fluid flow or temperature changes, you might need a different
type of simulation, like continuous simulation.
10
OMNeT++
https://docs.omnetpp.org/tutorials/tictoc/p
art3/
32
Step 2: Refining the Graphics, and Adding
Debugging Output
33
Step 2: Refining the Graphics, and
Adding Debugging Output (cont’d)
34
Step 3: Adding State Variables
35
Step 4: Adding Parameters
36
Step 4: Adding Parameters (cont’d)
37
Step 5: Using Inheritance
38
Step 6: Modeling Processing Delay
Step 6: Modeling Processing Delay (cont’d) 39
40
Step 7: Random Numbers and
Parameter
41
Step 8: Timeout, Cancelling Timers
42
Step 9: Retransmitting the Same Message
43
Step 9: Retransmitting the Same
Message (cont’d)
44
45
Turning it into a real network
46
Part 4 - Turning it Into a Real Network
https://docs.omnetpp.org/tutorials/tictoc/part4/
47
Step 10: More Than Two Nodes
48
Step 10: More Than Two Nodes
(cont’d)
49
Step 11: Channels and Inner Type
Definitions
50
Step 12: Using Two-Way Connections
51
Step 12: Using Two-Way Connections
(cont’d)
52
Step 13: Defining our Message Class
53
Step 13: Defining our Message Class
(cont’d)
54
Step 13: Defining our Message Class
(cont’d)
55
Adding statistics collection
56
Part 5 - Adding Statistics Collection
https://docs.omnetpp.org/tutorials/tictoc/part5/
57
Step 14: Displaying the Number of
Packets Sent/Received
58
Step 14: Displaying the Number of
Packets Sent/Received (cont’d)
59
Step 15: Adding statistics collection
60
Step 15: Adding statistics collection
(cont’d)
61
Step 15: Adding statistics collection
(cont’d)
62
Step 15: Adding statistics collection
(cont’d)
63
Step 16: statistics collection without
modifying your model
64
Step 16: statistics collection without
modifying your model (cont’d)
65
Step 16: statistics collection without
modifying your model (cont’d)
66
Visualizing the results with the OMNet+
+ IDE
67
Visualizing the results with the OMNet+
+ IDE (cont’d)
68
Visualizing the results with the OMNet+
+ IDE (cont’d)
69
Visualizing the results with the OMNet+
+ IDE (cont’d)
70
Visualizing the results with the OMNet+
+ IDE (cont’d)
71
Conclusions
72