Docsity

Mobile Computing ns2 Simulation - Lecture Slides | CS 6030, Assignments of Computer Science

Toggle sidebar
bg1
1
CS603 โ€“ Mobile Computing
ns2 Simulation
Assignment #2
By Mark Terwilliger
October 2, 2003
Extension of MANET
ns2 simulation
My scenario
Imagine an airport with users walking down a long
terminal with their mobile device
Users are accessing a single server (retrieving
email, checking weather forecast, news, sports
scores, etc.) as they are walking
Other mobile devices must forward the data to the
user when the device is not within range of the
server
Poisson distribution
A Poisson distribution was used to determine
the arrival times of the mobile devices
With a Poisson distribution, you can specify
the mean value for a sequence of numbers
For example, if the mean value is 3, you may
obtain a sequence such as 0, 2, 6, 1, 1, 4, 3,
0, 5, 5, 2, 1, 3, โ€ฆ
Implementation: A C program was written to
dynamically generate the scen ario and traf fic
data files
The function
int poisson(double mean) {
double limit = exp(-mea n);
double product = random_real();
int count = 0;
while (produ ct > limit) {
count++;
product *= random_real();
}
return count ;
}
Kruse, "Data Structures and Program Design in ++", P rentice Hall, 1999.
pf2

Partial preview of the text

Download Mobile Computing ns2 Simulation - Lecture Slides | CS 6030 and more Assignments Computer Science in PDF only on Docsity!

CS603 โ€“ Mobile Computing

ns2 Simulation

Assignment

By Mark Terwilliger

October 2, 2003

Extension of MANET

ns2 simulation

My scenario

Imagine an airport with users walking down a long

terminal with their mobile device

Users are accessing a single server (retrieving

email, checking weather forecast, news, sports

scores, etc.) as they are walking

Other mobile devices must forward the data to the

user when the device is not within range of the

server

Poisson distribution

A Poisson distribution was used to determine

the arrival times of the mobile devices

With a Poisson distribution, you can specify

the mean value for a sequence of numbers

For example, if the mean value is 3, you may

obtain a sequence such as 0, 2, 6, 1, 1, 4, 3,

Implementation: A C program was written to

dynamically generate the scenario and traffic

data files

The function

*int poisson(double mean) { double limit = exp(-mean); double product = random_real(); int count = 0; while (product > limit) { count++; product = random_real(); } return count; }

K ruse, " D ata Struc tu res and Pro gram D esign in ++", P rentic e H all, 1 999.

2

The results

The simulation

was run with

varying arrival

times (0.5, 1.0,

Problems

occurred when

big gaps

between users

prevented the

creation of

routes