You must generate two files. One traffic file and one mobility file and call 
them in a tcl script that you can find examples in the folder ns-2.x/tcl/ex 
(for example wireless.tcl). Do like this:
  1. go in the folder ../ns-2.x/indep-utils/cmu-scen-gen and type ns cbrgen.tcl 
-type cbr -nn 50 -seed 1.0 -nc 20 -rate 10.0 > traffic-file-name.  (20 = source 
  2. go in the folder ../ns-2.x/indep-utils/cmu-scen-gen/setdest and type 
./setdest -v 1 -n 50 -M 20 -t 800 -x 1000 -y 1000 > mobility-file-name.  (20 = 
velocity It is supposed here that the minimum velocity is 0 and the max 20). 
The mobility model is Random Waypoint.
  After that use the two files in your script tcl like in the example 
  I hope I didn't make mistake on the parameters of cbrgen and setdest. You can 
verify them in the programs cbrgen.tcl and setdest.cc in their folder.

Mohammad Haseeb Zafar <[EMAIL PROTECTED]> a écrit : 

How I can set scenario file with random velocities for the following parameters:
traffic type: cbr
total nodes: 50
source nodes: 20
seed 1.0
rate 10 packets/sec
dimensions: 1000m x 1000m
pause time: 30 sec
random velocity: 0-20m/s
simulation time: 800s



 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.

Reply via email to