# A Cooja-Based Tool for Coverage and Lifetime Evaluation in an In-Building Sensor Network+
## 7 Related Work  
Currently in the literature, there does not exist a tool to manage and maintain coverage in a deployed sensor network. However, in this section, we try to review publications that relate to maintenance efficiency in wireless sensor networks. Wireless sensor networks are prone to node failures, for instance caused by battery depletion, damaged hardware and buggy software. To be able to maintain efficient operations and to prolong the lifetime of the network, a sensor network should be resilient to these dynamics and able to automatically reconfigure itself. In some applications, physical node access costs are assumed to be dominant over _in situ_ costs during WSN maintenance. This means the maintenance cost for replacing one sensor (or its batteries) will be approximately the same as the maintenance cost for replacing all sensors in a region. In this case, one may try to balance the energy consumption of the whole network, so as to extend the time intervals between replacement of one or more nodes/batteries in the field. [PERSON] _et al._[27] modify the Greedy Perimeter Stateless Routing (GPSR) protocol for these purposes. In the modification of GPSR, a message is not necessarily forwarded to a neighbour that is the closest one to the destination. Instead, the message is randomly delivered to any node closer to the destination. This scheme proves to achieve better maintenance efficiency, which depends on the number of messages sent. However, using this scheme, messages travel longer paths, which result in increased latency. A failed node can create coverage and connectivity holes in a sensor network. In order to maintain network effectiveness, failed nodes should be replaced. There are three policies for failed  
Figure 16: Increased lifetime for TMON and CIT-1 deployments using real energy storage in AA batteries. node replacement by repairing network holes created by failed nodes [28]. The first policy is the directed furthest node first (DFNF), where an active node repairs the hole using one of its deactivated neighbours that has the longest distance, but in the same direction to the hole. In the second policy, weighted directed furthest node first (WDFNF) selects replacements by considering both the distance and direction of a node. The third one is best fit node (BFN), where all active nodes adjacent to a coverage hole participate in the replacement procedure. These three policies need strong assumptions regarding the network properties: for the unit disk graph model, the transmission range is twice the sensing range, and nodes can measure distances and angles to other nodes. It has been shown that DFNF and WDFNF can achieve similar lifetime to BFN when the network is extremely dense. Extremely dense here means an active node has around 20 inactive neighbours, which is not realistic in a real deployment. Under the condition that the communication range \(\geq\) 2 \(\times\) the sensing range, a sensor network only needs to be configured to guarantee coverage in order to satisfy both \(k\)-covered and \(k\)-connected network, where \(k\geq\) 1 [29]. A decentralised algorithm called the Coverage Configuration Protocol (CCP) has been proposed to evaluate a node's eligibility to become active if one of the intersection points of its neighbours' sensing circles are not \(k\)-covered. This algorithm requires the information about locations of all sensing neighbours, which are gathered using beacons (_i.e._, HELLO messages) received from the neighbours. When the ratio of the communication range to the sensing range \(<\)2, CCP guarantees \(k\)-coverage, but nodes might not communicate with each other. In this case, Span [18] can be utilised. Span is a decentralised algorithm to activate extra nodes for one-connectivity. With Span, a node decides to become active if two of its neighbours cannot reach each other either directly or via one or two active nodes. An in-field maintenance framework for VigilNet has been proposed [30]. VigilNet is a surveillance application.