{'fraction_non_alphanumeric': 0.04083038173947265, 'fraction_numerical': 0.012076938213301849, 'mean_word_length': 4.297328990228013, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
End-to-end delay modeling in buffer-limited MANETs: a general theoretical framework

This paper focuses on a class of important two-hop relay mobile ad hoc networks (MANETs) with limited-buffer constraint and any mobility model that leads to the uniform distribution of the locations of nodes in steady state, and develops a general theoretical framework for the end-to-end (E2E) delay modeling there. We first combine the theories of Fixed-Point, Quasi-Birth-and-Death process and embedded Markov chain to model the limiting distribution of the occupancy states of a relay buffer, and then apply the absorbing Markov chain theory to characterize the packet delivery process, such that a complete theoretical framework is developed for the E2E delay analysis. With the help of this framework, we derive a general and exact expression for the E2E delay based on the modeling of both packet queuing delay and delivery delay. To demonstrate the application of our framework, case studies are further provided under two network scenarios with different MAC protocols to show how the E2E delay can be analytically determined for a given network scenario. Finally, we present extensive simulation and numerical results to illustrate the efficiency of our delay analysis as well as the impacts of network parameters on delay performance.


I. INTRODUCTION
With the development of wireless communication technologies, mobile ad hoc networks (MANETs) have become an appealing candidate for many critical applications, such as emergency rescue, disaster relief, coverage extension for cellular networks, etc. [1]- [5]. Although lots of work has been done to facilitate the commercialization of MANETs, understanding their fundamental delay performance has been a critical research issue for them to support various applications with different quality of service (QoS) requirements [6], [7].
End-to-end (E2E) delay, the time that a packet takes to reach its destination after it is generated by its source, serves as the most fundamental delay metric. The available theoretical studies on E2E delay of MANETs mainly focus on deriving its upper bound or approximation. Regarding the delay upper bound of MANETs, Neely et al. [8] derived some useful results for a cell-partitioned MANET with the two-hop relay (2HR) routing scheme and i.i.d mobility model. Later, Gamal et al. [9] and Sharma et al. [10] extended the results of [8] to the continuous network model and general mobility model, respectively. Inspired by these works, extensive research activities have been devoted to the study of delay upper bound for MANETs under various network scenarios, such as under the motioncast in [11], under the cognitive networks in [12], under the packet redundancy in [13], under the multi-hop back-pressure routing in [14], and under the power control in [15]. Regarding the delay approximation, Jindal et al. [16] explored recently the E2E delay approximation for MANETs with multi-hop relay routing, and Liu et al. studied the E2E delay approximation for MANETs with probing-based 2HR routing [17] and limited packet redundancy [18].
In addition to the studies on delay upper bound or approximation for MANETs, Neely et al. [8] also applied the queueing theory to derive the exact expression for E2E delay. Following this line, recently some results have been reported on the modeling of really achievable E2E delay in MANETs. Chen et al. [19] explored the MANETs with Aloha MAC protocol and determined the corresponding exact E2E delay there under the continuous network model. For a cell-partitioned MANET with broadcast-based routing scheme, Gao et al. [20] proposed a new theoretical framework for the analysis of its exact E2E delay based on the theory of Quasi-Birth-and-Death process.
It is notable that the common limitation of above studies is that to simplify their analysis of E2E delay, they assume the relay buffer of a node, which is used for temporarily storing packets of other nodes, has an infinite buffer size. In a practical MANET, however, the buffer size of a mobile node is usually limited due to both its storage space limitation and computing capability limitation. Thus, for the practical delay performance study of MANETs, the constraint on buffer space should be carefully addressed. Notice that the E2E delay modeling with practical limited-buffer constraint still remains a technical challenge. This is mainly due to the lack of a general theoretical framework to efficiently characterize the highly dynamic behaviors in such networks, like the complicated buffer occupancy states of a relay buffer, as well as the highly dynamic queuing process and delivery process of a packet.
As a step towards the modeling of real achievable E2E delay for the practical MANETs with buffer constraint, we focus on a class of important 2HR MANETs with limited shared relay buffer and propose a general theoretical framework for the E2E delay modeling there. The main contributions of this paper are summarized as follows.
• For the concerned MANET, we first combine the theo-ries of Fixed-Point (FP), Quasi-Birth-and-Death (QBD) process and embedded Markov chain (EMC) to construct an analytical model to fully depict the complicated occupancy behaviors of a relay buffer with limited buffer size. • Based on the above modeling of relay buffer occupancy behaviors, we then apply the absorbing Markov chain (AMC) theory to characterize the packet delivery process, such that a complete theoretical framework is developed for the E2E delay modeling in the concerned bufferlimited MANETs. This framework is general in the sense that it can be applied to conduct E2E delay analysis for a 2HR MANET with any mobility model that leads to the uniform distribution of the locations of nodes, such as the i.i.d mobility model [8], the random walk model [9], the random way-point model [21], etc.. • To demonstrate the application of the proposed framework, case studies are further provided under two network scenarios, i.e., the cell partitioned networks with local scheduling-based MAC protocol (LS-MAC) [8] and Equivalent-Class based MAC protocol (EC-MAC) [22], to show how the E2E delay can be analytically determined for a given network scenario by applying our framework. Finally, extensive simulation and numerical results are provided to validate the efficiency of the proposed E2E delay model and also to illustrate the impacts of network parameters on delay performance. The remainder of this paper is organized as follows. Section II introduces preliminaries involved in this paper. The complicated relay buffer occupancy behaviors are analyzed in Section III. We derive the queuing delay, delivery delay and E2E delay in Section IV, and conduct case studies in Section V. The simulation results and corresponding discussions are provided in Section VI. Finally, Section VII concludes this paper.

II. PRELIMINARIES
In this section, we first present some basic assumptions and the buffer constraint, and then introduce the routing scheme and some critical definitions involved in this study.

A. Basic Assumptions
We consider the following minimal set of assumptions: (A.i) The ad hoc network is time-slotted and consists of n mobile nodes. (A.ii) The packet generating process in each source node is independent and assumed to be a Bernoulli process, where a packet is generated by its source node with probability λ in a time slot. (A.iii) The widely-used permutation traffic model [8], [23], [24] is adopted. With this traffic model, there are n unicast traffic flows in the network, each node is the source of one traffic flow and also the destination of another traffic flow. We denote by ϕ(i) the destination node of the traffic flow originated from node i, then the source-destination pairs are matched in a way that the sequence {ϕ(1), ϕ(2), · · · , ϕ(n)} is just a derangement of the set of nodes {1, 2, · · · , n}. (A.iv) During a time slot the total amount of data that can be transmitted from a transmitter to its corresponding receiver is fixed and normalized to one packet. (A.v) We consider the mobility model that leads to the uniform distribution of the locations of nodes in steady state, which covers many typical mobility models such as the i.i.d mobility model, the random walk model, the random way-point model, etc.. More formally, we denote by X i (t) the location of ith node at time slot t and assume the process {X i (·)} is stationary and ergodic with stationary distribution uniform on the network area; moreover, the trajectories of different nodes are independent and identically distributed.

B. Buffer Constraint
As illustrated in Fig. 1, each node in the MANET maintains n − 1 individual queues, one source queue for storing the packets that are locally generated at this node, and n − 2 parallel relay queues for storing packets of other flows (one queue per flow). All these queues follow the FIFO (first-infirst-out) discipline.
Similar to the available studies on buffer-limited wireless networks [25], [26], we consider the following practical buffer constraint that all the n − 2 relay queues of a node share a common relay buffer with the limited buffer size of B packets, while the buffer size of source queue is unlimited. We adopt this buffer constraint here mainly due to the following reasons. First, the mathematical tractability of this assumption allows us to gain important insights into the structure of E2E delay analysis. Second, the analysis under this assumption provides a meaningful theoretical result in the limit of infinite source buffer. Third, in a practical wireless network, each node usually prefers to reserve a much larger buffer space for storing its own packets than that for storing packets of other flows. Also, even in the case that the buffer space of source queue is not enough when bursty traffic comes, the congestion control in the upper layer can be executed to avoid the loss of locally generated packets [25].

C. Handshake-based 2HR Scheme
Regarding the routing scheme, we focus on the 2HR scheme, because it is simple yet efficient and thus serves as a class of attractive routing protocols for MANETs [8], [23]. To avoid unnecessary packet loss and support the efficient operation of the concerned buffer-limited MANETs, we introduce a handshake mechanism with negligible overhead 1 into the 2HR scheme such that the packet dropping will not happen even in the case of relay buffer overflow. Once a node (say S) gets access to the wireless channel in a time slot, it executes the new handshake-based 2HR (H2HR for short) routing scheme summarized in Algorithm 1. With equal probability, S selects one node as the receiver. S transmits the head-of-line (HoL) packet in its source queue to D.

3:
S removes the HoL packet from its source queue.

4:
S moves ahead the remaining packets in its source queue. 5: else 6: S remains idle. 7: end if Procedure 2 Source-to-relay (S-R) transmission 1: if S has packets in its source queue then 2: S initiates a handshake with the receiver to check whether the relay buffer of receiver is full or not. 3: if The relay buffer of receiver does not overflow then 4: The receiver dynamically allocates a new buffer space to the end of the corresponding relay queue.

5:
S transmits the HoL packet in its source queue to the receiver.

6:
S removes the HoL packet from its source queue.

7:
S moves ahead the remaining packets in its source queue. 8: end if 9: else 10: S remains idle. 11: end if 1 The handshake mechanism can be easily implemented by sending only one indicator bit from the receiver to the transmitter (e.g., bit 0 when the relay buffer is full, and bit 1 otherwise), so the impact of this overhead can be neglected in our analysis. Procedure 3 Relay-to-destination (R-D) transmission 1: if S has packets destined to the receiver then 2: S transmits the HoL packet in its corresponding relay queue to the receiver.

3:
S removes the HoL packet from this relay queue.

4:
S moves ahead the remaining packets in this relay queue.

5:
This relay queue releases one buffer space to the common relay buffer of S. 6: else 7: S remains idle. 8: end if

D. Definitions
Here we introduce some important definitions involved in this study.
Relay-buffer Overflowing Probability (ROP): For the concerned MANET with a given packet generating rate λ in each node, the relay-buffer overflowing probability p o (λ) of a node is defined as the probability that the relay buffer of this node overflows (i.e, the relay buffer is full).
Queuing Delay: The queuing delay is defined as the time it takes a packet to move to HoL in the source queue (i.e., the source node starts to deliver it) after it is generated by its source.
Delivery Delay: The delivery delay is defined as the time it takes a packet to reach its destination after its source starts to deliver it.
End-to-end Delay: The end-to-end delay is defined as the time it takes a packet to reach its destination after it is generated by its source, which is the sum of its queuing delay and delivery delay.

III. RELAY BUFFER ANALYSIS
In this section, we first introduce three basic probabilities. Based on these probabilities, we then apply the QBD process modeling and EMC technique to depict the occupancy behaviors of a relay buffer. Finally, we construct a self-mapping function for the ROP p o (λ) (i.e., p o (λ) is the fixed-point of this function) to determine the limiting distribution of the occupancy states, which will help us conduct delay analysis in Section IV.
Due to the symmetry of nodes and traffic flows, we only focus on one node S in the following analysis. We denote by p sd , p sr and p rd the probabilities that in a time slot S gets access to the wireless channel and decides to execute S-D, S-R and R-D transmission respectively 2 . These probabilities can be determined under a given network scenario and the derivation of them will be elaborated in case studies.

A. QBD Process Modeling
Regarding the source queue of S, it can be modeled as a Bernoulli/Bernoulli queue [27] with packet arrival rate λ and Transition cases from a general state (i, j).
service rate µ s (λ), where µ s (λ) is given by Due to the reversibility of Bernoulli/Bernoulli queue, the packet departure process of source queue is also a Bernoulli process with rate λ.
Regarding the relay buffer of S, we adopt a two-tuple X(t) = (I(t), J(t)) to define its state at time slot t, where I(t) denotes the number of packets occupying the relay buffer, and J(t) denotes the number of relay queues which are not As illustrated in Fig. 2, suppose that the relay buffer of S is in state (i, j) at the current time slot, only one of the following transitions may happen in the next time slot: Case 1: i < B, a packet enters the relay buffer, and this packet is destined for a destination same as one of packet(s) already in relay queues. Case 2: i < B, a packet enters the relay buffer, and the destination of this packet is different from all packet(s) already in relay queues. Case 3: i > 0, a packet in one of the relay queues is delivered to its destination, and there still exist other packet(s) in this relay queue. Case 4: i > 0, a packet in one of the relay queues is delivered to its destination, and there is no remaining packet in this relay. Case 5: no packet enters into or departs from the relay queues.
To facilitate our discussion, we call the subset of states and state (i, j) that the relay buffer is in level i and phase j. Notice that when the relay buffer is in some state of level i at a time slot, the next state after one-step state transitions could only be some state in the same level or its adjacent levels. Thus, as time evolves, the state transitions of the relay buffer of S form a two-dimensional QBD process {X(t), t = 0, 1, 2, · · · } [28], [29]. According to the transition cases in Fig. 2, the overall transition diagram of the QBD process is summarized in Fig. 3. There are in total 1+0.5B(1+B) states for the QBD process, and we arrange all these states in a low-to-high level and low-to-high phase way as follows: Then the corresponding state transition matrix P of the QBD process can be determined as where the sub-matrix A i,l is of size i × l (A 0,0 , A 0,1 and A 1,0 are of size 1 × 1), denoting the transition probabilities from the states of level i to the states of level l. It is notable that in our QBD process of relay buffer, different levels have different number of phases, and the transition probabilities of one state depend on its level, thus the QBD process is level-dependent and it is very difficult to solve its limiting distribution by determining its critical matrices and conducting recursive algorithm [28], [29]. To address this issue, we adopt a Markov chain-collapsing technique [30], [31] to convert the two-dimensional QBD process to a onedimensional EMC in the next subsection.

B. Collapsing to an EMC
For the QBD process of Fig. 3, we integrate all states of a level into only one state, then the two-dimensional QBD process is collapsed to a one-dimensional Embedded Markov Chain (EMC). As illustrated in Fig. 4, one state L i of the EMC corresponds to one level i of the QBD process, and p (i,l) L denotes the one-step transition probability from state L i to state L l in the EMC. According to the EMC theory [30], [31], the state transition probability of the EMC is the phaseaveraged state transition probability of the QBD process, then we have where p (i,j),L l denotes the transition probability from state (i, j) to the states of level l, and P j|Li denotes the conditional probability that the relay buffer is in phase j given that it is in level i. Based on formula (3) as well as the ergodic and uniform features of the distribution of node location, we have the following lemma regarding the transition probabilities of the EMC. Lemma 1: The one-step transition probability p of the EMC is determined as where .
Proof: See Appendix A for the proof. We arrange all the states of EMC in a low-to-high level way as follows: {L 0 , L 1 , · · · , L B }. Then the corresponding state transition matrix P EMC can be determined as

C. Constructing the self-mapping function
With the help of transition matrix P EMC , we then construct a self-mapping function for p o (λ), i.e., p o (λ) is the fixed-point of this function [32], such that p o (λ) as well as the limiting distribution of the occupancy states of a relay buffer can be determined.
From the the state machine of EMC in Fig. 4 and the transition matrix P EMC , we can see that: 1) the EMC is irreducible; 2) each state L i is recurrent; 3) the period of each state L i is 1, so each state is aperiodic. Based on these properties, we can conclude that the EMC is ergodic, thus its limiting distribution Π L = [π L0 , π L1 , · · · , π LB ] exists and is unique, and is same as its stationary distribution [33]. Then we have where 1 is a column vector of size (B+1)×1 with all elements being 1, and equation (7) follows from the normalization property of a probability vector. Combining (6) with (7) we have where It is notable that the relay buffer overflows when it is in level B, then the critical self-mapping function for p o (λ) is constructed as Given a packet generating rate λ, the self-mapping function doesn't contain any unknown parameters except p o (λ). Thus by solving equation (9), we can determine the ROP p o (λ) corresponding to a given λ, and the limiting distribution of the EMC can be recursively determined as The limiting distribution Π = [π 0,0 , π 1,1 , · · · , π i,j , · · · , π B,B ] of the QBD process can be further determined as where P j|Li is given by formula (42) in Appendix A.
Remark 1: Notice that if we don't apply the handshake mechanism, we can also develop the corresponding theoretical framework in the same way to model the relay buffer occupancy process, where the ROP p o (λ) derived in (9) just corresponds to the packet dropping probability.

IV. DELAY ANALYSIS
With the help of ROP and limiting distribution of occupancy states of a relay buffer, in this section we analyze the delay performance for the concerned buffer-limited MANET. We denote by Q, D and T the queuing delay, delivery delay and E2E delay of a packet respectively. The E2E delay of a packet will be derived by computing its queuing delay and delivery delay respectively. The queuing delay will be obtained by analyzing the queuing process of the source queue, while the delivery delay will be derived by modeling the packet delivery process as an AMC and analyzing the time the chain takes to enter the absorbing state.
Before presenting our main results on the delay performance, we first provide the following lemma regarding the per node throughput capacity, which is the maximal packet generating rate the MANET can stably support, and the corresponding delay can then be determined.
Lemma 2: For the considered MANET, its per node throughput capacity µ is given by Proof: See Appendix B for the proof.

A. Queuing Delay
Considering a given packet generating rate λ (λ < µ), the corresponding ROP p o (λ) can be obtained by solving equation (9), and the service rate of source queue µ s (λ) can be further determined by formula (1). Thus, in the following analysis, we use p o and µ s to represent p o (λ) and µ s (λ) respectively if there is no ambiguous. Notice that the source queue is a Bernoulli/Bernoulli queue, thus its average queue length L source is given by [27] According to the Little's Law [34], the average delay of a packet in its source queue E{D s } is given by Then, the expected queuing delay E{Q} is determined as

B. Delivery Delay and End-to-end Delay
We present the following theorem regarding the expected E2E delay of the concerned buffer-limited MANET.
Theorem 1: (Main result) For the concerned MANET with number of nodes n, relay buffer size B and packet generating rate λ (λ < µ), the expected delivery delay E{D} and the expected E2E delay E{T } of a packet are determined as where Ψ n,B,λ = Proof: We focus on a packet y which is the HoL packet of the source queue at time slot t, then in the next time slot, y will be delivered to its destination with probability p sd , be forwarded to a relay node with probability p sr · (1 − p o ), and still stay in the source queue with probability 1−µ s . Thus, the delivery process of packet y can be modeled as an absorbing Markov chain as illustrated in Fig. 5, where S, R and D denote the states that y is in source queue, forwarded to a relay, and delivered to its destination, respectively. We denote by X S and X R the average transition times from the transient states S and R to the absorbing state D, respectively. Then we have We denote by a probability vector P = (p 0 , p 1 , · · · , p B−1 ) the steady state distribution of the corresponding relay queue of y in a relay node R, where each element p i denotes the probability that when y enters the relay queue, there are i packets already in this queue. Notice that the location of each node is stationary and ergodic with stationary distribution uniform on the network area, thus when R conducts the R-D transmission with probability p rd in a time slot, it will deliver a packet for each of the n−2 traffic flows with equal probability. Thus, if there are i packets already in the relay queue of y, the expected time elapsed for y to be delivered to its destination Then we have where (21) follows from the normalization property of a probability vector, and L * relay is the average queue length of a relay queue, under the condition that the relay buffer is not full.
We denote by Π * L = (π * L0 , π * L1 , · · · , π * LB−1 ) the limiting distribution of the level of a relay buffer, under the condition that the relay buffer is not full, then we have and the corresponding conditional average number of packets occupying the relay buffer E {L * } is given by Since these buffered packets are destined to each of the n − 2 destinations with equal probability, then we have Substituting the results of (22), (24) and (25) into (19), the average transition times from the transient state S to the absorbing state D is determined as Notice that E{D} = X S , the result (16) follows, and then the result (17) follows from E{T } = E{Q} + E{D}.
Remark 2: Similar to the two-hop scenario, in the multihop MANETs the packet delivery process and occupancy behaviors of a relay buffer can be also modeled as an AMC and a QBD process respectively, so it is expected that our proposed theoretical framework for E2E delay modeling of Fig. 6. Illustration of the application of our theoretical framework.
two-hop MANETs can be also helpful for that of the multihop scenarios. It is notable, however, the state transition matrix of the QBD process will be different under the two scenarios, and also that with the multi-hop network scenarios there will be multiple transient states in the AMC. Based on Theorem 1, we can further extend our delay results to the buffer-unlimited scenario (i.e., B → ∞), which is shown in the following corollary.
Corollary 1: Considering the relay buffer size tends to infinity (B → ∞), then E{D} and E{T } are determined as Proof: See Appendix C for the proof. Remark 3: Notice that when B → ∞, the results of Lemma 2 and Corollary 1 are coincident with the capacity and delay derived in [8], where the relay buffer size is assumed to be infinite.

V. CASE STUDIES
In this section, we conduct case studies to illustrate the application of our theoretical framework for the E2E delay modeling in buffer-limited MANETs. As illustrated in Fig. 6, for a given network scenario, the corresponding p sd , p sr and p rd should be determined first, then with the inputs of these probabilities, by sequentially executing the relay buffer analysis module and delay analysis module, this framework finally returns the delay results. The details of the application of our framework under specific network scenarios are shown in the following subsections.

A. Cell-partitioned MANET with LS-MAC
We first consider a cell-partitioned MANET with local scheduling based MAC protocol (LS-MAC) [8]. The whole network area is partitioned into m × m non-overlapping cells of equal size. In a time slot, each cell can support only one pair of nodes for packet transmission, concurrent transmissions in different cells will not interference with each other, and nodes within different cells cannot communicate. At the beginning of each time slot, all nodes in a cell contends for the wireless channel access using a DCF-style mechanism [35]. In addition to these network settings, the MANET also meets the set of assumptions described in Section II-A.
With the detailed information of network settings, we then determine the corresponding probabilities p sd , p sr and p rd , provided in the following lemma.
Proof: See Appendix D for the proof. Given the number of nodes n and relay buffer size B, substituting formulas (29) and (30) into formula (12), we first determine the throughput capacity µ of such a MANET. Then with any packet generating rate λ < µ, we substitute formulas (29) and (30) into equation (9) to determine the corresponding ROP p o , and µ s can be further determined by formula (1). Substituting λ, p o and µ s into formulas (15), (16) and (17), we finally obtain the results of queuing delay, delivery delay and E2E delay respectively for the concerned buffer-limited MANET.

B. Cell-partitioned MANET with Power Control and EC-MAC
We then consider a more general cell-partitioned MANET which applies the power control and Equivalent-Class based MAC protocol (EC-MAC) [15], [18], [22]. As shown in Fig. 7(a), the transmission range of a transmitter T X covers a set of cells which have a horizontal and vertical distance of no more than ν − 1 cells away from its own cell. Meanwhile, as illustrated in Fig. 7(b), all cells are divided into different ECs, where any two cells in the same EC have a horizontal and vertical distance of some multiple of ε cells. Thus, the MANET contains in total ε 2 ECs and ECs are activated alternatively as time evolves. Suppose that at time slot t, a transmitter T X 0 in an active cell will transmit a packet to its receiver RX 0 , in order to ensure the transmission successful, according to the Protocol Model [36] it should satisfy that where T X 1 denotes a concurrent transmitter in any one of the other active cells, d i,j denotes the distance between nodes i and j, and ∆ is a guard factor. Thus we have and ε should be set as Regarding the corresponding probabilities p sd , p sr and p rd of this type of MANETs, we have the following lemma.
Lemma 4: For the concerned MANET with power control and EC-MAC, the probabilities p sd , p sr and p rd are given by where Γ = (2ν − 1) 2 .
Proof: See Appendix D for the proof. By applying the same operations of our theoretical framework as the previous subsection, we can obtain the delay results for the concerned MANETs.

C. Other Network Scenarios
Notice that to apply our theoretical framework for the E2E delay modeling, it only needs to determine the inputs of the framework, i.e., the probabilities p sd , p sr and p rd . Thus, this framework also has the great potential to be applied to many other network scenarios. For example, for the MANETs where the 2HR routing scheme is administered by cell [8] (not by each node in our case), and the ratio between S-R and R-D transmission can be changed [15] (we fix the ratio as 0.5), these probabilities can be determined. Recently, Chen et al. [19] has reported that how to compute these probabilities for a MANET under the continuous network model and the Aloha MAC protocol, then with these probabilities as the inputs of our framework, the corresponding delay analysis under the practical buffer constraint can be conducted.

VI. SIMULATION RESULTS
In this section, we first conduct simulations to validate our theoretical framework for the E2E delay modeling in bufferlimited MANETs, then provide discussions about the impacts of network parameters on delay performance.

A. Simulation Settings
For the validation of our theoretical framework and delay results, a specific C++ simulator was developed to simulate the packet generating, queuing and delivery processes in a cell-partitioned MANET [37], where the network settings, including relay buffer size B, number of nodes n, partition parameter m, packet generating rate λ and the mobility model can be flexibly adjusted to simulate the network performance under various scenarios. For the network scenario with power control and EC-MAC, we set ν = 1 and ∆ = 1 [38]. The duration of each task of simulation is set to be 2 × 10 8 time slots, and we only collect data from the last 80% of the time slots in each task (the system will be in the steady state with high probability), to ensure the accuracy of simulated results.

B. Validation
First, we provide plots of the theoretical and simulated ROP performance under two network scenarios in Fig. 8, and for each scenario we consider two cases (case 1: n = 32, m = 4, B = 5, and case 2: n = 50, m = 5, B = 5) and two mobility models (the i.i.d mobility model and the random walk model). The workload is defined as λ/µ. We can see from Fig. 8 that the simulation results match nicely with the theoretical ones for all the cases, which indicates that our framework is highly efficient in depicting the occupancy behaviors of the relay buffer in buffer-limited MANETs.
Then, with the same network settings, we provide plots of the theoretical and simulated E2E delay results in Fig. 9. It is observed from Fig. 9 that all the simulation results can match the corresponding theoretical curves very nicely, indicating that: 1) our theoretical framework is highly efficient for the E2E delay modeling in buffer-limited MANETs; 2) the framework is very general since it can be applied to various network scenarios. Another observation of Fig. 9 is that the packet E2E delay increases sharply as the packet generating rate λ approaches a specific value (e.g., under LS-MAC and case 1, the value is around 0.038), which serves as an intuitive  impression of its corresponding throughput capacity µ.
To further validate our framework on throughput capacity, Fig. 10 summarizes the simulation results on the achievable per node throughput, where two network scenarios with different throughput capacity (LS-MAC: n = 200, m = 10, B = 5, µ LS = 6.5 × 10 −3 ) and (power control and EC-MAC: n = 32, m = 4, B = 10, µ EC = 3.3 × 10 −3 ) are presented. We can see that for each network scenario there, the per node throughput first monotonously increases before the workload reaches 1, and then remains a constant which is just the corresponding throughput capacity when the workload exceeds 1. Thus, it indicates that the proposed framework is also efficient in depicting the per node throughput capacity behavior of the buffer-limited MANET.

C. Performance Discussion
With the help of our theoretical framework for the E2E delay modeling, we explore how the network parameters affect the the delay performance of a buffer-limited MANET. Without loss of generality, we consider here a cell-partitioned MANET with LS-MAC. We first summarize in Fig. 11 that how the expected delivery delay E{D} varies with the workload. A very interesting observation is that under the buffer-limited scenarios (B = 5 and B = 20), as workload increases, E{D} first increases to a maximum and then decreases. This is due to the reason that the effects of workload on E{D} are two folds. On one hand, a larger workload will lead to a longer relay queue length, which further leads to a higher delay in the relay queue; on the other hand, a larger workload will lead to a higher ROP, which further leads to a lower probability that a packet to be delivered by a two-hop way, such that E{D} decreases. Since the latter effect, the delivery delay under a small relay buffer is lower than that under a large one. Fig. 12 shows the relationship between the expected E2E delay E{T } and packet generating rate λ. We can see that under buffer-limited scenarios, as λ increases, E{T } doesn't increase all the time because the delivery delay will decrease when λ exceeds a specific value, however when λ approaches the corresponding throughput capacity, E{T } increases sharply because the queuing delay tends to infinity. It also can be seen that when λ is small, E{T } under B = 5 is smaller than   that under B = 20, since both of the queuing delay under two settings are small, but a small relay buffer can lead to a small delivery delay. However, with λ getting larger and larger, E{T } under B = 5 finally exceeds that under B = 20, and tends to infinity earlier. It indicates that increasing the relay buffer size can ensure the E2E delay limited for a larger region of packet generating rate.
We illustrate in Fig. 13 how E{T } varies B under the settings of (n = 32, m = 4, λ = {0.01, 0.02}). According to formula (12), µ = 0.0227 when B = 1, and µ increases as B increases. Thus, for λ = 0.01 which is much smaller than 0.0227, E{T } increases as B increases and finally tends to a constant 206.92 which can be determined by formula (28). While for λ = 0.02 which is very close to the µ under B = 1, E{T } under B = 1 is very large. With B increasing, the corresponding µ increases, leading to the E{T } first decreases, then increases and finally tends to a constant 221.65.
We further illustrate in two 3D figures (Fig. 14 and Fig. 15) that how E{T } is influenced by {n, λ} and {n, B}, respectively (the ratio of n to the number of cells keeps as 2). We can see that the variations of E{T } with n are complicated, but in general E{T } increases as n increases. A more careful observation is that when n increases, E{T } first increases  almost linearly when λ is much smaller than µ, then increases quickly when λ approaches µ. For example, these behaviors can be found in Fig. 14 under λ = 0.23 and in Fig. 15 under B = 1.

VII. CONCLUSION
This paper represents a significant step towards the exact end-to-end delay modeling of practical buffer-limited MANETs. With the help of the theories of Fixed-Point, QBD process, EMC and AMC, a novel theoretical framework has been developed to efficiently depict the highly dynamics in such networks. This framework is general in the sense that it can be applied to the MANETs with any mobility model that leads to the uniform distribution of the locations of nodes, and any MAC protocol as long as the probabilities p sd , p sr and p rd there can be determined. Also, it is expected the framework can shed light on the E2E delay modeling for multi-hop MANETs. Extensive simulations have been conducted to validate the efficiency and applicability of our framework, and some interesting theoretical findings about the impacts of network parameters on delay performance have been discussed.
Notice that our E2E delay modeling for buffer-limited MANETs is based on the 2HR routing and relay buffer constraint, so one of the future research directions is to extend our study to the E2E delay modeling for MANETs with multi-hop routing schemes and more practical buffer constraint on both source buffer and relay buffer. Another appealing direction is to explore the delay modeling for the concerned MANETs with the consideration of more practical network settings (such as the wireless channel fading) and apply the well-known NS-2 network simulator for model validation.
APPENDIX A PROOF OF LEMMA 1 We denote by λ R the packet arrival rate at the relay buffer in S. Due to the ergodic and uniform properties of node mobility, for node S, each of the remaining n − 2 nodes (except D) is likely to serve as its relay with equal probability. Due to the symmetry of nodes and traffic flows, for S serving as a relay, all the other n − 2 nodes are likely to forward packets to its relay buffer. Notice that the packet departure process of source queue is a Bernoulli process with rate λ, and from (1) we can see the ratio of S-R transmission to the whole packet departure is psr (1−po(λ))

µs(λ)
, then we have Regarding the transition probability from state (i, j) to the states in its adjacent upper level L i+1 , we have the following equation Combining (37) with (36) we have p (i,j),Li+1 = ρ s (λ)p sr .
Regarding the transition probability from state (i, j) to the states in its adjacent lower level L i−1 , when S conducts a R-D transmission with probability p rd , due to the ergodic and uniform features of node mobility, it will choose one of the other n − 2 nodes as its receiver with equal probability. Then we have p (i,j),Li−1 = p rd · j n − 2 .
To determine the conditional probability P j|Li , we utilize the following Occupancy technique [39]. Considering the relay buffer on level i, where each of these i buffered packets may be destined for any one of the other n − 2 nodes (except S and D), the number of all possible cases N Li is determined as Considering the condition that these i packets are destined for only j different nodes, then the number of possible cases N (i,j) is determined as Due to the ergodic and uniform features of node mobility, each of these cases occurs with equal probability. According to the Classical Probability, P j|Li is then determined as It can be easily verified that j≤i P j|Li = 1. Combining (39), (42) and (3) we have APPENDIX B PROOF OF LEMMA 2 Since the relay buffer is limited, it is always stable. Thus, we only need to consider the stability of source queue. The source queue is a Bernoulli/Bernoulli queue with packet generating rate λ and a corresponding service rate µ s (λ). Based on the queuing theory, the source queue is stable (resp. unstable) when λ < µ s (λ) (resp. λ ≥ µ s (λ)).

APPENDIX C PROOF OF COROLLARY 1
We denote by F (ρ s ), G(ρ s ) the sums of infinite series i≥0 C i ρ i s and i≥0 iC i ρ i s , respectively. Notice that F (ρ s ) is the Taylor series expansion from (1 − ρ s ) 2−n , then we have G(ρ s ) = ρ s · F ′ (ρ s ) = (n − 2) ρ s (1 − ρ s ) n−1 . (47) Further we have where (51) is obtained by utilizing the L'Hôpital's rule recursively. Substituting (48) and (51) into Theorem 1, we can obtain (27) and (28)  For a cell-partitioned MANET with LS-MAC, the event that node S conducts a S-D (resp. S-R or R-D) transmission in a time slot can be divided into the following sub-events: (1) D is (resp. is not) in the same cell with S; (2) other k out of n − 2 nodes are in the same cell with S, while the remaining n − 2 − k nodes are not in this cell; (3) S contends for the wireless channel access successfully. Thus we have