Hello,
I have followed this example to generate random trips https://www.youtube.com/watch?v=Mh4WnY4KY4Y . In this example, there are two commands that generate trips, one of them is:
python sumo/tools/randomTrips.py --n Munich.net.xml -r cars.rou.xml -t "type=\"car\" departSpeed=\"max\" departLine=\"best\"" -c passenger --additional-files car.add.xml -p 1.4 -e 1000 -l .
Then, I'm trying to import the generated simulation file (after running sumo) in NS3 via
ns2-mobility-trace.cc and generate a file for NetAnim. I am concerned by the following:
- I have to specify the total number of nodes. The only way I am aware of knowing the number of total nodes is doing a tail cars.rou.xml , where I will see the last id. How can I specify it at generation step?
- I have added "AnimationInterface anim("animation.xml")" before the simulation starts, but at the end of the simulation, NetAnim outputs warnings like "AnimationInterface WARNING:Node:1 Does not have a mobility model. Use set constant position
if it is stationary.". Do I need to set a mobility model? The traces are already generated by SUMO, aren't they? How can I fix that?
- Visualizing the generated "animation.xml" file via NetAnim shows nodes at constant position. I guess that by fixing the problem explained above this will be fixed.
Thanks in advance.
Ph.D. Student at La Salle Barcelona - Ramon Llull University
|