HI
   
  I am working on MAODV.could anybody please help me out from the follwing 
problem releted to MAODV.
   
   I have ported MAODV in ns-2.26.
   whenever I  run the simulation script ns.tcl I am getting following error:
   
  [EMAIL PROTECTED] ex]$ ns ns.tcl 10 30 1
num_nodes is set 50
INITIALIZE THE LIST xListHead
Loading connection pattern ...
Loading scenarios file...
Starting Simulation ...
ns: _o374 aodv-join-group 0xE000000:
    (_o374 cmd line 1)
    invoked from within
"_o374 cmd aodv-join-group 0xE000000"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o374" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o374 aodv-join-group 0xE000000"

  the simulation script is as follows:
   1 # TCL script takes three parameters: #senders, #receivers, #scenario
      2
      3 #
      4 # Check for command-line parameters
      5 #
      6
      7 if {$argc != 3} {
      8         error "Usages: ns ns.tcl <no_of_senders> <no_receivers> 
<scenari        o>"
      9 }
     10
     11 set opt(stop) 910.0
     12 set nodes       50
     13 set mobility    1
     14 set scenario    [lindex $argv 2]
     15 set pausetime   0
     16 set traffic     cbr
     17 set senders     [lindex $argv 0]
     18 set receivers   [lindex $argv 1]
     19
     20 set ns_ [new Simulator]
     21 set topo [new Topography]
     22 $topo load_flatgrid 1500 300
     
   24 set tracefd [open ./trace-$pausetime-$mobility-$scenario-$senders-$recei  
      vers w]
     25 $ns_ trace-all $tracefd
     26
     27 set god_ [create-god $nodes]
     28 $ns_ node-config -adhocRouting AODV \
     29                         -llType LL \
     30                         -macType Mac/802_11 \
     31                         -ifqLen 50 \
     32                         -ifqType Queue/DropTail/PriQueue \
     33                         -antType Antenna/OmniAntenna \
     34                         -propType Propagation/TwoRayGround \
     35                         -phyType Phy/WirelessPhy \
     36                         -channel [new Channel/WirelessChannel] \
     37                         -topoInstance $topo \
     38                         -agentTrace ON \
     39                         -routerTrace ON \
     40                         -macTrace OFF \
     41                         -movementTrace OFF
     42
     43 for {set i 0} {$i < $nodes} {incr i} {
     44         set node_($i) [$ns_ node]
     45         $node_($i) random-motion 0;
       }
     47
     48 puts "Loading connection pattern ..."
     49 source "traffic/$traffic-$senders-$receivers"
     50
     51 puts "Loading scenarios file..."
     52 source "scenarios/scen-1500x300-$nodes-$pausetime-$mobility-$scenario"
     53
     54 for {set i 0} {$i < $nodes} {incr i} {
     55         $ns_ at $opt(stop) "$node_($i) reset";
     56 }
     57
     58 $ns_ at $opt(stop) "$ns_ halt"
     59
     60 puts "Starting Simulation ..."
     61 $ns_ run

   
   traffic pattern are as follows:
   1 #
      2 # First Multicast group
      3 # 10 sender: nodes 0 through 9
      4 # receiver(s): nodes 20 through 49
      5 #
      6 for {set i 0} {$i < 10} {incr i} {
      7         set udp_($i) [new Agent/UDP]
      8         $udp_($i) set dst_addr_ 0xE000000
      9         $ns_ attach-agent $node_($i) $udp_($i)
     10 #
     11         set cbr_($i) [new Application/Traffic/CBR]
     12         $cbr_($i) set packetSize_ 256
     13         $cbr_($i) set interval_ 0.50
     14         $cbr_($i) set random_ 1
     15         # send enough packets to keep simulation nearly busy: 2 packets
     16         # a second, starting at 30, stopping at 899: 2*870 = 1740
     17         $cbr_($i) set maxpkts_ 1740
     18         $cbr_($i) attach-agent $udp_($i)
     19         $cbr_($i) set dst_ 0xE000000
     20         $ns_ at 30.0 "$cbr_($i) start"
     21 }
     22 #
     23 # the nodes have to join the multicast group to receive the packet
       25 for {set i 20} {$i < 50} {incr i} {
     26         $ns_ at 0.0100000000 "$node_($i) aodv-join-group 0xE000000"
     27 }


                                
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 

Reply via email to