using Bonnmotion created ManhattanGrid model can not work?

637 views
Skip to first unread message

agentZhu

unread,
Mar 30, 2016, 6:54:16 AM3/30/16
to ns-3-users
Hi,all:
  These days, I used Bonnmotion to create ManhattanGrid model to simulate the urban condition. The followed command as I used:
bm -f mhdata ManhattanGrid -d 300 -n 150 -x 2000 -y 2000 -e 10 -m 15 -u 3 -v 3 -o 0

it generated to files: mh_trace.params and mh_trace.movements.gz . The content of mh_trace.params as followed:
model=ManhattanGrid
ignore=3600.0
randomSeed=1459288854203
x=2000.0
y=2000.0
duration=300.0
nn=150
circular=false
J=2D
xblocks=3
yblocks=3
updateDist=5.0
turnProb=0.5
speedChangeProb=0.2
minSpeed=10.0
meanSpeed=15.0
speedStdDev=0.2
pauseProb=0.0
maxPause=0.0

Then I followed command to create ns2 format trace file for ns-3.
bm NSFile -f mh_trace 

I copy the mh_trace.ns_movements to scratch dir,then used vanet-routing-compare.cc to test it. The run command as followed:
./waf --run "scratch/vanet-routing-compare --scenario=2 --mobility=1 --nodes=60 --protocol=3 --sinks=9"

But some some trace data did not generate.

 I used grid-trace.txt which provided by Konstantinos Katsaros, it worked well. So I think  the  mh_trace.ns_movements file may consists some errors. But I did not very sure.
So I open a topic to ask for help.

Thanks in advance.
agentzhu

Konstantinos

unread,
Mar 30, 2016, 7:25:20 AM3/30/16
to ns-3-users
Hi,

Can you attach the generated ns-2 trace file you try to use?

Regards,
K

agentZhu

unread,
Mar 30, 2016, 7:55:05 AM3/30/16
to ns-3-users

Hi  ,Katsaros:
   I am sorry for forgetting to attach the ns-2 trace file. Now I attached.
Regards
zhu

在 2016年3月30日星期三 UTC上午11:25:20,Konstantinos写道:
mh_trace.ns_movements

agentZhu

unread,
Mar 30, 2016, 8:04:14 AM3/30/16
to ns-3-users
Hi,
 I am so sorry for tell about the attached file which i not use above command to generated, I use this command to create it.
bm -f mhdata ManhattanGrid -d 200 -n 200 -x 2000 -y 2000 -e 10 -m 15 -u 3 -v 3 -o 0

but it also didnot work. Can you tell how you generated the grid-trace.txt file? Have I made a mistake in my steps to generate?

Thank you!
zhu

在 2016年3月30日星期三 UTC上午11:25:20,Konstantinos写道:
Hi,

Konstantinos

unread,
Mar 30, 2016, 8:22:52 AM3/30/16
to ns-3-users
Hi,

There is nothing wrong with the file. I just used it in a simple test example and the mobility of the nodes showed as expected.
It might an issue with the updates you make in the scenario you run. 

Regard
K
Screen Shot 2016-03-30 at 13.19.41.png

agentZhu

unread,
Mar 30, 2016, 8:54:22 AM3/30/16
to ns-3-users
Hi Konstantinos: 
  Thank you. I sorry to ask some stupid question.
   Firstly, I can't get this sentence point: "It might an issue with the updates you make in the scenario you run." 
   Secondly, can you send me the test example. I use it to review my our script?
   Thirdly,  When I use your training-mobility-model.cc, I use the --visualize parameter by ns-3 but it occurs errors. I found i did not configure it.So I want to ask:how you create the beautiful image? I want to learn it, so I can check the ns2-trace file like you.

Thank you!
zhu

在 2016年3月30日星期三 UTC下午12:22:52,Konstantinos写道:

Konstantinos

unread,
Mar 30, 2016, 9:31:46 AM3/30/16
to ns-3-users
Hi

You said you use the vanet-routing-compare scenario and it did not work using this command:
I copy the mh_trace.ns_movements to scratch dir,then used vanet-routing-compare.cc to test it. The run command as followed:
./waf --run "scratch/vanet-routing-compare --scenario=2 --mobility=1 --nodes=60 --protocol=3 --sinks=9"

In order to get the vanet-routing-compare to see your mobility file, you either change the file name in the scenario code, or pass it as a command line parameter.
And since you do not pass this parameter, I guess that you have changed the file and probably there is something wrong there.
Do you get an error or something?

The test scenario I used can be found in the main ns-3 codebase inside the mobilty examples.
Either ns2-mobility-trace or bonnmotion-ns2-example should be good.

In order to use the --visualize command, you need to enable python and add corresponding dependencies for PyViz (https://www.nsnam.org/wiki/PyViz)
However, you can use the NetAnim that does not require python (https://www.nsnam.org/wiki/NetAnim)
Both produce high quality images. In NetAnim you can also change the node image and add a "vehicle" if you like...

Regards,
K

agentZhu

unread,
Apr 1, 2016, 9:04:26 AM4/1/16
to ns-3-users
Hi, Konstantinos:
   Thank you for your advice.These day I fixed it, I just change the ns2-trace file, using 600 X 600 instead of 2000 X 2000,and application started early time.
    Firstly, You got right. I did change the file, but I got no error. :)
    Secondly, I read the  PyViz wiki and try to work it, but in my computer, could not install some dependencies, so i gave up. Then I use the NetAnim tool, and read the examples which you told, I now work on it. 
   In all, words can't express my gratitude.
 
Regards
zhu
   


在 2016年3月30日星期三 UTC+8下午9:31:46,Konstantinos写道:

Wa Jabr

unread,
May 24, 2019, 7:19:17 PM5/24/19
to ns-3-users
Hi, i am using NS-3. 29. I followed the steps and generated my NS-2 trace file.  bm -f mhdata ManhattanGrid -300 -150 -2000 -2000 -10 -15 -3 -3 -0.  After generating the trace file. I coppied the files in scratch folder. Now i took one simple example from mobility/example folders  called  bonnmotion-example.cc.  in this file i updated the path of trace file to std::string traceFile = "scratch/mhdata.ns_movements"; and run the .cc file. But on out put i see one node instead of 150. Can you please help me why i can't see 150 nodes. 

Hemant Saini

unread,
Apr 26, 2020, 10:19:47 PM4/26/20
to ns-3-users
hi 
am also using ns3.25 can you pl. send me the steps  how i implement the manhattan grid mobility model into ns3 since am not using ns2 tcl also send me steps how could i test for AODV routing using this model.

or if you has the code files pl. share me
Reply all
Reply to author
Forward
0 new messages