Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 1 Modeling Epidemic Routing: Capturing Frequently Visited Locations While Preserving Scalability Leila Rashidi, Amir Dalili-Yazdi, Reza Entezari-Maleki, Leonel Sousa, Senior Member, IEEE and Ali Movaghar, Senior Member, IEEE Abstract—This paper investigates the performance of epidemic routing in mobile social networks considering several communities which are frequently visited by nodes. To this end, a monolithic Stochastic Reward Net (SRN) is proposed to evaluate the delivery delay and the average number of transmissions under epidemic routing by considering skewed location visiting preferences. This model is not scalable enough, in terms of the number of nodes and frequently visited locations. In order to achieve higher scalability, the folding technique is applied to the monolithic model, and an approximate folded SRN is proposed to evaluate performance of epidemic routing. Discreteevent simulation is used to validate the proposed models. Both SRN models for predicting the performance of epidemic routing exhibit high accuracy. We also propose an Ordinary Differential Equation (ODE) model for epidemic routing and compare it with the folded model. The obtained results show that the folded model is more accurate than the ODE model. Moreover, it is proved that the number of transmissions by the time of delivery follows a uniform distribution, for a general class of networks, where positions of nodes are always independent and identically distributed. Index Terms—Epidemic routing and performance evaluation. I. I NTRODUCTION ELAY tolerant and mobile social networks have drawn the attention of the research community due to the everincreasing number of smart devices [1]. Under these network, short-range wireless technologies of portable devices, such as smart phones, tablets, and sensors in vehicles, can be used by mobile users to share multimedia, data large-size files, etc. [2]. One of the main characteristics of Mobile Social Networks (MSNs) is that nodes have skewed location visiting preferences [3]. In real world scenarios, people visit locations with different frequencies. As an example, every employee visits her/his work place each business day while she/he D Copyright (c) 2015 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must be obtained from the IEEE by sending a request to pubs-permissions@ieee.org <mailto:pubs-permissions@ieee.org>. This work was partially supported by the FCT (Fundação para a Ciência e a Tecnologia, Portugal) through the project UIDB/50021/2020 and by the Iran National Science Foundation. L. Rashidi is with the Department of Computer Science, University of Calgary, Calgary, AB, Canada. E-mail: leila.rashidi@ucalgary.ca A. Dalili-Yazdi and A. Movaghar are with the Department of Computer Engineering, Sharif University of Technology, Tehran, Iran. E-mail: dalili@ce.sharif.edu; movaghar@sharif.edu R. Entezari-Maleki is with the School of Computer Engineering, Iran University of Science and Technology, Tehran, Iran and INESC-ID, Instituto Superior Técnico, Universidade de Lisboa, Lisbon, Portugal. E-mail: entezari@iust.ac.ir L. Sousa is with INESC-ID, Instituto Superior Técnico, Universidade de Lisboa, Lisbon, Portugal. E-mail: las@inesc-id.pt might prefer to go to a shopping center only once a week. Specifically, we tend to spend most of our time at a few frequently visited locations [3], [4]. We call such a location community. Despite various network models considered in the literature to analyze the performance of routing in Delay Tolerant Networks (DTNs), the performance of networks where nodes have skewed location visiting preferences has not been wellstudied. Scalability is one of the most important challenges in performance analysis of heterogeneous networks. In this paper, we focus on evaluating the performance of epidemic routing [5], in a scalable way, considering skewed location visiting preferences for nodes in a heterogeneous network. The aim is to compute the average and Cumulative Distribution Function (CDF) of the delivery delay of a message, from the source to the destination, and the average number of transmissions of the message by time of delivery as in [6]. Analytical models have various advantages in comparison to other evaluation methods, providing good insights into the network, less time to construct and analyze, and easy adaptation [7], [8]. For example, extensive experimentations for different network configurations are needed for measurement method, which may not be feasible specially for real-world large-scale networks, either with the large number of nodes/communities or large areas in which nodes move. In this paper, we first propose a monolithic Stochastic Reward Net (SRN) model [9] to evaluate the performance of epidemic routing in a network where nodes move in a large area, including some communities frequently visited by nodes. This proposed monolithic model significantly differs from the presented in our prior work [10] due to following reasons. • In the network model considered in [10], it was assumed that each node frequently visits only one specific community, and the number of local nodes in each community is limited by 𝑀 𝑁 , where 𝑀 and 𝑁 are the number of nodes and the number of communities, respectively. However, in real-world, nodes usually frequently visit more than one community. For example, a graduate student in a university campus visits different communities such as his/her office, dining center, and cafeteria. In this paper, we disregard the two aforementioned assumptions, considering a more realistic scenario where each node can frequently visit each community. The monolithic SRN model proposed herein accounts for the possibility of moving any number of local nodes in a community, to evaluate the performance of epidemic routing. • In [10], communities were homogeneous with respect to 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY how much they are interesting for nodes, i.e., exactly 𝑀 𝑁 nodes visit each community when they are in local mode. In this paper, we consider skewed location visiting preferences, allowing to detail the interest of nodes to frequently visit each community. We assume that nodes select communities according to an arbitrary Probability Density Function (PDF). This network model provides an opportunity to analyze the performance of the network also when some communities are more interesting for nodes. Using the proposed models, we can also analyze the effect of community selection PDF on the performance of the network. Although the monolithic SRN model is able to evaluate the performance of small networks, it faces the problem of state space explosion when the network scales up in terms of the number of nodes and communities. In order to solve this problem, an approximate SRN model is proposed, by applying the folding technique. Numerical results show that the number of states in the underlying Markov chain of the folded model is significantly less than that of the monolithic model. The results of both monolithic and folded SRN models are validated through discrete-event simulation. Analytical and simulation results indicate that both monolithic and folded models are accurate enough to evaluate the performance of the epidemic routing in the target networks. In order to prove the superiority of the proposed folding-based approach for evaluating the performance of large-scale networks, we apply the Ordinary Differential Equation (ODE) approach [6] to model the target network, and then show that the proposed folded model is more accurate than the ODE-based model. The main contributions of this paper are as follows. • • • • • A monolithic SRN model is proposed to evaluate the average value and CDF of the delivery delay, and the average number of transmissions of epidemic routing in a network consisting of some communities frequently visited by nodes. By applying the folding technique to the proposed monolithic SRN, a scalable approximate SRN is derived to evaluate the performance of large-scale networks. The validation is done by simulation, comparing the results of both monolithic and folded SRN models. This comparison indicates that the proposed models have a good accuracy. According to both analytical and simulation results, the average number of transmissions is very close to half of the number of nodes. In order to interpret this observation and justify this number, it is proved that the average number of transmissions is equal to half of the number of nodes in any network, not only for the target network, where positions of nodes are always independent and identically distributed (i.i.d.). In order to compare the proposed folded model with the ODE approach, this latter approach is also applied to model epidemic routing in the target networks. Comparison of the results of the folded SRN and ODE models with the results obtained from simulation indicates the practical interest of the folded model. 2 The rest of this paper is organized as follows. The related state-of-the-art and the main differences to the current work are introduced in Section II. Section III introduces the target network model and the assumptions made herein. Afterwards, a monolithic SRN and an approximate folded SRN are proposed for epidemic routing in the target network model, in Sections V and VI, respectively. Section VII is dedicated to the figures of merit and how to compute them applying the proposed models. Numerical results obtained from the proposed models and by simulation are provided in Section VIII. The proposed SRN models are compared in terms of the scalability in Section IX. Finally, Section X concludes the paper and provides some directions for future work. II. RELATED WORK A. Delay tolerant networks An ODE-based framework has been proposed to evaluate the performance of epidemic routing and its variations [6]. The network in [6] consists of a set of nodes moving in a closed area according to a common mobility model, such as random direction or random waypoint models. The closedform expressions for some performance measures, such as the average number of transmissions by the time of delivery, were derived using the analytical solution of the proposed ODE model. However, the ODE approach provides limits to the Markov models when the number of nodes tends to infinity [6]. Thus, it is not accurate to study the performance of networks with a moderate number of nodes [11]. In particular, the average number of infected nodes at the time of delivery, including the destination node, was estimated to be half of the number of nodes [6]. In this paper, we model the epidemic routing in a more realistic way, considering skewed location visiting preferences. Moreover, it is proved that the average number of transmissions by time of delivery is equal to half of the number of nodes, for a general class of networks, where positions of nodes at any time are independent and follow the same PDF. This class includes the network considered in [6], and the exact expression for the average number of transmissions, derived herein, is close to the approximate expression derived in [6] considering one initial infected node. In [12], a network consisting of two classes of nodes has been considered, wherein the inter-meeting time of any two nodes is exponentially distributed. Subsequently, three rates were defined, one per each class as the meeting rate of any two nodes belonging to that class, and another as the meeting rate of any two nodes belonging to different classes. Afterwards, epidemic routing was modeled as a Continuous Time Markov Chain (CTMC), and then two ODE models were proposed in order to evaluate the performance of large-scale networks. One ODE model is an extension of the model proposed in [6], while the other ODE model exploits the Kolmogorov forward equation. The network studied in [13] is similar to [12], but an arbitrary number of classes was considered. In order to evaluate the performance of epidemic routing and some variants of spray and wait routing, a framework that applies ODE model was proposed [13]. In [14], asymptotic results and closed-form approximations have been derived for epidemic spreading, considering a 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY contact network with probabilistic meeting rates. Unlike [12]– [17], the models proposed in this paper are not based on fixed meeting rates/probabilities or probabilistic meeting rates; two different movement modes are considered, and the meeting rate of any two nodes changes as the movement mode of at least one of them changes. In [3] and [18], a time-variant community mobility model has been proposed. The ODE model proposed in [6] was extended in [18] to evaluate the performance of epidemic routing on a network consisting of two communities. As shown in [18], although the average number of infected nodes as a function of time, obtained from the ODE model, follows a trend similar to that observed in simulation results, the ODE model does not yield a good accuracy. This paper adopts SRNs and the folding technique, instead of the ODE approach, to model epidemic routing in target large-scale networks, and it is shown that the proposed folded model is more accurate than the ODE approach. The network studied in [19] is similar to [13], but nodes can move between classes with specific rates. In [19], meeting times of all pairs of nodes are assumed to be independent from each other. In [20], an edge-Markovian dynamic graph model has been proposed for epidemic routing. In that model, the states of the edges change independently from each other. However, in real scenarios, the meeting times of some pairs of nodes depend on each other. This dependency was not considered in [19] and [20] although it is important to take it into account when studying MSNs, as it is addressed in this paper. A family of restricted epidemic routings has been modeled in [21] by applying Discrete Time Markov Chains (DTMCs). Those models are not scalable, the number of states exceedingly grows when the number of nodes/communities increases. Moreover, considering slotted time is a shortcoming of the models proposed in [20] and [21], while SRNs are based on continuous time which is more realistic. In [8], two monolithic and folded SRNs have been proposed for the epidemic content retrieval scheme in DTNs with restricted mobility. In [8] and [21], each node is assumed to move only within the community to which it belongs, while in the networks targeted herein, nodes can freely move in a common area and enter all communities. In [22], the delivery delay under both multi-copy two-hop forwarding and direct forwarding has been studied. The effect of selfishness on the performance of epidemic routing was studied in a DTN including several nonoverlappling groups of nodes [23]. There, it was assumed that the process of meeting between any two nodes is Poisson, and two different rates were considered: one for inter-meeting time of any two nodes belonging to the same group and one for inter-meeting time of nodes belonging to different groups. However, in this paper, we consider a mobility model for nodes instead of accounting for the meeting processes in an abstract way. Li et al. in [24] have studied the effect of selfishness on multicasting according to the epidemic and two-hop relaying. To this end, they proposed a 3-D CTMC for the delivery process. Afterwards, they computed delay and cost as closedform formulas. 3 B. Mobile social networks The optimality of a routing scheme was studied in [25], assuming that the inter-meeting time of any two nodes and the time between two consecutive visits of a node to its home are exponentially distributed. Based on these assumptions, the proposed routing scheme was modeled by a CTMC. In [25], the next location of each node is randomly selected from the set of its homes or the set of other cells independently from the current location of that node, and the path a node should traverse to reach the next location was ignored. However, we consider that nodes move according to the random direction mobility model both when they are in communities and outside of communities. In [2], the single-copy routing problem was studied considering a MSN with a certain number of locations and slotted time. Three assumptions were made in [2]: i) the time taken for each node to reach a frequently visited location follows an exponential distribution; ii) there is a throwbox at each frequently visited location; iii) nodes cannot transfer the message to each other when they are outside of the frequently visited locations. The existence of a throwbox at each frequently visited location and transmission only at frequently visited locations are oversimplifications. The network model adopted herein is more realistic than [2] and [25], where the location of a node is considered as a discrete quantity. Also it is assumed that time is continuous unlike [2]. The effect of various distributions of unselfishness on the throughput and delay of MSNs was analyzed, based on four human mobility datasets with community-biased and uniform traffic patterns [26]. Hui et al. discovered that distribution of unselfishness does not have a significant impact since there are usually multiple paths. Moreover, information diffusion was optimized with respect to the speed of diffusion [27]. The goal was the identification of a small set of nodes which can spread the information over the network with minimum delay. In [28], proactive placement of static relays to improve the performance of MSNs was studied. The problem was formalized as an optimization problem, and then a heuristic based solution was proposed. C. Vehicular ad hoc networks (VANETS) In [29], a dynamic epidemic-based broadcast scheme has been proposed to optimize the probability of message delivery in VANETs, while some constraints about the number of transmissions were satisfied. The performance metrics under this scheme were analyzed using ODEs. A unicast scheme has been proposed in [30], leveraging the cellular attractor mechanism for relay selection. This scheme can adapt itself to dynamic environments using transferring feedback packets. The timely delivery of emergency messages to the interested vehicles has been addressed in [31]. A position-based scheme was proposed in [31] for message dissemination in large-scale VANETs. III. N ETWORK M ODEL The mobility model considered in this paper is similar to the model proposed in [3], which matches with reallife traces from several scenarios. The network consists of 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 4 TABLE I: Notations adopted to define the network model 𝒄𝟏 𝒄𝟑 𝒄𝟒 𝒄𝟐 Fig. 1: A network with four communities. 𝑁 (𝑁 > 1) 𝐿 𝑐 × 𝐿 𝑐 communities, denoted by 𝑐 1 , 𝑐 2 , . . . , 𝑐 𝑁 , located in an 𝐿 × 𝐿 square, called common area. For instance, a university campus and each department located in that campus can be considered as the common area and a community, respectively. As an example, a network with four communities (𝑁 = 4) is represented in Fig. 1. 𝑀 nodes move in common area such that they visit the communities frequently. In contrast to the network model considered in [10], nodes do not visit a specific community frequently, rather they visit all communities frequently with different frequencies. Initially, nodes are randomly placed within the common area with a uniform distribution. The communication range of nodes is fixed, and it is denoted by 𝑅. We assume each node can move in two different modes: local and roaming. A node moves within a community or the common area when it is in local or roaming modes, respectively. In each of these modes, a node moves according to the random direction mobility model, with reflection when hitting boundaries [32], which is more realistic than the torus boundaries. The speed of a node is chosen from (𝑣 𝑚𝑖𝑛 , 𝑣 𝑚𝑎𝑥 ] according to a uniform distribution. The time it takes for each travel in local and roaming modes is distributed exponentially with rates 𝛼 and 𝛽, respectively. When the movement mode of a node is local and its travel ends, that node changes its movement mode to roaming with probability 𝑃𝑟 . Moreover, if a travel of a node ends, while it is in roaming movement mode, the node decides to change its movement mode to local with probability 𝑃𝑙 . Note that 𝑟 and 𝑙 in 𝑃𝑟 and 𝑃𝑙 refer to the roaming and local modes, respectively. In case of changing the movement mode to local, the node selects community 𝑐 𝑖 to move into during local mode with probability 𝑃𝑠𝑒𝑙_𝑖 . Let us consider a roaming node that chooses local mode and a community to move in. If it has just ended its travel somewhere in the selected community, the mode is immediately changed; otherwise, it chooses a random position in the selected community and begins to move towards that position by the shortest straight path [18]. We call this movement transitional travel. Unlike [18], it is assumed that in a transitional travel, a node moves with high speed, denoted by 𝑣 𝑡𝑟 𝑎𝑛𝑠 , to reach the community soon. This change is applied to the mobility model introduced in [18] in order to make the mobility model theoretically more tractable. Once a node reaches the previously chosen random position in the community, it begins to move in local mode. The notations introduced in this section are summarized in Table I. There are two specific nodes called source and destination. The source wishes to send a message using epidemic routing to the destination. Adopting the terminology from the field of Epidemiology [13], the nodes that have (have not) already received the message are called infected (susceptible). More- Notation Description 𝑁 Number of communities 𝑀 Total number of nodes 𝐿 Edge length of common area 𝐿𝑐 Edge length of each community 𝑅 Communication range of each node 𝛼 Rate of the duration of a travel in local mode 𝛽 Rate of the duration of a travel in roaming mode 𝑃𝑟 Probability of changing local mode to roaming mode 𝑃𝑙 Probability of changing roaming mode to local mode 𝑃𝑠𝑒𝑙_𝑖 Probability of selecting community 𝑐 𝑖 𝑣 𝑚𝑖𝑛 Minimum speed in local/roaming mode 𝑣 𝑚𝑎𝑥 Maximum speed in local/roaming mode 𝑣 𝑡𝑟 𝑎𝑛𝑠 Speed in a transitional travel over, roaming node and local node are used to refer to the nodes that move in roaming and local modes, respectively. In order to be able to use the benefits of analytical models for analyzing the network, the following assumptions are made, most of them come from the previous works in this area. 1) Communities, frequently visited locations, do not overlap each other [2], [21], [25]. 2) Initially, the movement mode of all nodes is roaming. 3) Speed 𝑣 𝑡𝑟 𝑎𝑛𝑠 is high, the duration of a transitional travel is very short. Based on this assumption, transitional travels are neglected in the proposed models. 4) The communication range of nodes, 𝑅, is much less than both the length of the edges of the communities and the common area, 𝑅 ≪ 𝐿 𝑐 and 𝑅 ≪ 𝐿. This assumption is very common in the literature [8], [15], [21]. 5) The first meeting time of any two nodes moving in the same fixed movement mode, starting from a random time, is exponentially distributed. This assumption is reasonable when 𝑅 ≪ 𝐿 𝑐 and 𝑅 ≪ 𝐿 [15], and has been extensively used in recent years [8], [11]. 6) The first meeting time of a node constantly moving in roaming mode with a set of nodes constantly moving in the same community in local mode is exponentially distributed [10]. 7) The delay of a message transmission, which corresponds to a short time, is negligible [8], [17], [21], [33]–[35]. IV. OVERVIEW OF PREVIOUS MODELS This section presents an overview of the monolithic and folded SRN models proposed in our previous work [10]. Due to the strict limitation of space, we do not present details of SRNs. The formal definition and structure of SRNs can be found in [9], [36], [37]. The previous monolithic model consists of 𝑁 +1 submodels, one per each community and one to represent the state of the destination node. In the previous monolithic model, submodel 𝑆𝑢𝑏 𝑖 , 1 ≤ 𝑖 ≤ 𝑁, represents the situation of nodes frequently visiting community 𝑐 𝑖 excluding the destination node, 𝑖 = 𝑁. Submodel 𝑆𝑢𝑏 𝑖 provides four main places to represent the infected local nodes, the infected roaming nodes, the susceptible local nodes, and the susceptible roaming nodes that frequently 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 𝒕𝒔𝒖𝒔_𝒓𝒍 𝒅𝒆𝒔_𝟏 𝒔𝒖𝒔_𝒍 𝑻𝒆𝒏𝒅_𝒅𝒆𝒔_𝟏 # [𝑮𝒍𝒊𝒏𝒇_𝒅𝒆𝒔_𝟏 ] 𝑻𝒍𝒊𝒏𝒇_𝒅𝒆𝒔_𝟏 𝑷𝒔𝒖𝒔_𝒍 𝒅𝒆𝒄_𝒅𝒆𝒔_𝟏 … 𝒔𝒖𝒔_𝒍𝒍 𝒕𝒅𝒆𝒔_𝟏 𝒕𝒔𝒖𝒔_𝒍𝒓 𝒅𝒆𝒔_𝟏 𝒕𝒔𝒖𝒔_𝒓𝒍 𝒅𝒆𝒔_𝑵 𝒕𝒔𝒖𝒔_𝒓𝒓 𝒅𝒆𝒔 𝒔𝒖𝒔_𝒍 𝑷𝒅𝒆𝒔_𝑵 # 𝒕𝒔𝒖𝒔_𝒍𝒍 𝒅𝒆𝒔_𝑵 𝒍 [𝑮𝒊𝒏𝒇_𝒅𝒆𝒔_𝑵 ] 𝑻𝒍𝒊𝒏𝒇_𝒅𝒆𝒔_𝑵 𝑷𝒔𝒖𝒔_𝒓 𝒅𝒆𝒔 𝟏 # 𝒔𝒖𝒔_𝒍 𝑻𝒆𝒏𝒅_𝒅𝒆𝒔_𝑵 𝒔𝒖𝒔_𝒍 𝑷𝒅𝒆𝒄_𝒅𝒆𝒔_𝑵 𝑷𝒔𝒖𝒔_𝒓 𝒅𝒆𝒄_𝒅𝒆𝒔 𝑻𝒔𝒖𝒔_𝒓 𝒆𝒏𝒅_𝒅𝒆𝒔 𝒓 𝑻𝒊𝒏𝒇_𝒅𝒆𝒔 𝒕𝒔𝒖𝒔_𝒍𝒓 𝒅𝒆𝒔_𝑵 … In this section, we describe the proposed monolithic SRN to evaluate the average and the CDF of delivery delay and the average number of transmissions of the epidemic routing in the network model described in Section III. In addition to 𝑁, 𝑀, 𝛼, 𝛽, 𝑃𝑟 , 𝑃𝑙 , and 𝑃𝑠𝑒𝑙_𝑖 , 1 ≤ 𝑖 ≤ 𝑁, introduced in Section III, the proposed monolithic model has the following input parameters, that are the rates of the exponential functions according to which first meeting times are distributed. • 𝜆: The rate of the first meeting time of any two local nodes moving in the same community • 𝜇: The rate of the first meeting time of any two roaming nodes • 𝛾: The rate of the first meeting time of any roaming node with any local node • 𝜂: The rate of the first meeting time of a roaming node with the set of other nodes that are in local mode and move in the same community. Definition of this kind of first meeting time can be found in [10]. In order to evaluate the measures of interest, the model needs to capture the situation of nodes, in terms of being susceptible or infected, and meetings between susceptible and infected nodes. In order to represent message delivery in the proposed model, the state of the destination node, being susceptible or infected, should be captured by the model. As mentioned in Section III, all nodes move according to the same mobility model, and initially they are placed within the common area with a uniform distribution. Thus, there is no need to capture the identity of non-destination nodes. In order to distinguish the destination node from other nodes, we dedicate a specific submodel, called 𝑆𝑢𝑏 𝑑𝑒𝑠 and represented in Fig. 2, to the destination node. 𝒔𝒖𝒔_𝒍 𝑷𝒅𝒆𝒔_𝟏 … V. T HE P ROPOSED M ONOLITHIC M ODEL 𝑺𝒖𝒃𝒅𝒆𝒔 … visit community 𝑐 𝑖 . Excluding the initial number of tokens, submodels 𝑆𝑢𝑏 𝑖 , 1 ≤ 𝑖 ≤ 𝑁, have the same structures. In order to be able to evaluate the performance of largescale networks, we have proposed a folded model, by folding submodels 𝑆𝑢𝑏 1 , 𝑆𝑢𝑏 2 , . . . , 𝑆𝑢𝑏 𝑁 −1 together into a single submodel, named 𝑆𝑢𝑏 𝑓 . In addition to the place holders for nodes and transitions representing infections and decision of nodes about the movement mode, there are another place acting as a counter, named 𝑃𝑐𝑛𝑡 , and two other transitions in submodel 𝑆𝑢𝑏 𝑓 . These elements enumerate the number of communities, among 𝑐 1 , 𝑐 2 , . . . , 𝑐 𝑁 −1 , which are frequently visited by at least one infected node. In contrast to the monolithic model, the number of susceptible (infected) nodes frequently visiting each community, except community 𝑐 𝑁 , cannot be captured from the folded model. Moreover, the number of local infected nodes and the number of local susceptible nodes in each community are not represented in the folded model. However, the values of these quantities are needed to precisely define guard and rate functions of some timed transitions of the folded model. In order to overcome this shortcoming, we used an approximation which is based on the assumption that nearly the same number of infected nodes and the same number of roaming infected nodes frequently visit each community 𝑐 𝑗 , 1 ≤ 𝑗 ≤ 𝑁. 5 𝒊𝒏𝒇 𝑷𝒅𝒆𝒔 Fig. 2: Submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 of the proposed monolithic model. The time of meetings between two susceptible and infected nodes is essential to model the epidemic routing protocol. Two main factors affect the time of meetings between nodes: i) movement modes of nodes, ii) the community in which each local node move. Thus, the monolithic model needs to capture the states of nodes in terms of being susceptible or infected, the movement modes of nodes, and the communities in which local nodes move. Based on the aforementioned attributes, the non-destination nodes can be classified into the following classes. • 𝑪 𝒔𝒖𝒔_𝒓 : The class of susceptible roaming nodes • 𝑪 𝒊𝒏 𝒇 _𝒓 : The class of infected roaming nodes 𝒔𝒖𝒔_𝒍 • 𝑪𝒋 (1 ≤ 𝒋 ≤ 𝑵): The class of susceptible local nodes moving community 𝑐 𝑗 𝒊𝒏 𝒇 _𝒍 • 𝑪𝒋 (1 ≤ 𝒋 ≤ 𝑵): The class of infected local nodes moving in community 𝑐 𝑗 Unlike the destination node, the identities of other nodes are not important. Capturing only the number of nodes belonging to each above-mentioned classes is sufficient to model the epidemic routing. To this end, each node of the network is represented by a token in the proposed model, and for each above-mentioned class, we consider a place which acts as a repository of the nodes belonging to that class. In addition to 𝑆𝑢𝑏 𝑑𝑒𝑠 , the proposed monolithic model has 𝑁 + 1 other submodels, named 𝑆𝑢𝑏𝑟 , 𝑆𝑢𝑏 𝑙_1 , 𝑆𝑢𝑏 𝑙_2 , . . . , and 𝑆𝑢𝑏 𝑙_𝑁 . Submodels 𝑆𝑢𝑏𝑟 , 𝑆𝑢𝑏 𝑙_1 , and 𝑆𝑢𝑏 𝑙_𝑁 are represented in Fig. 3. Submodels 𝑆𝑢𝑏 𝑙_ 𝑗 , 1 < 𝑗 < 𝑁, have the same graphical representation as 𝑆𝑢𝑏 𝑙_1 and 𝑆𝑢𝑏 𝑙_𝑁 . The role of submodel 𝑆𝑢𝑏𝑟 is to capture the numbers of susceptible and infected roaming nodes, excluding the destination node. Moreover, submodel 𝑆𝑢𝑏 𝑙_ 𝑗 , 1 ≤ 𝑗 ≤ 𝑁, is used to capture the numbers of susceptible and infected local nodes in community 𝑐 𝑗 . Places 𝑃 𝑠𝑢𝑠_𝑟 and 𝑃𝑖𝑛 𝑓 _𝑟 in submodel 𝑆𝑢𝑏𝑟 and places 𝑃 𝑠𝑢𝑠_𝑙 and 𝑗 𝑖𝑛 𝑓 _𝑙 𝑃𝑗 in submodel 𝑆𝑢𝑏 𝑙_ 𝑗 , 1 ≤ 𝑗 ≤ 𝑁, are used as repositories for nodes belonging to classes 𝐶 𝑠𝑢𝑠_𝑟 , 𝐶 𝑖𝑛 𝑓 _𝑟 , 𝐶 𝑠𝑢𝑠_𝑙 , and 𝑗 𝑖𝑛 𝑓 _𝑙 , respectively. Transitions and other places in submodels 𝐶𝑗 𝑆𝑢𝑏𝑟 and 𝑆𝑢𝑏 𝑙_ 𝑗 represent the infections during the meetings, 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 𝑷𝒔𝒖𝒔_𝒍 𝟏 𝒕𝟏𝒔𝒖𝒔_𝒍𝒍 [𝑮𝒍𝒊𝒏𝒇_𝟏 ] 𝑻𝒍𝒊𝒏𝒇_𝟏 # 𝒕𝟏𝒔𝒖𝒔_𝒍𝒓 𝒔𝒖𝒔_𝒍 𝑻𝒆𝒏𝒅_𝟏 [𝑮𝒘 ] 𝑷𝒔𝒖𝒔_𝒍 𝒅𝒆𝒄_𝟏 𝒊𝒏𝒇_𝒍 𝑻𝒆𝒏𝒅_𝟏 [𝑮𝒘 ] 𝒊𝒏𝒇_𝒍𝒍 𝒕𝟏 𝒕𝟏𝒔𝒖𝒔_𝒓𝒍 𝒕𝒔𝒖𝒔_𝒓𝒍 𝑵 𝒊𝒏𝒇_𝒍𝒓 𝒕𝟏 𝒊𝒏𝒇_𝒍 𝑷𝒅𝒆𝒄_𝟏 𝒊𝒏𝒇_𝒍 𝑷𝟏 𝒕𝒔𝒖𝒔_𝒓𝒓 … 𝑷𝒔𝒖𝒔_𝒓 … … # 𝒍 𝑻𝒊𝒏𝒇_𝑵 # 𝑻𝒔𝒖𝒔_𝒍 𝒆𝒏𝒅_𝑵 [𝑮𝒘 ] [𝑮𝒘 ] 𝒊𝒏𝒇_𝒍𝒍 𝒕𝑵 𝒊𝒏𝒇_𝒍 𝑷𝑵 𝒔𝒖𝒔_𝒓 𝑷𝒅𝒆𝒄 Section III, and given that initially only the source node has the message, the initial numbers of tokens in places 𝑃 𝑠𝑢𝑠_𝑟 and 𝑃𝑖𝑛 𝑓 _𝑟 are 𝑀 − 2 and 1, respectively. Transition 𝑟 𝑇𝑖𝑛 𝑓 represents the infection of a susceptible roaming node. [𝑮𝒘 ] # 𝟏 𝒕𝒊𝒏𝒇_𝒓𝒓 𝒊𝒏𝒇_𝒓 𝑻𝒆𝒏𝒅 [𝑮𝒘 ] 𝒊𝒏𝒇_𝒓 𝑷𝒅𝒆𝒄 𝑖𝑛 𝑓 _𝑟 𝒕𝒔𝒖𝒔_𝒍𝒓 𝑵 𝑷𝒔𝒖𝒔_𝒍 𝒅𝒆𝒄_𝑵 𝒊𝒏𝒇_𝒍 𝑷𝒅𝒆𝒄_𝑵 𝒊𝒏𝒇_𝒓𝒍 𝒕𝟏 … … # 𝒊𝒏𝒇_𝒍 𝑻𝒆𝒏𝒅_𝑵 # 𝒔𝒖𝒔_𝒓 [𝑮𝒘 ] 𝑻𝒆𝒏𝒅 𝑻𝒓𝒊𝒏𝒇 𝑷𝒊𝒏𝒇_𝒓 𝒔𝒖𝒔_𝒍𝒍 𝒕𝑵 [𝑮𝒍𝒊𝒏𝒇_𝑵 ] 𝑴 −𝟐 # 𝑺𝒖𝒃𝒍_𝑵 𝒔𝒖𝒔_𝒍 𝑷𝑵 Notation Description inf Infection of a susceptible node dec Deciding about the next movement mode Subscript end Ending of the current travel of a node des Destination node sus Susceptible node inf Infected node Superscript 𝑙 Local node / Local movement mode 𝑟 Roaming node / Roaming movement mode … … # # TABLE II: Notations adopted in naming the elements 𝑺𝒖𝒃𝒓 𝑺𝒖𝒃𝒍_𝟏 6 𝒊𝒏𝒇_𝒍𝒓 𝒕𝑵 𝒊𝒏𝒇_𝒓𝒍 𝒕𝑵 Fig. 3: Submodels 𝑆𝑢𝑏𝑟 , 𝑆𝑢𝑏 𝑙_1 , . . . , 𝑆𝑢𝑏 𝑙_𝑁 . changes in the movement modes, and community selections. In the following, first, the role of elements of each submodel is described, and then the guard and rate functions of the transitions are introduced. The range of 𝑗 in the rest of this paper is from 1 to 𝑁 (1 ≤ 𝑗 ≤ 𝑁). This notation in the subscripts of the names of places and transitions refers to the ID of the corresponding community. A. Elements of submodels In order to facilitate understanding the model, Table II shows the notation used in the elements’ names, as subscripts 𝑖𝑛 𝑓 _𝑙 or superscripts. Place 𝑃 𝑠𝑢𝑠_𝑙 (𝑃 𝑗 ) of submodel 𝑆𝑢𝑏 𝑙_ 𝑗 con𝑗 tains the tokens representing the susceptible (infected) local 𝑙 nodes that are moving in community 𝑐 𝑗 . Transition 𝑇𝑖𝑛 𝑓 _𝑗 represents the infection of a susceptible local node while 𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 moving in community 𝑐 𝑗 . Transition 𝑇𝑒𝑛𝑑_ 𝑗 (𝑇𝑒𝑛𝑑_ 𝑗 ) represents the ending of travels of susceptible (infected) local nodes 𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 moving in community 𝑐 𝑗 . When transition 𝑇𝑒𝑛𝑑_ 𝑗 (𝑇𝑒𝑛𝑑_ 𝑗 ) 𝑖𝑛 𝑓 _𝑙 fires, a token is removed from place 𝑃 𝑠𝑢𝑠_𝑙 (𝑃 𝑗 ) and put 𝑗 𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 into place 𝑃 𝑑𝑒𝑐_ (𝑃 ). As soon as a token is put in place 𝑗 𝑑𝑒𝑐_ 𝑗 𝑖𝑛 𝑓 _𝑙 𝑖𝑛 𝑓 _𝑙𝑙 𝑠𝑢𝑠_𝑟 Moreover, transition 𝑇𝑒𝑛𝑑 (𝑇𝑒𝑛𝑑 ) models the end of travel of a susceptible (infected) roaming node. As soon as a token 𝑖𝑛 𝑓 _𝑟 𝑠𝑢𝑠_𝑟 is put in the places 𝑃 𝑑𝑒𝑐 and 𝑃 𝑑𝑒𝑐 , it is removed upon firing of an immediate transition. Both transitions 𝑡 𝑠𝑢𝑠_𝑟𝑟 and 𝑡 𝑖𝑛 𝑓 _𝑟𝑟 fire with the probability 1 − 𝑃𝑙 , which represents remaining in the roaming mode during the next travel. If a 𝑖𝑛 𝑓 _𝑟 𝑠𝑢𝑠_𝑟 token is in place 𝑃 𝑑𝑒𝑐 (𝑃 𝑑𝑒𝑐 ), with probability 𝑃𝑙 , one of 𝑖𝑛 𝑓 _𝑟𝑙 𝑖𝑛 𝑓 _𝑟𝑙 𝑠𝑢𝑠_𝑟𝑙 𝑠𝑢𝑠_𝑟𝑙 the transitions 𝑡1 , 𝑡2 , . . . , 𝑡 𝑠𝑢𝑠_𝑟𝑙 (𝑡1 , 𝑡2 , ..., 𝑁 𝑖𝑛 𝑓 _𝑟𝑙 𝑖𝑛 𝑓 _𝑟𝑙 𝑠𝑢𝑠_𝑟𝑙 𝑡𝑁 ) fires. Specifically, transitions 𝑡 𝑗 and 𝑡 𝑗 signal that the node that has just finished its travel in roaming mode selects the local mode and community 𝑐 𝑗 to move in. Thus, these transitions fire with probability 𝑃𝑙 · 𝑃𝑠𝑒𝑙_ 𝑗 . As it can be observed in Fig. 2, there is one initial token in 𝑠𝑢𝑠_𝑟 place 𝑃 𝑑𝑒𝑠 of submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 . This token represents the destination node and circulates among places of this submodel 𝑖𝑛 𝑓 𝑠𝑢𝑠_𝑙 until it is put in place 𝑃 𝑑𝑒𝑠 . When this token is in place 𝑃 𝑑𝑒𝑠_ 𝑗 𝑠𝑢𝑠_𝑟 (𝑃 𝑑𝑒𝑠 ), the destination node is in community 𝑐 𝑗 (common area) and moves in local (roaming) mode. Depositing this 𝑖𝑛 𝑓 token in place 𝑃 𝑑𝑒𝑠 represents the delivery of message to the 𝑠𝑢𝑠_𝑙 destination node. Roles of place 𝑃 𝑑𝑒𝑐_𝑑𝑒𝑠_ 𝑗 and transitions 𝑠𝑢𝑠_𝑙𝑙 𝑠𝑢𝑠_𝑙𝑟 𝑠𝑢𝑠_𝑟𝑙 𝑠𝑢𝑠_𝑙 𝑙 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 , 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠_ 𝑗 , 𝑡 𝑑𝑒𝑠_ 𝑗 , 𝑡 𝑑𝑒𝑠_ 𝑗 , 𝑡 𝑑𝑒𝑠_ 𝑗 are similar to 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑙𝑙 𝑙 those of place 𝑃 𝑑𝑒𝑐_ , 𝑗 and transitions 𝑇𝑖𝑛 𝑓 _ 𝑗 , 𝑇𝑒𝑛𝑑_ 𝑗 , 𝑡 𝑗 𝑠𝑢𝑠_𝑟𝑙 𝑡 𝑠𝑢𝑠_𝑙𝑟 , 𝑡 of submodel 𝑆𝑢𝑏 , respectively. Moreover, 𝑙_ 𝑗 𝑗 𝑗 𝑠𝑢𝑠_𝑟 𝑠𝑢𝑠_𝑟 𝑠𝑢𝑠_𝑟𝑟 𝑟 , and 𝑇𝑖𝑛 , 𝑡 𝑑𝑒𝑠 place 𝑃 𝑑𝑒𝑐_𝑑𝑒𝑠 and transitions 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠 𝑓 _𝑑𝑒𝑠 𝑠𝑢𝑠_𝑟 can be presented in a similar manner to the place 𝑃 𝑑𝑒𝑐 and 𝑠𝑢𝑠_𝑟 𝑠𝑢𝑠_𝑟𝑟 𝑟 transitions 𝑇𝑒𝑛𝑑 ,𝑡 , and 𝑇𝑖𝑛 𝑓 of submodel 𝑆𝑢𝑏 𝑟 , respectively. The only difference of the aforementioned elements of submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 with those of submodels 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 is that the elements of 𝑆𝑢𝑏 𝑑𝑒𝑠 represent the situation of the destination node exclusively, while corresponding elements of 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 are used to model the situation of all other susceptible nodes. 𝑖𝑛 𝑓 _𝑙𝑟 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑙𝑙 𝑃 𝑑𝑒𝑐_ or 𝑡 𝑠𝑢𝑠_𝑙𝑟 (𝑡 𝑗 or 𝑡 𝑗 ) 𝑗 𝑗 (𝑃 𝑑𝑒𝑐_ 𝑗 ), transition 𝑡 𝑗 fires with probabilities 1 − 𝑃𝑟 or 𝑃𝑟 , respectively. Transitions 𝑖𝑛 𝑓 _𝑙𝑟 𝑖𝑛 𝑓 _𝑙𝑙 ) represent choosing local and 𝑡 𝑗 𝑡 𝑠𝑢𝑠_𝑙𝑙 and 𝑡 𝑠𝑢𝑠_𝑙𝑟 (𝑡 𝑗 𝑗 𝑗 and roaming modes, respectively, by the susceptible (infected) node, that has just finished its travel in local mode. Places 𝑃 𝑠𝑢𝑠_𝑟 and 𝑃𝑖𝑛 𝑓 _𝑟 are containers for tokens representing the susceptible and infected roaming nodes, respectively. According to the second assumption provided in B. Guard functions As mentioned in Section V-A, the existence of a token in 𝑖𝑛 𝑓 place 𝑃 𝑑𝑒𝑠 indicates that the message is delivered to the destination. Since the average delivery delay is one of our measures of interest, the proposed monolithic model is designed to be absorbed when the token representing the destination is put in 𝑖𝑛 𝑓 place 𝑃 𝑑𝑒𝑠 . To this end, a guard function satisfying condition 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 7 𝑖𝑛 𝑓 #𝑃 𝑑𝑒𝑠 == 0 should be associated with each timed transition in submodels 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 . Symbol "#" shows the number 𝑖𝑛 𝑓 of tokens inside a place (mark of a place), where #𝑃 𝑑𝑒𝑠 refers 𝑖𝑛 𝑓 to the number of tokens in place 𝑃 𝑑𝑒𝑠 . We associate the guard function 𝐺 𝑤 , defined in Eq. (1), to all timed transitions in submodel 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 except 𝑙 transitions 𝑇𝑖𝑛 𝑓 _𝑗. 𝑖𝑛 𝑓 𝐺 𝑤 = (#𝑃 𝑑𝑒𝑠 == 0) (1) 𝑖𝑛 𝑓 In addition to condition #𝑃 𝑑𝑒𝑠 == 0, there is another condition 𝑙 which should be satisfied before firing the transition 𝑇𝑖𝑛 𝑓 _𝑗. Each local node has a chance to meet only roaming nodes and other local nodes of the community in which it moves. Thus, we associate the guard function 𝐺 𝑙𝑖𝑛 𝑓 _ 𝑗 , defined in Eq. (2), to 𝑙 transition 𝑇𝑖𝑛 𝑓 _ 𝑗 to guarantee that there is at least one infected local node in community 𝑐 𝑗 or at least one infected roaming node in the common area.  𝑖𝑛 𝑓 𝑖𝑛 𝑓 _𝑙 𝐺 𝑙𝑖𝑛 𝑓 _ 𝑗 = #𝑃 𝑑𝑒𝑠 == 0 ∧ (#𝑃 𝑗 + #𝑃𝑖𝑛 𝑓 _𝑟 ) > 0 (2) Guard function 𝐺 𝑙𝑖𝑛 𝑓 _ 𝑗 is also associated with transition 𝑙 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 in submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 . If the destination moves in a community during local mode, it meets each infected local node moving in that community with rate 𝜆. Moreover, the destination meets each infected roaming 𝑙 node with rate 𝛾. Thus, the rate of transition 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 is computed by Eq. (5). 𝑖𝑛 𝑓 _𝑙 𝑙 𝑅𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 = #𝑃 𝑗 · 𝜆 + #𝑃𝑖𝑛 𝑓 _𝑟 · 𝛾 (5) Each susceptible roaming node meets an infected roaming node with rate 𝜇. Moreover, the rate with which time taken for each susceptible roaming node to meet the first infected local node in community 𝑐 𝑗 is distributed equals value of function 𝑖𝑛 𝑓 _𝑙 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑛) at 𝑛 = #𝑃 𝑗 . The number of susceptible roaming 𝑟 nodes is equal to #𝑃 𝑠𝑢𝑠_𝑟 . Therefore, the rate of transition 𝑇𝑖𝑛 𝑓 is computed by Eq. (6). 𝑟 𝑠𝑢𝑠_𝑟 𝑅𝑖𝑛 · #𝑃𝑖𝑛 𝑓 _𝑟 · 𝜇 + 𝑓 = #𝑃 𝑁 Õ 𝑖𝑛 𝑓 _𝑙 ) 𝑅ˆ 𝑚𝑒𝑒𝑡 (#𝑃 𝑗 𝑗=1  (6) 𝑟 , the rate of transiIn a similar manner to transition 𝑇𝑖𝑛 𝑓 𝑟 tion 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠 is obtained from Eq. (7). 𝑟 𝑖𝑛 𝑓 _𝑟 𝑅𝑖𝑛 ·𝜇+ 𝑓 _𝑑𝑒𝑠 = #𝑃 𝑁 Õ 𝑖𝑛 𝑓 _𝑙 𝑅ˆ 𝑚𝑒𝑒𝑡 (#𝑃 𝑗 ) (7) 𝑗=1 C. Rate functions Simulation results in [10] show that the first meeting time of a roaming node with a set of 𝑛 local nodes moving in the same community can be assumed to be exponentially distributed. Let 𝑅𝑚𝑒𝑒𝑡 (𝑛) denote the rate of this exponential distribution. 𝑅𝑚𝑒𝑒𝑡 (𝑛), 1 ≤ 𝑛 ≤ 𝑀, is needed to precisely 𝑙 𝑟 compute the rates of transitions 𝑇𝑖𝑛 𝑓 _ 𝑗 and 𝑇𝑖𝑛 𝑓 . However, as mentioned earlier in this section, input parameters of the monolithic model include the values of function 𝑅𝑚𝑒𝑒𝑡 only at 𝑛 = 1 and 𝑛 = 𝑀, respectively denoted by 𝛾 and 𝜂, in order to avoid complication and simplify the formulation. Like in [10], we approximate 𝑅𝑚𝑒𝑒𝑡 (𝑛), 1 < 𝑛 < 𝑀, using 𝛾 and 𝜂. As 𝑛 increases, the chance of the roaming node to meet a local node also increases. Thus, 𝑅𝑚𝑒𝑒𝑡 (𝑛) is an increasing function of 𝑛. We approximate this increasing function as the following linear increasing function of 𝛾 and 𝜂. This approximation is exact for 𝑛 = 1 and 𝑛 = 𝑀.  𝛾𝑛, 𝑛 = 0, 1 ˆ (3) 𝑅𝑚𝑒𝑒𝑡 (𝑛) = 𝜂−𝛾 , 𝑛 >1 𝛾 + (𝑛 − 1) · 𝑀 −2 Each susceptible local node in community 𝑐 𝑗 meets an infected local node in that community with rate 𝜆. As men𝑖𝑛 𝑓 _𝑙 tioned earlier, the number of tokens in place 𝑃 𝑠𝑢𝑠_𝑙 (𝑃 𝑗 ) 𝑗 represents the number of susceptible (infected) local nodes in community 𝑐 𝑗 . The meeting rate of these susceptible and 𝑖𝑛 𝑓 _𝑙 infected nodes is #𝑃 𝑠𝑢𝑠_𝑙 × #𝑃 𝑗 × 𝜆. Moreover, value of 𝑗 𝑠𝑢𝑠_𝑙 function 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑛) at 𝑛 = #𝑃 𝑗 is the rate with which time taken for each infected roaming node to meet the first susceptible local node that moves in community 𝑐 𝑗 is distributed. The number of infected roaming nodes is given by #𝑃𝑖𝑛 𝑓 _𝑟 . 𝑙 Therefore, the rate of transition 𝑇𝑖𝑛 𝑓 _ 𝑗 can be computed by Eq. (4). 𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 𝑙 𝑅𝑖𝑛 · #𝑃 𝑗 𝑓 _ 𝑗 = #𝑃 𝑗 · 𝜆 + #𝑃𝑖𝑛 𝑓 _𝑟 · 𝑅ˆ 𝑚𝑒𝑒𝑡 (#𝑃 𝑠𝑢𝑠_𝑙 ) (4) 𝑗 The duration of the travel is exponentially distributed with rates 𝛼 and 𝛽 in local and roaming modes, respectively. Thus, 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑟 transitions 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠_ 𝑗 and 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠 fire with rates 𝛼 and 𝛽, 𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 respectively. Moreover, the rates of transitions 𝑇𝑒𝑛𝑑_ 𝑗 , 𝑇𝑒𝑛𝑑_ 𝑗 , 𝑖𝑛 𝑓 _𝑟 𝑇𝑒𝑛𝑑 𝑠𝑢𝑠_𝑟 𝑇𝑒𝑛𝑑 and are computed as #𝑃 𝑠𝑢𝑠_𝑙 · 𝛼, 𝑗 𝑠𝑢𝑠_𝑟 𝑖𝑛 #𝑃 · 𝛽, and #𝑃 𝑓 _𝑟 · 𝛽, respectively. 𝑖𝑛 𝑓 _𝑙 #𝑃 𝑗 · 𝛼, VI. T HE P ROPOSED F OLDED A PPROXIMATE M ODEL Containing at least four places per each community among which tokens representing local nodes circulate, the monolithic model is not scalable in terms of 𝑁, the number of communities, and 𝑀, the number of nodes. To overcome this limitation, we propose in this section a folded approximate model to evaluate the performance of epidemic routing in target mobile social networks. In contrast with the monolithic model, in the folded model there is a single submodel, named 𝑆𝑢𝑏 𝑓 , instead of submodels 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 . The subscript 𝑓 in the notations refers to application of the folding technique. As mentioned in Section V, submodels 𝑆𝑢𝑏 𝑙_1 , 𝑆𝑢𝑏 𝑙_2 , . . . , 𝑆𝑢𝑏 𝑙_𝑁 of the monolithic model have the same structure. Thus, in order to prevent rapid growth of the state space, we fold submodels 𝑆𝑢𝑏 𝑙_1 , 𝑆𝑢𝑏 𝑙_2 , . . . , 𝑆𝑢𝑏 𝑙_𝑁 all together. Since 𝑖𝑛 𝑓 _𝑙 places 𝑃 𝑠𝑢𝑠_𝑙 (𝑃 𝑗 ) are folded into a single place, we need 𝑗 𝑖𝑛 𝑓 _𝑟𝑙 to fold also transitions 𝑡 𝑠𝑢𝑠_𝑟𝑙 (𝑡 𝑗 ) of submodel 𝑆𝑢𝑏𝑟 into 𝑗 a single transition. Submodel 𝑆𝑢𝑏 𝑓 is represented in Fig. 4. Table III provides details of submodel 𝑆𝑢𝑏 𝑓 elements that result from folding. 𝑖𝑛 𝑓 _𝑙 In submodel 𝑆𝑢𝑏 𝑓 , only places 𝑃 𝑠𝑢𝑠_𝑙 and 𝑃 𝑓 are 𝑓 used to represent the susceptible and infected local nodes, respectively. Thus, this submodel does not capture the number of local infected (susceptible) nodes moving in a specific community. Since the source is the only initial infected node in the network, capturing the community in which it moves 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 𝒕𝒔𝒖𝒔_𝒓𝒍 𝒇 [𝑮𝒘 ] 𝑷𝒇𝒔𝒖𝒔_𝒍 # 𝒊𝒏𝒇_𝒓𝒍 𝒕𝒇 [𝑮𝒘 ] 𝒊𝒏𝒇_𝒍 𝑻𝒆𝒏𝒅_𝒇 𝒊𝒏𝒇_𝒍𝒍 𝒕𝒇 𝒊𝒏𝒇_𝒍 𝑷𝒅𝒆𝒄_𝒇 𝑻𝒔𝒖𝒔_𝒓 𝒆𝒏𝒅 𝑷𝒔𝒖𝒔_𝒓 # [𝑮𝒘 ] 𝒊𝒏𝒇_𝒓 𝑻𝒆𝒏𝒅 𝒊𝒏𝒇_𝒍𝒓 𝒕𝒇 [𝑮𝒘 ] 𝒓 𝑻𝒊𝒏𝒇 𝒍𝒍 𝒕𝒔𝒓𝒄_𝑵 𝟏 𝑷𝒊𝒏𝒇_𝒓 𝑻𝒍𝒆𝒏𝒅_𝒔𝒓𝒄_𝑵 Element of Corresponding Initial Mark / Submodel 𝑺𝒖𝒃 𝒇 Folded Elements in Rate Function / 𝑖𝑛 𝑓 _𝑟 the Monolithic Model Firing Probability 𝑃 𝑠𝑢𝑠_𝑙 (1 ≤ 𝑗 ≤ 𝑁) 𝑗 0 𝑖𝑛 𝑓 _𝑙 𝑃𝑗 𝑠𝑢𝑠_𝑙 𝑃 𝑑𝑒𝑐_ 𝑗 𝑖𝑛 𝑓 _𝑙 𝑃 𝑑𝑒𝑐_ 𝑗 𝑠𝑢𝑠_𝑙 𝑇𝑒𝑛𝑑_ 𝑗 𝑠𝑢𝑠_𝑟𝑙 𝑡𝑗 𝑡 𝑠𝑢𝑠_𝑙𝑙 𝑗 𝑡 𝑠𝑢𝑠_𝑙𝑟 𝑗 𝑙 𝑇𝑖𝑛 𝑓 _𝑗 𝑖𝑛 𝑓 _𝑙 𝑇𝑒𝑛𝑑_ 𝑗 𝑖𝑛 𝑓 _𝑟𝑙 𝑡𝑗 𝑖𝑛 𝑓 _𝑙𝑙 𝑡𝑗 𝑖𝑛 𝑓 _𝑙𝑟 𝑡𝑗 (1 ≤ 𝑗 ≤ 𝑁) 0 (1 ≤ 𝑗 ≤ 𝑁) 0 (1 ≤ 𝑗 ≤ 𝑁) 0 (1 ≤ 𝑗 ≤ 𝑁) 𝑠𝑢𝑠_𝑙 𝑅𝑒𝑛𝑑_ 𝑓 (1 ≤ 𝑗 ≤ 𝑁) 𝑃𝑙 (1 ≤ 𝑗 ≤ 𝑁) 1 − 𝑃𝑟 (1 ≤ 𝑗 ≤ 𝑁) 𝑃𝑟 (1 ≤ 𝑗 ≤ 𝑁) 𝑙 𝑅𝑖𝑛 𝑓 _𝑓 (1 ≤ 𝑗 ≤ 𝑁) 𝑅𝑒𝑛𝑑_ 𝑓 (1 ≤ 𝑗 ≤ 𝑁) 𝑃𝑙 (1 ≤ 𝑗 ≤ 𝑁) 1 − 𝑃𝑟 (1 ≤ 𝑗 ≤ 𝑁) 𝑃𝑟 𝑖𝑛 𝑓 _𝑙 [𝑮𝒘 ] 𝒍 𝑷𝒅𝒆𝒄_𝒔𝒓𝒄_𝑵 𝒕𝒍𝒓 𝒔𝒓𝒄_𝑵 𝒓 𝑷𝒔𝒓𝒄 𝟏 𝒕𝒓𝒓 𝒔𝒓𝒄 [𝑮𝒘 ] 𝒓 𝑷𝒅𝒆𝒄_𝒔𝒓𝒄 𝒓 𝑻𝒆𝒏𝒅_𝒔𝒓𝒄 𝑖𝑛 𝑓 _𝑟 𝑃 𝑑𝑒𝑐 and transitions 𝑇𝑒𝑛𝑑 and 𝑡 𝑖𝑛 𝑓 _𝑟𝑟 of submodel 𝑆𝑢𝑏𝑟 of the monolithic model, respectively. The only difference between the aforementioned elements of submodel 𝑆𝑢𝑏 𝑠𝑟 𝑐 and those of submodels 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 is that elements of 𝑆𝑢𝑏 𝑠𝑟 𝑐 represent the situation of the source node exclusively, but corresponding elements of 𝑆𝑢𝑏 𝑙_ 𝑗 and 𝑆𝑢𝑏𝑟 model the situation of all infected nodes except the destination node. It 𝑙𝑙 𝑙𝑟 𝑟𝑙 is worth mentioning that transitions 𝑡 𝑠𝑟 𝑐_ 𝑗 , 𝑡 𝑠𝑟 𝑐_ 𝑗 , 𝑡 𝑠𝑟 𝑐_ 𝑗 , and 𝑟𝑟 𝑡 𝑠𝑟 𝑐 fire with probabilities 1 − 𝑃𝑟 , 𝑃𝑟 , 𝑃𝑙 · 𝑃𝑠𝑒𝑙_ 𝑗 , and 1 − 𝑃𝑙 , respectively. In addition to submodels 𝑆𝑢𝑏 𝑓 and 𝑆𝑢𝑏 𝑠𝑟 𝑐 , the proposed folded model has another submodel, named 𝑆𝑢𝑏 𝑑𝑒𝑠 , to represent the situation of the destination node as the monolithic model. Submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 of the folded model has the same graphical representation as the submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 of the monolithic model that is represented in Fig. 2. Thus, the elements of 𝑆𝑢𝑏 𝑑𝑒𝑠 are not described herein. 𝑖𝑛 𝑓 _𝑙 𝑖𝑛 𝑓 _𝑙𝑙 similar to those of place 𝑃 𝑑𝑒𝑐_ 𝑗 and transitions 𝑇𝑒𝑛𝑑_ 𝑗 , 𝑡 𝑗 𝑖𝑛 𝑓 _𝑙𝑟 𝑖𝑛 𝑓 _𝑟𝑙 𝑡𝑗 , 𝑡𝑗 𝒕𝒓𝒍 𝒔𝒓𝒄_𝑵 A. Approximating the number of local nodes in a community 𝑖𝑛 𝑓 _𝑙 during local mode is important to achieve a good accuracy when the probabilities of selecting communities are not equal, and there are a few nodes in the network. Under these conditions, the community in which the source node moves during local mode has a significant effect on the average time at which the first infection occurs. Thus, we model the situation of the source node in a specific submodel, named 𝑆𝑢𝑏 𝑠𝑟 𝑐 , represented in Fig. 5. There exists an initial token in place 𝑃𝑟𝑠𝑟 𝑐 that represents the source node and circulates among places of submodel 𝑆𝑢𝑏 𝑠𝑟 𝑐 . The existence of this token in place 𝑃𝑙𝑠𝑟 𝑐_ 𝑗 (𝑃𝑟𝑠𝑟 𝑐 ) means that the source node is in community 𝑐 𝑗 (common area) and moves in local (roaming) mode. Roles of place 𝑙 𝑙𝑙 𝑙𝑟 𝑟𝑙 𝑃𝑙𝑑𝑒𝑐_𝑠𝑟 𝑐_ 𝑗 and transitions 𝑇𝑒𝑛𝑑_𝑠𝑟 𝑐_ 𝑗 , 𝑡 𝑠𝑟 𝑐_ 𝑗 , 𝑡 𝑠𝑟 𝑐_ 𝑗 , 𝑡 𝑠𝑟 𝑐_ 𝑗 are 𝑖𝑛 𝑓 _𝑙 𝒍𝒓 𝒕𝒔𝒓𝒄_𝟏 Fig. 5: Submodel 𝑆𝑢𝑏 𝑠𝑟 𝑐 of the proposed folded model. TABLE III: Elements of the proposed folded submodel 𝑖𝑛 𝑓 _𝑙 𝑃𝑓 𝑠𝑢𝑠_𝑙 𝑃 𝑑𝑒𝑐_ 𝑓 𝑖𝑛 𝑓 _𝑙 𝑃 𝑑𝑒𝑐_ 𝑓 𝑠𝑢𝑠_𝑙 𝑇𝑒𝑛𝑑_ 𝑓 𝑠𝑢𝑠_𝑟𝑙 𝑡𝑓 𝑡 𝑠𝑢𝑠_𝑙𝑙 𝑓 𝑡 𝑠𝑢𝑠_𝑙𝑟 𝑓 𝑙 𝑇𝑖𝑛 𝑓 _𝑓 𝑖𝑛 𝑓 _𝑙 𝑇𝑒𝑛𝑑_ 𝑓 𝑖𝑛 𝑓 _𝑟𝑙 𝑡𝑓 𝑖𝑛 𝑓 _𝑙𝑙 𝑡𝑓 𝑖𝑛 𝑓 _𝑙𝑟 𝑡𝑓 𝑷𝒍𝒅𝒆𝒄_𝒔𝒓𝒄_𝟏 𝑷𝒍𝒔𝒓𝒄_𝑵 Fig. 4: Submodel 𝑆𝑢𝑏 𝑓 of the proposed folded model. 𝑃 𝑠𝑢𝑠_𝑙 𝑓 𝒕𝒓𝒍 𝒔𝒓𝒄_𝟏 𝒍𝒍 𝒕𝒔𝒓𝒄_𝟏 𝑻𝒍𝒆𝒏𝒅_𝒔𝒓𝒄_𝟏 [𝑮𝒘 ] # 𝒕𝒊𝒏𝒇_𝒓𝒓 𝒊𝒏𝒇_𝒓 𝑷𝒅𝒆𝒄 𝒍 𝑷𝒔𝒓𝒄_𝟏 𝑴 −𝟐 … # [𝑮𝒘 ] 𝒕𝒔𝒖𝒔_𝒍𝒓 𝒇 𝑷𝒔𝒖𝒔_𝒍 𝒅𝒆𝒄_𝒇 𝑺𝒖𝒃𝒔𝒓𝒄 𝑺𝒖𝒃𝒇 … 𝒍 𝑻𝒊𝒏𝒇_𝒇 𝒊𝒏𝒇_𝒍 𝑷𝒇 𝒕𝒔𝒖𝒔_𝒍𝒍 𝒇 [𝑮𝒍𝒊𝒏𝒇_𝒇 ] # 𝒔𝒖𝒔_𝒍 𝑻𝒆𝒏𝒅_𝒇 𝒕𝒔𝒖𝒔_𝒓𝒓 … # 𝑷𝒔𝒖𝒔_𝒓 𝒅𝒆𝒄 8 , of submodel 𝑆𝑢𝑏 𝑙_ 𝑗 of the monolithic model, 𝑟 respectively. Moreover, place 𝑃𝑟𝑑𝑒𝑐_𝑠𝑟 𝑐 and transitions 𝑇𝑒𝑛𝑑_𝑠𝑟 𝑐 𝑟𝑟 and 𝑡 𝑠𝑟 𝑐 can be described in a similar manner with place Places 𝑃 𝑠𝑢𝑠_𝑙 and 𝑃 𝑓 act as repositories for tokens 𝑓 representing susceptible and infected local nodes, respectively. Thus, in contrast with the monolithic model, the number of susceptible and infected local nodes in each community cannot be captured in the folded model. However, the values of these quantities are needed to precisely define guard and rate functions of the timed transitions of submodels 𝑆𝑢𝑏 𝑓 and 𝑆𝑢𝑏 𝑑𝑒𝑠 that represent infection of nodes. To overcome this difficulty, we apply the approximation in Algorithm 1. Let 𝑖𝑛 𝑓 _𝑙 𝑁ˆ 𝑖 ( 𝑁ˆ 𝑖𝑠𝑢𝑠_𝑙 ), 1 ≤ 𝑖 ≤ 𝑁, denote an approximated number of infected (susceptible) local nodes moving in community 𝑐 𝑖 . Algorithm 1 can be used to compute both approximated 𝑖𝑛 𝑓 _𝑙 values 𝑁ˆ 𝑖 and 𝑁ˆ 𝑖𝑠𝑢𝑠_𝑙 based on the number of tokens in 𝑖𝑛 𝑓 _𝑙 , 𝑃 𝑠𝑢𝑠_𝑙 , 𝑃𝑙𝑠𝑟 𝑐_𝑖 , and 𝑃𝑠𝑒𝑙_𝑖 (1 ≤ 𝑖 ≤ 𝑁). Since places 𝑃 𝑓 𝑓 𝑖𝑛 𝑓 _𝑙 the procedures to compute 𝑁ˆ 𝑖 and 𝑁ˆ 𝑖𝑠𝑢𝑠_𝑙 are similar, Algorithm 1 is written in a generic form where 𝑥 can be substituted by inf or sus. 𝑖𝑛 𝑓 _𝑙 In each marking of the folded SRN, there are #𝑃 𝑓 𝑠𝑢𝑠_𝑙 and #𝑃 𝑓 tokens that represent the infected and susceptible 𝑖𝑛 𝑓 _𝑙 local nodes, respectively. Algorithm 1 distributes the #𝑃 𝑓 (#𝑃 𝑠𝑢𝑠_𝑙 ) tokens representing the infected (susceptible) local 𝑓 nodes among communities 𝑐 1 , . . . , 𝑐 𝑁 based on the probabilities 𝑃𝑠𝑒𝑙_1 , . . . , 𝑃𝑠𝑒𝑙_𝑁 , according to which prospective local 𝑖𝑛 𝑓 _𝑙 nodes select communities. 𝑃𝑠𝑒𝑙_𝑖 × #𝑃 𝑓 (𝑃𝑠𝑒𝑙_𝑖 × #𝑃 𝑠𝑢𝑠_𝑙 ) 𝑓 can be a good indicator of the approximate number of infected 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 9 Algorithm 1: Approximation of the number of infected/susceptible local nodes in each community 𝑐 𝑖 (1 ≤ 𝑖 ≤ 𝑁), excluding the destination node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Data: #𝑃 𝑥_𝑙 , 𝑃𝑠𝑒𝑙_𝑖 , #𝑃𝑙𝑠𝑟 𝑐_𝑖 (1 ≤ 𝑖 ≤ 𝑁) 𝑓 𝑥_𝑙 Result: 𝑁ˆ 𝑖 (1 ≤ 𝑖 ≤ 𝑁) ⌉ (1 ≤ 𝑖 ≤ 𝑁); 𝑁ˆ 𝑖𝑥_𝑙 = ⌊𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 𝑓 Í 𝑁 ˆ 𝑥_𝑙 𝑥_𝑙 𝑑 = 𝑖=1 𝑁𝑖 − #𝑃 𝑓 ; for 𝑖 = 1 𝑡𝑜 𝑁 do > 𝑁ˆ 𝑖𝑥_𝑙 then if 𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 𝑓 add 𝑐 𝑖 to 𝑄 + . else add 𝑐 𝑖 to 𝑄 − . + Sort 𝑄 and 𝑄 − based on measure |𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 − 𝑁ˆ 𝑖𝑥_𝑙 | in 𝑓 descending order. while 𝑑 > 0 do 𝑐 𝑘 = remove front element of 𝑄 − ; 𝑁ˆ 𝑘𝑥_𝑙 − −; 𝑑 − −; while 𝑑 < 0 do 𝑐 𝑘 = remove front element of 𝑄 + ; 𝑁ˆ 𝑘𝑥_𝑙 + +; 𝑑 + +; if 𝑥 == 𝑖𝑛 𝑓 then for 𝑖 = 1 𝑡𝑜 𝑁 do if #𝑃𝑙𝑠𝑟 𝑐_𝑖 == 1 then 𝑁ˆ 𝑖𝑥_𝑙 + +; (susceptible) local nodes in community 𝑐 𝑖 . However, this indicator may not be an integer. If that is the case, we round the indicator to the nearest integer, and then we assign as many nodes as that integer to each community. Let ⌊𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 𝑓 ⌉ 𝑥_𝑙 denote the integer nearest to 𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑓 . We define 𝑑 as follows: 𝑁 Õ 𝑥_𝑙 (8) 𝑑= ⌊𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 𝑓 ⌉ − #𝑃 𝑓 , 𝑖=1 𝑖𝑛 𝑓 _𝑙 where #𝑃 𝑥_𝑙 denotes the number of tokens in place 𝑃 𝑓 or 𝑓 𝑃 𝑠𝑢𝑠_𝑙 if 𝑥 = 𝑖𝑛 𝑓 or 𝑥 = 𝑠𝑢𝑠, respectively. In the case 𝑑 is zero, 𝑓 we need to revise the node assignments. In the following, we show how to revise the node assignments for each cases of 𝑑 > 0 and 𝑑 < 0. 1) 𝒅 > 0: We deallocate 𝑑 nodes from the communities, for which their indicators were rounded-up, such that at most one node from each of these communities can be deallocated. We call this part of the algorithm deallocation phase. 2) 𝒅 < 0: We assign −𝑑 more nodes to communities, for which their indicators were rounded-down, such that at most one more node to each of these communities can be allocated. We call this part of the algorithm reallocation phase. Deallocation and reallocation phases are performed using two priority queues of communities, denoted by 𝑄 − and 𝑄 + , respectively. 𝑄 − (𝑄 + ) is a queue of communities, for which their indicators were rounded-up (rounded down), sorted in descending order based on measure 𝑥_𝑙 |(𝑃𝑠𝑒𝑙_𝑖 · #𝑃 𝑥_𝑙 𝑓 ) − ⌊𝑃 𝑠𝑒𝑙_𝑖 · #𝑃 𝑓 ⌉| for each community 𝑐 𝑖 . During deallocation (reallocation) phase, we start from the head of 𝑄 − (𝑄 + ) and deallocate (allocate) one node from (to) each community until |𝑑| nodes are deallocated (allocated). At the end, if the source node is in the local mode and moves in 𝑖𝑛 𝑓 _𝑙 community 𝑐 𝑖 , we increase 𝑁ˆ 𝑖 by one. B. Guard and Rate Functions 𝑖𝑛 𝑓 _𝑙 𝑖𝑛 𝑓 _𝑟 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑟 Transitions 𝑇𝑒𝑛𝑑_ represent the 𝑓 , 𝑇𝑒𝑛𝑑 , 𝑇𝑒𝑛𝑑_ 𝑓 , and 𝑇𝑒𝑛𝑑 end of travels of the susceptible local nodes, susceptible roaming nodes, infected local nodes, and infected roaming nodes, respectively, excluding the source and destination nodes. Since the duration of each travel of local (roaming) nodes is exponentially distributed with rate 𝛼 (𝛽), the rate functions of tran𝑖𝑛 𝑓 _𝑙 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑙 𝑠𝑢𝑠_𝑙 sitions 𝑇𝑒𝑛𝑑_ ·𝛼 𝑓 and 𝑇𝑒𝑛𝑑_ 𝑓 are defined as 𝑅𝑒𝑛𝑑_ 𝑓 = #𝑃 𝑓 𝑖𝑛 𝑓 _𝑙 𝑖𝑛 𝑓 _𝑙 and 𝑅𝑒𝑛𝑑_ 𝑓 = #𝑃 𝑓 𝑠𝑢𝑠_𝑟 𝑇𝑒𝑛𝑑 · 𝛼, respectively. Note that rate of tran- 𝑖𝑛 𝑓 _𝑟 𝑇𝑒𝑛𝑑 sitions and are computed in a similar manner as 𝑙 the monolithic model. Moreover, rates of transition 𝑇𝑒𝑛𝑑_𝑠𝑟 𝑐_ 𝑗 𝑠𝑢𝑠_𝑙 of submodel 𝑆𝑢𝑏 𝑠𝑟 𝑐 and transition 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠_ of submodel 𝑗 𝑟 𝑆𝑢𝑏 𝑑𝑒𝑠 are 𝛼 while transition 𝑇𝑒𝑛𝑑_𝑠𝑟 𝑐 of submodel 𝑆𝑢𝑏 𝑠𝑟 𝑐 𝑠𝑢𝑠_𝑟 and transition 𝑇𝑒𝑛𝑑_𝑑𝑒𝑠 of submodel 𝑆𝑢𝑏 𝑑𝑒𝑠 fire with rate 𝛽. Similarly to the corresponding transitions in the monolithic model, the guard function 𝐺 𝑤 , defined in Eq. (1), is associated with all timed transitions of submodels 𝑆𝑢𝑏 𝑠𝑟 𝑐 and 𝑆𝑢𝑏 𝑓 , 𝑙 except transition 𝑇𝑖𝑛 𝑓 _ 𝑓 to construct an absorbing model. In addition to guard function 𝐺 𝑤 , we need to define other 𝑙 guard functions to be associated to transitions 𝑇𝑖𝑛 𝑓 _ 𝑓 and 𝑙 𝑙 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 . Guard function 𝐺 𝑖𝑛 𝑓 _ 𝑓 , defined by Eq. (9), is 𝑙 𝑙 associated with transition 𝑇𝑖𝑛 𝑓 _ 𝑓 . Transition 𝑇𝑖𝑛 𝑓 _ 𝑓 models meetings of the local susceptible nodes, excluding the destination node, with infected nodes. Such a meeting is possible iff at least one infected node moves in the roaming mode, or movement modes of one susceptible node, except the destination node, and one infected node are local, and they move in Í 𝑖𝑛 𝑓 _𝑙 the same community. Condition 𝑁𝑗=1 𝑁ˆ 𝑠𝑢𝑠_𝑙 · 𝑁ˆ 𝑗 > 0 in 𝑗 Eq. (9) enforces moving of one susceptible node, except the destination node, and one infected node in the local mode at the same community. Moreover, condition #𝑃𝑖𝑛 𝑓 _𝑟 +#𝑃𝑟𝑠𝑟 𝑐 > 0 indicates the presence of at least one infected roaming node. It is worth mentioning that like 𝐺 𝑤 , guard function 𝐺 𝑙𝑖𝑛 𝑓 _ 𝑓 should guarantee that the destination has not received the 𝑖𝑛 𝑓 message. So, condition #𝑃 𝑑𝑒𝑠 == 0 is included. 𝑖𝑛 𝑓 𝐺 𝑙𝑖𝑛 𝑓 _ 𝑓 = (#𝑃 𝑑𝑒𝑠 == 0) ∧ ( 𝑁 Õ 𝑖𝑛 𝑓 _𝑙 𝑁ˆ 𝑠𝑢𝑠_𝑙 · 𝑁ˆ 𝑗 > 0) ∨ (#𝑃𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 > 0) 𝑗 𝑗=1  (9) In a similar way, we associate guard function 𝐺 𝑙𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 , 𝑙 defined by Eq. (10), to transition 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 . The first and second conditions in Eq. (10) represent the presence of at least one infected local node in community 𝑐 𝑗 and one infected roaming node, respectively. 𝑖𝑛 𝑓 _𝑙 𝐺 𝑙𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 = ( 𝑁ˆ 𝑗 > 0) ∨ (#𝑃𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 > 0) (10) Note that roaming susceptible nodes have chance to meet each infected node, and there is at least one infected node, the source, always in the network. Thus, function 𝐺 𝑤 is an 𝑟 , and we do appropriate guard function for transition 𝑇𝑖𝑛 𝑓 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 10 not need to include any condition regarding the numbers of infected and susceptible nodes. Any two susceptible and infected local nodes in community 𝑐 𝑗 meet with rate 𝜆. Therefore, the rate at which the non-destination local nodes in community 𝑐 𝑗 get infected by the infected non-destination local nodes in that community 𝑖𝑛 𝑓 _𝑙 can be computed as 𝑁ˆ 𝑠𝑢𝑠_𝑙 · 𝑁ˆ 𝑗 · 𝜆. Subsequently, the 𝑗 summation of this rate over 𝑗 = 1, 2, . . . , 𝑁 results in the total rate of infecting the non-destination susceptible local nodes by the infected local nodes. Places 𝑃𝑖𝑛 𝑓 _𝑟 and 𝑃𝑟𝑠𝑟 𝑐 are dedicated to contain the tokens representing the infected roaming nodes. Therefore, the number of these nodes is equal to #𝑃𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 . Distribution rate of the time taken for each infected roaming node to meet one of the susceptible local nodes in community 𝑐 𝑗 equals the value of function 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑛) at 𝑛 = 𝑁ˆ 𝑠𝑢𝑠_𝑙 , represented as 𝑅ˆ 𝑚𝑒𝑒𝑡 ( 𝑁ˆ 𝑠𝑢𝑠_𝑙 ). Thus, 𝑗 𝑗 𝑖𝑛 𝑓 _𝑟 𝑟 ) refers to the rate of infect(#𝑃 + #𝑃𝑠𝑟 𝑐 ) × 𝑅ˆ 𝑚𝑒𝑒𝑡 ( 𝑁ˆ 𝑠𝑢𝑠_𝑙 𝑗 ing the local nodes moving in community 𝑐 𝑗 by the infected 𝑙 roaming nodes. Therefore, the rate of transition 𝑇𝑖𝑛 𝑓 _ 𝑓 is computed with Eq. (11). 𝑙 𝑅𝑖𝑛 𝑓 _𝑓 = 𝑁  Õ 𝑖𝑛 𝑓 _𝑙 𝑁ˆ 𝑠𝑢𝑠_𝑙 𝑁ˆ 𝑗 𝜆 𝑗 (11) 𝑗=1 + (#𝑃 𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 ) × ) 𝑅ˆ 𝑚𝑒𝑒𝑡 ( 𝑁ˆ 𝑠𝑢𝑠_𝑙 𝑗  If the movement mode of the destination node is local, it meets each infected roaming node with rate 𝛾 and each infected local node in the community, in which the destination node moves, 𝑙 with rate 𝜆. Thus, the rate of transition 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠_ 𝑗 is obtained from Eq. (12). 𝑖𝑛 𝑓 _𝑙 𝑙 𝑖𝑛 𝑓 _𝑟 𝑅𝑖𝑛 + #𝑃𝑟𝑠𝑟 𝑐 ) · 𝛾 + 𝑁ˆ 𝑗 · 𝜆, 𝑓 _𝑑𝑒𝑠_ 𝑗 = (#𝑃 (12) 𝑖𝑛 𝑓 _𝑙 where (#𝑃𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 ) · 𝛾 and 𝑁ˆ 𝑗 · 𝜆 are equal to the rate of infecting the destination node by the infected roaming nodes and the infected local nodes in community 𝑐 𝑗 , respectively. Any two roaming nodes meet with rate 𝜇. Thus, the rate of infecting a single susceptible roaming node by infected roaming nodes can be computed as (#𝑃𝑖𝑛 𝑓 _𝑟 + #𝑃𝑟𝑠𝑟 𝑐 ) · 𝜇. Moreover, the rate of the time taken for a susceptible roaming node to meet one of infected local nodes, in a community, is 𝑟 estimated as 𝑅ˆ 𝑚𝑒𝑒𝑡 . Thus, the rate of transition 𝑇𝑖𝑛 𝑓 _𝑑𝑒𝑠 can be computed by Eq. (13). 𝑟 𝑖𝑛 𝑓 _𝑟 𝑅𝑖𝑛 + #𝑃𝑟𝑠𝑟 𝑐 ) · 𝜇 + 𝑓 _𝑑𝑒𝑠 = (#𝑃 𝑁 Õ 𝑖𝑛 𝑓 _𝑙 𝑅ˆ 𝑚𝑒𝑒𝑡 ( 𝑁ˆ 𝑖 ) (13) 𝑖=1 The tokens in place 𝑃 𝑠𝑢𝑠_𝑟 represent the susceptible roaming nodes, excluding the destination node. The infection rate of a 𝑟 single roaming node is equal to 𝑅𝑖𝑛 𝑓 _𝑑𝑒𝑠 . Thus, multiplying 𝑟 #𝑃 𝑠𝑢𝑠_𝑟 by 𝑅𝑖𝑛 , we get the total infection rate of non𝑓 _𝑑𝑒𝑠 destination susceptible roaming nodes. Therefore, the rate of 𝑟 , which represents the infection of roaming transition 𝑇𝑖𝑛 𝑓 nodes, can be computed by Eq. (14). 𝑁   Õ 𝑖𝑛 𝑓 _𝑙 𝑟 𝑠𝑢𝑠_𝑟 𝑖𝑛 𝑓 _𝑟 𝑟 ˆ ˆ 𝑅𝑖𝑛 = #𝑃 · (#𝑃 + #𝑃 ) · 𝜇 + 𝑅 ( 𝑁 ) 𝑚𝑒𝑒𝑡 𝑠𝑟 𝑐 𝑓 𝑖 𝑖=1 (14) VII. P ERFORMANCE M EASURES In this section, the performance measures and the way to compute them, by applying the proposed models, are presented: Average Delivery Delay- As mentioned in Sections V and VI, the proposed monolithic and folded models are absorbed 𝑖𝑛 𝑓 when a token is put in place 𝑃 𝑑𝑒𝑠 , representing the delivery of the message to the destination. Thus, the Mean Time To Absorption (MTTA) in both monolithic and folded models represents the average delivery delay. Average Number of Transmissions- This measure can be computed from the proposed models after an appropriate reward rate is assigned to each tangible marking of SRNs. According to Section V-A, tokens representing the infected 𝑖𝑛 𝑓 _𝑙 nodes, except the destination, circulate among places 𝑃 𝑗 and 𝑃𝑖𝑛 𝑓 _𝑟 of the monolithic model. Thus, in each marking of the monolithic SRN, the sum of the numbers of tokens in these places represents the number of infected nodes, excluding the destination but including the source, that is equal to the number of transmissions. If we assign the reward rate represented in Eq. (15) to each marking of the monolithic SRN, the average reward rate at time 𝑡 is equal to the average number of transmissions until time 𝑡. 𝑁 Õ 𝑖𝑛 𝑓 _𝑙 #𝑃 𝑗 + #𝑃𝑖𝑛 𝑓 _𝑟 (15) 𝑟𝑚 = 𝑗=1 As 𝑡 increases, the average reward rate at time 𝑡 converges to the average number of transmissions by the delivery time. Thus, if 𝑡 is large enough, the average number of transmissions by time of delivery is obtained. Similarly, the average number of transmissions can be obtained from the folded model. Tokens representing the infected nodes excluding the source 𝑖𝑛 𝑓 _𝑙 and destination nodes are hold in places 𝑃 𝑓 and 𝑃𝑖𝑛 𝑓 _𝑟 . Thus, the appropriate reward rate, to be assigned to markings of the folded SRN, is obtained from Eq. (16). Note that addition of 1 in this equation is due to counting also the transmission of the message to the destination node. 𝑖𝑛 𝑓 _𝑙 𝑟 𝑓 = #𝑃 𝑓 + #𝑃𝑖𝑛 𝑓 _𝑟 + 1 (16) CDF of the Delivery Delay- The probability of delivery of the message no later than time 𝑡, 𝑡 > 0, can be computed using transient analysis of the proposed SRNs. To this end, we need 𝑖𝑛 𝑓 to assign the reward rate #𝑃 𝑑𝑒𝑠 to each marking of the SRNs. The CDF of the delivery delay at time 𝑡 is equal to the average reward rate at time 𝑡. After computing the parameters 𝜆, 𝜇, 𝛾, and 𝜂, we can numerically solve the proposed models, and compute performance metrics using the Stochastic Petri Net Package (SPNP) [38]. This tool automatically converts an SRN to its underlying CTMC and facilitates computing the measures of interest. VIII. P ERFORMANCE EVALUATION This section presents the results obtained with the monolithic and folded models, which are validated. Moreover, in this section, we propose an ODE model for epidemic routing in the target network, and compare it with the folded model in terms of accuracy. 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 11 𝑵 Community (𝑐 𝑖 ) Coordinate of Center 𝑐1 (250, 250) 3 𝑐2 (250, 750) 𝑐3 (750, 250) 𝑐1 (𝐿/5 + 50, 𝐿/5 + 50) 4 𝑐2 (𝐿/5 + 50, 4𝐿/5 − 50) 𝑐3 (4𝐿/5 − 50, 𝐿/5 + 50) 𝑐4 (4𝐿/5 − 50, 4𝐿/5 − 50) 𝑐1 (250, 250) 𝑐2 (250, 750) 5 𝑐3 (750, 250) 𝑐4 (750, 750) 𝑐5 (500, 500) 𝑐1 , 𝑐2 (150, 150), (150, 500) 𝑐3 , 𝑐4 (150, 850), (500, 150) 10 𝑐5 , 𝑐6 (500, 350), (500, 650) 𝑐7 , 𝑐8 (500, 850), (850, 150) 𝑐 9 , 𝑐 10 (850, 500), (850, 850) 𝑷𝒔𝒆𝒍_𝒊 0.2 0.4 0.4 0.2 0.4 0.3 0.1 0.2 0.4 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 Network Setting: We set the network parameters as in [3] and [18]. Specifically, the values of parameters are as follows, unless otherwise noted. Parameters 𝐿, 𝐿 𝑐 , 𝑃𝑙 , and 𝑃𝑟 are set to 1000 𝑚, 100 𝑚, 0.8, and 0.2, respectively. Moreover, the average duration of a travel in local and roaming modes is 80 𝑠 and 520 𝑠, (𝛼 = 1/80 and 𝛽 = 1/520), respectively. According to [3] and [18], these setting matches the MIT trace. It is worth noting that parameters 𝑅, 𝑣 𝑚𝑖𝑛 , 𝑣 𝑚𝑎𝑥 , and 𝑣 𝑡𝑟 𝑎𝑛𝑠 are 10 𝑚, 5 𝑚/𝑠, 15 𝑚/𝑠, and 20 𝑚/𝑠, respectively. Table IV shows the locations of communities and the probabilities at which they are selected by the prospective local nodes for different values of 𝑁. Considering the left-lower corner of common area as the origin of a coordinate system, communities are centered in the coordinates established in Table IV. Rates of Meeting Time Distributions: Before using the proposed models to evaluate the performance of epidemic routing, we need to compute some input parameters, namely 𝜆, 𝜇, 𝛾, and 𝜂, by simulation. In order to obtain 𝜆 (𝜇), in each run of the simulation, two nodes are uniformly placed in an 𝐿 𝑐 × 𝐿 𝑐 (𝐿 × 𝐿) square, and then nodes are moved until they meet each other. Similarly, in order to compute 𝛾, one node is uniformly placed in an 𝐿 × 𝐿 square, and one node is placed uniformly in an 𝐿 𝑐 ×𝐿 𝑐 square within the aforementioned 𝐿×𝐿 square. Then, the former and latter nodes move in the 𝐿 × 𝐿 and 𝐿 𝑐 × 𝐿 𝑐 squares, respectively, until they meet each other. Parameter 𝜂 is obtained in a similar way when 𝛾 is computed. Validation Method: In order to validate the proposed models, the results of the monolithic and folded models are comparatively assessed against the simulation results. To achieve this end, the network under-analysis is simulated by applying the discrete-event simulation developed in Java. Although the transmission delays are not considered in the proposed models, they are considered in the simulation. We assume that the transmission speed of each node and the message size are 2.5 MBps and 25 KB, respectively. This transmission speed could be provided by Bluetooth technology. 1 0.9 CDF of the Delivery Delay TABLE IV: Locations of communities and the probabilities of choosing them by prospective local nodes. 0.8 Monolithic Model Simulation 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 300 600 900 1,200 1,500 Time, t (s) Fig. 6: The CDF of the delivery delay for 𝑁 = 4 and 𝑀 = 15. A. Validation of the proposed models The Monolithic Model: Fig. 6 represents the CDF of the delivery delay obtained with the monolithic model and by simulation for the aforementioned network with four communities (𝑁 = 4) and 15 nodes (𝑀 = 15). The maximum error of the analytical results reported in Fig. 6 is 6.32% indicating high accuracy of the monolithic model to predict CDF of the delivery delay. Before continuing to present the numerical results, it is worth mentioning that abbreviations Mono., Fold., and Sim. used in tables and figures, stand for the monolithic model, the folded model, and simulation, respectively. Table V presents the average delivery delay and the average number of transmissions obtained with the proposed monolithic model and by simulation. The Percent Errors of the results computed from the monolithic model with respect to the corresponding results computed by simulation are represented in columns PE. In Table V, for each result obtained from simulation, the 95% confidence interval is also presented. Due to memory shortage, the monolithic model cannot be solved for some configurations. Notation "-" in Table V shows these configurations, where the monolithic model encounters a scalability problem in terms of the number of communities, 𝑁, and the number of nodes, 𝑀. As an example, for networks consisting of 4 communities (𝑁 = 4), a system with 64 GB memory space cannot solve the monolithic model even when there are only 20 nodes in the network (𝑀 = 20). As it can be observed in Table V, the results obtained with the monolithic model and by simulation are close indicating that the monolithic SRN accurately models the network. Moreover, the average number of transmissions does not depend on the number of communities, 𝑁, and consequently the location visiting preference. According to the results represented in Table V, the average number of transmissions is nearly 𝑀/2. The Folded Model: In order to evaluate the performance of epidemic routing on a large scale network, the folded model was adopted. Fig. 7(a) represents the CDF of the delivery delay obtained with the folded model and by simulation for a network with four communities (𝑁 = 4) and 100 nodes (𝑀 = 100). As it can be observed in Fig. 7(a), simulation and analytical results are very close to each other, indicating high accuracy of the folded model to predict CDF of the delivery delay. Fig. 7(b) represents the average number of transmissions of 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 12 TABLE V: Comparison of the results obtained with the monolithic model and by simulation. 3 4 5 1 Folded Model Simulation CDF of the Delivery Delay 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 30 70 110 150 190 230 270 310 350 Time, t (s) (a) Delivery Delay (𝑠) Number of Transmissions Confidence Interval Average Confidence Interval PE Lower Bound Upper Bound Mono. Sim. PE Lower Bound Upper Bound 3.16 808.18 831.44 4.95 5.01 1.06 4.95 5.06 4.58 633.75 650.06 7.39 7.49 1.40 7.41 7.58 6.61 528.20 541.40 9.82 9.94 1.30 9.82 10.07 1.92 863.21 887.78 4.96 5.02 1.21 4.96 5.07 5.39 655.91 672.87 7.39 7.51 1.65 7.43 7.60 550.01 563.83 9.99 9.87 10.11 3.34 888.40 914.06 4.96 5.01 0.96 4.95 5.06 3.77 689.35 707.23 7.39 7.57 2.27 7.48 7.66 561.03 575.01 9.99 9.87 10.11 110 100 90 80 70 60 50 40 30 20 10 0 4,000 Folded Model Simulation 3,000 2,500 2,000 1,500 1,000 500 0 0 1,200 Fold., 𝑃𝑟 = 0.2, 𝑃𝑙 = 0.8 Sim., 𝑃𝑟 = 0.2, 𝑃𝑙 = 0.8 Fold., 𝑃𝑟 = 0.8, 𝑃𝑙 = 0.2 Sim., 𝑃𝑟 = 0.8, 𝑃𝑙 = 0.2 3,500 20 40 60 80 100 120 140 160 180 200 𝑀 2 3 4 5 7 6 8 800 600 400 200 0 10 9 20 30 40 50 60 70 80 90 100 𝑀 (b) (a) Fig. 8: The average delivery delay obtained with the folded SRN and by simulation when 𝑁 = 10. 2,500 Sim., 𝑅 = 5 Mono., 𝑅 = 5 Fold., 𝑅 = 5 Sim., 𝑅 = 10 Mono., 𝑅 = 10 Fold., 𝑅 = 10 2,000 1,500 Average Delivery Delay (𝑠) Average Delivery Delay (𝑠) 2,500 the message obtained with the folded model and the simulation when the network under-analysis consists of four communities (𝑁 = 4), and 𝑀 varies from 10 to 200. As it can be observed in Fig. 7(b), the folded model is very accurate to be used for predicting the average number of transmissions. The percent errors corresponding to the results represented in Fig. 7(b) is less than 2% for 𝑀 > 20. As shown in Fig. 7(b), the average number of transmissions changes approximately linearly as 𝑀 increases. Similarly to Table V, the results obtained from the analytical model and the simulation represented in Fig. 7(b) indicates that 𝑀/2 is an accurate estimation for the average number of transmissions. Fig. 8 represents the average delivery delay obtained from the folded model and by simulation for a large-scale network with 10 communities (𝑁 = 10). As it can be seen in that figure, the folded model can accurately evaluate the average delivery delay when the number of communities is large. Moreover, as observed in Fig. 8(a), increasing 𝑃𝑟 and decreasing 𝑃𝑙 yield higher average delivery delay given that the average time taken for the meeting of two roaming nodes is greater than two local nodes moving in the same community. Comparison of the Proposed Models: Fig. 9 represents the average delivery delay obtained with the monolithic and the folded models and by simulation for different values of 𝑀, when the network under-analysis consists of four communities (𝑁 = 4). Since the monolithic model cannot be solved in practice for 𝑀 > 19 due to the state space explosion, the maximum value of 𝑀 is 19 in Fig. 9. In addition to the default setting of parameters, Figs. 9(a) and 9(b) represent the results of the proposed models and simulation for 𝑅 = 5 𝑚 Folded Model Simulation 1,000 𝑀 (b) Fig. 7: Numerical results obtained from the folded model and by the simulation for 𝑁 = 4. The Average Delivery Delay (𝑠) Average Mono. Sim. 10 845.69 819.81 15 671.34 641.91 20 570.16 534.80 10 892.31 875.50 15 700.22 664.39 20 556.92 10 931.34 901.23 15 724.65 698.29 20 568.02 The Average Delivery Delay (𝑠) 𝑴 The Average Number of Transmissions 𝑵 1,000 500 0 10 11 12 13 14 15 16 𝑀 (a) 𝐿 = 1000 𝑚 17 18 19 Sim. Mono. Fold. 2,000 1,500 1,000 500 0 10 11 12 13 14 15 16 17 18 19 𝑀 (b) 𝐿 = 500 𝑚 and 𝑅 = 10 𝑚 Fig. 9: The average delivery delay for 𝑁 = 4. and 𝐿 = 500 𝑚, respectively. As it can be seen in Fig. 9, the results of the monolithic model are very close to the results of the simulation indicating high accuracy of the monolithic model. Moreover, the results of the folded model is close to the results of the simulation and the monolithic model. It shows that the folded model accurately approximates the monolithic model. B. Analysis of the number of transmissions by delivery time In order to justify the linear behaviour of the average number of transmission observed in Fig. 7(b) and Table V, we present the following theorem about the average number of transmission in a more general network model. Theorem 1: The number of transmissions by the time of delivery, including the forwarding to the destination node, under epidemic routing follows a uniform distribution, in any 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 13 arbitrary network, where at any time 𝑡 ≥ 0 positions of nodes are independent and have the same PDF. Proof: Label the transmissions of the message up to the delivery of the message to the destination node, 𝑇1 , 𝑇2 , . . . , 𝑇𝑛𝑢𝑚 , where 𝑛𝑢𝑚 denotes the number of transmissions, and 𝑇𝑖 does not occur after 𝑇 𝑗 iff 𝑖 < 𝑗. Due to the i.i.d. positions of nodes, the probability of forwarding the message to an arbitrary susceptible node during transmission 𝑇𝑖 , 1 ≤ 𝑖 ≤ 𝑛𝑢𝑚, is 1/(𝑀 − 𝑖). Initially, there exist 𝑀 − 1 susceptible nodes in the network. Thus, the destination node receives the message during transmission 𝑇1 with the probability 1/(𝑀 − 1). If only transmissions 𝑇1 , 𝑇2 , . . . , 𝑇𝑖−1 , 2 ≤ 𝑖 ≤ 𝑛𝑢𝑚, have occurred, 𝑀 −𝑖 nodes are still susceptible. Thus, if the message has not been forwarded to the destination node in one of the transmissions 𝑇1 , 𝑇2 , . . . , 𝑇𝑖−1 , the destination node receives (does not receive) the message during transmission 𝑇𝑖 with probability 1/(𝑀 − 𝑖) ((𝑀 − 𝑖 − 1)/(𝑀 − 𝑖)). As a result, the probability of forwarding the message to the destination node during transmission 𝑇𝑖 is obtained by Eq. (17). 𝑀 − (𝑖 − 1) − 1 1 𝑀 −2 𝑀 −3 × ×···× × 𝑀 −1 𝑀 −2 𝑀 − (𝑖 − 1) 𝑀 −𝑖 1 = . 𝑀 −1 (17) 𝑝(𝑖) = Note that this proof is valid even if some transmissions occur simultaneously. Corollary 1: The average number of transmission under epidemic routing by the delivery time in any arbitrary network with 𝑀 nodes, where at any time 𝑡 ≥ 0 positions of nodes are independent and have the same PDF, is 𝑀/2. Proof: According to Theorem 1, the probability of forwarding the message 𝑖 times, 1 ≤ 𝑖 ≤ 𝑀−1, by time of delivery including the forwarding to the destination node, is 1/(𝑀 −1). Thus, the average number of transmissions is computed as, 𝑛𝑢𝑚 = 1 𝑀 · (1 + 2 + · · · + (𝑀 − 1)) = . 𝑀 −1 2 (18) Given that initially, nodes are randomly placed within the common area with a uniform distribution, and they select the communities according to the same PDF, as mentioned in Section III, the herein target network satisfies the condition given in Theorem 1. That is not the case of the network considered in our previous work [10] where the community each node frequently visits is different from the communities some other nodes frequently visit. However, the results of Fig. 8 in [10] indicate that the average number of transmissions can be estimated as a linear function of the total number of nodes. As the number of transmissions is an important performance measure, it is worth to characterize that when tendencies of nodes to visit a community differ. However, it is challenging, and we leave it for future work. C. Comparison of the folded model with the ODE approach To the best of our knowledge, there is no analytical approach in the literature, considering exactly the same network model, so we cannot entirely compare the proposed models with the previous approaches. Modeling as ODEs is the main approach to evaluate the performance of DTNs, it was extensively used in the literature [6], [12], [13], [39]. Hence, we derive an ODE model for epidemic routing in the defined target network, and then compare the accuracy of the proposed folded model with the proposed ODE model. ODE models are derived from CTMCs [6]. A CTMC modeling the epidemic routing in the target network should have at least 2𝑁 + 1 state variables, in order to represent the number of nodes belonging to each of 𝑖𝑛 𝑓 _𝑙 , 1 ≤ 𝑗 ≤ 𝑁, which , 𝐶𝑗 classes 𝐶 𝑠𝑢𝑠_𝑟 , 𝐶 𝑖𝑛 𝑓 _𝑟 , 𝐶 𝑠𝑢𝑠_𝑙 𝑗 is essential to capture the message propagation. In the ODE approach, the derivative of the average value of each state variable is estimated basically using the rates of incoming and outgoing transitions of states. In order to model the epidemic routing with ODEs, we consider a CTMC having 2𝑁+1 state variables which represent 𝑖𝑛 𝑓 _𝑙 , and the number of nodes belonging to classes 𝐶 𝑖𝑛 𝑓 _𝑟 , 𝐶𝑖 𝑠𝑢𝑠_𝑙 𝑙 𝑟 𝐶𝑖 , 1 ≤ 𝑖 ≤ 𝑁. We use functions 𝐼 (𝑡), 𝐼𝑖 (𝑡), and 𝑆𝑖𝑙 (𝑡) to represent the average value of the above-mentioned state variables at time 𝑡. Specifically, 𝐼𝑖𝑙 (𝑡) and 𝑆𝑖𝑙 (𝑡) denote the average number of infected and susceptible local nodes in community 𝑐 𝑖 at time 𝑡, respectively, and 𝐼 𝑟 (𝑡) denotes the average number of infected roaming nodes at time 𝑡. Thus, the average number of susceptible roaming nodes at time 𝑡 Í𝑁 𝑙 (𝐼𝑖 (𝑡) + 𝑆𝑖𝑙 (𝑡)). Using can be computed as 𝑀 − 𝐼 𝑟 (𝑡) − 𝑖=1 functions 𝐼𝑖𝑙 (𝑡), 𝑆𝑖𝑙 (𝑡), and 𝐼 𝑟 (𝑡) and Eq. (20), we model the network described in Section III by 2𝑁 + 1 ODEs represented by equations (19) to (22), 1 ≤ 𝑖 ≤ 𝑁. Eqs. (19), (21), and (22) represent the derivatives of 𝐼𝑖𝑙 (𝑡), 𝑆𝑖𝑙 (𝑡), and 𝐼 𝑟 (𝑡), respectively. Three events change the number of infected local nodes in community 𝑐 𝑖 : i) change of one of those nodes to the roaming mode; ii) selecting community 𝑐 𝑖 by an infected node which changes to local mode; iii) infection of a susceptible node in community 𝑐 𝑖 . The travel of each local node is exponentially distributed with rate 𝛼, and the node goes to the roaming mode with probability 𝑃𝑟 after its travel. Thus, the first above-mentioned event happens with rate 𝐼𝑖𝑙 (𝑡) · 𝛼 · 𝑃𝑟 . The travel of an infected roaming node is distributed with rate 𝛽. After finishing the travel, the node chooses the local mode with probability 𝑃𝑙 , and selects community 𝑐 𝑖 with probability 𝑃𝑠𝑒𝑙_𝑖 . Thus, the second event happens with rate 𝐼 𝑟 (𝑡) · 𝛽 · 𝑃𝑙 · 𝑃𝑠𝑒𝑙_𝑖 . Moreover, meeting of a susceptible local node in community 𝑐 𝑖 with a local infected node in that community or a roaming infected node happen with rate 𝑆𝑖𝑙 (𝑡) · 𝐼𝑖𝑙 (𝑡) · 𝜆 or 𝐼 𝑟 (𝑡) · 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑆𝑖𝑙 (𝑡)), respectively. Thus, the derivative of 𝐼𝑖𝑙 (𝑡) can be computed as (19). 𝑑𝐼𝑖𝑙 (𝑡) = −𝐼𝑖𝑙 (𝑡)𝛼𝑃𝑟 + 𝐼 𝑟 (𝑡) 𝛽𝑃𝑙 𝑃𝑠𝑒𝑙_𝑖 + 𝑆𝑖𝑙 (𝑡)𝐼𝑖𝑙 (𝑡)𝜆 𝑑𝑡  + 𝐼 𝑟 (𝑡) 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑆𝑖𝑙 (𝑡)) , (19) Note that in order to use function 𝑅ˆ 𝑚𝑒𝑒𝑡 to define ODEs, we rewrite it as follows, 𝜂−𝛾 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑛) = 𝛾+𝜃 (1−𝑛)·(𝑛−1)·𝛾+𝜃 (𝑛−1)·(𝑛−1)· , (20) 𝑀 −2 where 𝜃 is the unit step function. Similar to the way the derivative of 𝐼𝑖𝑙 (𝑡) is computed, 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology 1,300 1,200 1,100 1,000 900 800 700 600 500 400 300 200 100 10 14 TABLE VI: Number of states of the proposed SRN models. 210 Simulation Folded Model ODE Model 20 30 40 50 60 70 80 The Average Delivery Delay (𝑠) The Average Delivery Delay (𝑠) IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 90 100 Simulation Folded Model ODE Model 190 𝑵 𝑴 5 10 15 170 150 130 110 90 70 100 120 𝑀 140 160 180 200 𝑀 (a) (b) Fig. 10: The average delivery delay obtained with the folded SRN, the ODE model, and by simulation when 𝑁 = 4. 3 Mono. 1,475 56,100 578,000 4 Fold. 400 3,300 11,200 Mono. 3,870 287,430 4,884,780 Fold. 600 4,950 16,800 TABLE VII: Number of states of the proposed monolithic model and the previous monolithic model proposed in [10], when 𝑁 = 4. 𝑴 Proposed Monolithic SRN Previous Monolithic SRN 8 66,660 8,400 12 999,570 192,000 16 7,821,768 2,205,000 derivatives of 𝑆𝑖𝑙 (𝑡) and 𝐼 𝑟 (𝑡) can be computed as follows. 𝑁 Õ 𝑑𝑆𝑖𝑙 (𝑡)  (𝑆 𝑙𝑗 (𝑡) + 𝐼 𝑙𝑗 (𝑡)) · 𝛽 · 𝑃𝑙 · 𝑃𝑠𝑒𝑙_𝑖 = 𝑀 − 𝐼 𝑟 (𝑡) − 𝑑𝑡 𝑗=1 − 𝑆𝑖𝑙 (𝑡) · 𝛼 · 𝑃𝑟 − 𝑆𝑖𝑙 (𝑡) · 𝐼𝑖𝑙 (𝑡) · 𝜆 − 𝐼 𝑟 (𝑡) · 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝑆𝑖𝑙 (𝑡)) (21) 𝑁 Õ 𝑑𝐼 𝑟 (𝑡) 𝐼𝑖𝑙 (𝑡) · 𝛼 · 𝑃𝑟 + 𝑀 − 𝐼 𝑟 (𝑡) = −𝐼 𝑟 (𝑡) · 𝛽 · 𝑃𝑙 + 𝑑𝑡 𝑖=1 − 𝑁 Õ 𝑖=1 𝑁  Õ   (𝑆𝑖𝑙 (𝑡) + 𝐼𝑖𝑙 (𝑡)) · 𝐼 𝑟 (𝑡) · 𝜇 + 𝑅ˆ 𝑚𝑒𝑒𝑡 (𝐼𝑖𝑙 (𝑡)) 𝑖=1 𝐼𝑖𝑙 (0) (22) 𝑆𝑖𝑙 (0), In the network described in Section III, and 1 ≤ 𝑖 ≤ 𝑁, are 0, whereas 𝐼 𝑟 (0) is 1. Once the system of equations represented in Eqs. (19), (21), and (22) is numerically solved with the aforementioned initial conditions, the average delivery delay, E(𝐷), is computed by Eq. (23), as follows [13]. ∫ 𝑡𝑚𝑎𝑥 Í𝑁 𝑙 𝐼𝑖 (𝑡) − 1)𝑑𝑡 (𝐼 𝑟 (𝑡) + 𝑖=1 0 , (23) E(𝐷) = 𝑡 𝑚𝑎𝑥 − 𝑀 −1 Í𝑁 𝑙 𝐼𝑖 (𝑡 𝑚𝑎𝑥 ) where 𝑡 𝑚𝑎𝑥 is a large time such that 𝐼 𝑟 (𝑡 𝑚𝑎𝑥 ) + 𝑖=1 is close to 𝑀. Fig. 10 represents the average delivery delay obtained with the folded SRN, the ODE model, and by simulation when the network under-analysis consists of four communities (𝑁 = 4), and 𝑀 varies from 10 to 200. As it can be observed in Fig. 10, the folded model is accurate in evaluating the average delivery delay. Particularly, in Fig. 10(a), as the number of nodes increases, the accuracy improves such that the error is less than 3% for 𝑀 > 80. As it can be seen in Fig. 10, the folded model is significantly more accurate than the ODE model. According to Fig. 10(a), when the number of nodes is not very large, the ODE model yields a significant error since ODE approach is rather inaccurate for networks with a moderate number of nodes [11]. Results represented in Fig. 10 indicate the superiority of the folding technique in terms of accuracy when compared against the ODE approach, in what concerns the performance of both networks with a moderate number of nodes and large-scale networks. IX. S CALABILITY A NALYSIS In this section, we investigate the scalability of the proposed monolithic and folded models and the previously presented monolithic and folded models [10], in terms of the number of states in the underlying Markov chains. Table VI represents the number of states in the underlying Markov chains of the proposed monolithic and folded models in columns Mono. and Fold., respectively. As it can be seen in this table, the number of states in the underlying Markov chain of the monolithic model grows too fast as the number of communities, 𝑁, or the number of nodes, 𝑀, increases. For instance, for a small network with four communities and 15 nodes (𝑁 = 4 and 𝑀 = 15), the Markov chain has about 5 million states. Too much memory is needed to save this large state space, while the underlying Markov chain of the folded model for the aforementioned setting has only 16,800 states. Therefore, the folded model is scalable enough, it significantly reduces the state space. Table VII represents the number of states in underlying Markov chains of the proposed monolithic model and the previous monolithic model proposed in [10]. As it can be observed in this table, the scalability problem of the proposed monolithic model is severer than the previously proposed monolithic model. This is due to the fact that the proposed monolithic SRN models a more realistic network. In the network model considered in [10], it was assumed that each node frequently visits only one specific community, and the maximum number of local nodes in each community is 𝑀/𝑁. However, the models proposed in this paper account for the possibility of moving any number of local nodes in a community. Thus, the total number of tokens in places 𝑃 𝑠𝑢𝑠_𝑙 𝑗 𝑖𝑛 𝑓 _𝑙 and 𝑃 𝑗 of submodel 𝑆𝑢𝑏 𝑗 of the previous monolithic is at 𝑖𝑛 𝑓 _𝑙 most 𝑀/𝑁 tokens; while places 𝑃 𝑠𝑢𝑠_𝑙 and 𝑃 𝑗 of submodel 𝑗 𝑆𝑢𝑏 𝑙_ 𝑗 of the proposed monolithic model can have in total up to 𝑀 − 2 tokens, which makes the state space larger. Table VIII represents the number of states in the underlying Markov chains of the folded models when the network consists of 5 communities and 𝑀 nodes. As it can be seen in this table, although the folded model previously published has less number of states than the folded model proposed in this paper 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 15 TABLE VIII: Number of states of the proposed folded model and the folded model previously proposed in [10], when 𝑁 = 5. 𝑴 Proposed Folded Model Previous Folded Model 10 6,930 3,552 20 55,860 133,080 30 188,790 1,186,080 40 447,720 5,796,720 50 874,650 20,211,840 1,200 30 25 Previous Folded Model Previous Simulation Proposed Folded Model Current Simulation Average Delivery Delay (𝑠) Average Number of Transmissions 35 20 15 10 5 0 10 20 30 𝑀 40 (a) 50 Previous Folded Model Previous Simulation Proposed Folded Model Current Simulation 1,000 800 600 400 200 0 10 20 30 𝑀 40 50 (b) Fig. 11: Comparing the results obtained from the proposed folded model, the previously presented folded model [10], and by simulation. for the smallest case of 𝑀 = 10, its number of states radically increases as the number of nodes increases up to five times. For example, for a network with 50 nodes (𝑀 = 50), the underlying Markov chain of the previous folded model has about 20 million states while that of the folded model proposed herein is less than 1 million states. It is worth mentioning that the number of states of the proposed folded model even for a three times larger network (𝑀 = 150) does not reach 20 million. Moreover, even when there are four communities and 60 nodes in the network, the previous folded model could not be solved on a system with a 64 GB memory. However, using that computing system, the results reported in Figs. 7(b) and 10(b) are computed. These figures present the results obtained with the folded model for a network with four communities and 200 nodes. In conclusion, the results presented in Table VIII indicate that the current folded model is much more scalable than the previous one in what concerns the number of nodes (𝑀). Fig. 11 represents the average number of transmissions and the average delivery delay obtained from the proposed folded model, the folded model previously proposed in [10], and by simulation of the networks modeled by each folded SRN. Parameters 𝑁 and 𝑀 in Fig. 11 are set to the values considered in Table VIII. Fig. 11(a) indicates higher accuracy of the proposed folded model for evaluation of the average number of transmissions in comparison with the previous folded model. In Fig. 11(b), we observe that although the current folded model has less accuracy than the previous folded model, when 𝑀 = 10 and 𝑀 = 20, it becomes more accurate upon increasing 𝑀, such that it is strongly more accurate than the previous folded model when 𝑀 = 50. The results presented in Table VIII and Fig. 11 indicate that the proposed folded model have better scalability than the previous folded model while achieving higher accuracy in large-scale networks. X. C ONCLUSIONS AND FUTURE WORK The goal of this paper was to evaluate of the performance of epidemic routing in MSNs. Its main contribution is analysis of the performance of epidemic routing, considering a network model which is more realistic than those considered in the state-of-the-art, while providing scalability. This network model is based on the skewed location visiting preferences of nodes, one of the main characteristics of MSNs. A monolithic SRN model was proposed to evaluate the delivery delay and the average number of transmissions by time of delivery under epidemic routing. Although the monolithic model is accurate to predict the measures of interest in MSNs, it suffers from the state space explosion for networks with a large number of nodes/communities. In order to overcome this issue, an approximate model was proposed, applying the folding technique to the monolithic model. This model can be used to evaluate the performance of large-scale networks without significant loss of accuracy. We also proposed an ODE model for epidemic routing and compared the obtained results with the ones for the folded model. All the proposed models were validated against discreteevent simulation. The obtained results show that the folded model is more accurate than the ODE model. Moreover, we proved that the number of transmissions by the time of delivery follows a uniform distribution, for a general class of networks, where the positions of nodes are always i.i.d. Finally, we investigated the scalability of the proposed monolithic and folded models, contrasting with the previously presented monolithic and folded models [10], in terms of the number of states in the underlying Markov chains. The current work can be extended in different ways. Other characteristics of MSNs, such as dependency of the next visited community to the currently/previously visited community and the timedependency property of mobility [18], can be added to the current models. It is also worth to evaluate and analyze the performance of other routing or content retrieval schemes. As discussed in Section VIII-B, another future research direction can be further analysis of the number of transmissions when tendencies of nodes to visit a community differ. Analysis of the number of transmissions provides good insights for designing efficient recovery schemes. R EFERENCES [1] G. Bartoli, F. Chiti, R. Fantacci, and B. Picano, “An efficient resource allocation scheme for applications in lr-wpans based on a stable matching with externalities approach,” IEEE Transactions on Vehicular Technology, vol. 68, no. 6, pp. 5893–5903, 2019. [2] M. Xiao, J. Wu, and L. Huang, “Community-aware opportunistic routing in mobile social networks,” IEEE Trans. Computers, vol. 63, no. 7, pp. 1682–1695, 2014. [3] W.-J. Hsu, T. Spyropoulos, K. Psounis, and A. Helmy, “Modeling timevariant user mobility in wireless mobile networks,” in Proc. IEEE INFOCOM, Barcelona, Spain, 6–12 May 2007, pp. 758–766. [4] H. Ko, J. Lee, and S. Pack, “An opportunistic push scheme for online social networking services in heterogeneous wireless networks,” IEEE Trans. Netw. Service Manag., vol. 14, no. 2, pp. 416–428, 2017. [5] A. Vahdat and D. Becker, “Epidemic routing for partially connected ad hoc networks,” Department of Computer Science, Duke University, Durham, North Carolina, Tech. Rep. CS-200006, Apr. 2000. [6] X. Zhang, G. Neglia, J. Kurose, and D. Towsley, “Performance modeling of epidemic routing,” Comput. Netw., vol. 51, no. 10, pp. 2867–2891, 2007. 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TVT.2021.3057541, IEEE Transactions on Vehicular Technology IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY [7] E. Ataie, R. Entezari-Maleki, L. Rashidi, K. S. Trivedi, D. Ardagna, and A. Movaghar, “Hierarchical stochastic models for performance, availability, and power consumption analysis of iaas clouds,” IEEE Transactions on Cloud Computing, vol. 7, no. 4, pp. 1039–1056, 2019. [8] L. Rashidi, R. Entezari-Maleki, D. Chatzopoulos, P. Hui, K. S. Trivedi, and A. Movaghar, “Performance evaluation of epidemic content retrieval in DTNs with restricted mobility,” IEEE Transactions on Network and Service Management, vol. 16, no. 2, pp. 701–714, 2019. [9] J. K. Muppala and K. S. Trivedi, “Composite performance and availability analysis using a hierarchy of stochastic reward nets,” in Comput. Perf. Eval. Model. Tech. Tools, G. Balbo and G. Serazzi, Eds. NorthHolland, The Netherlands: Elsevier Science Publishers B.V., 1992, pp. 335–349. [10] L. Rashidi, A. Dalili-Yazdi, R. Entezari-Maleki, L. Sousa, and A. Movaghar, “Scalable performance analysis of epidemic routing considering skewed location visiting preferences,” in Proc. IEEE MASCOTS, 2019, pp. 201–213. [11] Y. Yang, C. Zhao, S. Yao, W. Zhang, X. Ge, and G. Mao, “Delay performance of network-coding-based epidemic routing,” IEEE Trans. Veh. Technol., vol. 65, no. 5, pp. 3676–3684, 2016. [12] Y.-K. Ip, W.-C. Lau, and O.-C. Yue, “Performance modeling of epidemic routing with heterogeneous node types,” in Proc. IEEE ICC, Beijing, China, 19–23 May 2008, pp. 219–224. [13] T. Spyropoulos, T. Turletti, and K. Obraczka, “Routing in delay-tolerant networks comprising heterogeneous node populations,” IEEE Trans. Mobile Comput., vol. 8, no. 8, pp. 1132–1147, 2009. [14] P. Sermpezis and T. Spyropoulos, “Delay analysis of epidemic schemes in sparse and dense heterogeneous contact networks,” IEEE Trans. Mobile Comput., vol. 16, no. 9, pp. 2464–2477, 2017. [15] R. Groenevelt, P. Nain, and G. Koole, “The message delay in mobile ad hoc networks,” Perf. Eval., vol. 62, no. 1, pp. 210–228, 2005. [16] A. Picu and T. Spyropoulos, “Forecasting DTN performance under heterogeneous mobility: The case of limited replication,” in Proc. IEEE SECON, Seoul, South Korea, 18–21 Jun. 2012, pp. 569–577. [17] ——, “DTN-Meteo: forecasting the performance of DTN protocols under heterogeneous mobility,” IEEE/ACM Trans. Netw., vol. 23, no. 2, pp. 587–602, 2015. [18] W.-J. Hsu, T. Spyropoulos, K. Psounis, and A. Helmy, “Modeling spatial and temporal dependencies of user mobility in wireless mobile networks,” IEEE/ACM Trans. Netw., vol. 17, no. 5, pp. 1564–1577, 2009. [19] A. Chaintreau, J.-Y. Le Boudec, and N. Ristanovic, “The age of gossip: spatial mean field regime,” in Proc. ACM SIGMETRICS Perf. Eval. Review. Seattle, WA, USA: ACM, 15–19 Jun. 2009, pp. 109–120. [20] J. Whitbeck, V. Conan, and M. D. de Amorim, “Performance of opportunistic epidemic routing on edge-markovian dynamic graphs,” IEEE Trans. Communications, vol. 59, no. 5, pp. 1259–1263, 2011. [21] Q. Wang and Q. Wang, “Restricted epidemic routing in multi-community delay tolerant networks,” IEEE Trans. Mobile Comput., vol. 14, no. 8, pp. 1686–1697, 2015. [22] C.-H. Lee and D. Y. Eun, “On the forwarding performance under heterogeneous contact dynamics in mobile opportunistic networks,” IEEE Trans. Mobile Comput., vol. 12, no. 6, pp. 1107–1119, 2013. [23] Y. Li, P. Hui, D. Jin, L. Su, and L. Zeng, “Evaluating the impact of social selfishness on the epidemic routing in delay tolerant networks,” IEEE Communications Letters, vol. 14, no. 11, pp. 1026–1028, 2010. [24] Y. Li, G. Su, D. O. Wu, D. Jin, L. Su, and L. Zeng, “The impact of node selfishness on multicasting in delay tolerant networks,” IEEE Trans. Veh. Technol., vol. 60, no. 5, pp. 2224–2238, 2011. [25] M. Xiao, J. Wu, and L. Huang, “Home-based zero-knowledge multicopy routing in mobile social networks,” IEEE Transactions on Parallel and Distributed Systems, vol. 26, no. 5, pp. 1238–1250, 2015. [26] P. Hui, K. Xu, V. O. K. Li, J. Crowcroft, V. Latora, and P. Lio, “Selfishness, altruism and message spreading in mobile social networks,” in IEEE INFOCOM Workshops, 2009, pp. 1–6. [27] Z. Lu, Y. Wen, and G. Cao, “Information diffusion in mobile social networks: The speed perspective,” in IEEE INFOCOM, 2014, pp. 1932– 1940. [28] X. Zhang and G. Cao, “Proactively placing static relays with social-link awareness in mobile social networks,” IEEE Transactions on Vehicular Technology, vol. 68, no. 2, pp. 1903–1915, 2019. [29] D. Tian, J. Zhou, Y. Wang, H. Xia, Z. Yi, and H. Liu, “Optimal epidemic broadcasting for vehicular ad hoc networks,” International Journal of Communication Systems, vol. 27, no. 9, pp. 1220–1242, 2014. [30] D. Tian, K. Zheng, J. Zhou, X. Duan, Y. Wang, Z. Sheng, and Q. Ni, “A microbial inspired routing protocol for vanets,” IEEE Internet of Things Journal, vol. 5, no. 4, pp. 2293–2303, 2018. 16 [31] D. Tian, C. Liu, X. Duan, Z. Sheng, Q. Ni, M. Chen, and V. C. M. Leung, “A distributed position-based protocol for emergency messages broadcasting in vehicular ad hoc networks,” IEEE Internet of Things Journal, vol. 5, no. 2, pp. 1218–1227, 2018. [32] P. Nain, D. Towsley, B. Liu, and Z. Liu, “Properties of random direction models,” in Proc. IEEE INFOCOM, 13–17 Mar. 2005, pp. 1897–1907. [33] S. R. Pokhrel, J. Jin, and H. L. Vu, “Mobility-aware multipath communication for unmanned aerial surveillance systems,” IEEE Transactions on Vehicular Technology, vol. 68, no. 6, pp. 6088–6098, 2019. [34] K. Thilakarathna, A. C. Viana, A. Seneviratne, and H. Petander, “Design and analysis of an efficient friend-to-friend content dissemination system,” IEEE Trans. Mob. Comput., vol. 16, no. 3, pp. 702–715, 2017. [35] L. Rashidi, D. Towsley, A. Mohseni-Kabir, and A. Movaghar, “On the performance analysis of epidemic routing in non-sparse delay tolerant networks,” arXiv preprint arXiv:2002.04834, 2020. [36] J. L. Peterson, Petri Net Theory and the Modeling of Systems, 1st ed. Englewood Cliffs, NJ, USA: Prentice Hall, 1981. [37] M. Ajmone Marsan, G. Balbo, G. Conte, S. Donatelli, and G. Franceschinis, Modelling with Generalized Stochastic Petri Nets, 1st ed. Hoboken, NJ, USA: Wiley, 1995. [38] G. Ciardo, J. Muppala, and K. Trivedi, “SPNP: stochastic petri net package,” in Proc. IEEE PNPM, 1989, pp. 142–151. [39] E. Hernández-Orallo, M. Murillo-Arcila, J. C. Cano, C. T. Calafate, J. A. Conejero, and P. Manzoni, “An analytical model based on population processes to characterize data dissemination in 5G opportunistic networks,” IEEE Access, vol. 6, pp. 1603–1615, 2018. Leila Rashidi is a postdoctoral associate at University of Calgary, Canada. She received her Ph.D. in Computer Engineering from Sharif University of Technology, Iran in 2019, and the B.S. degree in Computer Engineering from the University of Tehran, Iran, in 2014. Her main research interests are performance evaluation and network security. Amir Dalili-Yazdi obtained his M.Sc. degree from the Department of Computer Engineering, Sharif University of Technology, Iran in 2020. He received his B.Sc. in Computer Engineering, Software Field, from Islamic Azad University, Tehran, Iran in 2017. His main research interests are performance modeling and computer networks. Reza Entezari-Maleki received the B.S. and M.S. degrees from the Iran University of Science and Technology (IUST) in 2007 and 2009, and the Ph.D. degree from the Sharif University of Technology in 2014, all in computer engineering. He was a postdoctoral researcher at Institute for Research in Fundamental Sciences, Iran, before joining IUST as an assistant professor in 2018. His main research interest is performance and dependability modeling. Leonel Sousa received the PhD degree from the Instituto Superior Tecnico (IST), Universidade de Lisboa, in 1996. Since 1996, he has been with IST, where he is currently the chair of the Department of Electrical and Computer Engineering. His research interests include computer architectures, high performance computing, and multimedia systems. Ali Movaghar is a Professor in the Department of Computer Engineering at Sharif University of Technology. He received his M.S. and Ph.D. degrees in Computer, Information, and Control Engineering from the University of Michigan, in 1979 and 1985, respectively. His research interests include performance/dependability modeling and formal verification. 0018-9545 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: b-on: Universidade de Lisboa Reitoria. Downloaded on February 11,2021 at 14:52:19 UTC from IEEE Xplore. Restrictions apply.