How veins create node in example

550 views
Skip to first unread message

fekair mohammed

unread,
Oct 16, 2014, 2:19:06 PM10/16/14
to

Dear all,

I would understand how veins example work , where I install veins 2.2 and omnetpp 4.3

My problem is how the veins   (Mixim—example—veins) create our node and add vehicle (*.Node[*]….) in scenario.  Where I read all source code the compound module Car, highway, and scenario (extend highway) but I not discovered how it create. Only in omnetpp.ini configuration the nod (car). Because I want to change source code in number the car created

 

##########################################################

#                    WaveAppLayer                        #

##########################################################

*.node[*].applType = "TraCIDemo11p"

*.node[*].appl.debug = false

*.node[*].appl.headerLength = 256 bit

*.node[*].appl.sendBeacons = false

*.node[*].appl.dataOnSch = false

*.node[*].appl.sendData = true

*.node[*].appl.beaconInterval = 1s

*.node[*].appl.beaconPriority = 3

*.node[*].appl.dataPriority = 2

*.node[*].appl.maxOffset = 0.005s

 

##########################################################

#                      Mobility                          #

##########################################################

*.node[*].mobilityType = "TraCIMobility"

*.node[*].mobility.x = 0

*.node[*].mobility.y = 0

*.node[*].mobility.z = 1.895

*.node[*0].mobility.accidentCount = 1

*.node[*0].mobility.accidentStart = 75s

*.node[*0].mobility.accidentDuration = 30s

I would really appreciate a response,

Thanks in advance

Regards

-- 

Fekair Mohammed El Amine,
PhD Candidate

Tian Bin

unread,
Oct 17, 2014, 5:02:14 AM10/17/14
to omn...@googlegroups.com
hi, the number of cars is decided by the SUMO files, you can check out the *.rou.xml file. If you want to change the number of cars, that is easy, just use SUMO to create new rou file, that is ok, but if your want to own your own scenario, you should use SUMO to create new one. 

fekair mohammed

unread,
Oct 17, 2014, 7:31:14 AM10/17/14
to
thanks Dear Tian Bin

that is very helpful , i read xml file the erlangen.rou.xml 

<?xml version="1.0"?>
<!-- 
194 Cars leaving the Computer Science Building and campus of the University of Erlangen-Nuremberg
Copyright (C) 2008 Christoph Sommer <christoph.sommer@informatik.uni-erlangen.de>
Licensed under the Creative Commons Attribution-ShareAlike 2.0 license <http://creativecommons.org/licenses/by-sa/2.0/>
-->
<routes>
   <vType id="vtype0" accel="2.6" decel="4.5" sigma="0.5" length="2.5" minGap="2.5" maxSpeed="14" color="1,1,0"/>
   <route id="route0" edges="-39539626 -5445204#2 -5445204#1 113939244#2 -126606716 23339459 30405358#1 85355912 85355911#0 85355911#1 30405356 5931612 30350450#0 30350450#1 30350450#2 4006702#0 4006702#1 4900043 4900041#1"/>
   <flow id="flow0" type="vtype0" route="route0" begin="0" period="3" number="195"/>
</routes>


where i discover number the cars created by sumo, but how veins detect cars and change it speed and disseminate information between them and attach module car by cars the sumo (vtype0) .  and the following output msg who module (c++ file) responsible for the display it.

.................
Initializing module scenario.node[0].mobility, stage 0
Initializing module scenario.node[0].appl, stage 1
Initializing module scenario.node[0].arp, stage 1
Initializing module scenario.node[0].nic.phy80211p, stage 1
Initializing module scenario.node[0].nic.mac1609_4, stage 1
Initializing module scenario.node[0].mobility, stage 1
.................



and thanks in advance

Regards

-- 

Fekair Mohammed El Amine,
PhD Candidate

Tian Bin

unread,
Oct 17, 2014, 9:16:12 AM10/17/14
to omn...@googlegroups.com
hi, Fekair, for the "veins detect cars and change it speed", you can see the source code in src/mobility/traci. And for "disseminate information", it is done by the app module. 


On Friday, October 17, 2014 1:31:14 PM UTC+2, fekair mohammed wrote:
thanks Dear Tian Bin

that is very helpful , i read xml file the erlangen.rou.xml 

<?xml version="1.0"?>
<!-- 
194 Cars leaving the Computer Science Building and campus of the University of Erlangen-Nuremberg
Copyright (C) 2008 Christoph Sommer <christop...@informatik.uni-erlangen.de>
Licensed under the Creative Commons Attribution-ShareAlike 2.0 license <http://creativecommons.org/licenses/by-sa/2.0/>
-->
<routes>
   <vType id="vtype0" accel="2.6" decel="4.5" sigma="0.5" length="2.5" minGap="2.5" maxSpeed="14" color="1,1,0"/>
   <route id="route0" edges="-39539626 -5445204#2 -5445204#1 113939244#2 -126606716 23339459 30405358#1 85355912 85355911#0 85355911#1 30405356 5931612 30350450#0 30350450#1 30350450#2 4006702#0 4006702#1 4900043 4900041#1"/>
   <flow id="flow0" type="vtype0" route="route0" begin="0" period="3" number="195"/>
</routes>


where i discover number the cars created by sumo, but how veins detect cars and change it speed and disseminate information between them and attach module car by cars the sumo (vtype0) .  and the following output msg who module (c++ file) responsible for the display it.

.................
Initializing module scenario.node[0].mobility, stage 0
Initializing module scenario.node[0].appl, stage 1
Initializing module scenario.node[0].arp, stage 1
Initializing module scenario.node[0].nic.phy80211p, stage 1
Initializing module scenario.node[0].nic.mac1609_4, stage 1
Initializing module scenario.node[0].mobility, stage 1
.................



and thanks in advance

Regards

-- 

Fekair Mohammed El Amine,
PhD Candidate

On Friday, October 17, 2014 10:02:14 AM UTC+1, Tian Bin wrote:
Reply all
Reply to author
Forward
0 new messages