Hi all, Whenver I try to simulate TORA in ns2, after some time, the execution hangs/stops at some point and doesnot proceed. There is NO error shown as such, but program doesnot proceed. The tcl script is also attached below. If anyone faced similar problem before or knows the solution, please reply. Its urgent for my project.
------------------------------------------------------- num_nodes is set 20 found DATA 16384 data points read fm0 = 30.000000 fm = 0.000000 fs = 1000.000000 INITIALIZE THE LIST xListHead Loading connection pattern... Loading scenario file... Starting Simulation... SORTING LISTS ...DONE! channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 node 0 received `QRY` for itself. node 0 received `QRY` for itself. node 0 received `QRY` for itself. EXECUTION STOPS HERE AND DOESNT PROCEED FURTHER. -------------------------------------- TORA Tcl Script: proc getopt {argc argv} { global argv0 seed rate cp sc if {$argc < 4} { puts "\nusage: $argv0 seed rate cbr-connection_file node-movement_file\n" exit } set seed [lindex $argv 0] set rate [lindex $argv 1] set cp [lindex $argv 2] set sc [lindex $argv 3] #puts "\n $seed $rate $cp $sc \n" } # ==================================================================== # Define options # ==================================================================== set val(chan) Channel/WirelessChannel set val(prop) Propagation/Ricean ;# radio-propagation model set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue ;# for aodv set val(ll) LL set val(ant) Antenna/OmniAntenna set val(x) 500 ;# X dimension of the topography set val(y) 500 ;# Y dimension of the topography set val(ifqlen) 50 ;# max packet in ifq set val(adhocRouting) TORA set val(nn) 20 ;# how many nodes are simulated set val(cn) 20 ;# how many connections set val(stop) 200 ;# simulation time # 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 # ==================================================================== # Main Program # ==================================================================== # # Initialize Global Variables # getopt $argc $argv # create simulator instance set ns_ [new Simulator] $ns_ use-newtrace; # setup topography object set topo [new Topography] # create trace object for ns and nam set tracefd [open out${sc}_nn${val(nn)}_mc${val(cn)}.tr w] set namtrace [open out${sc}_nn${val(nn)}_mc${val(cn)}.nam w] $ns_ trace-all $tracefd $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) # define topology $topo load_flatgrid $val(x) $val(y) # Create God set god_ [create-god $val(nn)] # Create channel #1 set chan_1_ [new $val(chan)] #global node setting # Create node "attached" to channel #1 $ns_ node-config -adhocRouting $val(adhocRouting) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel $chan_1_ \ -topoInstance $topo \ -agentTrace ON \ -dsrTrace OFF \ -routerTrace OFF \ -macTrace ON \ -movementTrace OFF \ -toraDebug ON ############################################### # Set Ricean and Rayleigh fading propagation parameter ## ############################################ set prop_inst [$ns_ set propInstance_] $prop_inst MaxVelocity 2.5; $prop_inst RiceanK 0; $prop_inst LoadRiceFile "rice_table.txt"; # # Create the specified number of nodes [$val(nn)] and "attach" them # to the channel. for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # # Define traffic model # source $cp #taken as argument if { $sc != 0} { source $sc #taken as argument } # Define node initial position in nam for {set i 0} {$i < $val(nn)} {incr i} { $ns_ initial_node_pos $node_($i) 20 } # # Tell nodes when the simulation ends # for {set i 0} {$i < $val(nn) } {incr i} { $ns_ at $val(stop).0 "$node_($i) reset"; } $ns_ at $val(stop).0001 "$ns_ nam-end-wireless $val(stop).0001" puts $tracefd "M 0.0 nn=$val(nn) x=$val(x) y=$val(y) rp=$val(adhocRouting)" puts $tracefd "M 0.0 sc=$sc cp=$cp seed=$seed" puts $tracefd "M 0.0 prop=$val(prop) ant=$val(ant)" #Define a 'finish' procedure proc finish {} { global ns_ tracefd namtrace val(stop) $ns_ flush-trace close $tracefd close $namtrace } $ns_ at $val(stop).0002 "finish" $ns_ at $val(stop).0004 "$ns_ halt" puts "Starting Simulation..." $ns_ run Looking for local information? Find it on Yahoo! Local http://in.local.yahoo.com/