Hi all, I am writing one Tcl script with following simulation settings. Please tell me if i am wrong somewhere....
1. Nodes move within the area according to the random way-point mobility model. 2. Velocity of the nodes is uniformly distributed between 2 m/sec and 38 m/sec. 3. pause time of nodes is 0. For above three requirements i have run the following command from ~/ns-allinone-2.28/ns-2.28.indep-utils/cmu-scen-gen/setdest.. ./setdest -v(2) -n 20 -m 2.0 -M 38.0 -t 150 -p 0.0 -x 500 -y 500 >scen-20 4. FreeSpace propogation model is used for radio propagation model. For this i am using following statement in tcl script... set val(prop) Propagation/FreeSpace 5. Each node generate CBR traffic at the rate of 1.5kbps For this i run following command from ~/ns-allinone-2.28/ns-2.28/indep-utils/cmu-scen-gen ns cbrgen.tcl -type cbr -nn 20 -seed 1.0 -mc 20 -rate 1.5 >cbr-20 6.Packet lenght is set to 1000 bytes. 7.Whole traffic is destined to stationary sink node located at (250m,250m) Now for 6th and 7th requirement, i am writing following statements in TCl script. This is a part of my tcl script... ************ set node_(0) [$ns_ node] $node_(0) random-motion 0 $node_(0) set X_ 250 $node_(0) set Y_ 250 $node_(0) set Z_ 0 $ns_ initial_node_pos $node_(0) 5 for {set i 1} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 1 ; # disable random motion } puts "Loading connection pattern..." source "cbr-20" for {set i 1} {$i < $val(nn) } {incr i} { set tcp_($i) [new Agent/UDP] #$tcp_($i) set class_ 2 set sink_ [new Agent/Null] $ns_ attach-agent $node_($i) $tcp_($i) $ns_ attach-agent $node_(0) $sink_ $ns_ connect $tcp_($i) $sink_ set ftp_($i) [new Application/Traffic/CBR] $ftp_($i) set rate_ 1.6k $ftp_($i) set packetSize_ 1000 puts "hello1" $ftp_($i) attach-agent $tcp_($i) $ns_ at [expr 10.0+0.01*$i] "$ftp_($i) start" } # Define traffic model puts "Loading scenario file..." source "scen-20" *********** Please tell me if i am going wrong somewhere... i have doubt in my 7th requirement... have i done it right??? Am i writing the statements in order?? loading scenario file should be called here only?? Please do tell me.. Its very urgent.. I will be highly thankful... Regards, Manpreet...