Hi everyone...

I developed a perl program to calculate end-to-end delay from my ns-2 trace 
file.  Oddly enough, I got fatal error "Illiegal division by zero".  At first I 
though that I got error in my program.  However when I check my trace file, I 
found that the sent time and received for data packets (both CBR and 
Exponential) are the same.  Below is a portion of my trace file:

exponential traffic, GPSR
s 0.823902776 _3_ AGT  --- 244 exp 250 [0 0 0 0] ------- [3:0 15:0 32 0] 
r 0.823902776 _3_ RTR  --- 244 exp 250 [0 0 0 0] ------- [3:0 15:0 32 0] 
D 0.823902776 _3_ RTR  SBF 139 exp 297 [0 0 0 0] ------- [3:0 15:0 128 0] 
s 0.827809026 _3_ AGT  --- 245 exp 250 [0 0 0 0] ------- [3:0 15:0 32 0] 
r 0.827809026 _3_ RTR  --- 245 exp 250 [0 0 0 0] ------- [3:0 15:0 32 0] 
D 0.827809026 _3_ RTR  SBF 140 exp 297 [0 0 0 0] ------- [3:0 15:0 128 0]

CBR traffic, GPSR
s 2.060625000 _3_ AGT  --- 1032 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [628] 
0 0
r 2.060625000 _3_ RTR  --- 1032 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [628] 
0 0
D 2.060625000 _3_ RTR  SBF 931 cbr 257 [0 0 0 0] ------- [3:0 15:0 128 0] [564] 
0 0
s 2.063783723 _52_ RTR  --- 1033 GPSR 1 [0 0 0 0] ------- [52:255 -1:255 32 0] 
3 0 [-1 -1]
s 2.063808723 _52_ MAC  --- 1033 GPSR 29 [0 ffffffff 34 0] ------- [52:255 
-1:255 32 0] 3 0 [-1 -1]
s 2.063906250 _3_ AGT  --- 1034 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [629] 
0 0
r 2.063906250 _3_ RTR  --- 1034 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [629] 
0 0

CBR traffic, AODV
s 0.200156250 _3_ AGT  --- 61 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [61] 0 0
r 0.200156250 _3_ RTR  --- 61 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [61] 0 0
s 0.203437500 _3_ AGT  --- 62 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [62] 0 0
r 0.203437500 _3_ RTR  --- 62 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [62] 0 0
s 0.206718750 _3_ AGT  --- 63 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [63] 0 0
r 0.206718750 _3_ RTR  --- 63 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [63] 0 0
s 0.210000000 _3_ AGT  --- 64 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [64] 0 0
r 0.210000000 _3_ RTR  --- 64 cbr 210 [0 0 0 0] ------- [3:0 15:0 32 0] [64] 0 0

As you can see in each portion of my trace, for the same flow id, the data 
packets are sent and received at the same time.  I even use AODV protocol just 
to make sure, but I still got the same type of result.  With this kind of 
trace, I definitely cannot calculate the delay because basically there is no 
delay.  Is my trace correct or did I make mistakes in my tcl program?  Have 
anyone encounter the same issue as I did?

By the way, my scenario is 95 mobile nodes simulated in vehicular ad hoc 
network environment with speed 20 m/s.  

Thank you in advance

regards
Aslinda Hassan
Computer Engineering Research Lab
Faculty of Engineering and Applied Science
Memorial University of Newfoundland

Reply via email to