(VANL1) protoco|s and app||canons through s|mu|anons.
17 th November 2011 Nlcbolos loollooJes v-5eose ltoject (bup.//vseose.cs.ocy.oc.cy) uept. of compotet 5cleoce, uolvetslty of cyptos (bup.//www.cs.ocy.oc.cy) Cverv|ew Slmulauon Workow for vAnL1s MoblllLy Slmulauon uslng SuMC vehlcular Ad Poc neLwork Slmulauon uslng ns-3 C&A Ceneral ulscusslon Nicholas Loulloudes (V-Sense Project) 2 S|mu|anon Workow for VANL1s neLwork Slmulauon 1opology CuLpuL Nicholas Loulloudes (V-Sense Project) 3 S|mu|anon Workow for VANL1s MoblllLy SlmulaLor 8oad 1opology MoblllLy uemand MoblllLy Models M o b l l l L y
1 r a c e s
1opo|ogy Nicholas Loulloudes (V-Sense Project) 4 S|mu|anon Workow for VANL1s M o b l l l L y
1 r a c e s
1ransporL Appllcauons neLwork P? & MAC Network S|mu|anon Nicholas Loulloudes (V-Sense Project) 5 S|mu|anon Workow for VANL1s noLe - lor Lhls LuLorlal we use: o SuMC (Slmulauon for urban MoblllLy) for MoblllLy Slmulauon hup://sumo.sourceforge.neL/ o ns-3 for neLwork Slmulauon hup://www.nsnam.org/ Nicholas Loulloudes (V-Sense Project) 6 Mob|||ty S|mu|anon koad 1opo|ogy Dehn|non 1wo opuons avallable: 1. lmporL a real (publlcly avallable) road neLwork l.e. CpenSLreeLMap (hup://www.opensLreeLmap.org) ros: lncreased 8eallsm Cons: A loL of lnfo mlsslng (speeds, Lurnlng regulauons, Lramc llghL sLaLes) 2. Manually bulld your own road neLwork ros: Slmple Lopologles, beuer conLrol Cons: very ume consumlng, error prone 8oad Lopology ln SuMC ls a dlrecLed graph o nodes represenL [uncuons and Ldges represenL sLreeLs. o Lvery sLreeL (edge) as a collecuon of lanes. Lach lane has a posluon, shape and speed llmlL o 8lghL of way regulauon o Connecuons beLween lanes aL [uncuons (nodes) o osluon and loglc of Lhe Lramc llghLs. o 1opology ls dened uslng xML Lags Nicholas Loulloudes (V-Sense Project) 7 Mob|||ty S|mu|anon Demand Mode||ng Dehn|non uemand Modellng denes Lhe vehlcle moblllLy on Lhe road Lopology o koutes: uene for a slngle vehlcle lLs movemenL from a sLarung edge Lo a desunauon edge, lncludlng also all Lhe lnLermedlary edges Lhe vehlcle wlll pass. o 1r|ps: uene for a slngle vehlcle lLs movemenL from a sLarung edge (sLreeL), Lo Lhe desunauon edge, and Lhe deparLure ume. lnLermedlary edges Lhe vehlcle wlll Lraverse (rouLes) are compuLed elLher: o uslng Lhe shorLesL-paLh algorlLhm by ul[ksLra (uuA8Cu1L8) o uslng Lurnlng percenLages aL [uncuons (!18Cu1L8) o I|ows: Same as Lrlps, buL for muluple vehlcles wlLh same sLarL-end. o Acnv|ty-8ased: uenes demand from a descrlpuon of Lhe populauon ln Lhe neLwork. lL uses acuvlLy-based Lramc model for acuvlues such as school, work, free ume. used for real clLy maps, and requlres sLausucs for a clLy. More lnfo: hup://sumo.sourceforge.neL/doc/currenL/docs/uemand/ lnLroducuon_Lo_demand_modelllng_ln_SuMC.hLml Nicholas Loulloudes (V-Sense Project) 8 Mob|||ty S|mu|anon Veh|c|e ropernes Dehn|non SuMC allows Lo speclfy vehlcle properues such as: o hyslcal roperues LengLh Max. Accelerauon / uecelerauon Max. veloclLy o Car-lollowlng roperues Max. Accelerauon / uecelerauon urlver lmperfecuon urlver reacuon ume Peadway, Mln gap SupporLed Car-lollowlng models: krauss lnLelllgenL urlver Model kerner Wagner More lnfo on car-followlng models: hup://www.cs.odu.edu/~mwelgle/courses/cs793-s08/papers/harrl-mar07.pdf
Nicholas Loulloudes (V-Sense Project) 9 Mob|||ty S|mu|anon Cutput SuMC provldes exLenslve ouLpuL opuons o Ldge/Lane SLausucs (lor a glven ume lnLerval) 1ravel 1lmes uenslLy Mean Speeds Arrlval and ueparLure volumes o vehlcle osluon (lor a glven ume lnLerval) osluon and Speeds of all vehlcles or a glven Lype of vehlcle o 1rlp and 8ouLe lnformauon o 1ramc LlghL SLaLes hase changes uurauons o . o More lnfo: hup://sumo.sourceforge.neL/doc/currenL/docs/Slmulauon/CuLpuL.hLml Nicholas Loulloudes (V-Sense Project) 10 Mob|||ty S|mu|anon S|mp|e Lxamp|e 2000m x 2000m recLangular area 9 [uncuons 24 bl-dlrecuonal sLreeLs o 1 lane each dlrecuon no Lramc llghLs Max. Speed 18 m/s (60km/h) 300s slmulauon ume 8andom Lrlps 234 vehlcles ln[ecLed Lo neLwork 0 20 40 60 80 100 120 140 160 0 50 100 150 200 250 300 N u m b e r
o f
N o d e s Time (s) "nodesPerSecond.txt" using 1:2 Nicholas Loulloudes (V-Sense Project) 11 VANL1 S|mu|anon ns-3 Cverv|ew ulscreLe - LvenL neLwork SlmulaLor Allows enure slmulauon workow, from slmulauon congurauon Lo Lrace collecuon and analysls. Wrluen ln C++ Plgh-Level Al o uescrlbe Models and rogram llow uslng C++ or yLhon Core deslgn LhaL enables lnLeracuon wlLh real world lnLerfaces (real-ume neLwork emulaLor) SupporL l and non-l neLworks Scalable (memory emclenL) Can run ln dlsLrlbuLed mode Lhrough Ml Nicholas Loulloudes (V-Sense Project) 12 VANL1 S|mu|anon ns-3 Cverv|ew !"#$ %&'( &!*+ ,-!.+/ '-0+ 1232 34 A software organization view heIper Routing Internet stack Devices mobiIity node simuIator common core High-IeveI wrappers for everything eIse No smart pointers Aimed at scripting Events ScheduIer Time arithmetic MobiIity modeIs (static, random waIk, etc) Packets Packet Tags Packet Headers Pcap/ascii fiIe writing Smart pointers Dynamic type system Attributes CaIIbacks, Tracing Logging Random VariabIes Node cIass NetDevice ABC Address types (Ipv4, MAC, etc.) Queues Socket ABC Ipv4 ABCs Packet sockets * Source: ns-3 LuLorlal aL CLnl (hup://www.nsnam.org/LuLorlals/genl-LuLorlal-parL1.pdf) Nicholas Loulloudes (V-Sense Project) 13 VANL1 S|mu|anon ns-3 Cverv|ew Llnk Layer Models o Wlll - 802.11 llnks lnfrasLrucLure and Ad Poc modes Mesh (802.11s) o 802.16 - WlMax o llnks o CSMA - LLherneL llnks o 802.11d - Learnlng 8rldge o L1L 8ouung Models o Ad Poc (ACuv, CLS8, uSuv) - supporLs lv4 o nlx-vecLor 8ouung - supporLs lv4 o SLauc 8ouung (unlcasL & mulucasL) - supporLs lv4 and lv6 o LlsL 8ouung ([olns muluple rouung proLocols aL a node) - supporLs lv4 and lv6 Nicholas Loulloudes (V-Sense Project) 14 VANL1 S|mu|anon S|mp|e Lxamp|e use moblllLy Lraces from SuMC example above. vehlcles have a uS8C enabled C8u (1x range ~ 300m) vehlcles 8roadcasL 8eacon (Pello) messages every 1 seconds. o PLLLC conLalns (node lu, osluon, ulrecuon, Speed) 1wo sLauonary 8Sus vehlcles lnluaLe a uu C88 sesslon Lo boLh 8Sus (1pkL/sec) for Lhe durauon ln Lhe slmulauon. 8Su 1 8Su 2 Nicholas Loulloudes (V-Sense Project) 15 VANL1 S|mu|anon S|mp|e Lxamp|e (cont.) Mlcroscoplc locus for Lxample Pello Messages are sLored as rouung Lable enLrles ln each vehlcle and have an explrauon ume 4 2 3 S node osluon ulrecuon Speed Lxp|re 3 x,? n 12m/s +3 2 x,? n 10m/s +4 1 node 3 rouung Lable node 3 1x range Nicholas Loulloudes (V-Sense Project) 16 VANL1 S|mu|anon S|mp|e Lxamp|e (cont.) node 3 wanLs Lo send some packeLs Lo Lhe sLauonary 8Su (l.e. parklng reservauon.) - [C88 uu sesslon, wlLh no reply]. use geographlc forwardlng (send packeL Lo my nelghbor whlch ls closesL Lo desunauon -> l.e. node 2) 4 2 3 S 1 Data acket 8Su Nicholas Loulloudes (V-Sense Project) 17 VANL1 S|mu|anon S|mp|e Lxamp|e (cont.) node 2 does noL have a nelghbor closer Lo desunauon (local maxlmum) ! Cueue packeL unul a new node ls found (Cnl). When a PLLLC message from a new node ls 8x, check queue for packeLs Lo be send ! lf found, send Lhen, and clear queue
4 2 3 S node osluon ulrecuon Speed Lxp|re 3 x,? n 12m/s +3 3 x,? n 8m/s +2 1 node 2 rouung Lable
8Su ackeL lrom 1o Lxplre 3 8Su +10 node 2 queue Nicholas Loulloudes (V-Sense Project) 18 VANL1 S|mu|anon S|mp|e Lxamp|e (cont.) node 2 sees node 4 ! Checks queue ! Sends Lo node 4 node 4 queues packeL slnce no nelghbor ls closer Lo 8Su
//CreaLe a C88 connecuon from each vehlcle Lo each sLauc node (8Su). ubSubAppllcauonPelper pubsubPelper ("ns3::udpSockeLlacLory", Address (lneLSockeLAddress (lnLerfaces.CeLAddress ([), porL))), pubsubPelper.SeLAurlbuLe ("Cn1lme", 8andomvarlablevalue (ConsLanLvarlable (1))), pubsubPelper.SeLAurlbuLe ("C1lme", 8andomvarlablevalue (ConsLanLvarlable (0))), pubsubPelper.SeLAurlbuLe ("Local", Addressvalue (lnLerfaces.CeLAddress (cllenLnode))), pubsubPelper.SeLAurlbuLe ("uaLa8aLe", uaLa8aLevalue (uaLa8aLe (raLe))), pubsubPelper.SeLAurlbuLe ("ackeLSlze", ulnLegervalue (packeLSlze)),
Nicholas Loulloudes (V-Sense Project) 26 C8k App||canon (cont.) // Lach packeL send from Lhe C88 daLa generaLor should lnclude Lhe // geographlc posluon of Lhe respecuve 8Su vecLor [osluon = nodeLlsL::CetNoJe (j)->CetObject<MobllltyMoJel> ()->Cetlosluoo (), pubsubPelper.SeLAurlbuLe ("uesLosluon", vecLorvalue ([osluon)),
// SLarL Lhe C88 only aer Lhe node enLers Lhe slmulauon, Lherefore // geL Lhe acuvlLy lnformauon. Lr<nodeAcuvlLy1able> na = nodeLlsL::CetNoJe (clleotNoJe)->CetObject<NoJeAcuvlty1oble> (), nodeAcuvlLyLnLry ne,