[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] How to create random event in ns?
Hi,
set a random variable then at "random_variable" schedule the event.
An example:
set rvar [new RandomVariable/Exponential]
set rvar avg_ 123
set myrng [new RNG]
$myrng seed 1973272912
$var use-rng $myrng
$ns at [$rvar value] "event"
Good luck.
Hi,
I know that in ns, we can shedule an event to occur at some sime
using the command 'at'. But if there are many events need happen
randomly, how could I do?
liu yong
[email protected]