[ns] aomdv in ns-2.34

2012-05-07 Thread Bety Barreto Soares

hi, i want to do (i have done) the comparison of aodv and aomdv in ns-2.34. so 
far i have did 6 times simulation but the result always shows the wrong 
reason.i did the comparison with the following metrics :
average end to end delay, pdf, routing load and throughput. it showed that aodv 
is out performs of aomdv in terms of average end to end delay in various pause 
time and aomdv is better in terms of packet delivery fraction, routing load and 
throughput.is that right? because i didn't found any mistakes in my tcl codes 
and awk script. only the result is odd. could someone suggest me if there is 
any change in aomdv protocol such as (aomdv.cc, aomd.h etc). i really need your 
help..please help me because my project is going to finish this month..thank 
you very much


 

regards

Bety  Barreto Soares



[ns] Fw: Ask for Expert help to give me comment on my result.Thank you

2012-04-30 Thread Bety Barreto Soares



I did the comparison of AODV and AOMDV and got same result..i'm confuse with my 
result. through this discussion group i would like to ask some expert people 
here to give me comment on my result either they are right or wrong
Your comment would help me to finish my project. i appreciate it a lot if some 
expert people do help me on this way.
thank you very much
pleas find my attachment 

 
 regards 

Bety Barreto Soares





[ns] average end-to-end delay in comparison of aodv and aomdv in ns 2.34

2012-04-16 Thread Bety Barreto Soares

hi all,
here i want to say that, i have done the simulation with various pause time and 
maximum connection for both aodv and aomdv routing protocol in ns 2.34.

i only change aodv to aomdv protocol in the tcl script and the rest code remain 
same. when i did the comparison of end to end delay seems like aomdv is better 
than aodv. it is contrast with the theory that actually aodv performs better 
than aomdv in terms of average end to end delay. 

please help me to solve this problem..what is wrong?
thank you very much


[ns] AOMDV Tcl Script

2012-04-09 Thread Bety Barreto Soares



 
Hi all,

I want to know that to run AOMDV for routing protocol in ns2.34 we just need to 
change the 
routing protocol to AOMDV and rest all things will be same as 
like in AODV 
or is there any other changes need to made in AODV tcl file to 
run the AOMDV 
protocol.

Thanks in advance
Bety


[ns] Need awk script of new trace file

2012-02-19 Thread Bety Barreto Soares

hi all,

could anyone provide or send me awk script of (end-to-end delay, packet 
delivery fraction, routing overhead and throughput)? i have done aodv.tcl 
script and got the result of new trace file format, all i need is to have those 
metrics to analyze the performance of aodv and aomdv.
Thank you very much in advance
Regards 


Bety


[ns] Got error when run example of 4node.tcl

2011-10-19 Thread Bety Barreto Soares

# ==
# Define options
# ===

set val(chan)                        Channel/WirelessChannel        ;# channel 
type
set val(prop)                        Propagation/TwoRayGround    ;# 
radio-propagation model
set val(ant)                        Antenna/OmniAntenna            ;# Antenna 
type
set val(ll)                            LL                            ;# Link 
Layer type
set val(ifq)                        Queue/DropTail/PriQueue        ;# Interface 
queue type
set val(ifqlen)                        50                            ;# max 
packet in ifq
set val(netif)                        Phy/WirelessPhy                ;# network 
interface type
set val(mac)                        Mac/802_11                    ;# MAC type
set val(nn)                            4                            ;# number 
of mobilenodes
set val(rp)                            AODV                        ;# routing 
protocol
set val(x)                            800                            
set val(y)                            800

set ns [new Simulator]
#ns-random 0

set f [open 1_out.tr w]
$ns trace-all $f
set namtrace [open 1_out.nam w]
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
set f0 [open proj_out0.tr w]
set f1 [open proj_out1.tr w]
set f2 [open proj_out2.tr w]
set f3 [open proj_out3.tr w]

set topo [new Topography]
$topo load_flatgrid 800 800

create-god $val(nn)

set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
set chan_3 [new $val(chan)]
set chan_4 [new $val(chan)]

# Configure and create nodes

$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) \
                #-channelType $val(chan) \
                -topoInstance $topo \
                -agentTrace OFF \
                -routeTrace ON \
                -macTrace ON \
                -movementTrace OFF \
                -channel $chan_1 \
                -channel $chan_2 \
                -channel $chan_3 \
                -channel $chan_4 
proc finish {} {
        global ns f f0 f1 f2 f3 namtrace
        $ns flush-trace
        close $namtrace
        close $f0
        close $f1
        close $f2
        close $f3
        #exec xgraph proj_out0.tr proj_out1.tr proj_out2.tr proj_out3.tr
        exec nam -r 5m 1_out.nam 
        exit 0
}

proc record {} {
    global sink0 sink1 sink2 sink3 f0 f1 f2 f3
    # Get AN instance of the simulator
    
    set ns [Simulator instance]
    #set the Time after which the procedure should be called again
    set time 0.05
    # How Many Bytes have been received by the traffic sinks?
    set bw0 [$sink2 set npkts_]
    set bw1 [$sink2 set nlost_]
    set bw2 [$sink0 set npkts_]
    set bw3 [$sink0 set nlost_]

# Get the current time
set now [$ns now]

#save data to the files
puts $f0 $now [expr $bw0]
puts $f1 $now [expr $bw1]
puts $f2 $now [expr $bw2]
puts $f3 $now [expr $bw3]

# Re-schedule the procudere
$ns at [expr $now+$time] record
}

#define color index
$ns color 0 blue
$ns color 1 red
$ns color 2 chocolate
$ns color 3 red
$ns color 4 brown
$ns color 5 tan
$ns color 6 gold
$ns color 7 black

set n(0) [$ns node]
#$ns at 0.0 $n(0) color red
$n(0) color 0
$n(0) shape circle
set n(1) [$ns node]
$n(1) color blue
$n(1) shape circle
set n(2) [$ns node]
$n(2) color tan
$n(2) shape circle
set n(3) [$ns node]
$n(3) color red
$n(3) shape circle

for {set i 0} {$i  $val(nn)} {incr i} {
    $ns intial_node_pos $n($i) 30+i*100
}
$n(0) set X_ 0.0
$n(0) set Y_ 0.0
$n(0) set Z_ 0.0

$n(1) set X_ 0.0
$n(1) set Y_ 0.0
$n(1) set Z_ 0.0

$n(2) set X_ 0.0
$n(2) set Y_ 0.0
$n(2) set Z_ 0.0

$n(3) set X_ 0.0
$n(3) set Y_ 0.0
$n(3) set Z_ 0.0

$ns at 0.0 $n(0) setdest 100.0 200.0 3000.0
$ns at 0.0 $n(1) setdest 250.0 200.0 3000.0
$ns at 0.0 $n(2) setdest 400.0 200.0 3000.0
$ns at 0.0 $n(3) setdest 550.0 200.0 3000.0

#$ns at 1.5 $n(2) setdest 100.0 150.0 500.0
#$ns at 1.5 $n(3) setdest 450.0 150.0 500.0

# Configure and set up a flow

set sink0 [new Agent/LossMonitor]
set sink1 [new Agent/LossMonitor]
set sink2 [new Agent/LossMonitor]
set sink3 [new Agent/LossMonitor]
$ns attach-agent $n(0) $sink0
$ns attach-agent $n(1) $sink1
$ns attach-agent $n(2) $sink2
$ns attach-agent $n(3) $sink3

#$ns attach-agent $sink2 $sink3
set tcp0 [new Agent/TCP]
$ns attach-agent $n(0) $tcp0
set tcp1 [new Agent/TCP]
$ns attach-agent $n(1) $tcp1
set tcp2 [new Agent/TCP]
$ns attach-agent $n(2) $tcp2
set tcp3 [new Agent/TCP]
$ns attach-agent $n(3) $tcp3

proc attach-CBR-traffic {node sink size interval} {
#Get an instance of the simulator
set ns [Simulator instance]
#create a CBR agent and attach it to the node
set cbr [new Agent/CBR]
$ns attach-agent $node $cbr
$cbr set packetSize $size
$cbr set 

[ns] Erro when run ad-hoc simulation with AODV

2011-10-18 Thread Bety Barreto Soares
]
}
(file wrlsl.tcl line 51)

i went through to line 51 but  found nothing to change there

please help to get the result. i really need your help to understand well about 
AODV 

thank you very much

best

Bety Barreto Soares 



[ns] NAM : NO DISPLAY NAME AND NO $DISPLAY ENVIRONMENT VARIABLE

2011-09-02 Thread Bety Barreto Soares



still in the same example myfirst_ns.tcl, i have changed and do some change but 
when run it showed that :

NAM : NO DISPLAY NAME AND NO $DISPLAY ENVIRONMENT VARIABLE


I HAVE BROWSED ON THE INTERNET BUT I GOT NO SOLUTION...PLEASE HELP ME OUT

THANK YOU



Re: [ns] [NS-ANS] Re: NAM : NO DISPLAY NAME AND NO $DISPLAY ENVIRONMENT VARIABLE

2011-09-02 Thread Bety Barreto Soares

thank you sir Teerawat, 
i did what u suggested and seems like nam doesn#39;t work..but when i try run 
an example quot;$ns mcast.tclquot; the nam works well...what is the 
difference  when using nam in cygwin and startxwin.bat? 

could you suggested me how to install nam?i really need your help...thank you
NS2 is complicated software and even hard when installed it

best regards
 


Best Regards

Bety Barreto Soares

College of Information and Communication Engineering

Harbin Engineering University

Harbin, Heilongjiang, 150001, P.R. CHINA


- Original Message -
gt; From: quot;Teerawat@UBCquot; lt;teera...@ece.ubc.cagt;
gt; To: Bety Barreto Soares lt;betyb...@yahoo.comgt;
gt; Cc: quot;ns-users@isi.eduquot; lt;ns-users@ISI.EDUgt;
gt; Sent: Friday, September 2, 2011 3:05 PM
gt; Subject: [NS-ANS] Re: [ns] NAM : NO DISPLAY NAME AND NO $DISPLAY 
ENVIRONMENT VARIABLE
gt; 
gt; Hi,
gt; 
gt; You have to install NAM (Network Animator). To test whether, NAM was 
installed 
gt; correctly. Please try to type
gt; 
gt; nam
gt; 
gt; at the command prompt.
gt; 
gt; Best Wishes,
gt; 
gt; Teerawat Issariyakul
gt; http://www.ns2ultimate.com/
gt; http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417
gt; http://twitter.com/T_Bear
gt; http://www.t-issariyakul.blogspot.com
gt; http://www.ece.ubc.ca/~teerawat
gt; On Sep 2, 2011, at 1:36 PM, Bety Barreto Soares wrote:
gt; 
gt;gt; 
gt;gt; 
gt;gt; 
gt;gt;  still in the same example myfirst_ns.tcl, i have changed and do some 
change 
gt; but when run it showed that :
gt;gt; 
gt;gt;  NAM : NO DISPLAY NAME AND NO $DISPLAY ENVIRONMENT VARIABLE
gt;gt; 
gt;gt; 
gt;gt;  I HAVE BROWSED ON THE INTERNET BUT I GOT NO SOLUTION...PLEASE HELP ME 
OUT
gt;gt; 
gt;gt;  THANK YOU
gt;gt; 
gt;



[ns] myfirst_ns.tcl still error

2011-09-01 Thread Bety Barreto Soares



Many thanks for the previous reply and solution. i have changed it to ns [new 
Simulator] S instead of s
again, i got an error when i run it after did some change.i'm very new and 
need any help in this forum discussion..
this is the whole program:
 
1 # myfirst_ns.tcl
2 # create a simulator
3 set ns [new Simulator]
  
4 create a trace file
5 set mytrace [open out.tr w]
6 $ns trace-all $mytrace
  
7 create a NAM trace file
8 set myNAM [open out.nam w]
9 $ns namtrace-all $myNAM
  
10 define a procedure finish
11 proc finish {} {
12   global ns mytrace myNAM
13    $ns flush-trace
14    close $mytrace
15    close $myNAM
16    exec nam out.nam 
17    exit 0
18 }
  
19 create nodes
20 set n0 [$ns node]
21 set n1 [$ns node]
22 set n2 [$ns node]
23 set n3 [$ns node]
24 set n4 [$ns node]
  
25 connect nodes with links
26 $ns duplex-link $n0 $n2 100Mb 5ms DropTail
27 $ns duplex-link $n1 $n2 100Mb 5ms DropTail
28 $ns duplex-link $n2 $n4 54Mb 10ms DropTail
29 $ns duplex-link $n2 $n3 54Mb 10ms DropTail
30 $ns duplex-link $n3 $n4 10Mb 15ms DropTail
31 $ns queue-limit $n2 n3 40
  
32 create a UDP agent
33 set udp [new Agent/UDP]
34 $ns attach-agent $n0 $udp
35 set null [new Agent/Null]
36 $ns attach-agent $n3 $null
37 $ns connect $udp $null
38 $udp set fid_1
  
39 create a CBR traffic source
40 set cbr [new Application/Traffic/CBR]
41 $cbr attach-agent $udp
42 $cbr set packetSize_1000
43 $cbr set rate_2Mb
  
44 create a TCP agent
45 set tcp [new Agent/TCP]
46 $ns attach-agent $n1 $tcp
47 set sink [new Agent/TCPSink]
48 $ns attach-agent $n4 $sink
49 $ns connect $tcp $sink
50 $tcp set fid_2
  
51 create an FTP session
52 set ftp [new Application/FTP]
53 $ftp attach-agent $tcp
  
54 schedule events
55 ns at 0.05 $ftp start
56 ns at 0.1 $cbr start
57 ns at 60.0 $ftp stop
58 ns at 60.5 $cbr stop
59 ns at 61 finish
60 }
 
61 # Start the simulation
 62 $ns run

 

ON THE CYGWIN I RUN THE FILE


$ ns myfirst_ns.tcl
can't read fid_1: no such variable
    while executing
subst $[subst $var]
procedure _o125 line 5
object next line 5
invoked from within
_o125 next fid_1
eval body line 1
invoked from within
eval $self next $args
procedure _o125 line 18
agent set line 18
invoked from within
$udp set fid_1 file myfirst_ns.tcl line 44



[ns] ERROR when run my fist tcl example

2011-08-31 Thread Bety Barreto Soares



 
# myfirst_ns.tcl
# create a simulator
set ns [new simulator]
 
create a trace file
set mytrace [open out.tr w]
$ns trace-all $mytrace
 
create a NAM trace file
set myNAM [open out.nam w]
$ns namtrace-all $myNAM
 
define a procedure finish
proc finish {} {
  global ns mytrace myNAM
  $ns flush-trace
  close $mytrace
  close $myNAM
  exec nam out.nam 
  exit 0
}
 
create nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
 
connect nodes with links
$ns duplex-link $n0 $n2 100Mb 5ms DropTail
$ns duplex-link $n1 $n2 100Mb 5ms DropTail
$ns duplex-link $n2 $n4 54Mb 10ms DropTail
$ns duplex-link $n2 $n3 54Mb 10ms DropTail
$ns duplex-link $n3 $n4 10Mb 15ms DropTail
$ns queue-limit $n2 n3 40
 
create a UDP agent
set udp [new Agent/UDP]
$ns attach-agent $n0 $udp
set null [new Agent/Null]
$ns attach-agent $n3 $null
$ns connect $udp $null
$udp set fid_1
 
create a CBR traffic source
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set packetSize_1000
$cbr set rate_2Mb
 
create a TCP agent
set tcp [new Agent/TCP]
$ns attach-agent $n1 $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $n4 $sink
$ns connect $tcp $sink
$tcp set fid_2
 
create an FTP session
set ftp [new Application/FTP]
$ftp attach-agent $tcp
 
schedule events
ns at 0.05 $ftp start
ns at 0.1 $cbr start
ns at 60.0 $ftp stop
ns at 60.5 $cbr stop
ns at 61 finish
}
 
# Start the simulation
$ns run
 
ON THE CYGWIN I RUN THE FILE
$ ns myfirst_ns.tcl
 
IT'S ERROR SHOW BELOW

 
$ myfirst_ns.tcl
invalid command
name simulator
while executing
simulator
create _o3
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
simulator
invoked from
within
set ns [new
simulator]
file
myfirst_ns.tcl line3
 
 
 
 
How to solve this?please help me out..i’m
very new