[ns] Calculating parameters
Hello , I am working on load balancing techniques.. For results, i want to get following: 1. Load balance at Routing layer under this Sqaured sum- Routing level ((kbps)^2) and Load Variance- Routing level ((kbps)^2) are to be calculated 2. Load balance at MAC layer under this Sqaured sum- MAC level ((kbps)^2) and Load Variance- MAC level ((kbps)^2) are to be calculated. Does anyone know how to calculate this or have any awk/perl scripts regarding this..please forward me.. please help me regarding this. Its very urgent for my project. Thanks. Regards, Manpreet Kaur Grewal.
[ns] Calculating Load balancing parameters
Hello , I am working on load balancing techniques.. For results, i want to get following: 1. Load balance at Routing layer under this Sqaured sum- Routing level ((kbps)^2) and Load Variance- Routing level ((kbps)^2) are to be calculated 2. Load balance at MAC layer under this Sqaured sum- MAC level ((kbps)^2) and Load Variance- MAC level ((kbps)^2) are to be calculated. Does anyone know how to calculate this or have any scripts regarding this..please forward me.. please help me regarding this. Its very urgent for my project. Thanks. Regards, Manpreet Kaur Grewal.
[ns] Calculating Load balancing parameters
Hello , I am working on load balancing techniques.. For results, i want to get following: 1. Load balance at Routing layer under this Sqaured sum- Routing level ((kbps)^2) and Load Variance- Routing level ((kbps)^2) are to be calculated 2. Load balance at MAC layer under this Sqaured sum- MAC level ((kbps)^2) and Load Variance- MAC level ((kbps)^2) are to be calculated. Does anyone know how to calculate this or have any scripts regarding this..please forward me.. please help me regarding this. Its very urgent for my project. Thanks. Regards, Manpreet Kaur Grewal.
[ns] Calculating Parameters..
Hello , I am working on load balancing techniques.. For results, i want to get following: 1. Load balance at Routing layer under this Sqaured sum- Routing level ((kbps)^2) and Load Variance- Routing level ((kbps)^2) are to be calculated 2. Load balance at MAC layer under this Sqaured sum- MAC level ((kbps)^2) and Load Variance- MAC level ((kbps)^2) are to be calculated. Does anyone know how to calculate this or have any scripts regarding this..please forward me.. please help me regarding this. Its very urgent for my project. Thanks. Regards, Manpreet Kaur Grewal.
[ns] Calculating parameters (Load Balancing)
Hello , I am working on load balancing techniques.. For results, i want to get following: 1. Load balance at Routing layer under this Sqaured sum- Routing level ((kbps)^2) and Load Variance- Routing level ((kbps)^2) are to be calculated 2. Load balance at MAC layer under this Sqaured sum- MAC level ((kbps)^2) and Load Variance- MAC level ((kbps)^2) are to be calculated. please help me regarding this. Its very urgent for my project. Thanks. Regards, Manpreet Kaur Grewal.
[ns] Multihop wireless Network
Hi all, Does anybody have TCL script for multihop wireless network for large number of mobile nodes (atleast 20)?? I have one but not sure whether it is correct... Please send me... Its urgent... Thanks, manpreet..
[ns] Setting transmission range.
Hi, While setting transmission range from TCL Script do we need to set something other than RXThresh_ also??? I have set only RXThresh_... Do i need to do something else also... Please anybody tell me... Thanks in advance, Manpreet.
[ns] Problem in TCL Script
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...
[ns] Regarding Simulation Setting..
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 0} {$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 0} {$i < $val(nn) } {incr i} { set tcp_($i) [new Agent/UDP] #$tcp_($i) set class_ 2 set sink_($i) [new Agent/Null] $ns_ attach-agent $node_($i) $tcp_($i) $ns_ attach-agent $node_(0) $sink_($i) $ns_ connect $tcp_($i) $sink_($i) 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...
[ns] Trace Analysis
Hi all, I am working in NS-2.28 under cygwin... I am using following awk script for calculating instant throughput for post processing trace files.. This script is working fine and it is giving throughput against simulation time... But i had a problem.. I want to calculate throughput against transmission range... Please anybody tell me how to do this... Its very urgent... Thanks in advance.. Regards, Manpreet.. * BEGIN { recv = 0 currTime = prevTime = 0 printf("# %10s %10s %5s %5s %15s %18s\n\n", \ "flow","flowType","src","dst","time","throughput") } { # 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 flow_t = $5 level = "AGT" } # Trace line format: new if ($2 == "-t") { event = $1 time = $3 node_id = $5 flow_id = $39 pkt_id = $41 pkt_size = $37 flow_t = $45 level = $19 } # Init prevTime to the first packet recv time if(prevTime == 0) prevTime = time # Calculate total received packets' size if (level == "AGT" && flow_id == flow && node_id == dst && event == "r" && pkt_size >= pkt) { # Rip off the header hdr_size = pkt_size % pkt pkt_size -= hdr_size # Store received packet's size recv += pkt_size # This 'if' is introduce to obtain clearer # plots from the output of this script if((time - prevTime) >= tic*10) { printf(" %10g %10s %5d %5d %15g %18g\n", \ flow,flow_t,src,dst,(prevTime+1.0),0) printf(" %10g %10s %5d %5d %15g %18g\n", \ flow,flow_t,src,dst,(time-1.0),0) } currTime += (time - prevTime) if (currTime >= tic) { printf(" %10g %10s %5d %5d %15g %18g\n", \ flow,flow_t,src,dst,time,(recv/currTime)*(8/1000)) recv = 0 currTime = 0 } prevTime = time } } END { printf("\n\n") }
[ns] Simulation Results
Hello ns-users, I want to plot some simulation results... i.e. Various performance metrics (load balance at routing layer,load balance at MAC layer,end to end delay,throughput,routing overhead etc) against transmission range.. How to get this??? This couldnt be with the help of tracegraph.. please help me regarding this.. Its very urgent... Thanks in advance, Regards, Manpreet..
[ns] Simulation results.....
Dear all, I want to get simulation results as graphical output of throughput,End-to-end delay,Routing overhead etc against Transmission range (instead of simulation time)... I couldnt get this through trgraph please help me in this... Its very urgent please anyone send me some scripts regarding this.. Thanks in advance.. Regards, Manpreet
[ns] Simulation results.....
Dear all, I want to get simulation results as graphical output of throughput,End-to-end delay,Routing overhead etc against Transmission range (instead of simulation time)... I couldnt get this through trgraph please help me in this... Its very urgent please anyone send me some scripts regarding this.. Thanks in advance.. Regards, Manpreet
[ns] Regarding Simulation Results...
Dear all, I want to get simulation results as graphical output of throughput,End-to-end delay,Routing overhead etc against Transmission range (instead of simulation time)... I couldnt get this through trgraph please help me in this... please anyone send me some scripts regarding this.. Thanks in advance.. Regards, Manpreet
[ns] Adding Timer feature in .cc file
Hello, I want to add a timer to a particular class (toraAgent) in a .cc file (tora.cc) file and activate the time for particular if statement please tell me how to do this??? I am reffering the following link:---(page 8, section B, of the in the pdf file) http://www.rpi.edu/~bisnin/bisnik_TORA.pdf please help me.. its very urgent Regards, Manpreet...
[ns] Adding timer to a class in .cc file
Hello, I want to add a timer to a particular class (toraAgent) in a .cc file (tora.cc) file and activate the time for particulat if statement please tell me how to do this??? I am reffering the following link:---(page 8, section B, of the in the pdf file) http://www.rpi.edu/~bisnin/bisnik_TORA.pdf please help me.. its very urgent Regards, Manpreet...
[ns] TORA Related...
Hello, During my research work,I came across the following link http://www.rpi.edu/~bisnin/bisnik_TORA.pdf This paper seems interesting to me... Can anyone please tell how can the graphs in figures 9,10,11,12,13,14,15,16 can be plotted??? How these X and Y parameters are obtained??? I have seen various graphs plotted under .tr files but none have these parameters Can anyone help me in this... Thanks, Regards.. Manpreet..
[ns] NS2 debugging
Hello ns-users, I am new to gdb debugger please help me in this... I am using ns-allinone-2.28 under cygwin on Windows XP... I have added a small function in tora_dest.cc file.. I want to see while running tora.tcl, is that function refered... I simple put gdb in cygwin bash shell...And got the following message... * GNU gdb 6.5.50.20060706-cvs (cygwin-special) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-cygwin". (gdb) *** i also executed {gdb) r tora.tcl and the result is- Starting program : tora.tcl No executable specified,use 'target exec'. (gdb) --- Are above two results correct ? Can i use gdb as it is for my above problem or i have to make some changes somewhere??? Please help me... I have reached till here with the help of all of you... Please help me... Its very urgent... Thanks, Manpreet...
[ns] Problem in TORA Simulation!!!
Dear All, I have executed TORA successfully and made all the requisite changes totora.cc to enable it work correctly and to get rid of Agent/PROTO problem. But When i execute my tcl script, there seems to be indeterminate delay ingetting the output.When i examine the trace file created by tora.tcl script,the simulation gets struck at 2.3 seconds and not able to movebeyond.The exact output that appears in the terminal is OUTPUT AS IT APPEARS IN THE TERMINAL** num_nodes is set 6 INITIALIZE THE LIST xListHead using backward compatible Agent/CBR; use Application/Traffic/CBR instead Start of simulation.. channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! It gets struck at this point and there is no progress beyond this. ** It would immensely help me if anyone is able to correct this peculiar problem.I'm using ns2.31 in Windows XP I have enclosed my tora.tcl script below. please help me pl. Thank You, With Regards, Manpreet **TORA.tcl*** # == # 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) 6;# number of mobilenodes set val(rp) TORA ;# 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)] set chan_5 [new $val(chan)] set chan_6 [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 \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1 # \ #-channel $chan_2 \ #-channel $chan_3 \ #-channel $chan_4 \ #-channel $chan_5 \ #-channel $chan_6 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 sink4 sink5 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 [$sink5 set npkts_] set bw1 [$sink5 set nlost_] #set bw2 [$sink2 set npkts_] #set bw3 [$sink3 set npkts_] #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 Procedure $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" set n(4) [$ns node] $n(4) color "tan" $n(4) shape "circle" set n(5) [$ns node] $n(5) color "red
[ns] Problem in TORA Simulation
Dear All, I have executed TORA successfully and made all the requisite changes totora.cc to enable it work correctly and to get rid of Agent/PROTO problem. But When i execute my tcl script, there seems to be indeterminate delay ingetting the output.When i examine the trace file created by tora.tcl script,the simulation gets struck at 2.3 seconds and not able to movebeyond.The exact output that appears in the terminal is OUTPUT AS IT APPEARS IN THE TERMINAL** num_nodes is set 6 INITIALIZE THE LIST xListHead using backward compatible Agent/CBR; use Application/Traffic/CBR instead Start of simulation.. channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! It gets struck at this point and there is no progress beyond this. ** It would immensely help me if anyone is able to correct this peculiar problem.I'm using ns2.31 in Windows XP I have enclosed my tora.tcl script below. please help me pl. Thank You, With Regards, Manpreet **TORA.tcl*** # == # 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) 6;# number of mobilenodes set val(rp) TORA ;# 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)] set chan_5 [new $val(chan)] set chan_6 [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 \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1 # \ #-channel $chan_2 \ #-channel $chan_3 \ #-channel $chan_4 \ #-channel $chan_5 \ #-channel $chan_6 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 sink4 sink5 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 [$sink5 set npkts_] set bw1 [$sink5 set nlost_] #set bw2 [$sink2 set npkts_] #set bw3 [$sink3 set npkts_] #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 Procedure $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" set n(4) [$ns node] $n(4) color "tan" $n(4) shape "circle" set n(5) [$ns node] $n(5) color "red
[ns] Problem in TORA Simulation
Dear All, I have executed TORA successfully and made all the requisite changes totora.cc to enable it work correctly and to get rid of Agent/PROTO problem. But When i execute my tcl script, there seems to be indeterminate delay ingetting the output.When i examine the trace file created by tora.tcl script,the simulation gets struck at 2.3 seconds and not able to movebeyond.The exact output that appears in the terminal is OUTPUT AS IT APPEARS IN THE TERMINAL** num_nodes is set 6 INITIALIZE THE LIST xListHead using backward compatible Agent/CBR; use Application/Traffic/CBR instead Start of simulation.. channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! It gets struck at this point and there is no progress beyond this. ** It would immensely help me if anyone is able to correct this peculiar problem.I'm using ns2.31 in Windows XP I have enclosed my tora.tcl script below. please help me pl. Thank You, With Regards, Manpreet **TORA.tcl*** # == # 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) 6;# number of mobilenodes set val(rp) TORA ;# 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)] set chan_5 [new $val(chan)] set chan_6 [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 \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1 # \ #-channel $chan_2 \ #-channel $chan_3 \ #-channel $chan_4 \ #-channel $chan_5 \ #-channel $chan_6 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 sink4 sink5 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 [$sink5 set npkts_] set bw1 [$sink5 set nlost_] #set bw2 [$sink2 set npkts_] #set bw3 [$sink3 set npkts_] #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 Procedure $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" set n(4) [$ns node] $n(4) color "tan" $n(4) shape "circle" set n(5) [$ns node] $n(5) color "red
Re: [ns] Res: Problem running Tcl Script in NS-2.31
Hello Sir, Thanks for consideration Please help me..its very urgent... Regards, Manpreet.. On Sat, 21 Apr 2007 Helber Wagner wrote : Hi, Manpreet. Send me your tcl script. Regards. Helber Wagner da Silva Bacharelando em Ciência de Computação Universidade Federal do Ceará - Mensagem original De: manpreet grewal <[EMAIL PROTECTED]> Para: ns-users@ISI.EDU Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Enviadas: Sexta-feira, 20 de Abril de 2007 14:59:02 Assunto: [ns] Problem running Tcl Script in NS-2.31 Hello, I have installed ns-allinone-2.31 under cygwin... i tried running tora.tcl... (using ns tora.tcl command). But i got the following message... Moreover .nam and .tr files formed are of 0 bytes... num_nodes is set 6 INITIALIZE THE LIST xListHead (_o22 cmd line 1) invoked from within "_o22 cmd port-dmux _o37" 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 "_o22" line 2) (SplitObject unknown line 2) invoked from within "$agent port-dmux $dmux_" (procedure "_o19" line 11) (Node/MobileNode add-target-rtagent line 11) invoked from within "$self add-target-rtagent $agent $port" (procedure "_o19" line 23) (Node/MobileNode add-target line 23) invoked from within "$self add-target $agent $port" (procedure "_o19" line 15) (Node attach line 15) invoked from within "$node attach $ragent [Node set rtagent_port_]" (procedure "_o3" line 72) (Simulator create-wireless-node line 72) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" invoked from within "set node_(0) [$ns_ node]" (file "tora.tcl" line 115) Almost same thing happens for other .tcl files (having channel type Wireless)... Please help me.. Its really very urgent... Thanks in advance... Manpreet.. __ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/
[ns] Problem running Tcl Script in NS-2.31
Hello, I have installed ns-allinone-2.31 under cygwin... i tried running tora.tcl... (using ns tora.tcl command). But i got the following message... Moreover .nam and .tr files formed are of 0 bytes... num_nodes is set 6 INITIALIZE THE LIST xListHead (_o22 cmd line 1) invoked from within "_o22 cmd port-dmux _o37" 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 "_o22" line 2) (SplitObject unknown line 2) invoked from within "$agent port-dmux $dmux_" (procedure "_o19" line 11) (Node/MobileNode add-target-rtagent line 11) invoked from within "$self add-target-rtagent $agent $port" (procedure "_o19" line 23) (Node/MobileNode add-target line 23) invoked from within "$self add-target $agent $port" (procedure "_o19" line 15) (Node attach line 15) invoked from within "$node attach $ragent [Node set rtagent_port_]" (procedure "_o3" line 72) (Simulator create-wireless-node line 72) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" invoked from within "set node_(0) [$ns_ node]" (file "tora.tcl" line 115) Almost same thing happens for other .tcl files (having channel type Wireless)... Please help me.. Its really very urgent... Thanks in advance... Manpreet..
[ns] Problem running Tcl Script in NS-2.31
Hello, I have installed ns-allinone-2.31 under cygwin... i tried running tora.tcl... (using ns tora.tcl command). But i got the following message... Moreover .nam and .tr files formed are of 0 bytes... num_nodes is set 6 INITIALIZE THE LIST xListHead (_o22 cmd line 1) invoked from within "_o22 cmd port-dmux _o37" 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 "_o22" line 2) (SplitObject unknown line 2) invoked from within "$agent port-dmux $dmux_" (procedure "_o19" line 11) (Node/MobileNode add-target-rtagent line 11) invoked from within "$self add-target-rtagent $agent $port" (procedure "_o19" line 23) (Node/MobileNode add-target line 23) invoked from within "$self add-target $agent $port" (procedure "_o19" line 15) (Node attach line 15) invoked from within "$node attach $ragent [Node set rtagent_port_]" (procedure "_o3" line 72) (Simulator create-wireless-node line 72) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" invoked from within "set node_(0) [$ns_ node]" (file "tora.tcl" line 115) Almost same thing happens for other .tcl files (having channel type Wireless)... Please help me.. Its really very urgent... Thanks in advance... Manpreet..
[ns] Running Tcl script...
Hello, I have installed Ns-2.31 under cygwin... i tried running tota.tcl...But i got the following message... Moreover .nam and .tr files formed are of 0 bytes... num_nodes is set 6 INITIALIZE THE LIST xListHead (_o22 cmd line 1) invoked from within "_o22 cmd port-dmux _o37" 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 "_o22" line 2) (SplitObject unknown line 2) invoked from within "$agent port-dmux $dmux_" (procedure "_o19" line 11) (Node/MobileNode add-target-rtagent line 11) invoked from within "$self add-target-rtagent $agent $port" (procedure "_o19" line 23) (Node/MobileNode add-target line 23) invoked from within "$self add-target $agent $port" (procedure "_o19" line 15) (Node attach line 15) invoked from within "$node attach $ragent [Node set rtagent_port_]" (procedure "_o3" line 72) (Simulator create-wireless-node line 72) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" invoked from within "set node_(0) [$ns_ node]" (file "tora.tcl" line 115) Almost same thing happens for other .tcl files... Please help me.. Its really very urgent... Thanks in advance... Manpreet..
Re: [ns] Make Command.....
Hello Sir, Thanks for reply, After running make command from ns-2.31 folder, I got alot of text displayed and the following message in the end. for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-con/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do < cd $i; make all; > done make[1]: Entering directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest' make[1]:Nothing to be done for 'all'. make[1]: 'Leaving directory'/cygdrive/c/cygwin/home/MycomputerName/ns-allinone2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest' make[1]: Entering directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec' make[1]: Nothing to be done for `all'. make[1]: Leaving directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone2.31/ns-2.31/indep-utils/webtrace-conv/dec' make[1]: Entering directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa' make[1]: Nothing to be done for `all'. make[1]: Leaving directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa' make[1]: Entering directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr' make[1]: Nothing to be done for `all'. make[1]: Leaving directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/2.31/indep-utils/webtrace-conv/nlanr' make[1]: Entering directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb' make[1]: Nothing to be done for `all'. make[1]: Leaving directory`/cygdrive/c/cygwin/home/MycomputerName/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb' Please let me know if this is correct or wrong. Before this after installing ns-allinone-2.31...I set path variables from My computer->Right click-> properties-> Advanced->Environment Variables and added the path For LD_LIBRARY_PATH and TCL_PATH, i used export LD_LIBRARY_PATH=. and export TCL_PATH= after executing the above two commands no message was displayed... please tell me, is it the right way.... PLEASE HELP ME... THANKS IN ADVANCE, Manpreet... On Thu, 19 Apr 2007 Timo Reimann wrote : > >manpreet grewal wrote: > > I have installed NS-2.31 under cygwin... > > I have not made changes in any file. > > Please tell me what message is displayed (in the end) after >"make" > > command has fully executed... > >You mean this one? > >http://nsnam.isi.edu/nsnam/index.php/Downloading_and_installing_ns-2 > >You need to extend/create the named variables, possibly through >your >~/.bashrc. > >If you don't know how to do that, look it up in the mailinglist >archives. > > >Cheers, > >--Timo >
[ns] Make Command.....
Hello, I have installed NS-2.31 under cygwin... I have not made changes in any file. Please tell me what message is displayed (in the end) after "make" command has fully executed... Thanks in advance, Manpreet..
[ns] TORA Related....
Hello all, I am trying to modify tora_dest.cc Can anyone please tell me which is basic function that TORA_Dest Class uses?? Thanks in advance... Manpreet...
[ns] Problem running make command
hi ns-users, i am able to run ./configure command in tclcl-1.012 But i couldnt run make command... The error, i got is: tclcl-mappings.h:51: error:incomplete type 'Tcl'used in nested name specifier tclcl-mappings.h:52: error: invalid use of undefined type 'struct Tcl' tclcl-mappings.h:41: error: forward declaration of 'struct Tcl' tclcl-mappings.h:57: error: invalid use of undefined type 'struct Tcl' tclcl-mappings.h:41: error: forward declaration of 'struct Tcl' make: *** [Tcl.o] Error 1 please help me thanks in advance... Manpreet Grewal
[ns] Problem installing NS-2
Dear all, I am trying to install ns-allinone-2.1b9a under cygwin I have downloaded ns-allinone-2.1b9a from http://www.isi.edu/nsnam/dist/ns-allinone-2.1b9a-gcc32.tar.gz i have fully installed cygwin on my system But while installing ns-allinone-2.1b9a using ./install command ,it gives the following error when it comes to Bilding Otcl-1.0a8 checking for libtcl8.3... -L../lib -ltcl8.3 checking for init.tcl... ../lib/tcl8.3 checking for tclsh8.3.2... no checking for tclsh8.3... ../bin/tclsh8.3 checking for tk.h... -I../include checking for libtk8.3... -L../lib -ltk8.3 checking for tk.tcl... ../lib/tk8.3 checking for X11 header files checking for X11 library archive checking for XOpenDisplay in -lX11... no can't find X library otcl-1.0a8 configuration failed! Exiting ... please tell me where the problem is. please help me Regards, Manpreet...
[ns] Problem Installing ns-allinone-2.1b9a
hello Sir/Madam, I am following Nicolas Christin's instructions to install ns-allinone-2.1b9a. Everything goes fine until ns-allinone-2.1b9a/install gets to "Build OTcl-1.0a8"... and The error that I received is given below: checking for libtcl8.3... -L../lib -ltcl8.3 checking for init.tcl... ../lib/tcl8.3 checking for tclsh8.3.2... no checking for tclsh8.3... ../bin/tclsh8.3 checking for tk.h... -I../include checking for libtk8.3... -L../lib -ltk8.3 checking for tk.tcl... ../lib/tk8.3 checking for X11 header files checking for X11 library archive checking for XOpenDisplay in -lX11... no can't find X library otcl-1.0a8 configuration failed! Exiting ... Please help me...its urgent... Best Regards, Manpreet.
[ns] Making changes in .cc files
Hello Sir/Madam, I am using ns-allinone-2.31 under cygwin on Windows XP. I have made changes in tora.cc file.. Then i executed make command successfully with no errors.. But the changes are not picked by tora.tcl, when i execute ns tora.tcl.. Can anyone please tell me where am i wrong? What should be done so that tora.tcl start picking the changes??? Please help me... Thanks and Regards, Manpreet Grewal..
[ns] Making changes in .cc files in NS2
Hello Sir/Madam, In using ns-allinone-2.31 under cygwin on Windows XP. I have made changes in tora.cc file.. Then i executed make command successfully with no errors.. But the changes are not picked by tora.tcl.. Can anyone please tell me where am i wrong? What should be done so that tora.tcl start picking the changes??? Please help me... Thanks and Regards, Manpreet Grewal..
[ns] Difference Between make,make clean and make depend
Hello Sir/Madam, Can anyone please tell me the difference between make,make clean and make depend commands.. I am working on ns-allinone-2.31 using Cygwin om Windows XP.. Thanks and regards, Manu.
[ns] Recompling C++ code in NS2
hello Sir/Madam, I am a research student working in NS2. Sir, I want to make changes in tora.cc,toradest.cc etc.. I had fully installed cygwin in Windows XP. I installed ns-allinone-2.31 using ./install command. It worked fine. I executed ./validated command too..it too worked fine.. Now i had made minor change in tora.cc i.e. then i ran ./configure and then make command. It gives errors while compiling tora.cc.. So i think i am going in right direction till now.. But how will i obtain results.. ns tora.tcl works fine... but how will i see output from 1_out.tr file? please help me..how to execute .tr file and see the results graphically in cygwin using ns-allinone-2.31 i will be highly thankful.. Regards, manpreet.
[ns] Extending C++ code in NS-2
hello sir/madam i am a research student working in NS-2. I have istalled ns-allinone-2.29. I have also installed cygwin. Iam following the website.. http://nile.wpi.edu/NS/linkage.html The steps followed are: 1.Download "ex-linkage.cc" file, and save it under the "ns-2" directory. 2.Open "Makefile", add "ex-linkage.o" at the end of object file list. 3.Re-compile NS using the "make" command. 4.Download the "ex-linkage.tcl" file that contains "MyAgent" testing OTcl commands. (see Figure 22 for the input script and the result) 5.Run the OTcl script using command "ns ex-linkage.tcl". --- I am unable to run "make" command. when i run "make" command,the following error occurs. --Nothing to be done in Makefile.IN. please tell me what is the problem.. thanks Manpreet
[ns] Regarding agent not recognized
hello sir/madam i am a research studnt working in NS2. I wand to extend C++ code in NS2. Iam following the website.. http://nile.wpi.edu/NS/linkage.html The steps followed are: 1.Download "ex-linkage.cc" file, and save it under the "ns-2" directory. 2.Open "Makefile", add "ex-linkage.o" at the end of object file list. 3.Re-compile NS using the "make" command. 4.Download the "ex-linkage.tcl" file that contains "MyAgent" testing OTcl commands. (see Figure 22 for the input script and the result) 5.Run the OTcl script using command "ns ex-linkage.tcl". But while running "ns ex-linkage.tcl". command,i get the following error... invalid command name "MyAgent/MyAgentOtcl" while executing > >"Agent/MyAgentOtcl create _o3 " > >invoked from within > >"catch "$className create $o $args" msg" > >(procedure "new" line 3) > >invoked from within > >"new Agent/MyAgentOtcl" > >invoked from within > >"set myagent [new Agent/MyAgentOtcl]" > >(file "ex-linkage.tcl" line 5) please help thanks in advance Manpreet Kaur.
[ns] Regarding agent not recognized
Note: Forwarded message attached -- Original Message -- From: "manpreet grewal" <[EMAIL PROTECTED]> To: ns-users@isi.edu, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Regarding agent not recognized
[ns] Regarding Agent not recognized
Note: Forwarded message attached -- Original Message -- From: "manpreet grewal" <[EMAIL PROTECTED]> To: ns-users@ISI.EDU