Beruflich Dokumente
Kultur Dokumente
(12/12/12)
Ali Balador
balador@gmail.com
Last modification: 18 December 2012
The picture was extracted from http://www.ccs-labs.org/teaching/c2x-2012s/01-intro.pdf.
Outline
Pre-Simulation (SUMO)
SUMO setup
Simulation (OMNeT++)
NED file(s)
Ini file(s)
Running simulation
Pre-Simulation step
(SUMO setup)
1.Extracting the map from
www.OpenStreetMap.org (*.osm)
Extracted from [8]: Tutorial for Simulating VANET and ITS (using OMNeT++ and SUMO), MJ 3
(Thinus) Booysen, july 2012.
Pre-Simulation
(SUMO setup)
2. Creating road network file (convert *.osm to net.xml with
netconvertor)
netconvert --osm rc.osm
3. Generating random trips for road network file (randomTrips.py)
./randomTrips.py -n net.net.xml -l -e 600 -o trips.trips.xml
4. Convert the trips to routes and traffic flows (duarouter)
duarouter -n net.net.xml t trips.trips.xml -o routes.rou.xml
--ignore-errors
Pre-Simulation
(SUMO setup)
Creating config file (sumo.cfg)
Pre-Simulation
(SUMO setup)
If the city doesn't include the building layout, it must be drawn with
the JOSM (Java Open Street Map editor) tool.
<additional-files value="map.poly.xml"/>
6
SUMO overview
.ned.xml
.edg.xml
.net.xml
.poly.xml
.rou.xml
.sumo.cfg
netconvert
polyconvert
Refers to / Uses
Moscow
Milan
Simulation step
Gates (input/output)
Connections (within a compound module or between one submodule and compound module)
self-messages
Simulation step
Simulation components:
Behavior
C++ code
Structure
INETMANET package
NED file
Runtime parameters
Omnetpp.ini
10
Simulation step
Simulation components:
Behavior
C++ code
Structure
INETMANET package
NED file
Runtime parameters
Omnetpp.ini
11
Simulation step
module Car
{
parameters:
string routingProtocol @enum("AODVUU","DYMOUM","DYMO",
"DSRUU","OLSR","OLSR_ETX","DSDV_2","Batman") = default("");
gates:
...
submodules:
app: UDPBasicBurst
mobility: TraCIMobility
udp: UDP
Module Type
Module Interface
networkLayer: NetworkLayer
wlan: Ieee80211Nic {
manetrouting: <routingProtocol> like ImanetRouting
if routingProtocol != ""
connections allowunconnected:
...
}
12
Simulation step(continue)
module Highway
{
submodules:
channelControl: ChannelControl {
parameters:
Channel control
@display("p=256,128");
}
manager: TraCIScenarioManagerLaunchd {
parameters:
TraCIScenarioManagerLaunchd
@display("p=512,128");
}
}
13
Simulation step(continue)
import inet.world.VACaMobil.VACaMobil;
...
import inet.world.obstacles.ObstacleControl;
import inet.world.annotations.AnnotationManager;
module Highway
{
submodules:
...
manager: VACaMobil {
@display("p=430,35");
}
obstacles: ObstacleControl {
@display("p=282,108");
}
annotations: AnnotationManager {
@display("p=144,108");
}
}
14
Simulation step
Simulation components:
Behavior
C++ code
Structure
INETMANET package
NED file
Runtime parameters
Omnetpp.ini
15
Simulation step(continue)
[General]
network = scenario
sim-time-limit = 3000s
#########################################
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 10699m
**.constraintAreaMaxY = 7131m
**.constraintAreaMaxZ = 0m
#########################################
# channel physical parameters
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 2.0mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1
16
Simulation step(continue)
# udp apps
**.host[*].app.destAddresses = moduleListByPath("**.host[*]")
**.app.localPort = 1234
**.app.destPort = 1234
**.app.messageLength = 512B # Bytes
**.app.sendInterval = 0.25s + uniform(-0.001s,0.001s,0)
**.app.burstDuration = 0s
**.app.sleepDuration = 0s
**.app.chooseDestAddrMode = "perSend"
**.app.delayLimit =20s
**.app.startTime = simTime()+1s
#################################
# nic settings
**.wlan.bitrate = 54Mbps
**.wlan.opMode = "a"
**.wlan.mgmt.frameCapacity = 10
**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.wlan.mac.address = "auto"
**.wlan.mac.maxQueueSize = 14
**.wlan.mac.rtsThresholdBytes = 2346B
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = ${7, 15, 31}
**.wlan.mac.cwMaxData = 1023
**.wlan.mac.cwMinBroadcast = 15
**.wlan.mac.slotTime = 13us #
random_name(host) or
moduleListByPath("**.host[*]")
17
18
Simulation step
**.meanNumberOfCars = 50
**.carHysteresisValue = 0
#########################################
# annotations
*.annotations.draw = true
#########################################
# obstacles
*.obstacles.obstacles = xmldoc("map.poly.xml")
19
Running simulation
20
Post simulation
Output vector
Scalar result
Contain summary statistics: number of packets sent, number of packet drops, average end-to-end delay of received packets, peak
throughput.
Every scalar generates one line in the output file like:
49400
1110720
21
120000
29000
100000
28000
80000
27000
Throughput
60000
26000
40000
25000
20000
24000
23000
5
10
15
20
CWmin
25
30
35
10
15
20
25
30
35
CWmin
22
23
Next steps
1. Simulating vehicular ad hoc networks with obstacles and generated car mobility by
VACaMobil. [it's done/18.12.2012]
2. Creating a script file to extract and draw final graphs automatically.
3. Reading the IEEE 802.11 implementation to know how it behaves.
1.How can I implement my previous works in omnet++.
6. Reading about IEEE 802.11p and it's implementation in OMNeT. [in parallel with 4 and 5]
24
Broadcast communication in
vehicular ad hoc networks
RTS/CTS handshaking
ACK packets
25
Research questions
26
References
1. OMNET++ User Manual: http://whale.hit.bme.hu/omnetpp/.
2. TicToc tutorial: http://www.omnetpp.org/doc/omnetpp/tictoc-tutorial.
3. IDE user guide: http://omnetpp.org/doc/omnetpp/userguide/index.html.
4. OMNeT++ 4.x Wiki page: http://www.omnetpp.org/pmwiki/index.php?n=Main.Omnetpp4.
5. Contributors: Open street map. www.openstreetmap.org. Accessed 11 November 2012
6. Omnet++ (home site). http://www.omnetpp.org/. Accessed 11 November 2012
7. SUMO Simulation of Urban MObility (home page). http://sumo.sourceforge.net/. Accessed 11
November 2012
8. Tutorial for Simulating VANET and ITS (using OMNeT++ and SUMO), MJ (Thinus) Booysen,
july 2012.
9. SUMO overview, University of Innsbruck.
10. OMNeT++ tutorial. http://www.ccs-labs.org/teaching/nwsim-2012w/02-omnetpp.pdf.
27
28
29