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 --
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]} {
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
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
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?