[ns] tcl : create nodes Urgent

2011-05-22 Thread Tami Nesher
Hello, first of all read my previous mail. I just want to change it's end : the topology needs to look like this n1---| |---n4 n2---|- - r1- -|---n5 n3---| |---n6 n1,n2,n3 tcp/udp agents n4,n5,n6 sink/null agents r1 I create separately thanks. -- Forwarded message --

Re: [ns] tcl : create nodes

2011-05-19 Thread мαłłi
Tami, For your question my answer is 1. yes u got it, i forget to put s instead i put number thanks 2. yes we can do The topology n1 --- n2 --- n3 --- n4 --- n5 set requiredNodes 5 for {set i 0} {$i < $requiredNodes} {incr i} { set n$i [$ns node] if {$i == [expr $requiredNodex - 1]} {

Re: [ns] tcl : create nodes

2011-05-17 Thread Tami Nesher
Thank you for all answers. 1. Did you mean to write like this?(with s) set s 10 for {set i 0} {$i < *$s*} {incr i} { set n$i [$ns node] 2. I want also to create* links* between the nodes, to *attach agents(tcp or udp)* and *start them*. I need to do everey thing in the same way, with

Re: [ns] tcl : create nodes

2011-05-17 Thread мαłłi
Tami, What I understand you question is you have an variable, based on that you need to create that much of users? Ex. set s 10 for {set i 0} {$i < 10} {incr i} { set n$i [$ns node] } On 17 May 2011 15:43, Tami Nesher wrote: > > Hi, > How can I create nodes according to a variable nu

[ns] tcl : create nodes

2011-05-17 Thread Tami Nesher
Hi, How can I create nodes according to a variable number? I mean : I have a variable that contains the number of nodes that I need to create. How can I do it?