在ONE使用External Contact Trace
以Dieselnet数据为例,使用toolkit目录下的转换脚本将其转换成ONE能够识别的格式。以下为示例配置文件:
1 Scenario.name = diesel_net
2 Scenario.simulateConnections = false
3
4 #Group settings
5 Scenario.nrofHostGroups = 1
6 Group.nrofHosts = 23
7 Group.nodeLocation = 10,10
8
9 Group.movementModel = StationaryMovement
10 Group.nodeLocation = 100,100
11 Group.bufferSize = 150M
12
13
14 Events.nrof = 2
15 Events1.class = ExternalEventsQueue
16 Events1.filePath = traces/2007-10-23-one.txt
17
18 ## Message creation parameters
19 # Class of the event generator, it's required or no message will be created!
20 Events2.class = MessageEventGenerator
21 # (following settings are specific for the MessageEventGenerator class)
22 # Creation interval in seconds (one new message every 25 to 35 seconds)
23 Events2.interval = 25,35
24 # Message sizes (50kB - 150kB)
25 Events2.size = 500k, 1M
26 # range of message source/destination addresses
27 Events2.hosts = 0,23
28 # Message ID prefix
29 Events2.prefix = M
2 Scenario.simulateConnections = false
3
4 #Group settings
5 Scenario.nrofHostGroups = 1
6 Group.nrofHosts = 23
7 Group.nodeLocation = 10,10
8
9 Group.movementModel = StationaryMovement
10 Group.nodeLocation = 100,100
11 Group.bufferSize = 150M
12
13
14 Events.nrof = 2
15 Events1.class = ExternalEventsQueue
16 Events1.filePath = traces/2007-10-23-one.txt
17
18 ## Message creation parameters
19 # Class of the event generator, it's required or no message will be created!
20 Events2.class = MessageEventGenerator
21 # (following settings are specific for the MessageEventGenerator class)
22 # Creation interval in seconds (one new message every 25 to 35 seconds)
23 Events2.interval = 25,35
24 # Message sizes (50kB - 150kB)
25 Events2.size = 500k, 1M
26 # range of message source/destination addresses
27 Events2.hosts = 0,23
28 # Message ID prefix
29 Events2.prefix = M
后记:该配置下(default_settings & diesel_settings, Epidemic Routing)的消息成功递交率仅为:
5M:0.0349
150M:0.2613
1000M:0.3194
可能的原因: 1,网络过于稀疏导致contact graph不连通; 2,节点移动速度缓慢或者移动的节点过少,导致消息不能在RTTL内完成传输。