Search code examples
ns2

setdest v 2 mobility generator tool puts up max speed equal to zero instead of the asked max speed


I want to generate a mobility scenario for my NS2 simulation, for that I will use the mobility generator tool setdest. the path to it is : '~/ns-allinone-2.xx/ns-2.xx/indep-utils/cmu-scen-gen/setdest'- I'm using NS 2.35 by the way. In the command line, I used this command to generate my scenario :

./setdest -v 2 -n 20 -s 2 -m 1 M- 10 -t 300 -P 1 -p 10 -x 500 -y 500 > scenario

where :

  • -v : is the nuber of the command version, I'm using version 2. So the parameters that follows are the one of version 2.
  • -n : number of nodes
  • -s : speed type (uniform, normal), s = 1 constant speed, s = 2 normal speed
  • -m : min speed
  • -M : max speed
  • -t : the simulation time
  • -P : pause type (constant, uniform); P=1 constant pause; P=2 uniform pause [0, 2*p]
  • -p : pause time
  • -x : x dimension of space
  • -y : y dimension of space

in the scenario file I got this (I trunked a part of the scenario file that was generated):

#
# nodes: 20, speed type: 2, min speed: 1.00, max speed: 0.00
# avg speed: 0.23, pause type: 1, pause: 10.00, max x: 500.00, max y: 500.00
#
$node_(0) set X_ 179.262898812695
$node_(0) set Y_ 200.991843665555
$node_(0) set Z_ 0.000000000000
.
.
.
$ns_ at 0.000000000000 "$node_(0) setdest 113.145148273136 63.780190950790 0.615925877381"
.
.
.

I want my node to move at a speed between 1 and 10 m/s, but instead they 're moving at a speed between 1 and 0 m/s. So who do I do to configure the max speed to 10 m/s ? thank you in advance


Solution


  • Simple, you have a typo ... the right command seems to be like ...

    setdest -v 2 -n 20 -s 10 -m 1 -M 10 -t 300 -P 1 -p 10 -x 500 -y 500 > scenario
    

    #
    # nodes: 20, speed type: 10, min speed: 1.00, max speed: 10.00
    # avg speed: 0.00, pause type: 1, pause: 10.00, max x: 500.00, max y: 500.00
    #
    

    Note : 1) The setdest command can be installed : # cd ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest/ && make install

    2) With the 'Oct 2014 update' ns-allinone-2.35_gcc482.tar.gz https://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing ... all the tools indep-utils/ {dec-tr-stat, epa-tr-stat, nlanr-tr-stat, ucb-tr-stat, setdest} are installed with the # make install in ns-2.35/