[ns] Error, Generating random below 400 for nodement
TAING Nguon
romdoul2002 at yahoo.com
Tue Apr 26 11:19:14 PDT 2005
Dear all,
I got error when I changed the value of number to be
generated below 400. my code is as below.
Thanks
Nguon
----------
set god_ [God instance]
set rng [new RNG]
for {set i 0} {$i < 30 } {incr i} {
# set px [$rng integer $val(x)]
set px [$rng integer 400 ]
^^^^
set py [$rng integer 350 ]
^^^^
set pz 0
$node_($i) set X_ $px
$node_($i) set Y_ $py
$node_($i) set Z_ $pz
$ns_ at 0 "$node_($i) setdest $px $py 0"
$ns_ at 0 "$node_($i) start";
}
------------
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Ns-users
mailing list