本文列出The ONE仿真器有关contact time的Report,包含ContactTimesReportInterContactTimesReportTotalContactTimeReportContactsDuringAnICTReportContactsPerHourReport

1. ContactTimesReport

ContactTimesReport输出的结果是相遇时间的分布(contact time distribution, the count of connections that lasted for certain amount of time),举例如下:

time nrofContacts
0.0  0
1.0  1545
2.0  2712
3.0  3853
4.0  5232
5.0  6499
6.0  7912
7.0  9846
8.0  13021
9.0  18148
10.0 26595

例如,有6499个节点对(conections),相遇时间是5.0秒。值得注意的是,粒度granularity可以在设置文件设置,默认值为1秒。

//Defines how many simulated seconds are grouped in one reported interval. 
public static final String GRANULARITY = "granularity";
protected double granularity;  //How many seconds are grouped in one group

# 设置文件
ContactTimesReport.granularity = 1.0  # 默认值为1.0

1.1 InterContactTimesReport

InterContactTimesReport继承ContactTimesReport,输出的是inter-contact time distribution (the time between the end of previous contact and the beginning of a new contact between two hosts),通俗的说,节点对又过了多久才再次相遇。举例如下:

0.0  0
1.0  579
2.0  451
3.0  362
4.0  338
5.0  314
6.0  309
7.0  259
8.0  266
9.0  226
10.0 194

可见,有314节点对两次相遇间隔为5.0秒。

1.2 TotalContactTimeReport

TotalContactTimeReport继承ContactTimesReport,输出结果是total amount of contact times among hosts,举例如下:

# time totalContactTime
2.0000 35.0000
3.0000 71.0000
4.0000 106.0000
5.0000 141.0000
6.0000 174.0000
7.0000 206.0000
8.0000 240.0000

可见,在5.0秒时,节点之间的相遇时间总共为141.0,数值是累加得到的

2.ContactsDuringAnICTReport

InterContactTimesReport类似,不同的是,InterContactTimesReport统计的是节点对再次相遇的间隔,而ContactsDuringAnICTReport不一定非得要求是相同的节点。(不知道理解对了没)源代码注释如下:

/* 
* The number of contacts during an inter-contact time metric is similar to 
 * the inter-contact times metric, except that instead of measuring the time 
 * until a node meets again, we count the number of other nodes both of the 
 * nodes meet separately.  In contrast to the inter-contact times, the number 
 * of contacts during an inter-contact is not symmetric, i.e. during an 
 * inter-contact both nodes wait the exact same time but will meet a different 
 * number of nodes. 
*/

输出结果,举例如下:

0    4563
1    3498
2    3227
3    3313
4    3398
5    3706
6    3985
7    4548
8    4883
9    5277
10   5516

3. ContactsPerHourReport

ContactsPerHourReport输出的是每个小时,有多少节点对相遇(counts the number of contacts each hour),举例如下:

0    14454
1    14648
2    14449
3    14449
4    14722
5    14447
6    14334
7    14492
8    14553
9    14245
10   14447

可见,在第一个小时内,有14454次节点对相遇(connections)。

本文系Spark & Shine原创,转载需注明出处本文最近一次修改时间 2022-03-27 13:26

results matching ""

    No results matching ""