i ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND WAIT DI JARINGAN OPPORTUNISTIC SKRIPSI Diajukan Untuk Memenuhi Salah Satu Syarat Memperoleh Gelar Sarjana Komputer Program Studi Teknik Informatika oleh : Maria Irmgrad Ratu 125314027 PROGRAM STUDI TEKNIK INFORMATIKA JURUSAN TEKNIK INFORMATIKA FAKULTAS SAINS DAN TEKNOLOGI UNIVERSITAS SANATA DHARMA YOGYAKARTA 2016 PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
128
Embed
ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND … · addition of the Time-To-Live (TTL), increase number of copy message (L Copy), ... Penulis menyadari masih banyak kekurangan
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
i
ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND WAIT
DI JARINGAN OPPORTUNISTIC
SKRIPSI
Diajukan Untuk Memenuhi Salah Satu Syarat Memperoleh Gelar
Sarjana Komputer Program Studi Teknik Informatika
oleh :
Maria Irmgrad Ratu
125314027
PROGRAM STUDI TEKNIK INFORMATIKA
JURUSAN TEKNIK INFORMATIKA
FAKULTAS SAINS DAN TEKNOLOGI
UNIVERSITAS SANATA DHARMA
YOGYAKARTA
2016
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
ii
PERFORMANCE ANALYSIS OF THE ROUTING PROTOCOL SPRAY
AND WAIT IN OPPORTUNISTIC NETWORKS
A THESIS
Presented as Partial Fulfillment of Requirements to Obtain Sarjana
Komputer Degree in Informatics Engineering Department
By:
Maria Irmgrad Ratu
125314027
INFORMATICS ENGINEERING STUDY PROGRAM
INFORMATICS ENGINEERING DEPARTMENT
FACULTY OF SCIENCE AND TECHNOLOGY
SANATA DHARMA UNIVERSITY
YOGYAKARTA
2016
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
iii
SKRIPSI
ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND WAIT
DI JARINGAN OPPORTUNISTIC
Oleh
Maria Irmgrad Ratu
125314027
Telah disetujui oleh:
Pembimbing,
Bambang Soelistijanto, S.T., M.Sc., Ph.D Tanggal, 19 September 2016
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
iv
SKRIPSI
ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND WAIT
DI JARINGAN OPPORTUNISTIC
Dipersiapkan dan ditulis oleh:
MARIA IRMGRAD RATU
NIM: 125314027
Telah dipertahankan di depan panitia penguji
Pada tanggal, 26 Agustus 2016
dan dinyatakan memenuhi syarat
Yogyakarta, Agustus 2016
Yogyakarta, 19 September 2016
Fakultas Sains dan Teknologi
Universitas Sanata Dharma
Dekan
Sudi Mungkasi, S.Si., M.Math.Sc., Ph.D.
Susunan Panitia Penguji
Nama Lengkap Tanda Tangan
Ketua : Puspaningtyas Sanjoyo Adi, S.T., M.T. ……………….
Sekretaris : Henricus Agung Hernawan, S.T., M.Kom. ……………….
Anggota : Bambang Soelistijanto, S.T., M.Sc., Ph.D. ……………….
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
v
MOTTO
“If God answers your prayer, He is increasing your faith. If He delays, He is
increasing your patience. If He does not answer your prayer, He is preparing the
best for you.”
St. Theresa
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
vi
PERNYATAAN LEMBAR KEASLIAN KARYA
Saya menyatakan dengan sesungguhnya bahwa di dalam skripsi yang saya
tulis ini tidak memuat karya atau bagian karya orang lain, kecuali yang telah
disebutkan dalam kutipan dan daftar pustaka, sebagaimana layaknya karya ilmiah.
Yogyakarta, 25 Agustus 2016
Penulis
Maria Irmgrad Ratu
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
vii
LEMBAR PERSETUJUAN PUBLIKASI KARYA ILMIAH UNTUK
KEPENTINGAN AKADEMIS
Yang bertanda tangan di bawah ini, saya mahasiswa Universitas Sanata Dharma:
Nama : Maria Irmgrad Ratu
NIM : 125314027
Demi pengembangan ilmu pengetahuan, saya memberikan kepada Perpustakaan
Universitas Sanata Dharma karya ilmiah yang berjudul:
ANALISIS UNJUK KERJA ROUTING PROTOKOL SPRAY AND WAIT
DI JARINGAN OPPORTUNISTIC
Beserta perangkat yang diperlukan (bila ada). Dengan demikian saya memberikan
kepada Perpustakaan Universitas Sanata Dharma hak untuk menyimpan,
mengalihkan dalam bentuk media lain, mengelolahnya dalam bentuk pangkalan
data, mendistribusikan secara terbatas, dan mempublikasikannya di Internet atau
media lain untuk kepentingan akademis tanpa perlu meminta ijin dari saya
maupun memberikan royalty kepada saya selama tetap mencatumkan nama saya
sebagai penulis.
Demikian pernyataan ini saya buat dengan sebenarnya.
Yogyakarta, 25 Agustus 2016
Penulis
Maria Irmgrad Ratu
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
viii
ABSTRAK
Opportunistic Network (OppNet) merupakan jaringan wireless yang tidak
membutuhkan infrastruktur dalam pembentukannya. Pada Opportunistic Network
tidak menjamin adanya jalur antara source dan destination setiap saat dikarenakan
node selalu bergerak dan terus berpindah (mobile).
Pada penelitian ini penulis melakukan pengujian terhadap Routing Protokol
Epidemc dan Routing Protokol Spray And Wait dengan menggunakan
ONEsimulator. Parameter yang digunakan adalah Delivery Probability, Overhead
Ratio, Average Latency, Buffer Occupancy, dan Messages Drop. Skenario yang
digunakan pada setiap pengujian adalah luas area yang tetap dengan penambahan
jumlah node, penambahan ukuran buffer, penambahan Time-To-Live (TTL),
penambahan jumlah copy message (L Copy), dan penambahan jumlah node dan
jumlah copy (30%).
Pengujian menunjukkan Protokol Routing Epidemic mengalami peningkatan
pada Delivery Probability dan Average Latency yang baik, hal itu dikarenakan
Epidemic selalu memberikan copy message setiap kali bertemu dengan relay node
tanpa mempedulikan resources. Sedangkan Protokol Routing Spray and Wait
bagus pada Overhead Ratio, hal itu dikarenakan Spray and Wait membatasi
jumlah copy message yang diberikan kepada relay node untuk mengurangi cost
pada Routing Epidemic. Tetapi Latency pada Spray and Wait menjadi sangat
tinggi dibandingkan dengan Epidemic, hal itu dikarenakan Spray And Wait
membatasi jumlah copy dan ada fase Wait.
Kata Kunci: Opportunistic Network, Epidemic, Spray and Wait, Delivery
Probability, Overhead Ratio, Average Latency,Buffer Occupancy, Drop.
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
ix
ABSTRACT
Opportunistic Network (OppNet) is a wireless network that does not need
any infrastructure in the formation. Opportunistic Network can not guarantee a
path between the source and the destination because the node always and keep
moving (mobile).
In this research, the researcher tested the Epidemic Routing Protocols and
Spray And Wait Routing Protocol using ONEsimulator. The parameters used are
Delivery Probability, Overhead Ratio, Average Latency, Buffer Occupancy, and
Number of Drop Messages. The scenarios used in each test is the width of the
remain area with the increase number of nodes, increase of the buffer size, the
addition of the Time-To-Live (TTL), increase number of copy message (L Copy),
and the increase number of nodes and copies (30%).
Epidemic Routing Protocols Tests showed the good improvement of
Delivery Probability and Latency Average Probability, because Epidemic Routing
Protocol always provides copy messages whenever it met a relay node without
regarding the resources. While Spray and Wait Routing Protocols shows a good
result on the Overhead Ratio, because Spray and Wait limit the number of copy
message given to a relay node to reduce cost on the Epidemic Routing. However
the Latency on Spray and Wait become very high than the Epidemic, which is
caused by the Spray and Wait that limit the number of copies and the Wait phase
availability.
Keywords: Opportunistic Network, Epidemic, Spray and Wait, Delivery
Probability, Overhead Ratio, Average Latency, Buffer Occupancy, Messages
Drop.
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
x
KATA PENGANTAR
Puji dan syukur penulis panjatkan kepada Tuhan Yang Maha Esa,
sehingga penulis dapat menyelesaikan tugas akhir dengan judul “Analisis Unjuk
Kerja Routing Protokol Spray and Wait di Jaringan Opportunistic”. Tugas akhir
ini merupakan salah satu mata kuliah wajib dan sebagai syarat akademik untuk
memperoleh gelar sarjana komputer program studi Teknik Informatika
Universitas Santa Dharma Yogyakarta.
Pada kesempatan ini, penulis ingin mengucapkan terima kasih kepada
pihak-pihak yang telah membantu penulis baik selama penelitian maupun saat
mengerjakan tugas akhir ini. Uacapan terima kasih sebesar-besarnya penulis
sampaikan kepada:
1. Tuhan Yang Maha Esa, yang telah memberikan kesehatan jasmani dan
rohani dalam proses tugas akhir.
2. Orang tua, Bapak Daniel Ratu dan Ibu Karolina Martha Ratu-Bureni, K
Yuli, K Marlin, K Tris, Anton, Inna, K Erny, Sefrit dan Cindy, yang telah
memberikan dukungan baik spiritual maupun material.
3. Bambang Soelistijanto, S.T., M.Sc., Ph.D. selaku Dosen Pembimbing tugas
akhir, atas kesabaran dalam membimbing, memberikan semangat, waktu,
dukungan dan motivasi yang telah diberikan kepada penulis.
4. Puspaningtyas Sanjoyo Adi S.T., M.Kom. selaku dosen Pembimbing
Akademik, atas bimbingan, kritik dan saran yang telah diberikan kepada
penulis.
5. Dr. Anastasia Rita Widiarti, M.Kom. selaku Ketua Program Studi Teknik
Informatika, atas bimbingan, kritik dan saran yang telah diberikan kepada
penulis.
6. Sudi Mungkasi, S.Si., M.Math.Sc., Ph.D. selaku Dekan Fakultas Sains dan
Teknologi, atas bimbingan, kritik dan saran yang telah diberikan kepada
penulis.
7. Seluruh dosen Teknik Informatika atas ilmu yang telah diberikan semasa
kuliah dan semangat membantu penulis dalam mengerjakan tugas akhir.
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
xi
8. Mas Danang selaku laboran Laboratorium Jaringan Komputer Teknik
Informatika, atas bantuannya menyediakan tempat untuk mengerjakan tugas
Cham Heidelberg, New York Dordrecht London 2015. (L. Gao et al.,
Delay Tolerant Networks, SpingerBrief in Computer Science, DOI
10.1007/978-3-319-18108-0_1)
[6] Sanjeev.C, M., &Mukane.S.M.(2003). Impact Of Relay Nodes On
Performance Of DTN Using Spray And Wait Protocol. International
Journal of Electrical, Electronics and Data Communication, I(-9), 57-61.
[7] H.Huang, Zhang.Z, Zhou.W, “Spray And Wait Routing Based on Position
Prediction in Opportunistic Networks,” Department of Electrical
Engineering and Informartion Science, University of Science and
Technology of China. Hefei, China. ISBN: 978-1-61284-840-2, IEEE-
2011
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
80
[8] Patel.B., Dave.K., Pandya.V., “Spray And Wait Routing Protocol in Delay
Tolerant Network” International Journal of Enggineering Technology and
Advanced Engineering (IJETAE) ISSN: 225002459, ISO 9001:2008
Certified Journal, Vol.4 Issue 5, May 2004)
[9] Y.-C. Tseng, S.-Y NI, Y.-S. Chen, and J.-P. Sheu. The broadcast storm
problem in a mobile ad hoc network. Wirel. Net., 8(2/3):153-167, 2002.
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
81
LAMPIRAN
1. Default Setting
# # Default settings for the simulation # ## Scenario settings Scenario.name = default_scenario Scenario.simulateConnections = true Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 43200 ## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 10 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 10M highspeedInterface.transmitRange = 1000 # Define 6 different node groups Scenario.nrofHostGroups = 6 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all #for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = ShortestPathMapBasedMovement Group.router = EpidemicRouter Group.bufferSize = 5M Group.waitTime = 0, 120
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
82
# All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 0.5, 1.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = 300 Group.nrofHosts = 40 # group1 (pedestrians) specific settings Group1.groupID = p # group2 specific settings Group2.groupID = c # cars can drive only on roads Group2.okMaps = 1 # 10-50 km/h Group2.speed = 2.7, 13.9 # another group of pedestrians Group3.groupID = w # The Tram groups Group4.groupID = t Group4.bufferSize = 50M Group4.movementModel = MapRouteMovement Group4.routeFile = data/tram3.wkt Group4.routeType = 1 Group4.waitTime = 10, 30 Group4.speed = 7, 10 Group4.nrofHosts = 2 Group4.nrofInterfaces = 2 Group4.interface1 = btInterface Group4.interface2 = highspeedInterface Group5.groupID = t Group5.bufferSize = 50M Group5.movementModel = MapRouteMovement Group5.routeFile = data/tram4.wkt Group5.routeType = 2 Group5.waitTime = 10, 30 Group5.speed = 7, 10 Group5.nrofHosts = 2 Group6.groupID = t Group6.bufferSize = 50M Group6.movementModel = MapRouteMovement Group6.routeFile = data/tram10.wkt Group6.routeType = 2 Group6.waitTime = 10, 30 Group6.speed = 7, 10 Group6.nrofHosts = 2 ## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 25,35 # Message sizes (500kB - 1MB) Events1.size = 500k,1M # range of message source/destination addresses Events1.hosts = 0,125 # Message ID prefix Events1.prefix = M ## Movement model settings
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
83
# seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = 1 # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 3400 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 1 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) Report.reportDir = reports/ # Report classes to load Report.report1 = MessageStatsReport ## Default settings for some routers settings ProphetRouter.secondsInTimeUnit = 30 SprayAndWaitRouter.nrofCopies = 6 SprayAndWaitRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
2. Default Seeting Menggunakan Pergerakan Random Waypoint
a. Epidemic Router # # Default settings for the simulation # ## Scenario settings #Scenario.name = EpidemicRWPLTTL Scenario.name = EpidemicRWP_Buffer Scenario.simulateConnections = true
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
84
Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 259200 #3 hari ## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface #Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 10 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 10M highspeedInterface.transmitRange = 10 # Define 6 different node groups Scenario.nrofHostGroups = 1 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = RandomWaypoint Group.router = EpidemicRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
85
Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = [360; 720; 1080; 1440; 1880] Group.nrofHosts = 50 # group1 (pedestrians) specific settings Group1.groupID = RWP ## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600,3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,49 # Message ID prefix Events1.prefix = M Events1.hosts = 1, 1 Events1.tohosts = 24, 24 ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = [11; 3; 5; 7; 9] #MovementModel.rngSeed = 3 # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) #Report.reportDir= [reports/Node50TTL300Buffer20M070416/1; reports/Node50TTL300Buffer20M070416/2;
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
86
reports/Node50TTL300Buffer20M070416/3; reports/Node50TTL300Buffer20M070416/4; reports/Node50TTL300Buffer20M070416/5] Report.reportDir= [reports/Epidemic_RandomWaypoinTTL/360;reports/Epidemic_RandomWaypoinTTL/720;reports/Epidemic_RandomWaypoinTTL/1080;reports/Epidemic_RandomWaypoinTTL/1440;reports/Epidemic_RandomWaypoinTTL/1880] #Report.reportDir = reports/EpidemicRWPCoba # Report classes to load Report.report1 = MessageStatsReport Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings EpidemicRouter.secondsInTimeUnit = 30 #EpidemicRouter.nrofCopies = 250 #EpidemicRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.connectionAlg = 2 Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 10 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 10M highspeedInterface.transmitRange = 10 # Define 6 different node groups Scenario.nrofHostGroups = 1 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = RandomWaypoint Group.router = SprayAndWaitRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = 1440
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
88
Group.nrofHosts = 50 # group1 (pedestrians) specific settings Group1.groupID = p ## Message creation parameters # How many event generators Events.nrof = [1; 2; 3; 4; 5] # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600, 3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,125 # Message ID prefix Events1.prefix = M Events1.hosts = 1, 1 Events1.tohosts = 24, 24 ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = [423; 524; 653; 724; 857] # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) #Report.reportDir = reports/SprayandWaitRWPcoba Report.reportDir = [reports/SPWRWPNodeLCOPIES/5; reports/SPWRWPNodeLCOPIES/7; reports/SPWRWPNodeLCOPIES/9; reports/SPWRWPNodeLCOPIES/11; reports/SPWRWPNodeLCOPIES/13] # Report classes to load Report.report1 = MessageStatsReport
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
89
Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings SprayAndWaitRouter.secondsInTimeUnit = 30 SprayAndWaitRouter.nrofCopies = [5; 7; 9; 11; 13] SprayAndWaitRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
c. Direct Delivery Router # # Default settings for the simulation # ## Scenario settings Scenario.name = DirectDelivey Scenario.simulateConnections = true Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 432000 ## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
90
btInterface.transmitRange = 10 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 10M highspeedInterface.transmitRange = 1000 # Define 6 different node groups Scenario.nrofHostGroups = 1 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = RandomWaypoint Group.router = DirectDeliveryRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = 1440 Group.nrofHosts = 125 # group1 (pedestrians) specific settings Group1.groupID = p ## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
91
# (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600, 3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,125 Events1.hosts = 1, 1 Events1.tohosts = 24, 24 # Message ID prefix Events1.prefix = M ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = 4 # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) #Report.reportDir = [reports/DD/25;reports/DD/50;reports/DD/75;reports/DD/100;reports/DD/125] Report.reportDir = reports/DDRWP/125 # Report classes to load Report.report1 = MessageStatsReport Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings DirectDeliveryRouter.secondsInTimeUnit = 30 #DirectDeliveryRouter.nrofCopies = 5 #DirectDeliveryRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
92
## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
3. Default Setting Menggunakan Pergerakan Working Day
a. Epidemic Router
# # Default settings for the simulation # ## Scenario settings Scenario.name = EpidemicWorkingDayTTL Scenario.simulateConnections = true Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 259200 #3 hari ## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 100 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 20M highspeedInterface.transmitRange = 10 # Define 6 different node groups Scenario.nrofHostGroups = 1
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
93
## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = WorkingDayMovement Group.router = EpidemicRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = [360; 720; 1080; 1440; 1880] Group.nrofHosts = 50 #WORKING DAY Group.workDayLength = 28800 Group.nrOfOffices = 10 Group.officeSize = 100 Group.officeWaitTimeParetoCoeff = 0.5 Group.officeMinWaitTime = 10 Group.officeMaxWaitTime = 10000 Group.timeDiffSTD = 7200 Group.nrOfMeetingSpots = 5 Group.minGroupSize = 1 Group.maxGroupSize = 3 Group.probGoShoppingAfterWork = 0.5 Group.shoppingControlSystemNr = 2 Group.maxAfterShoppingStopTime = 200 Group.minAfterShoppingStopTime = 100 Group.ownCarProb = 1 Group.busControlSystemNr = 1 Group2.shoppingControlSystemNr = 1
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
94
Group2.meetingSpotsFile=data/HelsinkiMedium/A_meetingspots.wkt Group2.officeLocationsFile=data/HelsinkiMedium/A_offices.wkt Group2.homeLocationsFile=data/HelsinkiMedium/A_homes.wkt # group1 (pedestrians) specific settings Group1.groupID = p ## Message creation parameters # How many event generators Events.nrof = 1 # The source nodes -- nodes that create the messages # Lower bound is inclusive; upper bound is exclusive Events1.hosts = 1, 1 Events1.tohosts = 24, 24 # The destinations of the messages created # Lower bound is inclusive; upper bound is exclusive # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600, 3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,49 # Message ID prefix Events1.prefix = M ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = [11; 3; 5; 7; 9] # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting)
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
95
Report.reportDir = [reports/Epidemic_WDMTTL/360;reports/Epidemic_WDMTTL/720;reports/Epidemic_WDMTTL/1080;reports/Epidemic_WDMTTL/1440;reports/Epidemic_WDMTTL/1880] #Report.reportDir = reports/Epidemic_WDMBufferCoba # Report classes to load Report.report1 = MessageStatsReport Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings EpidemicRouter.secondsInTimeUnit = 30 #EpidemicRouter.nrofCopies = 250 #EpidemicRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
b. Spray And Wait Router
# # Default settings for the simulation # ## Scenario settings Scenario.name = SprayAndWaitWorkingDayLCOPIES Scenario.simulateConnections = true Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 259200 ## Interface-specific settings: # type : which interface class the interface belongs to
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
96
# For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 100 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 20M highspeedInterface.transmitRange = 10 # Define 6 different node groups Scenario.nrofHostGroups = 1 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups Group.movementModel = WorkingDayMovement Group.router = SprayAndWaitRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = 1440 Group.nrofHosts = 50
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
97
#WORKING DAY Group.busControlSystemNr = 5 Group.workDayLength = 28800 Group.nrOfOffices = 10 Group.officeSize = 100 Group.officeWaitTimeParetoCoeff = 0.5 Group.officeMinWaitTime = 10 Group.officeMaxWaitTime = 20 Group.timeDiffSTD = 7200 Group.nrOfMeetingSpots = 5 Group.minGroupSize = 1 Group.maxGroupSize = 3 Group.shoppingControlSystemNr = 2 Group.maxAfterShoppingStopTime = 200 Group.minAfterShoppingStopTime = 100 Group.ownCarProb = 1 Group.probGoShoppingAfterWork = 0.5 Group2.shoppingControlSystemNr = 1 Group2.meetingSpotsFile=data/HelsinkiMedium/A_meetingspots.wkt Group2.officeLocationsFile=data/HelsinkiMedium/A_offices.wkt Group2.homeLocationsFile=data/HelsinkiMedium/A_homes.wkt # group1 (pedestrians) specific settings Group1.groupID = p ## Message creation parameters # How many event generators Events.nrof = 3 #Events.nrof = 7 # The source nodes -- nodes that create the messages # Lower bound is inclusive; upper bound is exclusive Events1.hosts = 1, 1 Events1.tohosts = 24, 24 # The destinations of the messages created # Lower bound is inclusive; upper bound is exclusive # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600,3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,49 # Message ID prefix Events1.prefix = M ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = 95 # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000 # How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
98
MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) #Report.reportDir = [reports/SPWWorkingDayLCOPIES/5; reports/SPWWorkingDayLCOPIES/7; reports/SPWWorkingDayLCOPIES/9; reports/SPWWorkingDayLCOPIES/11; reports/SPWWorkingDayLCOPIES/13] #Report.reportDir= [reports/SPW_WDMBuffer/5;reports/SPW_WDMBuffer/10;reports/SPW_WDMBuffer/15;reports/SPW_WDMBuffer/20;reports/SPW_WDMBuffer/25] Report.reportDir = reports/SPW_WorkingDayLCOPIES/13 # Report classes to load Report.report1 = MessageStatsReport Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings SprayAndWaitRouter.secondsInTimeUnit = 30 SprayAndWaitRouter.nrofCopies = 13 SprayAndWaitRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
99
c. Direct Delivery
# # Default settings for the simulation # ## Scenario settings Scenario.name = DirectDelivey Scenario.simulateConnections = true Scenario.updateInterval = 0.1 # 43200s == 12h Scenario.endTime = 432000 ## Interface-specific settings: # type : which interface class the interface belongs to # For different types, the sub-parameters are interface-specific # For SimpleBroadcastInterface, the parameters are: # transmitSpeed : transmit speed of the interface (bytes per second) # transmitRange : range of the interface (meters) # "Bluetooth" interface for all nodes btInterface.type = SimpleBroadcastInterface # Transmit speed of 2 Mbps = 250kBps btInterface.transmitSpeed = 250k btInterface.transmitRange = 10 # High speed, long range, interface for group 4 highspeedInterface.type = SimpleBroadcastInterface highspeedInterface.transmitSpeed = 10M highspeedInterface.transmitRange = 1000 # Define 6 different node groups Scenario.nrofHostGroups = 1 ## Group-specific settings: # groupID : Group's identifier. Used as the prefix of host names # nrofHosts: number of hosts in the group # movementModel: movement model of the hosts (valid class name from movement package) # waitTime: minimum and maximum wait times (seconds) after reaching destination # speed: minimum and maximum speeds (m/s) when moving on a path # bufferSize: size of the message buffer (bytes) # router: router used to route messages (valid class name from routing package) # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...) # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite ## Group and movement model specific settings # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... ) # for ShortestPathMapBasedMovement # okMaps : which map nodes are OK for the group (map file indexes), default=all # for all MapBasedMovent models # routeFile: route's file path - for MapRouteMovement # routeType: route's type - for MapRouteMovement # Common settings for all groups
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
100
Group.movementModel = WorkingDayMovement Group.router = DirectDeliveryRouter Group.bufferSize = 10M Group.waitTime = 0, 300 # All nodes have the bluetooth interface Group.nrofInterfaces = 1 Group.interface1 = btInterface # Walking speeds Group.speed = 1.5 , 2.5 # Message TTL of 300 minutes (5 hours) Group.msgTtl = 1440 Group.nrofHosts = 125 # group1 (pedestrians) specific settings Group1.groupID = p #WORKING DAY Group.workDayLength = 28800 Group.nrOfOffices = 10 Group.officeSize = 100 Group.officeWaitTimeParetoCoeff = 0.5 Group.officeMinWaitTime = 10 Group.officeMaxWaitTime = 10000 Group.timeDiffSTD = 7200 Group.nrOfMeetingSpots = 5 Group.minGroupSize = 1 Group.maxGroupSize = 3 Group.probGoShoppingAfterWork = 0.5 Group.shoppingControlSystemNr = 2 Group.maxAfterShoppingStopTime = 200 Group.minAfterShoppingStopTime = 100 Group.ownCarProb = 1 Group.busControlSystemNr = 1 Group2.shoppingControlSystemNr = 1 Group2.meetingSpotsFile=data/HelsinkiMedium/A_meetingspots.wkt Group2.officeLocationsFile=data/HelsinkiMedium/A_offices.wkt Group2.homeLocationsFile=data/HelsinkiMedium/A_homes.wkt ## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator # (following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 3600, 3650 # Message sizes (500kB - 1MB) Events1.size = 10k # range of message source/destination addresses #Events1.hosts = 0,125 Events1.hosts = 1, 1 Events1.tohosts = 24, 24 # Message ID prefix Events1.prefix = M ## Movement model settings # seed for movement models' pseudo random number generator (default = 0) MovementModel.rngSeed = 6 # World's size for Movement Models without implicit size (width, height; meters) MovementModel.worldSize = 4500, 4000
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
101
# How long time to move hosts in the world before real simulation MovementModel.warmup = 1000 ## Map based movement -movement model specific settings MapBasedMovement.nrofMapFiles = 4 MapBasedMovement.mapFile1 = data/roads.wkt MapBasedMovement.mapFile2 = data/main_roads.wkt MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt MapBasedMovement.mapFile4 = data/shops.wkt ## Reports - all report names have to be valid report classes # how many reports to load Report.nrofReports = 7 # length of the warm up period (simulated seconds) Report.warmup = 0 # default directory of reports (can be overridden per Report with output setting) #Report.reportDir = [reports/DD_WDM/25;reports/DD_WDM/50;reports/DD_WDM/75;reports/DD_WDM/100;reports/DD_WDM/125] Report.reportDir = reports/DDWDM/125 # Report classes to load Report.report1 = MessageStatsReport Report.report2 = TrafficReport Report.report3 = BufferOccupancyReport Report.report4 = BufferVsTtlReport Report.report5 = BufferOverflowReport Report.report6 = BufferOccupancyReportA Report.report7 = BufferOccupancyArrayReport ## Default settings for some routers settings DirectDeliveryRouter.secondsInTimeUnit = 30 DirectDeliveryRouter.nrofCopies = 1 #DirectDeliveryRouter.binaryMode = true ## Optimization settings -- these affect the speed of the simulation ## see World class for details. Optimization.cellSizeMult = 5 Optimization.randomizeUpdateOrder = true ## GUI settings # GUI underlay image settings GUI.UnderlayImage.fileName = data/helsinki_underlay.png # Image offset in pixels (x, y) GUI.UnderlayImage.offset = 64, 20 # Scaling factor for the image GUI.UnderlayImage.scale = 4.75 # Image rotation (radians) GUI.UnderlayImage.rotate = -0.015 # how many events to show in the log panel (default = 30) GUI.EventLogPanel.nrofEvents = 100 # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details) #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$
4. Listing Program Epidemic * Copyright 2010 Aalto University, ComNet * Released under GPLv3. See LICENSE.txt for details.
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
102
*/ package routing; import core.Settings; /** * Epidemic message router with drop-oldest buffer and only single transferring * connections at a time. */ public class EpidemicRouter extends ActiveRouter { /** * Constructor. Creates a new message router based on the settings in * the given Settings object. * @param s The settings object */ public EpidemicRouter(Settings s) { super(s); System.setProperty("java.util.Arrays.useLegacyMergeSort", "true"); //TODO: read&use epidemic router specific settings (if any) } /** * Copy constructor. * @param r The router prototype where setting values are copied from */ protected EpidemicRouter(EpidemicRouter r) { super(r); //TODO: copy epidemic settings here (if any) } @Override public void update() { super.update(); if (isTransferring() || !canStartTransfer()) { return; // transferring, don't try other connections yet } // Try first the messages that can be delivered to final recipient if (exchangeDeliverableMessages() != null) { return; // started a transfer, don't try others (yet) } // then try any/all message to any/all connection this.tryAllMessagesToAllConnections(); } @Override public EpidemicRouter replicate() { return new EpidemicRouter(this); } }
5. Listing Program Spray And Wait /* * Copyright 2010 Aalto University, ComNet * Released under GPLv3. See LICENSE.txt for details. */ package routing; import java.util.ArrayList; import java.util.List; import core.Connection; import core.DTNHost; import core.Message; import core.Settings; /**
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
103
* Implementation of Spray and wait router as depicted in * <I>Spray and Wait: An Efficient Routing Scheme for Intermittently * Connected Mobile Networks</I> by Thrasyvoulos Spyropoulus et al. * */ public class SprayAndWaitRouter extends ActiveRouter { /** identifier for the initial number of copies setting ({@value})*/ public static final String NROF_COPIES = "nrofCopies"; /** identifier for the binary-mode setting ({@value})*/ public static final String BINARY_MODE = "binaryMode"; /** SprayAndWait router's settings name space ({@value})*/ public static final String SPRAYANDWAIT_NS= "SprayAndWaitRouter"; /** Message property key */ public static final String MSG_COUNT_PROPERTY= SPRAYANDWAIT_NS + "." +"copies"; protected int initialNrofCopies; protected boolean isBinary; public SprayAndWaitRouter(Settings s) { super(s); Settings snwSettings = new Settings(SPRAYANDWAIT_NS); initialNrofCopies = snwSettings.getInt(NROF_COPIES); isBinary = snwSettings.getBoolean( BINARY_MODE); } /** * Copy constructor. * @param r The router prototype where setting values are copied from */ protected SprayAndWaitRouter(SprayAndWaitRouter r) { super(r); this.initialNrofCopies = r.initialNrofCopies; this.isBinary = r.isBinary; } @Override public int receiveMessage(Message m, DTNHost from) { return super.receiveMessage(m, from); } @Override public Message messageTransferred(String id, DTNHost from) { Message msg = super.messageTransferred(id, from); IntegernrofCopies= (Integer)msg.getProperty(MSG_COUNT_PROPERTY); assert nrofCopies != null : "Not a SnW message: " + msg; if (isBinary) { /* in binary S'n'W the receiving node gets ceil(n/2) copies */ nrofCopies = (int)Math.ceil(nrofCopies/2.0); } else { /* in standard S'n'W the receiving node gets only single copy */ nrofCopies = 1; } msg.updateProperty(MSG_COUNT_PROPERTY,nrofCopies); return msg; } @Override public boolean createNewMessage(Message msg) { makeRoomForNewMessage(msg.getSize());
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
104
msg.setTtl(this.msgTtl); msg.addProperty(MSG_COUNT_PROPERTY,new Integer(initialNrofCopies)); addToMessages(msg, true); return true; } @Override public void update() { super.update(); if (!canStartTransfer() || isTransferring()) { return; // nothing to transfer or is currently transferring } /* try messages that could be delivered to final recipient */ if (exchangeDeliverableMessages() != null) { return; } /* create a list of SAWMessages that have copies left to distribute */ @SuppressWarnings(value = "unchecked") List<Message>copiesLeft= sortByQueueMode(getMessagesWithCopiesLeft()); if (copiesLeft.size() > 0) { /* try to send those messages */ this.tryMessagesToConnections(copiesLeft, getConnections()); } } /** * Creates and returns a list of messages this router is currently * carrying and still has copies left to distribute (nrof copies > 1). * @return A list of messages that have copies left */ protected List<Message> getMessagesWithCopiesLeft() { List<Message> list = new ArrayList<Message>(); for (Message m : getMessageCollection()) { Integer nrofCopies= (Integer)m.getProperty(MSG_COUNT_PROPERTY); assert nrofCopies != null : "SnW message " + m + " didn't have " + "nrof copies property!"; if (nrofCopies > 1) { list.add(m); } } return list; } /** * Called just before a transfer is finalized (by * {@link ActiveRouter#update()}). * Reduces the number of copies we have left for a message. * In binary Spray and Wait, sending host is left with floor(n/2) copies, * but in standard mode, nrof copies left is reduced by one. */ @Override protected void transferDone(Connection con) { Integer nrofCopies; String msgId = con.getMessage().getId(); /* get this router's copy of the message */ Message msg = getMessage(msgId); if (msg == null) { // message has been dropped from the buffer after..
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
105
return; // ..start of transfer -> no need to reduce amount of copies } /* reduce the amount of copies left */ nrofCopies = (Integer)msg.getProperty(MSG_COUNT_PROPERTY); if (isBinary) { nrofCopies /= 2; } else { nrofCopies--; } msg.updateProperty(MSG_COUNT_PROPERTY, nrofCopies); } @Override public SprayAndWaitRouter replicate() { return new SprayAndWaitRouter(this); } }
6. Listing Program Direct Delivery /* * Copyright 2010 Aalto University, ComNet * Released under GPLv3. See LICENSE.txt for details. */ package routing; import core.Settings; /** * Router that will deliver messages only to the final recipient. */ public class DirectDeliveryRouter extends ActiveRouter { public DirectDeliveryRouter(Settings s) { super(s); } protected DirectDeliveryRouter(DirectDeliveryRouter r) { super(r); } @Override public void update() { super.update(); if (isTransferring() || !canStartTransfer()) { return; // can't start a new transfer } // Try only the messages that can be delivered to final recipient if (exchangeDeliverableMessages() != null) { return; // started a transfer } } @Override public DirectDeliveryRouter replicate() { return new DirectDeliveryRouter(this); } }
7. Listing Program Average Buffer Occupancy package report; /** * Records the average buffer occupancy and its variance with format: * <p> * <Simulation time><average buffer occupancy % [0..100]><variance>
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
106
* </p> * */ import java.util.*; //import java.util.List; //import java.util.Map; import core.DTNHost; import core.Settings; import core.SimClock; import core.UpdateListener; public class BufferOccupancyReportA extends Report implements UpdateListener { /** * Record occupancy every nth second -setting id ({@value}). * Defines the interval how often (seconds) a new snapshot of buffer * occupancy is taken previous:5 */ public static final String BUFFER_REPORT_INTERVAL = "occupancyInterval"; /** Default value for the snapshot interval */ public static final int DEFAULT_BUFFER_REPORT_INTERVAL = 3600; private double lastRecord = Double.MIN_VALUE; private int interval; private Map<DTNHost, Double> bufferCounts = new HashMap<DTNHost, Double>(); private int updateCounter = 0; //new added public BufferOccupancyReportA() { super(); Settings settings = getSettings(); if (settings.contains(BUFFER_REPORT_INTERVAL)) { interval = settings.getInt(BUFFER_REPORT_INTERVAL); } else { interval = -1; /* not found; use default */ } if (interval < 0) { /* not found or invalid value -> use default */ interval = DEFAULT_BUFFER_REPORT_INTERVAL; } } public void updated(List<DTNHost> hosts) { if (isWarmup()) { return; } if (SimClock.getTime() - lastRecord >= interval) { lastRecord = SimClock.getTime(); printLine(hosts); updateCounter++; // new added } /** for (DTNHost ho : hosts ) { double temp = ho.getBufferOccupancy(); temp = (temp<=100.0)?(temp):(100.0); if (bufferCounts.containsKey(ho.getAddress())) bufferCounts.put(ho.getAddress(), (bufferCounts.get(ho.getAddress()+temp))/2); else bufferCounts.put(ho.getAddress(), temp); } } */ } /**
PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
107
* Prints a snapshot of the average buffer occupancy * @param hosts The list of hosts in the simulation */ private void printLine(List<DTNHost> hosts) { /** double bufferOccupancy = 0.0; double bo2 = 0.0; for (DTNHost h : hosts) { double tmp = h.getBufferOccupancy(); tmp = (tmp<=100.0)?(tmp):(100.0); bufferOccupancy += tmp; bo2 += (tmp*tmp)/100.0; } double E_X = bufferOccupancy / hosts.size(); double Var_X = bo2 / hosts.size() - (E_X*E_X)/100.0; String output = format(SimClock.getTime()) + " " + format(E_X) + " " + format(Var_X); write(output); */ for (DTNHost h : hosts ) { double temp = h.getBufferOccupancy(); temp = (temp<=100.0)?(temp):(100.0); if (bufferCounts.containsKey(h)){ //bufferCounts.put(h, (bufferCounts.get(h)+temp)/2); seems WRONG bufferCounts.put(h, bufferCounts.get(h)+temp); //write (""+ bufferCounts.get(h)); } else { bufferCounts.put(h, temp); //write (""+ bufferCounts.get(h)); } } } @Override public void done() { for (Map.Entry<DTNHost, Double> entry : bufferCounts.entrySet()) { DTNHost a = entry.getKey(); Integer b = a.getAddress(); Double avgBuffer = entry.getValue()/updateCounter; write("" + b + ' ' + avgBuffer); //write("" + b + ' ' + entry.getValue()); } super.done(); } }