this script will create random topology for random no. of nodes , for
random movement and at random amount of time
i think this was what u need.
set min 5.0 #min value
set max1 480.0 #max val of time
set max2 990.0# x-coordinat
set max3 990.0 #y-coordinate
set max4 20.0 #max mobility
set max5 39 #no of node==40
proc value {min max1} {
return [expr {int(rand()*($max1+1))}]
}
proc value_x {min max2} {
return [expr {int(rand()*($max2+1))}]
}
proc value_y {min max3} {
return [expr {int(rand()*($max3+1))}]
}
proc value_z {min max4} {
return [expr {int(rand()*($max4+1))}]
}
proc node_x {min max5} {
return [expr {int(rand()*($max5+1))}]
}
for {set t 0} {$t 100 } { incr t } {
$ns at [value $min $max1] $node_([node_x $min $max5]) setdest [value_x $min
$max2] [value_y $min $max3] [value_z $min $max4]
}
On 3/22/07, Vijay Kumar c [EMAIL PROTECTED] wrote:
Hi ns users,
Can anyone send me a wireless script which uses Node Movement and Topology
Generation Traffic Pattern Generation which uses the setdest tool and
cbrgen traffic there are some errors when i run Marc Greis tutorial script
*
wireless1.tcl* can anybody send any other script other than wireless1.tclby
which i can include the Node Movement and Topology Generation Traffic
Pattern Generation file so that i can run the script in my PC.
Plz try to attach or paste the tcl script in your e-mail
Plz help me your valuble suggesstions and comments are always welcome.
Thanks and Reg:
Vijay
--
Shailesh Gamit
M.Tech (CSE),
Nirma Institute of Technology,
Ahmedabad, India