[ns] errors in propagation model

2007-10-07 Thread ibrahim koda

Hi all ,
  
I am new to NS-2(im using ns-2.28 an ns.2.30).I am trying to include Ricean 
propagation model 
  with the following steps:
1-Copy the two files under ns-src(prop-ricean.cc,prop-ricean.h) into my NS 
source directory
2-edit Makefile.in in my NS source directory and i added the  
mobile/prop_ricean.o \  to OBJ_CC 
3-Run configure 
4. make clean
5. make 
 but when I am trying to test the Ricean propagation model  using the following 
code I got the 
  following error: 
num_nodes is set 10
invalid command name "Propagation/Ricean"
while executing
"Propagation/Ricean create _o13 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $propType_"
(procedure "_o3" line 29)
(Simulator node-config line 29)
invoked from within
  
Here is the code portion related to the error: 
  /** 
 set val(chan)  Channel/WirelessChannel;#Channel Type
set prop [new Propagation/Ricean]
  set val(netif)  Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11 ;# MAC type
set val(ifq)   Queue/DropTail/PriQueue;# interface queue type
set val(ll)LL ;# link layer type
set val(ant)   Antenna/OmniAntenna;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn)10   ;# number of mobilenodes
set val(rp)DSR   ;# routing protocol
set val(x)  1000
set val(y) 1000
   
# unity gain, omni-directional antennas
# set up the antennas to be centered in the node and 1.5 meters above it
Antenna/OmniAntenna set X_ 0
 Antenna/OmniAntenna set Y_ 0
 Antenna/OmniAntenna set Z_ 1.5 
Antenna/OmniAntenna set Gt_ 1.0
 Antenna/OmniAntenna set Gr_ 1.0
# Initialize the SharedMedia interface with parameters to make
# it works like the 914MHz Lucent WaveLAN DSSS radio interface
Phy/WirelessPhy set CPThresh_ 10.0
Phy/WirelessPhy set CSThresh_ 1.559e-11
Phy/WirelessPhy set RXThresh_ 3.652e-10
Phy/WirelessPhy set Rb_ 2*1e6
Phy/WirelessPhy set Pt_ 0.2818
Phy/WirelessPhy set freq_ 914e+6
Phy/WirelessPhy set L_ 1.0
# Initialize Global Variables
#Create simulator instance
set ns_ [new Simulator]
  set tracefd [open hybridrice2.tr w]
#simulator object ns_ to writes all sim data into this tr file
$ns_ trace-all $tracefd
set namtrace [open hybridrice2.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# set up topography object
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
# Create God
set god_ [create-god $val(nn)]
set chan_1_ [new $val(chan)]
# configure node, please note the change below.
$ns_ node-config -adhocRouting $val(rp) \
  -llType $val(ll) \
  -macType $val(mac) \
  -ifqType $val(ifq) \
  -ifqLen $val(ifqlen) \
-propInstance $prop  \
  -antType $val(ant) \
  -phyType $val(netif) \
  -topoInstance $topo \
  -agentTrace ON \
  -routerTrace ON \
  -macTrace ON \
  -movementTrace OFF \
  -channel $chan_1_ 
#$ns_ node-config -adhocRouting $val(rp) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType 
$val(prop) \ -phyType 
  $val(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ 
-macTrace ON \
 -movementTrace OFF \
  -channel $chan_1_ 
set prop_inst [$ns_ set propInstance_]
$prop_inst MaxVelocity  2.5 ;
$prop_inst RiceanK6 ;
$prop_inst LoadRiceFile  "rice_table.txt"   ;
  How can I solve such error
   Please if u can help me
thank you



Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Don't let your dream ride pass you by.Make it a reality with Yahoo! Autos. 


[ns] until Now Error in Ricean model

2007-09-24 Thread ibrahim koda


Hi ;
  Ihave sent you an email before and i'm wating your reply to solve error in 
Ricean model and also i have attched output of my TCL program with this 
message. ihave did the following steps:
  1-Copy the two files under ns-src(prop-ricean.cc,prop-ricean.h) into my NS 
source directory
  2-edit Makefile.in in my NS source directory and i added the prop_ricean.o  
to the list of objects under OBJ_CC
  3-Run configure 
  4. make clean
  5. make 
  but when i have used TCL script it does'nt work .
  many thanks
  ibrahim
   


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 

[ns] ricean model

2007-09-16 Thread ibrahim koda

 
 I am trying to add ricean propagation model. I have built NS on windows machine
under Cygwin enviornment. But when I put the prop_ricean.cc and prop_ricean.h
files under the NS Sourse directory and run the configure command it I get the
following messages:
 
 
No .configure file found in current directory   
Continuing with default options...  
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin 
checking target system type... i686-pc-cygwin   
checking for gcc... gcc 
checking for C compiler default output... a.exe 
checking whether the C compiler works... yes
checking whether we are cross compiling... no   
checking for suffix of executables... .exe  
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes  
checking for gcc option to accept ANSI C... none needed 
checking for g++... g++ 
checking whether we are using the GNU C++ compiler... yes   
checking whether g++ accepts -g... yes  
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E   
checking for ANSI C header files... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes  
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes   
checking for inttypes.h... yes  
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes   
checking for main in -lXbsd... no   
checking for socket in -lsocket... no   
checking for gethostbyname in -lnsl... no   
checking for dcgettext in -lintl... yes 
checking for getnodebyname in -ldnet_stub... no 
checking that g++ can handle -O2... no  
checking if C++ libraries work without any namespace... no  
checking if C++ libraries work with namespace std... yes
checking if STL works without any namespace... no   
checking if STL works with namespace std... yes 
checking should use STL... yes  
checking for tcl.h... -I../include  
checking for libtcl8.4... -L../lib -ltcl8.4 
checking for init.tcl... ../lib/tcl8.4  
checking for tclsh8.4.5... no   
checking for tclsh8.4... no 
checking for tclsh... ../tcl8.4.5/unix/tclsh
checking for tk.h... -I../include   
checking for libtk8.4... -L../lib -ltk8.4   
$   
checking for otcl.h... -I../otcl-1.8
checking for libotcl1.8... -L../otcl-1.8 -lotcl 
checking for tclcl.h... -I../tclcl-1.15 
checking for libtclcl... -L../tclcl-1.15 -ltclcl
checking for tcl2c++... ../tclcl-1.15   
checking for X11 header files   
checking for X11 library archive
checking for XOpenDisplay in -lX11... no
can't find X library 
  then i  ran make clean and make  
 
and when I am trying to test the Ricean propagation model (after I have added 
it to NS-2) using the following code I got the following error: 
   invalid command name "Propagation/ricean"
 while executing
 "Propagation/ricean create _o12 "
 invoked from within
   
  "can't read "propInstance_": no such variable 
  while executing 
  "$ns_ set propInstance_" ... " 

.
  .
  .
  Here is the code portion related to the error: 
  
  set val(chan)   Channel/WirelessChannel;#Channel Type 
set val(prop)   Propagation/Ricean ;# radio-propagation model 
set val(netif)  Phy/WirelessPhy;# network interface type 
set val(mac)Mac/802_11 ;# MAC type 
set val(ifq)Queue/DropTail/PriQueue;# interface queue type 
se

[ns] error in using Ricean model

2007-09-16 Thread ibrahim koda

Hi all 
   
  I am trying to implement the ricean propagation(include the .cc and .h 
classes of the Ricean propagation model within the simulator)I have put the 
classes  in the mobile directory in ns.When I am trying to test the Ricean 
propagation model. After following the
 instructions below :
  firstly, i added mobile/prop_ricean.o \ to OBJ_CC in Makefile.in  
   secondly, 
 I ran ./config  then I ran "make" .
When I am trying to test the Ricean propagation modelusing the following code I 
got the following error: 
   invalid command name "Propagation/ricean"
 while executing
 "Propagation/ricean create _o12 "
 invoked from within
   
  "can't read "propInstance_": no such variable 
  while executing 
  "$ns_ set propInstance_" ... " 

.
  .
  .
  Here is the code 
  /** 
  set val(chan)   Channel/WirelessChannel;#Channel Type 
set val(prop)   Propagation/Ricean ;# radio-propagation model 
set val(netif)  Phy/WirelessPhy;# network interface type 
set val(mac)Mac/802_11 ;# MAC type 
set val(ifq)Queue/DropTail/PriQueue;# interface queue type 
set val(ll) LL ;# link layer type 
set val(ant)Antenna/OmniAntenna;# antenna model 
set val(ifqlen) 50 ;# max packet in ifq 
set val(nn) 2  ;# number of mobilenodes 
set val(rp) DSDV   ;# routing protocol 
#set val(rp) DSR   ;# routing protocol 
set val(x)  500 
set val(y)  500 
  
# Initialize Global Variables 
set ns_  [new Simulator] 
set tracefd [open wireless_mitf.tr w] 
$ns_ trace-all $tracefd 
  set namtrace [open wireless_mitf.nam w] 
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y) 
  # set up topography object 
set topo   [new Topography] 
  $topo load_flatgrid $val(x) $val(y) 
  # 
set prop_inst [$ns_ set propInstance_] 
$prop_inst MaxVelocity  2.5; 
$prop_inst RiceanK6; 
$prop_inst LoadRiceFile  "rice_table.txt"; 
  
How can I solve such error
 How to deal with it?
 Please give me a solution...
   your help is very much appreciated
 regards


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 


[ns] problem in compiling Voronoi.c in obstacle mobility model

2007-04-25 Thread ibrahim koda

hi all
  Thank you very much for your help. ihave  a problem  when i compiled 
Voronoi.c. i have used C++ to compile Voronoi.c and the error after compilation 
is:
  C(2) : fatal error C1083: Cannot open include file: 'CGAL/basic.h': No such 
file or directory
Error executing cl.exe.
   
  please help me
  thanks 


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


[ns] problem inobstacle mobility model

2007-04-19 Thread ibrahim koda

Hi all;
for Installation and Usage Procedure for the Obstacle Mobility Model Plugin for 
NS-2:
ihave done the following procedure:
- i have downloded and installed the CGAL libraries.
- i replaced the file  voronoi.C with the one provided with the tarball.
- i extracted the NS-2 files and replace the original NS-2 files with the given 
files 
- i compiled the java files(error_frame.java ,obstacle.java ,tergen.java)

-i compiled the TerGen code and i found GUI .
  but iam still have the following questons:
  
how can i Draw rectangular objects?
how can i display the voronoi graph ?
how can i generate Obstacles(like buildings or trees) and edges?
please help me to easy understand using your obstacle mobility model.
many thanks 
yours 
ibrahim




Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


[ns] obstacle mobility model

2007-04-18 Thread ibrahim koda

Hi all;
  for Installation and Usage Procedure for the Obstacle Mobility Model Plugin 
for NS-2:
ihave done the following procedure:
- i have downloded and installed the CGAL libraries.
- i replaced the file 'voronoi.C'with the one provided with the tarball.
- i extracted the NS-2 files and replace the original NS-2 files with the given 
files 
-  i compiled the java files(error_frame.java ,obstacle.java ,tergen.java)
but iam still have the following questons:
what the following means :
 1- compilecsimulator code
   2-Compile the TerGen code
also realy i don't understand the following:
 1-the TerGen code where i can find this code.
 2-Version for the TerGen Tool.
where i can find the Release 1.0 for TerGen - The Terrain Generator?
how  can i generate node mobility?
how  can i  Draw rectangular objects?
how  can i display the voronoi graph ?
how  can i generate Obstacles(like buildings or trees) and edges?
please help me to easy understand using your obstacle mobility model.
  many thanks 
  yours 
ibrahim
  
 


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


[ns] problem in implementing the ricean propagation

2007-04-17 Thread ibrahim koda

Hi all ;
  I am trying to implement the ricean propagation. After following the
instructions below :
in Makefile.in  i added  mobile/prop_ricean.o  to OBJ_CC 
I got the following problem first I was  run config
I ran ./config  then I ran "make" but after a while it has given me 
the following error
  make: *** No rule to make target ` mobile/prop_ricean.cc', needed by
` mobile/prop_ricean.o'.  Stop.
   
  How to deal with it?
  Please give me a solution...
  
your help is very much appreciated
  regards

Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


[ns] problem in implement the ricean propagation

2007-04-13 Thread ibrahim koda

Hi all ;
  I am trying to implement the ricean propagation. After following the
instructions below :
Makefile.in   add  mobile/prop_ricean.o  to OBJ_CC 
I get the following problem first I was told to run config
I ran ./config  then I ran "make" but after a while it has given me this error
  make: *** No rule to make target ` mobile/prop_ricean.cc', needed by
` mobile/prop_ricean.o'.  Stop.
   
  How to deal with it?
  Please give me a solution...
  
your help is very much appreciated
  regards


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


[ns] problem in Ricean Propagation model

2007-04-09 Thread ibrahim koda

i'm try to use  Ricean model instead of Two Ray Ground  in tcl script 
  but i met the following problems:
  invalid command name "Propagation/Ricean"
while executing
"Propagation/Ricean create _o11 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $opt(prop)"
invoked from within
"set prop[new $opt(prop)]"
(file "err_wireless.tcl" line 188)
   
  first i have download prop_ricean.cc and prop_ricean.h and rice_table 
  and i put the first two file in mobile directory and the third file 
  with my Tcl script.
please help me 
  thanks



Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.


[ns] problem in using Ricean Propagation model

2007-04-09 Thread ibrahim koda

i'm try to use  Ricean model instead of Two Ray Ground  in tcl script 
  but i met the following problems:
  num_nodes is set 10
invalid command name "Propagation/Ricean"
while executing
"Propagation/Ricean create _o13 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $propType_"
(procedure "_o3" line 29)
(Simulator node-config line 29)
invoked from within
  first i have download prop_ricean.cc and prop_ricean.h and rice_table 
  and i put the first two file in mobile directory and the third file 
  with my Tcl script.
please help me 
  thanks



Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
   
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.


[ns] problems in ricean model

2007-04-05 Thread ibrahim koda

Hi all
I have downloaded and installed the ricean model extensions. it compiled and
make fine.However, when i ran the tcl file, the following message came up.
can not read "propInstant" no such variable
while executin
"subset $[subset $var]"
(procedure "_o3" line 5)
(SplitObject set line 5)
invoked from within
"set prop_inst [$ns_ set propInstance]"
and whole lot of other error messages
Apprantly, ns cant find the command Ricean..
I have ns2version 2.28
If anyone could help me with this problems or know someone who can help, it 
would
be grealty appreciated.

Thank you



Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
 
-
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.


[ns] problems on using ricean propagation model extensions

2007-04-04 Thread ibrahim koda

Hi all
  I have downloaded and installed the ricean model extensions. it compiled and
make fine.However, when i ran the tcl file, the following message came up.
can not read "propInstant" no such variable
while executin
"subset $[subset $var]"
(procedure "_o3" line 5)
(SplitObject set line 5)
invoked from within
"set prop_inst [$ns_ set propInstance]"
and whole lot of other error messages
  Apprantly, ns cant find the command Ricean..
  I have ns2version 2.28
  If anyone could help me with this problems or know someone who can help, it 
would
be grealty appreciated.
   
  Thank you


Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.


[ns] problem in delay and throughput script

2007-03-22 Thread ibrahim koda

Hi all,
  I have worked for  TRACE format .I have used  delay.awk,throughput.awk for my 
tcl progrm 
It runs successfully for delay but not for thrpughput.
for throughput error :
 awk: thrput.awk:44: (FILENAME=hybrid.tr FNR=122048) fatal: division by zero 
attempted
while executing
 awk -f thrput.awk hybrid.tr > result.tr

for delay
  it runs successfully.But the problem is that the new file generated (.tr) is 
empty.The new file has not any data.
   
  # throughput.awk
   BEGIN {
 recv = 0
 }
 {
 # Trace line format: normal
 if ($2 != "-t") {
 event = $1
 time = $2
 if (event == "+" || event == "-") node_id = $3
 if (event == "r" || event == "d") node_id = $4
 flow_id = $8
 pkt_id = $12
 pkt_size = $6
 }
 # Trace line format: new
 if ($2 == "-t") {
 event = $1
 time = $3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 pkt_size = $37
 }
 # Calculate total received packets' size
 if (flow_id == flow && event == "r" && node_id == dst) {
 if (flow_t != "sctp") {
 recv += pkt_size - hdr_size
 #printf("recv[%g] = %g %g\n",node_id,pkt_size
  -hdr_size,recv)
 } else {
 # Rip off SCTP header, whose size depends
 # on the number of chunks in each packet
if (pkt_size != 448 && pkt_size != 864 && 
  pkt_size != 1280) pkt_size = 0
 if (pkt_size == 448) pkt_size = 400
 if (pkt_size == 864) pkt_size = 800
 if (pkt_size == 1280) pkt_size = 1200
 recv += pkt_size
 #printf("recv[%g] = %g --> tot: %
  g\n",node_id,pkt_size,recv)
 }
 }
 }
 END {
 printf("%10g %10s %10g\n",flow,flow_t,(recv/simtime)*(8/1000))
 }

  #Delay.awk
BEGIN {
 for (i in send) {
 send[i] = 0
 }
 for (i in recv) {
 recv[i] = 0
 }
 delay = avg_delay = 0
 }
 {
 # Trace line format: normal
 if ($2 != "-t") {
 event = $1
 time = $2
 if (event == "+" || event == "-") node_id = $3
 if (event == "r" || event == "d") node_id = $4
 flow_id = $8
 pkt_id = $12
 }
 # Trace line format: new
 if ($2 == "-t") {
 event = $1
 time = $3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 }
 # Store packets send time
 if (flow_id == flow && node_id == src && send[pkt_id] == 0 && (event 
== "+" || event 
  =="s")) {
 send[pkt_id] = time  
 }
 # Store packets arrival time
 if (flow_id == flow && node_id == dst && event == "r") {
 recv[pkt_id] = time
}
 }
 END {
 # Compute average delay
 for (i in recv) {
 if (send[i] == 0) {
 printf("\nError %g\n",i)
 }
 delay += recv[i] - send[i]
 num ++
 }
 printf("%10g ",flow)
 if (num != 0) {
 avg_delay = delay / num
 } else {
 avg_delay = 0
 }
 printf("%10g\n",avg_delay*1000)
}
   
  thanks
   
  ibrahim

 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.


[ns] problem in delay and throughput script

2007-03-22 Thread ibrahim koda

Hi all,
  I have worked for  TRACE format .I have used  delay.awk,throughput.awk for my 
tcl progrm 
It runs successfully for delay but not for thrpughput.
for throughput error :
 awk: thrput.awk:44: (FILENAME=hybrid.tr FNR=122048) fatal: division by zero 
attempted
while executing
 awk -f thrput.awk hybrid.tr > result.tr

for delay
  it runs successfully.But the problem is that the new file generated (.tr) is 
empty.The new file has not any data.
   
  # throughput.awk
   BEGIN {
 recv = 0
 }
 {
 # Trace line format: normal
 if ($2 != "-t") {
 event = $1
 time = $2
 if (event == "+" || event == "-") node_id = $3
 if (event == "r" || event == "d") node_id = $4
 flow_id = $8
 pkt_id = $12
 pkt_size = $6
 }
 # Trace line format: new
 if ($2 == "-t") {
 event = $1
 time = $3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 pkt_size = $37
 }
 # Calculate total received packets' size
 if (flow_id == flow && event == "r" && node_id == dst) {
 if (flow_t != "sctp") {
 recv += pkt_size - hdr_size
 #printf("recv[%g] = %g %g\n",node_id,pkt_size
  -hdr_size,recv)
 } else {
 # Rip off SCTP header, whose size depends
 # on the number of chunks in each packet
if (pkt_size != 448 && pkt_size != 864 && 
  pkt_size != 1280) pkt_size = 0
 if (pkt_size == 448) pkt_size = 400
 if (pkt_size == 864) pkt_size = 800
 if (pkt_size == 1280) pkt_size = 1200
 recv += pkt_size
 #printf("recv[%g] = %g --> tot: %
  g\n",node_id,pkt_size,recv)
 }
 }
 }
 END {
 printf("%10g %10s %10g\n",flow,flow_t,(recv/simtime)*(8/1000))
 }

  #Delay.awk
BEGIN {
 for (i in send) {
 send[i] = 0
 }
 for (i in recv) {
 recv[i] = 0
 }
 delay = avg_delay = 0
 }
 {
 # Trace line format: normal
 if ($2 != "-t") {
 event = $1
 time = $2
 if (event == "+" || event == "-") node_id = $3
 if (event == "r" || event == "d") node_id = $4
 flow_id = $8
 pkt_id = $12
 }
 # Trace line format: new
 if ($2 == "-t") {
 event = $1
 time = $3
 node_id = $5
 flow_id = $39
 pkt_id = $41
 }
 # Store packets send time
 if (flow_id == flow && node_id == src && send[pkt_id] == 0 && (event 
== "+" || event 
  =="s")) {
 send[pkt_id] = time  
 }
 # Store packets arrival time
 if (flow_id == flow && node_id == dst && event == "r") {
 recv[pkt_id] = time
}
 }
 END {
 # Compute average delay
 for (i in recv) {
 if (send[i] == 0) {
 printf("\nError %g\n",i)
 }
 delay += recv[i] - send[i]
 num ++
 }
 printf("%10g ",flow)
 if (num != 0) {
 avg_delay = delay / num
 } else {
 avg_delay = 0
 }
 printf("%10g\n",avg_delay*1000)
}
   
  thanks
   
  ibrahim

 
-
Looking for earth-friendly autos? 
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.  


[ns] Walfisch-Ikagami radio propagation model in ns

2007-03-14 Thread ibrahim koda

Hi all
  how  i can use Walfisch-Ikagami radio propagation model instead of 
TwoRayGround radio propagation model  in ns ?
  ibrahim 

 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.


[ns] for urgent help

2007-03-07 Thread ibrahim koda

Hi all,
  i want to simulate two cell each has a base station .If there is one mobile 
station in first  cell,when mobile station move from first cell and at the 
boundary between these two cell  shoud  send message to first cell for hand off 
. please help me to write this secnario.
  many thanks 

 
-
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.


[ns] need help

2007-03-07 Thread ibrahim koda

Hi all,
  i want to simulate two cell each has a base station and there is one mobile 
station in one of cell,when mobile station move from first cell and at the 
boundary between these two cell  shoud  send message to first cell for hand off 
. please help me to write this secnario.
  many thanks 

 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.


[ns] need help

2007-03-07 Thread ibrahim koda

Hi all,
  i want to simulate two cell each has a base station and there is one mobile 
station in one of cell,when mobile station move from first cell and at the 
boundary between these two cell  shoud  send message to first cell for hand off 
. please help me to write this secnario.
  many thanks 

 
-
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.


[ns] obstacle mobility model in urban area

2007-02-26 Thread ibrahim koda

Hi ALL
i have simulated (DSR,AODV,DSDV) using Manhattan and  Random Waypoint.I 
want to check the performance of these adhoc   protocols in real environment.i 
looked  for using  obstacle mobility model for  more realistic work.How i can 
use obstacle mobility model?. 
thanks for any suggestion with regards
ibrahim khider

 
-
Everyone is raving about the all-new Yahoo! Mail beta.


[ns] obstacle mobility model

2007-02-26 Thread ibrahim koda

Hi ALL
i have simulated (DSR,AODV,DSDV) using Manhattan and  Random Waypoint.I 
want to check the performance of these adhoc   protocols in real environment.i 
looked  for added obstacle mobility model for  more realistic work. 
thanks for any suggestion with regards
ibrahim khider

 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.


[ns] How i can use Obstcale model with Hybrid model(Manhattan and RWP models) for node movement in urban area

2007-02-24 Thread ibrahim koda

Hi ALL
i have simulated (DSR,AODV,DSDV)using hybrid model (Manhattan and Random 
Waypoint).I want to check the performance of these adhoc  protocols in real 
environment(urban area or in campus  environment).  i looked for added obstacle 
mobility model to manhattan and Random waypoint for more realistic work. 

 thanks for any suggestion with regards
ibrahim khider



 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.


[ns] How i can use Obstcale model with Hybrid model(Manhattan and RWP models) for node movement in urban area

2007-02-22 Thread ibrahim koda


Hi ALL
i have simulated (DSR,AODV,DSDV)using hybrid model (Manhattan and 
Random Waypoint).I want to check the performance of these adhoc 
protocols in real environment(urban area or in campus  environment).
  i looked for added obstacle mobility model to manhattan and Random 
waypoint for more realistic work. 
   thanks for any suggestion with regards
ibrahim khider

 
-
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!


[ns] ns2-in celluler

2007-01-04 Thread ibrahim koda

Hi friends
  I would like to construct a simple network similar to cellular network. I 
need to define the cell areas , then set up some base stations, the base 
stations should be able to find whether a particular mobile node is present in 
its cell area, by sending a paging message and receiving an acknowledgement. 
Base stations should be able to communicate among them to search for the users 
in other cells. Can this be done using NS2.If you know please share with me 
how. 
  Waiting for some reply
  Thank you
  [EMAIL PROTECTED]

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com