JSQE: Joint Surveillance Quality and Energy Conservation for Barrier Coverage in WSNs

Barrier coverage is a fundamental issue in wireless sensor networks (WSNs). Most existing works have developed centralized algorithms and applied the Boolean Sensing Model (BSM). However, the critical characteristics of sensors and environmental conditions have been neglected, which leads to the problem that the developed mechanisms are not practical, and their performance shows a large difference in real applications. On the other hand, the centralized algorithms also lack scalability and flexibility when the topologies of WSNs are dynamically changed. Based on the Elfes Sensing Model (ESM), this paper proposes a distributed Joint Surveillance Quality and Energy Conservation mechanism (JSQE), which aims to satisfy the requirements of the desired surveillance quality and minimize the number of working sensors. The proposed JSQE first evaluates the sensing probability of each sensor and identifies the location of the weakest surveillance quality. Then, the JSQE further schedules the sensor with the maximum contribution to the bottleneck location to improve the overall surveillance quality. Extensive experiment results show that our proposed JSQE outperforms the existing studies in terms of surveillance quality, the number of working sensors, and the efficiency and fairness of surveillance quality. In particular, the JSQE improves the surveillance quality by 15% and reduces the number of awake sensors by 22% compared with the relevant TOBA.


Introduction
Wireless sensor networks (WSNs) consist of many sensor nodes, which are capable of sensing and processing data in a monitoring region.Sensor nodes can communicate with one another through data exchange in a wireless manner.WSNs have been widely applied in many applications, such as health monitoring, agriculture, and environmental monitoring [1][2][3][4].
Network coverage is known as one of the most important issues in wireless sensor networks.It can be divided into three categories [5][6][7][8][9]: target coverage, area coverage, and barrier coverage.Target coverage aims to detect some interesting targets using working sensors, while the area coverage concerns the monitoring coverage over a predefined region.In contrast to the target and area coverages, barrier coverage investigates intruder detections when crossing boundaries or interesting curves.The main purpose of barrier coverage is to form a defense barrier by organizing some working sensors to detect intruders crossing international boundaries, or detect the spread of forest fires around forests.It also has been widely applied to protect critical areas and important resources, including military bases and the alarm boundaries for visitors in certain zones.
In recent years, the surveillance quality for barrier coverage issues in WSNs has received a large amount of attention.Many studies have presented algorithms to form a defense barrier with k-barrier coverage [10] or strong barrier [11] capabilities, which guarantees monitoring quality so that every intrusion can be detected by sensors participating in the barrier.The sensing models applied in these studies can be mainly divided into two categories, namely the Boolean Sensing Model (BSM) [12][13][14][15][16] and the Elfes Sensing Model (ESM) [17][18][19][20][21][22].Studies applying the BSM assume that each sensor can detect the object falling in its sensing range.The probability of sensing can be expressed as a Boolean variable with a value of either true (one) or false (zero), depending on whether or not the event location is in the sensor's sensing range.The BSM model is simple, but it is not practical as it does not consider interference and other environmental conditions.However, the sensing range in the real application is not a perfect disc due to the physical characteristic of sensing hardware and the interferences.In general, the actual sensing range of a sensor is smaller than the considered perfect disc and hence introduces a coverage hole when a coverage algorithm applies the BSM as its sensing model.On the contrary, the ESM is different from the BSM.It assumes that the detection of a target within the sensing range is a probabilistic value, which depends on the distance between the sensor and the target.The ESM can estimate the sensing capability of each sensor with a higher accuracy.Hence, it can obtain higher surveillance quality.This paper applies the ESM to construct a defense barrier.
Some other studies have applied the ESM to cope with the coverage problem.Dong et al. [17] proposed a centralized mechanism, which applied solar-powered sensors with adjustable sensing radii to construct the defense barrier.Compared with the mechanism proposed in [17], this paper proposed a distributed mechanism JSQE, which has better scalability and flexibility.Xu. et al. [21] applied the ESM to cope with the target coverage problem, aiming to minimize the total energy cost while satisfying the requirements of both coverage and connectivity.However, the mechanism proposed in [21] is not suitable for barrier coverage, which is the investigated issue of this paper.Fan et al. [22] focused on providing a cost-efficient directional barrier construction method, which aimed to form barriers and prolong network service lifetime.However, the surveillance quality was not considered [22].In contrast to [22], this paper aims at constructing a barrier to guarantee the user-required surveillance quality.
Regarding the algorithm, plenty of existing studies of barrier coverage can be further divided into centralized [13,14,17] and distributed [15,16] approaches.The centralized mechanisms assume that the sink node is aware of the location of all sensors and executes an algorithm to determine the set of working sensors.To achieve this, the sink node needs to collect the reports from sensor nodes and makes a decision according to these reports.The big challenge of centralized approaches is that they increase communication overheads for obtaining the locations of all sensor nodes and then reporting the decision results to all sensors.These overheads consume more energy from sensors in advance.Another common challenge of centralized mechanisms is that they lack scalability, which is a key factor that should be considered in WSNs.To reduce the traffic overheads and energy consumption and improve the scalability of WSNs, some other studies have proposed distributed approaches, which allow each sensor to execute the monitoring work based on its local calculation.One big challenge of these algorithms is to make a decision without global information.In general, the surveillance quality increases with the number of working sensors.Therefore, another big challenge is to guarantee monitoring quality while reducing the number of working sensors to save energy.
This paper proposes a distributed Joint Surveillance Quality and Energy Conservation mechanism (JSQE), aiming to dynamically wake up the minimal number of working sensors to guarantee the required monitoring quality of the barrier boundary.In the proposed mechanism, the boundary curve is initially partitioned into several line segments to simplify the complexity of the investigated problem.Then, each sensor locally calculates its contribution to the monitoring quality.The sensor that has the largest contribution wakes up to join the monitoring work.The following presents the main contributions of this paper.
(1) Guaranteeing the predefined surveillance quality of the boundary barrier The proposed JSQE mechanism guarantees the surveillance quality of the boundary barrier.This is achieved by identifying and improving the weakest monitoring quality round by round.
(2) Lower number of working sensors In the proposed mechanism, the sensor that has the largest contribution to monitoring quality wakes up.This also implies that the number of working sensors can be reduced.Compared with existing works [15,17], the proposed mechanism wakes up lower numbers of working sensors.
(3) Scalability due to adopting the distributed approaches The operations designed in the proposed JSQE are totally distributed.Each sensor locally calculates the contribution of monitoring quality and makes a decision.Adopting the distributed approaches can reduce the overheads of maintaining networks, such as network flooding and centralized operations.As a result, the efficiency of the proposed algorithm can be guaranteed even as the network grows, improving the scalability of the WSNs.
(4) Realistic Compared with the existing studies [14-16] which apply BSM as the sensing model, this paper applies the ESM, which considers the physical characteristics of sensors and the interference of the external environment.Hence, the proposed JSQE mechanism is more realistic in the calculation of surveillance quality.
The remainder of this paper is organized as follows: Section 2 introduces the related work.Section 3 describes the network environment and problem formation.Section 4 details the proposed JSQE algorithm.Section 5 presents the simulation results, while Section 6 reviews the conclusions of this paper.

Related Work
This section presents the existing works related to the barrier coverage problem in WSNs.In the literature, plenty of studies have been developed for the construction of a defense barrier.These studies can be mainly classified into two categories: centralized and distributed approaches.

Centralized Approaches for Barrier Coverage
Chen. et al. [13] presented the concept of local barrier coverage, which can provide global barrier coverage in thin belt regions.They proposed a localized sleep-wake algorithm, aiming to prolong the network lifetime.Saipulla et al. [14] proposed a line-based sensor deployment strategy, which outperformed that of the Poisson point process in the monitoring region.Then, they further presented an efficient algorithm that adopts mobile sensors to fill gaps along the deployed line, aiming to improve barrier coverage.However, the long distance of movement leads to the energy consumption of the sensors.Dong et al. [17] introduced a centralized mechanism, aiming to improve the surveillance quality of a given boundary curve and to maintain the perpetual network lifetime.However, the centralized approaches [13,14,17] require the collection of messages from all sensors to the sink node, leading to low scalability and significant energy consumption.In addition, previous works [13,14] have designed centralized algorithms by applying the BSM model.However, the BSM model cannot accurately present physical characteristics, such as interference and other environmental conditions.

Distributed Approaches for Barrier Coverage
Weng et al. [15] first presented the Cover Adjacent Net (CA-Net) to simplify the problem of k-barrier coverage, aiming to reduce computational complexity.Based on the CA-Net, the distributed mechanism was presented to construct the maximum number of distinct k-barriers by using the minimum number of sensors.Xu et al. [16] proposed an efficient distributed algorithm that wakes up the minimal number of visual sensors to form a disjoint full-view barrier.The given region was first partitioned into a set of grids.Then, each visual sensor checked if its neighboring grids satisfied the full-view coverage.Finally, a locally weighted graph was formed by using the relationships among the girds meeting the full-view coverage.Based on the weighted graph, full-view barriers can be constructed.However, the above-mentioned existing works applied the BSM model, which cannot reflect the practical environment.This paper proposes a distributed mechanism, JSQE, by adopting the ESM model, which aims to maximize the weakest sensing quality of the barrier boundary while satisfying the user-defined monitoring quality with the minimum number of awake sensors.Table 1 simply compares these works with the proposed algorithm.

Network Environment and Problem
This section first introduces the network environment and assumptions in wireless sensor networks.Then, the sensor sensing model and the problem formulations are presented.

Network Environment
Assume that there is a barrier boundary L existing between the two countries.This boundary can also be the dividing line between dangerous and safe regions or between prohibited or open areas.Let L be a curve that can be modeled by function f (x) and can be contained in a minimal rectangle R. The left and right boundaries of R are denoted by W l and W r , respectively.A set of sensors, S = {s 1 , s 2 , s 3 , . . . . . . ,s n }, is randomly deployed in R. Let (x i , y i ) denote the location of sensor s i .Each sensor s i is assumed to have a unique ID and to be aware of its own location.All sensors are assumed to be clock synchronized.The sensing and communication radiuses are denoted by r s and r c , respectively, where r c = 2r s .Through the exchanges of beacons with one-hop neighbors, each sensor can collect the messages, including the IDs and locations of its neighbors.

Sensing Model
This section introduces the ESM (Elfes Sensing Model) of the given wireless sensor networks.The sensing range of each sensor can be divided into two regions, denoted by rs and rg s , respectively.As shown in Figure 1, the probability of sensing is 100% if the object falls in the region rg s .When the object falls in the region rs , the sensing probability decreases along with the increase in the distance between the sensor and the object.ˆs r and ˆg s r , respectively.As shown in Figure 1, the probability of sensing is 100% i object falls in the region ˆg s r .When the object falls in the region ˆs r , the sensing prob ity decreases along with the increase in the distance between the sensor and the obje    ( , ) ( -) ( -) The  and  are the path-loss exponents of the sensing signal strength, which adjusted by the different physical properties of sensors.In the case that point v sati the condition ( , )

Problem Formulation
Given a predefined monitoring quality ρ, the -guaranteed barrier coverage pro aims to construct a defense barrier by scheduling a minimal set of working sensors, w are denoted by Ŝ , such that any path crossing the boundary can be detected by the w ing sensors with a probability of at least ρ.In case the number of deployed sensors i enough to support the ρ-guaranteed barrier coverage, the set of working sensors sh guarantee that the monitoring quality of the barrier boundary can be maximized, w the number of sensors can be minimized.Let  Consider a point, v, in the region rs , and the coordinates of point v are (x v , y v ).Let p(s i , v) denote the sensing probability of point v detected by s i , and d(s i , v) denote the distance between sensor s i and point v.The following Equation (1) represents the relations between sensing probability p and distance d.
In Equation ( 1), the distance d(s i , v) can be obtained through the following computation.
The λ and γ are the path-loss exponents of the sensing signal strength, which are adjusted by the different physical properties of sensors.In the case that point v satisfies the condition r g s < d(s i , v) < r s , the detection probability p(s i , v) of point v decreases with the reduction in the value of d(s i , v).

Problem Formulation
Given a predefined monitoring quality ρ, the ρ-guaranteed barrier coverage problem aims to construct a defense barrier by scheduling a minimal set of working sensors, which are denoted by Ŝ, such that any path crossing the boundary can be detected by the working sensors with a probability of at least ρ.In case the number of deployed sensors is not enough to support the ρ-guaranteed barrier coverage, the set of working sensors should guarantee that the monitoring quality of the barrier boundary can be maximized, while the number of sensors can be minimized.Let h represent the number of sensors in Ŝ.The activation sensors Ŝ can be represented by Equation (3).
Figure 2 depicts the considered scenario.As shown in Figure 2, the sensing range of sensor ŝi covers the segment marked with red ink of the boundary curve.For any point, say v, it can be monitored by sensor ŝi : that is, any intruder that crosses point v from south to north can be detected by sensor ŝi using a probability.Let λ i,v denote the monitoring quality of point v contributed by sensor ŝi .Herein, we notice that the monitoring quality is a probability value as the probability sensing model is applied.Let the distance between sensor ŝi and point v be represented by d( ŝi , v).The following Equation (4) evaluates the value of λ i,v , by applying the sensing model proposed in Equation (1).
south to north can be detected by sensor ˆi s using a probability.Let , iv  denote the mon itoring quality of point v contributed by sensor ˆi s .Herein, we notice that the monitor ing quality is a probability value as the probability sensing model is applied.Let the dis tance between sensor ˆi s and point v be represented by ( , ) This paper aims to maximize the weakest sensing quality of the barrier boundary while satisfying the minimum number of sensors.Equation ( 6) formulates the major goa of this paper. Objective: When the major goal is achieved, the monitoring quality of the weakest segment ha been maximized.This means that the quality of barrier coverage cannot be further im proved even when a sensor wakes up.Therefore, the second goal is energy conservation which aims to minimize the number of sensors that wake up.Equation ( 7) reflects thi sub-goal: The goal is given in Equations ( 6) and (7), which should satisfy some constraints.The first is the working state constraint, which requires each sensor to remain in either a sensing or a sleeping state.
(1) Working State constraint: Let λ v denote the probability of point v monitored by sensors in S v .Let S v ⊂ S denote the set of sensors that can cover point v, and λ v denote the detection probabilities that the event of point v can be monitored by sensors in S v .The weakest monitoring quality of any point in L, denoted by λ, can be presented as This paper aims to maximize the weakest sensing quality of the barrier boundary while satisfying the minimum number of sensors.Equation ( 6) formulates the major goal of this paper.
Objective Min(ρ, maximize( λ)) When the major goal is achieved, the monitoring quality of the weakest segment has been maximized.This means that the quality of barrier coverage cannot be further improved even when a sensor wakes up.Therefore, the second goal is energy conservation, which aims to minimize the number of sensors that wake up.Equation ( 7) reflects this sub-goal: The goal is given in Equations ( 6) and (7), which should satisfy some constraints.The first is the working state constraint, which requires each sensor to remain in either a sensing or a sleeping state.
(1) Working State constraint: Let Boolean variables r sen i and r sl p i denote sensing and sleeping states, respectively.Equation ( 8) reflects this constraint.
(2) Sensor energy constraint: Let T denote the period of time required to monitor the barrier boundary.Recall that the time can be partitioned into several equal-length time units, denoted by t.Let e sec t denote the energy consumptions of any sensor staying in a sensing state for a time unit, t.Let e rem i denote the remaining energy of sensor s i .To ensure that the monitoring task can be executed over T, Equation (9) proposes that the battery energy of each sensor s i should be large enough to support the energy consumption.For any sensor,s i ∈ Ŝ, there exists at least one sensor, s j ∈ Ŝ, such that the following condition is satisfied.
Let s sen i denote the sensing range of the ith sensor in Ŝ. Equation (10) guarantees that there is no coverage hole existing in the constructed barrier.
(4) Boundary constraint: Equation (11) shows that the sensing range of the leftmost sensor, which is denoted by s sen le f tmost , should be overlapped with the left boundary of rectangle R (i.e.,W l ), and the sensing range of the rightmost sensor, denoted by s sen rightmost , should be overlapped with W r .The next section presents the proposed JSQE algorithm, which aims to achieve the goal given in Equations ( 6) and ( 7) while satisfying constraints Equations ( 8)- (11).

Joint Surveillance Quality and Energy Conservation (JSQE) Algorithm
The proposed JSQE is a distributed algorithm, which mainly consists of four phases: Boundary Curve Partitioning Phase, Basic Contribution Evaluation Phase, Collaborative Contribution Evaluation Phase, and Terminating Phase.In the Boundary Curve Partitioning Phase, a given barrier boundary,L, is partitioned into a set of equal-sized segments to simplify the barrier coverage problem.Each sensor in the Basic Contribution Evaluation Phase aims to independently calculate the monitoring quality of line segments it contributes.Based on the calculated contribution, the sensor determines its sleeping time.This can wake up the sensor with the largest contribution.Any sensor that stays in sleeping mode but learns that some neighbors have woken up should switch to the next phase, the Collaborative Contribution Evaluation Phase.The sensor staying in the Collaborative Contribution Evaluation Phase aims to calculate its contribution to the weakest segment.The calculation of the contribution should take into consideration the collaborative sensing of some common segments.The sensor that has the largest contribution to the weakest segment will be awake.
If any sensor that stays in sleeping mode determines that its contribution to the weakest segment is small enough, it should switch to the Terminating Phase.The sensor in the Terminating Phase does not participate in the monitoring task and stays in sleeping mode to save electricity.
The following presents the details of each phase of the proposed JSQE.

Boundary Curve Partitioning Phase
This section presents the details of the Boundary Curve Partitioning Phase.The main purpose of this phase is to partition the boundary curve into several equal-length line segments.To better present the details, the following provides some formal definitions.Assume that the boundary curve can be mapped to a geographic two-dimensional plan, and it can be modeled by function y = f (x), x 1 ≤ x ≤ x n , where x 1 and x n denote the x coordinates of the leftmost and rightmost points of the boundary curve, respectively.In general, the direction for partitioning the boundary is taken as the direction that is perpendicular to the boundary.Without the loss of generality, this paper simply assumes that the boundary is horizontal.To facilitate the evaluation of the monitoring contribution of each sensor, as shown in Figure 3, we partition the boundary curve into a set of equalsized n-line segments.Let L[x a : x b ] denote a sub-curve of the boundary curve, starting from x-coordinate x a and ending at x-coordinate x b .The boundary curve can be presented by set each sensor, as shown in Figure 3, we partition the boundary curve into a set of equ sized n-line segments.Let  For simplicity, we assume that each sensor can cover several complete line segmen Thus, the covered segment of sensor For simplicity, we assume that each sensor can cover several complete line segments.Thus, the covered segment of sensor s i is denoted by L cov i , as shown in Figure 4. Assume that the length of L cov i is k i .The covered segment of sensor s i can be represented as shown in Equation (12).
sented by set For simplicity, we assume that each sensor can cover several complete Thus, the covered segment of sensor

Basic Contribution Evaluation Phase
In this phase, each sensor independently calculates its contribution to monitoring quality.According to its own contribution, each sensor determines its waiting time.In order to wake up a minimal number of sensors to monitor the barrier boundary, the sensor with the largest contribution should wake up the earliest and then broadcast the join-monitoring message, which includes the ID and location of that sensor in a distributed manner.The following presents the detailed calculation of the contribution of each sensor.
Initially, all sensors stay in the sleeping state.Herein, we notice that each sensor s i ⊂ S is aware of its coordinates (x i , f (x i )).Consider any point v that lies in the segment Sensors 2022, 22, 4120 By applying the probabilistic model, as shown in Equation ( 1), the value of p(s i , v) can be calculated through Equation (14).
The total contribution of sensor s i , which is denoted by c i , for its covered segment, L cov i , can be evaluated by applying Equation (15).
As we aim to wake up as few sensors as possible, the policy design for waiting time is that the sensor with the largest contribution should wake up the earliest.Equation ( 16) depicts the calculation of the waiting time.
Figure 5 provides an example to show that sensor s 1 wakes up earlier than sensor s 2 .As shown in Figure 5, assume that the contribution of any sensor s 1 is c 1 .As the value of c 1 is larger than that of c 2 , the waiting time of sensor s 1 is shorter than that of sensor s 2 , according to Equation ( 16).When sensor s 1 finishes its waiting time, it wakes up and broadcasts the join-monitor message, which contains its ID = s 1 and physical location (x 1 , f (x 1 )) in a distributed manner.
Sensors 2022, 22, x FOR PEER REVIEW Upon receiving the join-monitor message from a neighbor, each sensor that its neighbor has been awake.The neighboring sensors should check w they should switch to the next phase.
The following presents the criteria for the switching phase.A sensor, to be a loser of sensor i s if it satisfies the following two conditions.Simil is said to be a winner if it joins the monitoring task.Phase switching criteria: (1) Sensor j s neighbors i s .
(2) The covered segments of i s and j s are overlapped, that is, the follow holds.Upon receiving the join-monitor message from a neighbor, each sensor learns the fact that its neighbor has been awake.The neighboring sensors should check whether or not they should switch to the next phase.
The following presents the criteria for the switching phase.A sensor, say s j , is said to be a loser of sensor s i if it satisfies the following two conditions.Similarly, sensor s i is said to be a winner if it joins the monitoring task.
Phase switching criteria: (1) Sensor s j neighbors s i .
(2) The covered segments of s i and s j are overlapped, that is, the following condition holds.
Each sensor that stays in sleeping state but hears the join-monitor message should further check if it satisfies the phase switching criteria.If this is the case, the sensor switches to the Collaborative Contribution Evaluation Phase.

Collaborative Contribution Evaluation Phase
The collaborative contribution evaluation phase will be initiated if the sensor receives the join-monitor message and satisfies the phase switching criteria.In this phase, each sensor should recalculate its contribution to its covered segment if it has an overlapped segment with some awake sensors.Recall the major goal of the considered barrier problem is to maximize the monitoring quality of the weakest point.Therefore, the contribution calculation only cares about monitoring contribution to the weakest point, rather than the monitoring contribution to the whole covered segment.The sensor that has the largest contribution to the weakest line segment should be awake and join the monitoring task.
Assume that sensor s i is awake and has joined the monitoring tasking.Assume that sensor s j is the loser due to receiving the join-monitoring message from s i .When sensor s j switches to the collaborative contribution evaluation phase, it should recalculate the contribution of the overlapped segment.Let the covered segment L cov j be classified into two types according to whether or not the segment is overlapped segment.As shown in Figure 6, let L nocovered j denote the no-covered segment marked with red ink by the sensor s j .
Similarly, let L overlapped j denote the overlapped segment that is commonly covered by the sensor s j and awake sensors.That is, we have  According to the ESM, the value of p nocovered m can be obtained by Equation (19).
Assume that S l q ⊂ S denotes the set of awake sensors that can cover line segment l q ∈ L overlapped j . It is obvious that s j / ∈ S l q .The calculation of the contribution of sensor s j to line segment l q should take into consideration collaborative monitoring.Let p overlapped q denote the probability that none of the awake sensors in S l q can monitor line segment l q .For simplicity, the leftmost point, say v q , of line segment l q , represents line segment l q , that is, the monitoring probability of v q presents the monitoring probability of segment l q .
We have Let p overlapped q denote the probability that any awake sensor in S l q can monitor line segment l q .According to Equation ( 20), the value of p overlapped q can be calculated as shown in Equation (21).
Equation ( 21) depicts the probability that any sensor in S l q can monitor line segment l q .However, we need to evaluate the monitoring probability contributed by sensor s j .Let Φ(I) denote the probability that any sensor in set I can monitor line segment l q .It is obvious that we have Equation ( 23) represents the increased probability contributed by the single sensor, s j , if sensor s j wakes up and cooperatively monitors line segment l q .
Given that the set of awake sensors is denoted by S l q , let l weakest j denote the line segment with the weakest monitoring probability and p weakest j denote its monitoring probability.We have As we aim to maximize the monitoring quality of the weakest line segment while reducing the number of awake sensors, the waiting times of sensors should be decreased alongside their contributions for the weakest line segment covered by s j .Let c j denote the contribution of the single sensor, s j , for the weakest line segment.The value of c j can be calculated as shown in Equation (25).
Thus, the waiting time of each sensor s j can be presented as Upon completing the waiting time, sensor s j takes part in the monitoring work and, therefore, plays the role of the winner.All the other sensors neighboring the winner, which still stay in a sleeping state, are losers of the s j .Each loser, say, s w , should recalculate its own contribution to the overlapped segment and then reset its waiting time accordingly.Each loser should repeatedly execute the Collaborative Contribution Evaluation Phase to maximize the monitoring quality.The loser will switch to the Terminating Phase until the following condition is satisfied.
where σ is the predefined contribution threshold, that is, the monitoring quality of the weakest line segment cannot be significantly improved, even though the loser wakes up to participate in the monitoring task.

Terminating Phase
Each sensor switches to the Terminating Phase and should stay in the sleeping state until some neighboring working sensors run out of energy.The sleeping sensor should switch to the Collaborative Contribution Evaluation Phase to check if it should participate in the monitoring work.
In this section, the JSQE algorithm, which consists of four phases, is proposed for maximizing the weakest sensing quality of the given barrier boundary while reducing the number of awake sensors.Each sensor performs the proposed JSQE and locally determines whether it should participate in the monitoring task, and plays the role of the working sensor.Finally, the set of working sensors is the output of the proposed JSQE algorithm.In the next subsection, the formal algorithm is presented.

The Proposed JSQE Algorithm
This subsection presents the JSQE algorithm to summarize the operations presented in the previous subsection.
The overall distributed JSQE algorithm is shown in Algorithm 1.Each step will be performed locally by sensor s i .In phase I, steps 1 and 2 evaluate the covered segment of sensor s i and the number of line segments covered by sensor s i .In phase II, steps 3 to 5 calculate the contribution of each sensor s i , then obtain the waiting time accordingly.Next, step 6 calls the Wait() procedure to reduce the waiting time in order to determine the role of sensor s i .Steps 7 to 9 check whether or not the loser s i has an overlapped segment with its neighbor working sensor.The calculation of the contribution of the overlapped segment should take into consideration collaborative sensing.In phase III, steps 10 to 15 evaluate the line segment with the weakest monitoring probability covered by sensor s i .Step 16 calculates its monitoring probability.Next, steps 17 and 19 calculate the contribution of the single sensor, s i , and its waiting time.Step 20 calls the Wait() procedure to determine the role of sensor s i .When sensor s i is a loser, steps 21 to 23 check if it satisfies the criteria to participate in the monitoring task.In phase IV, steps 24 to 27 express that the loser s i stays in a sleeping state until its neighbor working sensor runs out of energy.The loser s i then switches to phase III.Step 28 returns a set of all working sensors, Ŝbest , and finishes the JSQE executions.
The following describes the computing complexity of this algorithm.In phase I, the computing complexity of steps 1 and 2 is O(1).In phase II, each sensor evaluates its contribution and obtains the waiting time in steps 3 to 5. Thus, the computing complexity of steps 3 to 5 is O(1).In phase III, steps 10 to 13 evaluate the weakest line segment of the loser, s i , which is not an overlapped segment.The computing complexity is O(q).Step 14 further evaluates the collaborative probability of the neighbors of any awake sensor.As the number of neighbors is k, the computing complexity of this step is O(k).Steps 15 and 16 evaluate the weakest line segment and its monitoring quality.The computing complexity of steps 15 and 16 are O(q) and O(k), respectively.Steps 17 to 19 calculate the contribution of the loser, s i , for the weakest line segment and set up the waiting time.The computing complexity of steps 17 to 19 is O(1).In phase IV, the computing complexity of steps 24 to 27 is O(1).Therefore, the computing complexity of the JSQE algorithm is max(O(k), O(q)).

Algorithm 1. Joint Surveillance Quality and Energy Conservation (JSQE)
Inputs: A set of sensors, S = {s 1 , s 2 , . . . . . . s n }.Notation (x i , y i ) denotes the location of sensor s i .The boundary curve can be modeled by function y = f (x),

Simulation
This section presents the performance comparisons of the proposed JSQE against the existing top-down one-coverage barrier approach (TOBA) [15] and Boundary Surveillance mechanism with the adjustable sensing radius (BSAS) [17].Based on the developed CA-Net (Cover Adjacent Net), the TOBA mechanism forms a k-barrier by combining multiple 1-barriers with the purpose of minimal energy consumption and maximal lifetime.The Sensors 2022, 22, 4120 14 of 22 BSAS mechanism constructs the defense barriers with the sensor of the adjustable sensing radius, aiming to improve the surveillance quality of the barrier boundary and the utilization of sensors.The following first illustrates the simulation environment and then presents the simulation results.

Simulation Environment
The simulation parameters are given in Table 2. MATLAB is used as the simulation tool in the experimental study.The sensor nodes are randomly deployed in the 400 m × 40 m monitoring area, as shown in Figure 7.The number of sensors is varied, ranging from 400 to 800.Each node is aware of its own location.The communication radius is twice the size of the sensing radius, which is set to 10m.The user-required monitoring quality, denoted by Q req , is set to 0.3, 0.5, and 0.7.To further study the performance of the proposed JSQE mechanism, two different boundaries, namely, Small-boundary and Big-boundary, are considered, which are denoted by S-b and B-b, respectively.(1).In phase IV, the computing complexity of steps 24 to 27 is O(1).Therefore, the computing complexity of the JSQE algorithm is max(O(k), O(q)).

Simulation
This section presents the performance comparisons of the proposed JSQE against the existing top-down one-coverage barrier approach (TOBA) [15] and Boundary Surveillance mechanism with the adjustable sensing radius (BSAS) [17].Based on the developed CA-Net (Cover Adjacent Net), the TOBA mechanism forms a k-barrier by combining multiple 1-barriers with the purpose of minimal energy consumption and maximal lifetime.The BSAS mechanism constructs the defense barriers with the sensor of the adjustable sensing radius, aiming to improve the surveillance quality of the barrier boundary and the utilization of sensors.The following first illustrates the simulation environment and then presents the simulation results.

Simulation Environment
The simulation parameters are given in Table 2. MATLAB is used as the simulation tool in the experimental study.The sensor nodes are randomly deployed in the 400 m × 40 m monitoring area, as shown in Figure 7.The number of sensors is varied, ranging from 400 to 800.Each node is aware of its own location.The communication radius is twice the size of the sensing radius, which is set to 10m.The user-required monitoring quality, denoted by

Simulation Results
Figure 8 investigates the boundary surveillance quality under different numbers of deployed sensors and different required quality, Q req .As shown in Figure 8a, both the Small-boundary and Big-boundary are considered, and the surveillance quality of the proposed JSQE is measured.The performance of the Small-boundary is better than that of the Big-boundary in all cases.This occurs because the Small-boundary has a small amplitude, where the line segments are concentrated around the central barrier.As a result, the line segments can be easily covered by the deployed sensors, resulting in higher monitoring quality.Figure 9 compares the surveillance qualities of the eight randomly selected points when 500 sensors are randomly deployed in a monitoring region.Figure 9a shows the surveillance quality of the eight selected points on the Big-boundary by applying the proposed JSQE.It is observed that the surveillance qualities of all selected points are higher than the user-required value req Q .This implies that the proposed JSQE supports sufficient fairness of surveillance quality.This occurs because the selection policy of the JSQE mechanism selects the sensor with the largest contribution to cover the bottleneck segment, which can balance the surveillance quality of each line segment.Figure 9b further compares the surveillance qualities of the proposed JSQE and existing BSAS and TOBA by using different boundaries.The required quality req Q is set to Figure 8b further compares the surveillance qualities of JSQE, BSAS, and TOBA mechanisms by varying the number of sensors and the quality requirement, Q req .Three mechanisms have a similar trend in that the quality is increased with the increase in the number of deployed sensors and the required quality.This occurs because more sensors can participate in monitoring tasks when a large number of sensors are deployed.Furthermore, the proposed JSQE has a higher monitoring quality in the case of the lowdensity sensor deployment and high user-required quality Q req , as compared with the other two mechanisms.The reason for this is that the proposed JSQE adopts the ESM model, which can reflect the physical parameters.It selects the sensor with the maximal contribution to improve the surveillance quality of the bottlenecked line segments.
Figure 9 compares the surveillance qualities of the eight randomly selected points when 500 sensors are randomly deployed in a monitoring region.Figure 9a shows the surveillance quality of the eight selected points on the Big-boundary by applying the proposed JSQE.It is observed that the surveillance qualities of all selected points are higher than the user-required value Q req .This implies that the proposed JSQE supports sufficient fairness of surveillance quality.This occurs because the selection policy of the JSQE mechanism selects the sensor with the largest contribution to cover the bottleneck segment, which can balance the surveillance quality of each line segment.
Figure 9b further compares the surveillance qualities of the proposed JSQE and existing BSAS and TOBA by using different boundaries.The required quality req Q is set to 0.7, while the settings of other parameters are identical to those of Figure 9a.In comparison, the proposed JSQE mechanism outperforms BSAS and TOBA in terms of the monitoring quality for those randomly selected points.The reason for this is that the existing TOBA mechanism aims to construct the k-barrier with a minimal number of working sensors.This policy might lead to the imbalanced monitoring quality of each line segment, as the line segment with the minimal quality might not be covered by the working sensors.In addition, the BSAS mechanism is a centralized approach, which consumes more energy to control overheads.Therefore, a lower amount of remaining energy results in lower surveillance quality, as compared with the proposed JSQE.   Figure 9b further compares the surveillance qualities of the proposed JSQE and existing BSAS and TOBA by using different boundaries.The required quality Q req is set to 0.7, while the settings of other parameters are identical to those of Figure 9a.In comparison, the proposed JSQE mechanism outperforms BSAS and TOBA in terms of the monitoring quality for those randomly selected points.The reason for this is that the existing TOBA mechanism aims to construct the k-barrier with a minimal number of working sensors.This policy might lead to the imbalanced monitoring quality of each line segment, as the line segment with the minimal quality might not be covered by the working sensors.In addition, the BSAS mechanism is a centralized approach, which consumes more energy to control overheads.Therefore, a lower amount of remaining energy results in lower surveillance quality, as compared with the proposed JSQE.
Figure 10 compares the number of working sensors by applying the three mechanisms in the Small-boundary scenario.The number of deployed sensors ranges from 400 to 800.As shown in Figure 10, three mechanisms have a similar trend in that the number of working sensors is increased with the increase in the number of deployed sensors.This occurs because a large number of deployed sensors can provide more opportunities to find the appropriate sensors, which contribute better monitoring quality to satisfy the user-required quality Q req .As shown in Figure 10a, in the case that the required quality Q req is equal to 0.3, three mechanisms have small differences in terms of the number of working sensors.This is because all three mechanisms have a similar trend in that fewer sensors can achieve the requirements of surveillance quality.Figure 10b shows that the proposed JSQE mechanism has better performance than BSAS and TOBA, especially in the scenario in which there is a high density of sensor nodes.This occurs because the proposed JSQE mechanism can exactly estimate the surveillance quality by applying the ESM.In addition, the JSQE selects more sensors with the largest contribution, such that the segment with the weakest surveillance quality can be significantly improved.For example, when the weakest surveillance quality is below quality Q req = 0.7, the JSQE mechanism only needs to wake up a few sensors to improve the weakest surveillance quality.On the contrary, the existing TOBA mechanism wakes up more sensors to construct the barrier, aiming to form the continuous cover set.The BSAS mechanism first schedules sensors with the farthest distance to the boundary barrier, aiming to improve the utilization of sensors.This results in a larger number of working sensors, as compared with the proposed JSQE.Assume that all sensors have the same total energy.As the working sensors run out of energy, we add 100 sensors over a fixed period.As shown in Figure 11, the three mechanisms have a similar trend in that the energy consumption increases is increased with Assume that all sensors have the same total energy.As the working sensors run out of energy, we add 100 sensors over a fixed period.As shown in Figure 11, the three mechanisms have a similar trend in that the energy consumption increases is increased with the number of sensor nodes.The reason for this is that adding sensors allows for the energy consumption needed to construct the new barriers.The total energy consumption of the JSQE is lower than that of the other two mechanisms.This is because the JSQE schedules a smaller number of working sensors but satisfies the user-defined surveillance quality.Figure 12 compares the flexibilities of the JSQE, BSAS, and TOBA algorithms.The flexibility of an algorithm is observed by measuring the control overheads and the increment of coverage contribution when the number of deployed sensors is increased.In the experiment, fifty sensors are added every fixed period of time.The number of sensors is varied, ranging from 400 to 700.As shown in Figure 12, the proposed JSQE outperforms the BSAS in terms of control overheads.The reason for this is that the BSAS algorithm adopts a centralized approach, which increases significant control overheads for communication when 50 additional sensors are deployed.Meanwhile, the proposed JSQE has better performance than the TOBA in terms of the coverage contribution.By applying the JSQE, the newly scheduled sensors can accurately calculate their contributions and improve the weakest surveillance quality.However, the TOBA can increase its coverage only when the number of increased sensors is larger than a certain number.Thus, the JSQE is better than the BSAS and TOBA in terms of the scalability of the WSNs.   Figure 12 compares the flexibilities of the JSQE, BSAS, and TOBA algorithms.The flexibility of an algorithm is observed by measuring the control overheads and the increment of coverage contribution when the number of deployed sensors is increased.In the experiment, fifty sensors are added every fixed period of time.The number of sensors is varied, ranging from 400 to 700.As shown in Figure 12, the proposed JSQE outperforms the BSAS in terms of control overheads.The reason for this is that the BSAS algorithm adopts a centralized approach, which increases significant control overheads for communication when 50 additional sensors are deployed.Meanwhile, the proposed JSQE has better performance than the TOBA in terms of the coverage contribution.By applying the JSQE, the newly scheduled sensors can accurately calculate their contributions and improve the weakest surveillance quality.However, the TOBA can increase its coverage only when the number of increased sensors is larger than a certain number.Thus, the JSQE is better than the BSAS and TOBA in terms of the scalability of the WSNs. Figure 12 compares the flexibilities of the JSQE, BSAS, and TOBA algorithms.The flexibility of an algorithm is observed by measuring the control overheads and the increment of coverage contribution when the number of deployed sensors is increased.In the experiment, fifty sensors are added every fixed period of time.The number of sensors is varied, ranging from 400 to 700.As shown in Figure 12, the proposed JSQE outperforms the BSAS in terms of control overheads.The reason for this is that the BSAS algorithm adopts a centralized approach, which increases significant control overheads for communication when 50 additional sensors are deployed.Meanwhile, the proposed JSQE has better performance than the TOBA in terms of the coverage contribution.By applying the JSQE, the newly scheduled sensors can accurately calculate their contributions and improve the weakest surveillance quality.However, the TOBA can increase its coverage only when the number of increased sensors is larger than a certain number.Thus, the JSQE is better than the BSAS and TOBA in terms of the scalability of the WSNs.   Figure 13 further examines the efficiency index, which considers two parameters, namely, the weakest surveillance quality and the number of working sensors.Let N num denote the total number of working sensors and P weakest denote the weakest monitoring quality of the barrier boundary.The monitoring efficiency, denoted by M e f f iciency , is defined as shown in Equation (28).
A high-efficiency index indicates that the mechanism can obtain better monitoring quality by using fewer working sensors.In Figure 13, the monitoring efficiency is examined for the three required qualities req Q in two scenarios, where the number of deployed sensors is varied, ranging from 400 to 800.As shown in Figure 13, the monitoring efficiency at req Q = 0.7 is better than that of the other two required qualities, in the case that the number of sensors is larger than 500.This occurs because more appropriate sensors with better contributions can be selected in the case of a large number of sensors.Comparing Figure 13a,b, the performance in the Small-boundary scenario is better than that in the Big-boundary scenario in all cases.This occurs because the Big-boundary has a large amplitude, leading to the segments being widely distributed.Hence, the segments of the barrier cannot be easily covered by the sensors.A high-efficiency index indicates that the mechanism can obtain better monitoring quality by using fewer working sensors.In Figure 13, the monitoring efficiency is examined for the three required qualities Q req in two scenarios, where the number of deployed sensors is varied, ranging from 400 to 800.As shown in Figure 13, the monitoring efficiency at Q req = 0.7 is better than that of the other two required qualities, in the case that the number of sensors is larger than 500.This occurs because more appropriate sensors with better contributions can be selected in the case of a large number of sensors.Comparing Figure 13a,b, the performance in the Small-boundary scenario is better than that in the Big-boundary scenario in all cases.This occurs because the Big-boundary has a large amplitude, leading to the segments being widely distributed.Hence, the segments of the barrier cannot be easily covered by the sensors.In comparison, the proposed JSQE outperforms the other two mechanisms in terms of the fairness index.The key reason for this is that the TOBA does not consider the lowest monitoring quality, which impacts its fairness.The BSAS aims to maximize the utilization of sensor energy.This policy leads to low fairness when the deployed sensors are not balanced.The proposed JSQE finds the weakest line segment and selects the sensors with the largest contribution to improve the monitoring quality of the weakest line segment.Therefore, the fairness index of JSQE is close to 1.
Figure 15 further examines the fairness index of the JSQE mechanism by varying the values of the required quality in the Small-boundary scenario.The number of sensors is varied, ranging from 400 to 800.As shown in Figure 15, the fairness index of monitoring quality increases with the increase in the number of deployed sensors.This occurs because more sensors can provide more opportunities for sensors to cooperatively monitor the bottleneck line segment, which has the lowest monitoring quality.In comparison, the proposed JSQE outperforms the other two mechanisms in terms of the fairness index.The key reason for this is that the TOBA does not consider the lowest monitoring quality, which impacts its fairness.The BSAS aims to maximize the utilization of sensor energy.This policy leads to low fairness when the deployed sensors are not balanced.The proposed JSQE finds the weakest line segment and selects the sensors with the largest contribution to improve the monitoring quality of the weakest line segment.Therefore, the fairness index of JSQE is close to 1.
Figure 15 further examines the fairness index of the JSQE mechanism by varying the values of the required quality in the Small-boundary scenario.The number of sensors is varied, ranging from 400 to 800.As shown in Figure 15, the fairness index of monitoring quality increases with the increase in the number of deployed sensors.This occurs because more sensors can provide more opportunities for sensors to cooperatively monitor the bottleneck line segment, which has the lowest monitoring quality.
In comparison, the proposed JSQE outperforms the other two mechanisms in terms of the fairness index.The key reason for this is that the TOBA does not consider the lowest monitoring quality, which impacts its fairness.The BSAS aims to maximize the utilization of sensor energy.This policy leads to low fairness when the deployed sensors are not balanced.The proposed JSQE finds the weakest line segment and selects the sensors with the largest contribution to improve the monitoring quality of the weakest line segment.Therefore, the fairness index of JSQE is close to 1.
Figure 15 further examines the fairness index of the JSQE mechanism by varying the values of the required quality in the Small-boundary scenario.The number of sensors is varied, ranging from 400 to 800.As shown in Figure 15, the fairness index of monitoring quality increases with the increase in the number of deployed sensors.This occurs because more sensors can provide more opportunities for sensors to cooperatively monitor the bottleneck line segment, which has the lowest monitoring quality.

Conclusions
This paper proposes a distributed barrier coverage mechanism, JSQE, which aims to dynamically wake up the minimal number of working sensors to guarantee the required monitoring quality of the barrier boundary.The proposed JSQE initially partitions the boundary curve into several line segments.Then, it applies the ESM to calculate the sensing probability of each sensor, identify the weakest line segments, and schedule the sensor with the maximal contribution in advance to improve the weakest line segment.The experimental results show that our proposed mechanism outperforms the compared TOBA and BSAS mechanisms.Future work will consider mobile sensors and further optimize the surveillance quality of barrier coverage.


can be obtained through the following com tation.

h
represent the number of sensors in The activation sensors Ŝ can be represented by Equation (3).
i d s v .The following Equation (4) evaluates the value of , iv  , by applying the sensing model proposed in Equation (1).

Figure 2 .
Figure 2. A scenario of the sensor set

Figure 2 .
Figure 2. A scenario of the sensor set λ v .

22 ( 3 )
Continuous constraint: denote a sub-curve of the boundary curve, start from x-coordinate a x and ending at x-coordinate b x .The boundary curve can be p sented by set
i s is denoted by cov i L , as shown in Figure 4. sume that the length of cov i L is i k .The covered segment of sensor i s can be rep sented as shown in Equation (12).

Figure 4 .
Figure 4.The covered segment of s i .
i s is denoted by cov i L , as shown in sume that the length of cov i L is i k .The covered segment of sensor i s sented as shown in Equation (12).

Figure 4 .
Figure 4.The covered segment of s i .

Figure 4 .
Figure 4.The covered segment of.
The following introduces how to calculate the monitoring quality of point v contributed by s i .Let p(s i , v) denote the monitoring quality of point v contributed by sensor s i .Let notation d(u, v) denote the distance of two points, u and v.The distance between sensor s i and v can be denoted by d(u, v), whose value can be obtained by Equation(13).

Figure 5 . 1 s
Figure 5.An example to show that sensor 1 s wakes up earlier than sensor

Figure 5 .
Figure 5.An example to show that sensor s 1 wakes up earlier than sensor s 2 .

( 18 )Figure 6 .l
Figure 6.Classified into two types, denoted by cov no ered j L

Figure 6 .
Figure 6.Classified into two types, denoted by L nocovered j

reqQ
, is set to 0.3, 0.5, and 0.7.To further study the performance of the proposed JSQE mechanism, two different boundaries, namely, Small-boundary and Bigboundary, are considered, which are denoted by S-b and B-b, respectively.

Figure 8 .
Figure 8. Performance comparison of boundary surveillance quality applying different Q req and varying the number of deployed sensors: (a) using JSQE to compare Small-boundary and Big-boundary; (b) using Small-boundary to compare JSQE, BSAS, and TOBA mechanisms.

Figure 8 .
Figure 8. Performance comparison of boundary surveillance quality applying different req and varying the number of deployed sensors: (a) using JSQE to compare Small-boundary and Bigboundary; (b) using Small-boundary to compare JSQE, BSAS, and TOBA mechanisms.

Figure 9 .
Figure 9. Performance comparison of surveillance quality by randomly selecting points: (a) different

Figure 10
Figure 10 compares the number of working sensors by applying the three mechanisms in the Small-boundary scenario.The number of deployed sensors ranges from 400

Figure 9 .
Figure 9. Performance comparison of surveillance quality by randomly selecting points: (a) different Q req of JSQE for Big-boundary; (b) different mechanisms for Small-boundary.

Figure 10 .
Figure 10.Comparison of the three mechanisms in terms of the number of working sensors in different values of req Q : (a)

Figure 10 .
Figure 10.Comparison of the three mechanisms in terms of the number of working sensors in different values of Q req : (a) Q req is set to 0.3; (b) Q req is set to 0.7.

Sensors 2022 , 25 Figure 11 .
Figure 11.Comparison of three mechanisms in terms of energy consumption by increasing the number of sensors.

Figure 12 .
Figure 12.Comparison of JSQE, BSAS, and TOBA in terms of control overheads and coverage contribution by increasing the number of sensors.

Figure 13
Figure 13 further examines the efficiency index, which considers two parameters, namely, the weakest surveillance quality and the number of working sensors.Let num N

Figure 11 .
Figure 11.Comparison of three mechanisms in terms of energy consumption by increasing the number of sensors.

Sensors 2022 , 25 Figure 11 .
Figure 11.Comparison of three mechanisms in terms of energy consumption by increasing the number of sensors.

Figure 12 .
Figure 12.Comparison of JSQE, BSAS, and TOBA in terms of control overheads and coverage contribution by increasing the number of sensors.

Figure 13
Figure 13 further examines the efficiency index, which considers two parameters, namely, the weakest surveillance quality and the number of working sensors.Let num N

Figure 12 .
Figure 12.Comparison of JSQE, BSAS, and TOBA in terms of control overheads and coverage contribution by increasing the number of sensors.

Figure 13 .
Figure 13.Comparison of the different user-required qualities

Figure 13 .
Figure 13.Comparison of the different user-required qualities Q req in terms of monitoring efficiency by varying the number of deployed sensors: (a) Small-boundary; (b) Big-boundary.

Figure 14
Figure14further investigates the fairness indices of the three compared mechanisms in the Small-boundary scenario.The user-required quality is set to 0.3, 0.5, and 0.7.The number of sensors is 500.The fairness index of monitoring quality, denoted by T f airness , is defined as shown in Equation (29), where p i denotes the monitoring quality of each line segment and n denotes the number of line segments.

Figure 14
Figure 14 further investigates the fairness indices of the three compared mechanisms in the Small-boundary scenario.The user-required quality is set to 0.3, 0.5, and 0.7.The number of sensors is 500.The fairness index of monitoring quality, denoted by fairness T

Figure 14 .
Figure 14.Performance comparison of JSQE, BSAS, and TOBA in terms of fairness index.

Figure 14 .
Figure 14.Performance comparison of JSQE, BSAS, and TOBA in terms of fairness index.

Sensors 2022 ,
Figure 14 further investigates the fairness indices of the three compared mechanisms in the Small-boundary scenario.The user-required quality is set to 0.3, 0.5, and 0.7.The number of sensors is 500.The fairness index of monitoring quality, denoted by fairness T

Figure 14 .
Figure 14.Performance comparison of JSQE, BSAS, and TOBA in terms of fairness index.

Figure 15 .
Figure 15.Performance comparison of different required qualities in terms of fairness index.

Table 1 .
Comparisons between the proposed JSQE with the existing studies., Not have this property., Have this property.
where x 1 and x n denote the x coordinates of the leftmost and rightmost points of the boundary curve, respectively.A partitioned boundary curve with n line segments.

Table 2 .
Simulation parameters., for the weakest line segment and set up the waiting time.The computing complexity of steps 17 to 19 is O i s