# 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


//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


## 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


# 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


### 4 thoughts on “The ONE使用笔记：有关contact time的Report”

• Sunday July 8th, 2018 at 08:13 AM

您好，我想请问一下每个节点与其他节点的连接时间怎么怎么获取呢？