[ns] ATP protocol source code to add new feature
hai, iam shyamala,doing project on ATP protocol...to add additional feature as PRE(proactive error correction)to that...i need if anybody has its source code of ATP please send it to me..b'cos my ATP protocol shows some error where i have to finish my project by next week, please kindly help me...thanks in advance cheers, shyamala __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[ns] Time resolution
Hi there, Could anyone say what is the smallest unit of time in NS-2? And 1 simulation second traslate directly into 1 realtime second. Keita
[ns] XCP under ns2.29
Hi all, I'm writing you because when I run my script tcl, with a XCP flow a TCP flow, TCP is never able to get more than the middle of the total link capacity, even when I didn't use the tcp_xcp_on_ option in my script. For example, if I give 100Mbps for the bottleneck, My TCP flow that begins at second 0 gets almost 100Mbps. However, at second 100, when my XCP flow starts, XCP gets 100Mbps, so TCP tries to get its space in the network during the Congestion Avoidance phase, but it doesn't arrive to break the limit of 50Mbps. I think this is not correct because TCP have to get more than 50Mbps until a congestion problem caused by TCP and XCP has to decrease. I think this is a problem from the virtual queues (queueWeight_[XCPQ], queueWeight_[TCPQ], queueWeight_[OTHERQ]). I would like to know how I can solve this problem. This is very important for me. Thank you very much!! -- Dino M. LOPEZ P.
Re: [ns] Time resolution
This link may answer the first question: 4.2.5 Precision of the scheduler clock used in ns: http://www.isi.edu/nsnam/ns/doc/node37.html What do you mean with And 1 simulation second traslate directly into 1 realtime second ? Regards Miguel Keita Rose [EMAIL PROTECTED] escribió: Hi there, Could anyone say what is the smallest unit of time in NS-2? And 1 simulation second traslate directly into 1 realtime second. Keita - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
[ns] Segmentation Fault in DSR
Hello, I am working with ad hoc protocols in point-to-multipoint and multipoint-to-point scenario with 1, 2, 5, 10, 20 and 50 nodes. The simulation take 1020 seconds. With few nodes, there is no problem. But with 20 and 50 nodes, the segmentation fault occurs with 400, 600, 800 seconds. Anybody has any idea? I am appending a shell script file and the TCL file. Thanks in advance. Etienne Oliveira # == # Define options # === set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif) Phy/WirelessPhy set opt(mac)Mac/802_11 set opt(ll) LL set opt(ant)Antenna/OmniAntenna set opt(ifqlen) 50 ;# max packet in ifq set opt(filters) DSR set opt(adhocRouting)DSR set opt(ifq) CMUPriQueue set opt(x) 1898 set opt(y) 770 set opt(nn) 51 set opt(stop) 1020 set opt(tr) wireless.tr set opt(sndr) 50 set opt(rcvr) 1 # == $opt(mac) set dataRate_ 11Mb $opt(mac) set basicRate_ 11Mb LL set mindelay_50us LL set delay_ 25us LL set bandwidth_ 0 ;# not used #Queue/DropTail/PriQueue set Prefer_Routing_Protocols1 # 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 work 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 # set ns_ [new Simulator] set topo[new Topography] set tracefd [open $opt(tr) w] $ns_ trace-all $tracefd $topo load_flatgrid $opt(x) $opt(y) # [... + 2] Problema no DSR - Resposta no google set god_ [create-god [expr $opt(nn) + 2]] # # Global node setting # $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channelType $opt(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON # Create the specified number of nodes [$opt(nn)] and attach them # to the channel. for {set i 0} {$i = $opt(nn) } {incr i} { set node_($i) [$ns_ node $i] $node_($i) random-motion 0 ;# disable random motion $god_ new_node $node_($i) } # # Scennario File # $node_(0) set X_ 949.00 $node_(0) set Y_ 385.00 $node_(0) set Z_ 0.0 $node_(1) set X_ 1635.91 $node_(1) set Y_ 662.36 $node_(1) set Z_ 0.0 $node_(2) set X_ 1459.13 $node_(2) set Y_ 139.45 $node_(2) set Z_ 0.0 $node_(3) set X_ 280.60 $node_(3) set Y_ 697.29 $node_(3) set Z_ 0.0 $node_(4) set X_ 1861.14 $node_(4) set Y_ 214.13 $node_(4) set Z_ 0.0 $node_(5) set X_ 1736.59 $node_(5) set Y_ 582.57 $node_(5) set Z_ 0.0 $node_(6) set X_ 1005.10 $node_(6) set Y_ 58.01 $node_(6) set Z_ 0.0 $node_(7) set X_ 1252.78 $node_(7) set Y_ 300.35 $node_(7) set Z_ 0.0 $node_(8) set X_ 1565.76 $node_(8) set Y_ 219.67 $node_(8) set Z_ 0.0 $node_(9) set X_ 1513.90 $node_(9) set Y_ 92.29 $node_(9) set Z_ 0.0 $node_(10) set X_ 1522.73 $node_(10) set Y_ 653.42 $node_(10) set Z_ 0.0 $node_(11) set X_ 1410.50 $node_(11) set Y_ 148.86 $node_(11) set Z_ 0.0 $node_(12) set X_ 1081.79 $node_(12) set Y_ 620.04 $node_(12) set Z_ 0.0 $node_(13) set X_ 917.08 $node_(13) set Y_ 688.20 $node_(13) set Z_ 0.0 $node_(14) set X_ 846.38 $node_(14) set Y_ 554.51 $node_(14) set Z_ 0.0 $node_(15) set X_ 152.46 $node_(15) set Y_ 48.60 $node_(15) set Z_ 0.0 $node_(16) set X_ 1561.04 $node_(16) set Y_ 559.50 $node_(16) set Z_ 0.0 $node_(17) set X_ 1316.64 $node_(17) set Y_ 585.48 $node_(17) set Z_ 0.0 $node_(18) set X_ 1529.37 $node_(18) set Y_ 407.81 $node_(18) set Z_ 0.0 $node_(19) set X_ 1824.51 $node_(19) set Y_ 38.28 $node_(19) set Z_ 0.0 $node_(20) set X_ 1601.04 $node_(20) set Y_ 305.16 $node_(20) set Z_ 0.0 $node_(21) set X_ 1027.40 $node_(21) set Y_ 240.27 $node_(21) set Z_ 0.0 $node_(22) set X_ 25.83 $node_(22) set Y_ 94.53
[ns] Many simulations with same scripts and differents parameters
Hello, Could someone help me in explaining how to create a script which execute many simulation of a protocol of ad hoc networj with differents mobility and traffic model files. For exemple I have this script and I want to write a TCL script which permits to execute this script many times in changing only parameters like X, Y, FTrace.tr, Nbnode, FTraf, FMob, FNam.nam, Time, FTest.txt. Thanks in advance. Molo. # = # Define Options # == set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif)Phy/WirelessPhy set opt(mac) Mac/802_11 set opt(ifq) CMUPriQueue ;# Queue/DropTail/PriQueue set opt(ll) LL set opt(ant)Antenna/OmniAntenna set opt(x)X ;# X dimension of the topography set opt(y)Y ;# Y dimension of the topography set opt(ifqlen) 10 ;# max packet in ifq set opt(seed) 0.4 set opt(tr) FTrace.tr;# trace file set opt(adhocRouting) DSR set opt(nn) Nbnode ;# how many nodes are simulated set opt(cp) ../Scenarios de trafic/CBR/Ftraf set opt(sc) ../Scenarios de mobilite/FMob set opt(stop) Time ;# simulation time # == # Main Program # == # Initialize Global Variables # create simulator instance set ns_ [new Simulator] # set wireless channel, radio-model and topography objects set wtopo [new Topography] # create trace object for ns and nam set tracefd [open $opt(tr) w] $ns_ trace-all $tracefd set namtrace [open FNam.nam w] $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # use new trace file format $ns_ use-newtrace # define topology $wtopo load_flatgrid $opt(x) $opt(y) # Create God set god_ [create-god $opt(nn)] # create channel #1 and #2 set chan_1_ [new $opt(chan)] set chan_2_ [new $opt(chan)] # define how node should be created #global node setting $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $wtopo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1_ # Create the specified number of nodes [$opt(nn)] and attach them # to the channel. for {set i 0} {$i $opt(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # Define node movement model puts Loading connection pattern... source $opt(cp) # Define traffic model puts Loading scenario file... source $opt(sc) # Define node initial position in nam for {set i 0} {$i $opt(nn)} {incr i} { # 20 defines the node size in nam, must adjust it according to your scenario # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 } # Tell nodes when the simulation ends for {set i 0} {$i $opt(nn) } {incr i} { $ns_ at $opt(stop).1 $node_($i) reset; } # tell nam the simulation stop time #$ns_ at $opt(stop)$ns_ nam-end-wireless $opt(stop) $ns_ at $opt(stop) stop $ns_ at $opt(stop).1 puts \NS EXITING...\ ; $ns_ halt proc stop {} { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace exec rm -f FText.txt exec touch FText.txt exec awk { { if (($1 == s) || ($1 == f) || ($1 == d) || ($1 == r)) { if ($41 == ) { print $1,$2, $3, $19, /, /, 0 } else { print $1, $2, $3, $19, $35, $40, $41 } } } } FTrace.tr FText.txt puts running nam... exec nam FNam.nam exit 0 } puts Starting Simulation... $ns_ run - Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Demandez à ceux qui savent sur Yahoo! Questions/Réponses.
[ns] [bug] TCP limited when executed with a XCP flow tcp_xcp_on_ disabled
[Bug Report] - Category: Other Package: ns 2.30 OS:Linux debian 2.6.17-2-686 Environment Variables: LD_LIBRARY_PATH= TCL_LIBRARY= TK_LIBRARY= - Description: Description of Problem: When 1 TCP flow 1 XCP flow share the bottleneck, TCP can't get more than the middle of the total link capacity, even when the option tcp_xcp_on_ is disabled in my script tcl. How Easily Reproducible: Every time Steps to Reproduce: 1. Start a TCP flow at second 0, and tune TCP with a high cwnd size in order to let TCP gets the total capacity of the bottleneck. The bottleneck could be 100Mbps. 2. Start a XCP flow at second 100. 3. Look the behavior of the two flows during the next 100 seconds Actual Results: 1. After XCP is started, the TCP throughput gets down, because of a congestion problem maybe. 2. When TCP comes into the congestion avoidance phase, it tries to get the place in the network. 3. TCP arrives to get until de middle of the bottleneck capacity, however TCP will never get more bandwidth. Expected Results: 1. When XCP is started, any congestion problem couldn't be produced by the XCP flow, because the XCP routers have to limit the grown of the XCP cwnd size. 2. After a congestion problem, when TCP is in the congestion avoidance phase, it will take its place in the network the XCP throughput has to decrease. So, TCP has to get more than 50% of the bottleneck capacity, while the XCP performance will be strongly decreased. Additional Information: My script tcl proc create-topology2 { delay qtype qsize nXCPi deltaDelay } { global ns set i 0 while { $i 4 } { global R$i set R$i [$ns node] incr i } $ns duplex-link $R0 $R1 500Mb [set delay]ms $qtype $ns queue-limit $R0 $R1 $qsize $ns queue-limit $R1 $R0 $qsize global Bottleneck0 rBottleneck0 set Bottleneck0 [[$ns link $R0 $R1] queue] set rBottleneck0 [[$ns link $R1 $R0] queue] global l0 rl0 set l0 [$ns link $R0 $R1] set rl0 [$ns link $R1 $R0] $ns duplex-link $R1 $R2 30Mb [set delay]ms $qtype $ns queue-limit $R1 $R2 $qsize $ns queue-limit $R2 $R1 $qsize global Bottleneck1 rBottleneck1 set Bottleneck1 [[$ns link $R1 $R2] queue] set rBottleneck1 [[$ns link $R2 $R1] queue] global l1 rl1 set l1 [$ns link $R1 $R2] set rl1 [$ns link $R2 $R1] $ns duplex-link $R2 $R3 500Mb [set delay]ms $qtype $ns queue-limit $R2 $R3 $qsize $ns queue-limit $R3 $R2 $qsize global Bottleneck2 rBottleneck2 set Bottleneck2 [[$ns link $R2 $R3] queue] set rBottleneck2 [[$ns link $R3 $R2] queue] global l2 rl2 set l2 [$ns link $R2 $R3] set rl2 [$ns link $R3 $R2] global all_links set all_links $l0 $rl0 $l1 $rl1 $l2 $rl2 # The i xcp sender set i 0 while { $i $nXCPi } { global si$i qsi$i rqsi$i lsi$i rlsi$i set si$i [$ns node] $ns duplex-link [set si$i] $R0 500Mb 1ms $qtype $ns queue-limit [set si$i] $R0 $qsize $ns queue-limit $R0 [set si$i] $qsize set qsi$i [[$ns link [set si$i] $R0] queue] set rqsi$i [[$ns link $R0 [set si$i]] queue] set lsi$i[$ns link [set si$i] $R0] set rlsi$i [$ns link $R0 [set si$i]] set all_links $all_links [set lsi$i] [set rlsi$i] incr i } # The i xcp receiver set i 0 while { $i $nXCPi } { global ri$i qri$i rqri$i lri$i rlri$i set ri$i [$ns node] $ns duplex-link [set ri$i] $R3 500Mb 1ms $qtype $ns queue-limit [set ri$i] $R3 $qsize $ns queue-limit $R3 [set ri$i] $qsize set qri$i [[$ns link [set ri$i] $R3] queue] set rqri$i [[$ns link $R3 [set ri$i]] queue] set lri$i[$ns link [set ri$i] $R3] set rlri$i [$ns link $R3 [set ri$i]] set all_links $all_links [set lri$i] [set rlri$i] incr i } } #--- Sender Class : # This is essentially an ftp sender Class GeneralSender -superclass Agent # otherparams are startTime TCPclass .. GeneralSender instproc init { id node rcvrTCP otherparams } { global ns $self next $self instvar tcp_ id_ ftp_ node_ tcp_rcvr_ tcp_type_ set id_ $id set node_ $node if { [llength $otherparams] 1 } { set TCP [lindex $otherparams 1] } else { set TCP TCP/Reno } set tcp_type_ $TCP set tcp_ [new Agent/$TCP] $tcp_ set packetSize_ 1000 $tcp_ set class_ $id set
[ns] Cluster base routing protocol
Dear all, Hi, I need to Cluster base routing protocol source code for NS2,would you please help me about that. I eagerly waiting to your help about source code and any document about that. Thanks in Advance Amin Seyed Amin Hosseini, Computer PhD student, Network Research Group (NRG) (http://nrg.cs.usm.my), School of Computer Sciences (http://www.cs.usm.my), University Science Malaysia (http://www.usm.my), Penang - Malaysia, Mobile: +60 16 438 9352 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[ns] [Fwd: Re: Segmentation Fault in DSR]
Dear, Thank for you help. The message is above. The simulation was aborted with 832 seconds. [EMAIL PROTECTED]:~/simulacoes/Mare_DSR/TCL ns DSR.tcl num_nodes is set 53 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Loading connection pattern... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! Segmentation fault Thanks in advance. Etienne Oliveira Original Message Subject: Re: [ns] Segmentation Fault in DSR From:Sasan Sahraei [EMAIL PROTECTED] Date:Fri, October 13, 2006 11:20 am To: [EMAIL PROTECTED] -- The only time that I have seen DSR to generate a segmentation fault is when you define a queue type other than CMUPriQueue. which in your case you should be fine. can you send us the exact error? Thanks, Sasan Hello, I am working with ad hoc protocols in point-to-multipoint and multipoint-to-point scenario with 1, 2, 5, 10, 20 and 50 nodes. The simulation take 1020 seconds. With few nodes, there is no problem. But with 20 and 50 nodes, the segmentation fault occurs with 400, 600, 800 seconds. Anybody has any idea? I am appending a shell script file and the TCL file. Thanks in advance. Etienne Oliveira # == # Define options # === set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif)Phy/WirelessPhy set opt(mac) Mac/802_11 set opt(ll) LL set opt(ant)Antenna/OmniAntenna set opt(ifqlen) 50 ;# max packet in ifq set opt(filters) DSR set opt(adhocRouting)DSR set opt(ifq) CMUPriQueue set opt(x)1898 set opt(y)770 set opt(nn) 51 set opt(stop) 1020 set opt(tr) wireless.tr set opt(sndr) 50 set opt(rcvr) 1 # == $opt(mac) set dataRate_ 11Mb $opt(mac) set basicRate_ 11Mb LL set mindelay_ 50us LL set delay_ 25us LL set bandwidth_ 0 ;# not used #Queue/DropTail/PriQueue set Prefer_Routing_Protocols1 # 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 work 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 # set ns_ [new Simulator] set topo [new Topography] set tracefd [open $opt(tr) w] $ns_ trace-all $tracefd $topo load_flatgrid $opt(x) $opt(y) # [... + 2] Problema no DSR - Resposta no google set god_ [create-god [expr $opt(nn) + 2]] # # Global node setting # $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channelType $opt(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON # Create the specified number of nodes [$opt(nn)] and attach them # to the channel. for {set i 0} {$i = $opt(nn) } {incr i} { set node_($i) [$ns_ node $i] $node_($i) random-motion 0 ;# disable random motion $god_ new_node $node_($i) } # # Scennario File # $node_(0) set X_ 949.00 $node_(0) set Y_ 385.00 $node_(0) set Z_ 0.0 $node_(1) set X_ 1635.91 $node_(1) set Y_ 662.36 $node_(1) set Z_ 0.0 $node_(2) set X_ 1459.13 $node_(2) set Y_ 139.45 $node_(2) set Z_ 0.0 $node_(3) set X_ 280.60 $node_(3) set Y_ 697.29 $node_(3) set Z_ 0.0 $node_(4) set X_ 1861.14 $node_(4) set Y_ 214.13 $node_(4) set Z_ 0.0 $node_(5) set X_ 1736.59 $node_(5) set Y_ 582.57 $node_(5) set Z_ 0.0 $node_(6) set X_ 1005.10 $node_(6) set Y_ 58.01 $node_(6) set Z_ 0.0 $node_(7) set X_
Re: [ns] Many simulations with same scripts and differents parameters
You could run a script like: for parameter1 in 0 1 2 3 4 do for parameter2 in 10.0 15.0 do ns myfile.tcl -parameter1 $parameter1 -parameter2 $parameter2 done done Don't forget to add the parameters that you want to be modified in your .tcl file: proc getopt {argc argv} { gloval val lappend optlist parameter1 parameter2 for {set i 0} {$i $argc} {incr i} { set arg [lindex $argv $i] if {[string range $arg 0 0] != -} continue set name [string range $arg 1 end] set val($name) [lindex $argv [expr $i+1]] } } molo badji [EMAIL PROTECTED] escribió: Hello, Could someone help me in explaining how to create a script which execute many simulation of a protocol of ad hoc networj with differents mobility and traffic model files. For exemple I have this script and I want to write a TCL script which permits to execute this script many times in changing only parameters like X, Y, FTrace.tr, Nbnode, FTraf, FMob, FNam.nam, Time, FTest.txt. Thanks in advance. Molo. # = # Define Options # == set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif)Phy/WirelessPhy set opt(mac) Mac/802_11 set opt(ifq) CMUPriQueue ;# Queue/DropTail/PriQueue set opt(ll) LL set opt(ant)Antenna/OmniAntenna set opt(x)X ;# X dimension of the topography set opt(y)Y ;# Y dimension of the topography set opt(ifqlen) 10 ;# max packet in ifq set opt(seed) 0.4 set opt(tr) FTrace.tr;# trace file set opt(adhocRouting) DSR set opt(nn) Nbnode ;# how many nodes are simulated set opt(cp) ../Scenarios de trafic/CBR/Ftraf set opt(sc) ../Scenarios de mobilite/FMob set opt(stop) Time ;# simulation time # == # Main Program # == # Initialize Global Variables # create simulator instance set ns_ [new Simulator] # set wireless channel, radio-model and topography objects set wtopo [new Topography] # create trace object for ns and nam set tracefd [open $opt(tr) w] $ns_ trace-all $tracefd set namtrace [open FNam.nam w] $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # use new trace file format $ns_ use-newtrace # define topology $wtopo load_flatgrid $opt(x) $opt(y) # Create God set god_ [create-god $opt(nn)] # create channel #1 and #2 set chan_1_ [new $opt(chan)] set chan_2_ [new $opt(chan)] # define how node should be created #global node setting $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $wtopo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1_ # Create the specified number of nodes [$opt(nn)] and attach them # to the channel. for {set i 0} {$i $opt(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # Define node movement model puts Loading connection pattern... source $opt(cp) # Define traffic model puts Loading scenario file... source $opt(sc) # Define node initial position in nam for {set i 0} {$i $opt(nn)} {incr i} { # 20 defines the node size in nam, must adjust it according to your scenario # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 } # Tell nodes when the simulation ends for {set i 0} {$i $opt(nn) } {incr i} { $ns_ at $opt(stop).1 $node_($i) reset; } # tell nam the simulation stop time #$ns_ at $opt(stop)$ns_ nam-end-wireless $opt(stop) $ns_ at $opt(stop) stop $ns_ at $opt(stop).1 puts \NS EXITING...\ ; $ns_ halt proc stop {} { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace exec rm -f FText.txt exec touch FText.txt exec awk { { if (($1 == s) || ($1 == f) || ($1 == d) || ($1 == r)) { if ($41 == ) { print $1,$2, $3, $19, /, /, 0 } else { print $1, $2, $3, $19, $35, $40, $41 } } } } FTrace.tr FText.txt puts running nam... exec nam FNam.nam exit 0 } puts Starting Simulation... $ns_ run - Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Demandez à ceux qui savent sur Yahoo! Questions/Réponses.
[ns] Shadowing model
Hello I'm trying to simulate an ad-hoc network using shadowing model. This model has a radom component, but when I run my scenario several times, the results are always the same, there's no difference among them, what's the problem? I tried to change de seed for each iteration, but it didn't work thank you very much _ Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor Amistad. http://match.msn.es/match/mt.cfm?pg=channeltcid=162349
[ns] list of neighbors (wireless network)
Hello everybody I have some problem, and I will be glade if you help me. What is the function witch calculate the list of neighbors of node with the power receive and transmission conditions. Thunks for all. - Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Demandez à ceux qui savent sur Yahoo! Questions/Réponses.
Re: [ns] Time resolution
Even though it was not my question... Actually, the text in the link is not understandable to me at all... =:-o -- Precision of the scheduler clock can be defined as the smallest time-scale of the simulator that can be correctly represented. The clock variable for ns is represented by a double. As per the IEEE std for floating numbers, a double, consisting of 64 bits must allocate the following bits between its sign, exponent and mantissa fields. sign exponent mantissa 1 bit 11 bits52 bits Any floating number can be represented in the form ($X * 2^n$) where X is the mantissa and n is the exponent. Thus the precision of timeclock in ns can be defined as ($1/2^(52)$). As simulation runs for longer times the number of remaining bits to represent the time educes thus reducing the accuracy. Given 52 bits we can safely say time upto around ($2^(40)$) can be represented with considerable accuracy. Anything greater than that might not be very accurate as you have remaining 12 bits to represent the time change. However ($2^(40)$) is a very large number and we donot anticipate any problem regarding precision of time in ns. --- I think this part of the manual should be reworked. greetings, Martina Miguel Sepulcre Ribes schrieb: This link may answer the first question: 4.2.5 Precision of the scheduler clock used in ns: http://www.isi.edu/nsnam/ns/doc/node37.html What do you mean with And 1 simulation second traslate directly into 1 realtime second ? Regards Miguel Keita Rose [EMAIL PROTECTED] escribió: Hi there, Could anyone say what is the smallest unit of time in NS-2? And 1 simulation second traslate directly into 1 realtime second. Keita - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
[ns] How to plot jitter, throughput and end to end delay of a eurane simulation
Hi all, I am using ns2 with eurane. How to plot jitter,throughput and end to end delay using xgraph or gnuplot. Thanks. Diego Passos
[ns] Is any change required to be made when you add a procedure in ns-node.tcl?
Hello All, I faced with a strange problem after adding a procedure in ns-node.tclfile. I wrote a procedure in the level of tcl without calling any method from any C++ file just like the procedures can be found in ns-node.tcl , for example: Node instproc id {} { return [$self set id_] } I added following procedure to ns-node.tcl : Node instproc my-id {} { return [$self set id_] } I used this procedure in my tcl program to test: set node_id [$node_(0) my-id] puts $node_id and an error occured that is: ns: _o14 my_id: (_o14 cmd line 1) invoked from within _o14 cmd my-id 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 _o14 line 2) (SplitObject unknown line 2) invoked from within _o14 my_id The interesting point for me is: the procedure that I added is exactly similar to the one exists in ns-node.tcl , but the ns2 can't execute it. (the only difference is in the name of procedure as you see) I guess I have to change something in somewhere to meke this procedure work. What do you think? I would appreciate any help thanks in advance, Amir
[ns] Help! About directional routing in MANET. Urgent!!!
hello, everyone I am doing my thesis on the routing protocols in MANET using smart antenna. But I can't find the packets which support the smart antenna in physical layer and a directional MAC protocol such as DMAC in MAC layer. Does anyone know? I have found for a long long period but have no idea. I will be very grateful if you give me such a packet or any suggestions or clues. Thanks a lot!
[ns] Ping-like Protocol design (Marc Greis's) and Error: Help needed
In current NS2, Ping protocol is given in /apps folder. I made a similar protocol named 'Ring' (according to the same .cc/.h files of ping protocol) in my PC (Redhat 9) and then I edited in 1) packet.h == PT_RING == name_[PT_RING]=Ring; 2)tcl/lib/ns-default Agent/Ring set PacketSize_ 64 3)tcl/lib/ns-packet.tcl I followed where Ping is positioned. I put 'Ring' in similar fashion. 4) Makefile ring.o \ ( I put ring.cc/h into ns-2-30 directory) Then I did 1) make depend 2) make 'make' takes LOTS of time to complete. Why? How can I reduce the time to complete 'Make'? After that, I ran 'ring.tcl' (like 'ping.tcl'). It shows Error: Agent/Ring undefined?? Same thing I did at my LAB's PC (Fedora core) where it was set before ( 2.28 version of NS2). When I did all previous tasks there, it was CORRECT and runs perfectly. I'm unable to find out where the error is? Moreover, in my LAB's PC, 'make' command runs fast and quick. Can you please help me out and give suggestion how can I correct it in my PC (where Radhat 9 with NS 2-30 installed perfectly)? Regards Manzur