# Students Social Based Mobility Model for MANET-DTN Networks

Authors: Dávid Hrabčák; Martin Matis; L’ubomír Doboš; Ján Papaj
Journal: Mobile Information Systems
 (2017)

---

## Abstract

In the real world, wireless mobile devices are carried by humans. For this reason, it is useful if mobility models as simulation tools used to test routing protocols and other MANET-DTN features follow the behaviour of humans. In this paper, we propose a new social based mobility model called Students Social Based Mobility Model (SSBMM). This mobility model is inspired by the daily routine of student’s life. Since many current social based mobility models give nodes freedom in terms of movement according to social feeling and attractivity to other nodes or places, we focus more on the mandatory part of our life, such as going to work and school. In the case of students, this mandatory part of their life is studying in university according to their schedule. In their free time, they move and behave according to attractivity to other nodes or places of their origin. Finally, proposed SSBMM was tested and verified by Tools for Evaluation of Social Relation in Mobility Models and compared with random based mobility models. At the end, SSBMM was simulated to examine the impact of social relations on routing protocols.


---

## Body

## 1. Introduction

A Mobile Ad hoc NETwork (MANET) is actually a group of wireless mobile devices that communicate without any fixed infrastructure. Also, Delay Tolerant Network (DTN) participates in such a wireless environment, but under different conditions. Wireless mobile devices also called nodes can suffer a long delay in process of message delivery, end-to-end disconnections due to the mobility of nodes on separate networks also called islands [1], and much more. But MANET-DTN has one significant common attribute which is mobility of nodes. Authors in [2] claim that node mobility has a significant impact on the routing protocol performance.Nowadays, problems in MANET-DTN became popular topics for researchers. New routing protocols and improvements in routing process are one of the main problems. Mobility models as simulation tools are therefore important to verify correctness and functionality of protocols. Many researchers use random mobility models as simulation tools. In real life, carriers of wireless mobile devices are humans. Humans are social creatures and they move and organise themselves in social groups. Therefore, it is useful if the movement of nodes in mobility models follows such behaviour of humans.The intention was to create social mobility model as a proper simulation tool that follows the behaviour of humans in real life. Tracking movement of humans and implementing their behaviour into the model of mobility may be a difficult task. For those reasons, the decision was to observe and follow the life of students in the university campus of the city area. Most of the current social based mobility models give nodes a freedom in terms of movement because they move as they want according to social feeling, attractivity to other nodes or places. The main idea is that humans have their duties and responsibilities such as going to work or school. This part of humans life is mandatory and not a free choice. Therefore, we decide to create a Students Social Based Mobility Model (SSBMM) that follows the routine of student’s daily life and also takes into account mentioned mandatory part of the human’s life.The article is organised as follows. Section2 briefly describes the classification of mobility models. Section 3 proposes Students Social Based Mobility Model (SSBMM) and Section 4 describes the simulation of proposed SSBMM and main results that are analysed and compared with random mobility models such as Random Walk and Matis. At the end, we conclude this paper in Section 5.


## 2. Social Based Mobility Models

Social based mobility modelling is actually the application of social network theory into mobility modelling [3]. In those models, mobile wireless nodes represent wireless devices carried by humans. Therefore the mobility pattern depends on human movements which are influenced by social behaviours. Hence, researchers focused on the understanding of social structure affecting the node mobility patterns. In the past few years, many social based mobility models were proposed. Authors in [4] grouped all mobility models that aim to mimic the movement of humans in a real life and simulate their mobility patterns using parametric methods synthetically as simulation-based mobility models. These mobility models have been largely preferred for the evaluation of human-associated networking protocols. Broadly, simulation-based mobility models can be categorised into four main classes:(i)
Map-based models(ii)
Location-based models(iii)
Community-based models(iv)
Sociological models.


### 2.1. Map-Based Models

The map-driven mobility models use real-world traces in order to reproduce mobility traces using simulation methods synthetically.Part of these models isworking day movement (WDM) [5]. This model is a map-based method that is able to produce contact times (CTs) and intercontact times (ICTs) distributions from the real-world measurement experiments. It also incorporates some sense of hierarchy and distinguishes between interbuilding and intrabuilding movements.Another well-known model in this class isagenda driven mobility model (ADMM) [6]. ADMM uses national household travel survey (NHTS) information from the US Department of Transportation to obtain activity and well time distributions. This model contains personal agenda, the geographic map, and motion generator components that model social activities, geographic locations, and movements of mobile users.SAME [7] is a mobility model that follows students’ habits and customs in campus environment. The model consists of few submodels. Each submodel describes the moving instruments of corresponding behaviour such as learning and travelling.


### 2.2. Location-Based Models

Location-based models use a set of preferred locations. Various attributes and relationships can be identified between the preferred locations and users in these models move across these locations.Sociological orbit aware location approximation and routing (SOLAR) [8] is deterministic orbital movement pattern of mobile users along specific places called hubs. The movement pattern of this model is based on the fact that most mobile nodes are not truly random in their movements but actually move around in an orbit from hub to hub. Each hub may be a rectangle and movement may take place either inside a hub or in between hubs. This model is motivated by the observation that the mobility of a mobile user exhibits a partially repetitive orbital pattern.Time-variant community model (TVCM) [9] is movement model that capture the important mobility properties observed from daily lives. The model attempts to capture two main properties of mobility named skewed location preferences and periodical reappearance. The skewed location preferences refer to the percentage of time a node spends at a given location, and the periodical reappearance property refers to having the same node visiting different locations on different times and with different time granularity. Broadly, some locations called communities are defined to be visited by each node in order to capture skewed location visiting preferences. In addition, time periods with different mobility parameters are used to create periodical reappearance of nodes at the same location.The approach of TVCM is extended in [10] by proposingThe Self-Similar Least Action Walk (SLAW). It contains several properties such as pause time, intercontact time, attraction by the popular places, and preference of people to move around in their own area. To solve the problem of attraction by the popular places, SLAW uses a technique similar to the fractional Gaussian noise or Brownian Motion generation technique. Furthermore, it leverages fundamental properties of fractal points to generate power law flights on top of them. A power law distribution is then applied to node movement. SLAW uses an individual walker model to restrict the mobility of each moving node (walker) to a predefined subsection of the total area. For example, the node in cluster moves to another cluster when this cluster is the closest cluster and most populated one.


### 2.3. Community-Based Models

The community-based mobility models use communities as user mobility pattern. A community is defined as a group of network members with stronger ties to members of the group than to members outside the group. The assumption is that those nodes from one community tend to spend more time together and they follow the movement of the nodes with the strongest social ties.The community-based mobility model (CMM) [11] captures nodes in groups and their movement in a way that mimics the social behaviour of nodes. In CMM, nodes belonging to a community are called friends, while nodes in different communities are called nonfriends. At the initial phase, the simulation area is divided into some areas as a grid and each community is assigned to a cell of the grid. A link is established between all the friend and nonfriend nodes in the network by attraction matrix which will be used later to drive node movements. In this model, nodes move between the communities based on node attraction feature. Therefore, when a node with high attraction value decides to travel to another community, nodes belonging to him follow his movement.The home cell community mobility model (HCMM) [12] is another social based mobility model which closely resembles the CMM. The main difference is the fact that it can consider not only attraction towards other nodes, but also attraction towards locations. In this model, for each node there is a home cell which is actually the initial cell where the node is placed and has a stronger attractiveness than others. When a node is within its home cell, then the next target relies on the CMM probabilistic approach. When the node is in a foreign cell, then the probability of staying in that cell is defined as p and the probability to go back to the home cell is 1-p.Enhance community mobility model (ECMM) [13] is an extended version of CMM and HCMM which follows preceding community-based approaches. The main difference in this model is the introduction of pause periods and group mobility encouragement which have not been considered in the previous community-based models.


### 2.4. Sociological Models

Sociological mobility models are the application of social network theory into mobility modelling to formalise social interactions of human movements. These models exploit social characteristics, behaviours, and interaction patterns of users in a real life.Sociological interaction mobility for population simulation (SIMPS) [14] is a social based model in which mobile user moves according to two behavioural rules: social interaction level, which is actually the personal status, and social interaction needs, which are actually the social needs for individuals to make acquaintances. Node moves according to these two behaviours. Every node chooses between them in feedback decision-making process which balances the volume of current social interactions against the volume of interactions needed by the node.GeSoMo [15] is a social based mobility model that receives a social network as input and creates a mobility traces, then these traces are followed by nodes and these traces create meetings between the nodes according to their social relations. In this model, the attraction between nodes is defined based on node attraction, location attraction, and node repulsion which is an actually negative attraction.


## 2.1. Map-Based Models

The map-driven mobility models use real-world traces in order to reproduce mobility traces using simulation methods synthetically.Part of these models isworking day movement (WDM) [5]. This model is a map-based method that is able to produce contact times (CTs) and intercontact times (ICTs) distributions from the real-world measurement experiments. It also incorporates some sense of hierarchy and distinguishes between interbuilding and intrabuilding movements.Another well-known model in this class isagenda driven mobility model (ADMM) [6]. ADMM uses national household travel survey (NHTS) information from the US Department of Transportation to obtain activity and well time distributions. This model contains personal agenda, the geographic map, and motion generator components that model social activities, geographic locations, and movements of mobile users.SAME [7] is a mobility model that follows students’ habits and customs in campus environment. The model consists of few submodels. Each submodel describes the moving instruments of corresponding behaviour such as learning and travelling.


## 2.2. Location-Based Models

Location-based models use a set of preferred locations. Various attributes and relationships can be identified between the preferred locations and users in these models move across these locations.Sociological orbit aware location approximation and routing (SOLAR) [8] is deterministic orbital movement pattern of mobile users along specific places called hubs. The movement pattern of this model is based on the fact that most mobile nodes are not truly random in their movements but actually move around in an orbit from hub to hub. Each hub may be a rectangle and movement may take place either inside a hub or in between hubs. This model is motivated by the observation that the mobility of a mobile user exhibits a partially repetitive orbital pattern.Time-variant community model (TVCM) [9] is movement model that capture the important mobility properties observed from daily lives. The model attempts to capture two main properties of mobility named skewed location preferences and periodical reappearance. The skewed location preferences refer to the percentage of time a node spends at a given location, and the periodical reappearance property refers to having the same node visiting different locations on different times and with different time granularity. Broadly, some locations called communities are defined to be visited by each node in order to capture skewed location visiting preferences. In addition, time periods with different mobility parameters are used to create periodical reappearance of nodes at the same location.The approach of TVCM is extended in [10] by proposingThe Self-Similar Least Action Walk (SLAW). It contains several properties such as pause time, intercontact time, attraction by the popular places, and preference of people to move around in their own area. To solve the problem of attraction by the popular places, SLAW uses a technique similar to the fractional Gaussian noise or Brownian Motion generation technique. Furthermore, it leverages fundamental properties of fractal points to generate power law flights on top of them. A power law distribution is then applied to node movement. SLAW uses an individual walker model to restrict the mobility of each moving node (walker) to a predefined subsection of the total area. For example, the node in cluster moves to another cluster when this cluster is the closest cluster and most populated one.


## 2.3. Community-Based Models

The community-based mobility models use communities as user mobility pattern. A community is defined as a group of network members with stronger ties to members of the group than to members outside the group. The assumption is that those nodes from one community tend to spend more time together and they follow the movement of the nodes with the strongest social ties.The community-based mobility model (CMM) [11] captures nodes in groups and their movement in a way that mimics the social behaviour of nodes. In CMM, nodes belonging to a community are called friends, while nodes in different communities are called nonfriends. At the initial phase, the simulation area is divided into some areas as a grid and each community is assigned to a cell of the grid. A link is established between all the friend and nonfriend nodes in the network by attraction matrix which will be used later to drive node movements. In this model, nodes move between the communities based on node attraction feature. Therefore, when a node with high attraction value decides to travel to another community, nodes belonging to him follow his movement.The home cell community mobility model (HCMM) [12] is another social based mobility model which closely resembles the CMM. The main difference is the fact that it can consider not only attraction towards other nodes, but also attraction towards locations. In this model, for each node there is a home cell which is actually the initial cell where the node is placed and has a stronger attractiveness than others. When a node is within its home cell, then the next target relies on the CMM probabilistic approach. When the node is in a foreign cell, then the probability of staying in that cell is defined as p and the probability to go back to the home cell is 1-p.Enhance community mobility model (ECMM) [13] is an extended version of CMM and HCMM which follows preceding community-based approaches. The main difference in this model is the introduction of pause periods and group mobility encouragement which have not been considered in the previous community-based models.


## 2.4. Sociological Models

Sociological mobility models are the application of social network theory into mobility modelling to formalise social interactions of human movements. These models exploit social characteristics, behaviours, and interaction patterns of users in a real life.Sociological interaction mobility for population simulation (SIMPS) [14] is a social based model in which mobile user moves according to two behavioural rules: social interaction level, which is actually the personal status, and social interaction needs, which are actually the social needs for individuals to make acquaintances. Node moves according to these two behaviours. Every node chooses between them in feedback decision-making process which balances the volume of current social interactions against the volume of interactions needed by the node.GeSoMo [15] is a social based mobility model that receives a social network as input and creates a mobility traces, then these traces are followed by nodes and these traces create meetings between the nodes according to their social relations. In this model, the attraction between nodes is defined based on node attraction, location attraction, and node repulsion which is an actually negative attraction.


## 3. Proposal of Students Social Based Mobility Model (SSBMM)

### 3.1. Overview

The main topic of this paper is a creation of Students Social Based Mobility Model (SSBMM). The main idea is to capture usual day or week of the students. As we mentioned above, people or students have their duties. They need to go to the work and students to the school. This part of the day is for them a mandatory. They are not able to choose when they want to go to the school or when they want to go home from school. This time is defined for them by the system, which is the school in this case. Students follow a schedule defined by their school. After they end this mandatory part of the day, they have free time. In this part of the day, some of them just lie down at home, and some of them go to visit their friends or do their hobbies. This is the time of the day, where a social behaviour of the nodes or students is simulated. There is also a need to define a usual week. The week is divided into five business days and two weekend days. A mentioned schedule (structure will be explained later) needs to be defined for each business day differently. On the weekend, we assumed that every student has a free time, so no schedule is defined for that day. In Figure1 is depicted model timeline.Figure 1
Timeline of the SSBMM.Moreover, students are divided by school to the study groups. For these groups a schedule is the defined. It is more efficient if the schedule is defined for study groups rather than for each student separately. Further division of the students is based upon their origins, regardless of the division to the study groups. Some students live in settlement area of the city. Other students live in the college dormitory. These two areas (settlement, dormitory) will be part of the simulation area in different locations. Students’ origin is then important because travelling to the school is also simulated. Students will travel to school from the area of their origin location so there is a need to know how long it takes for them. In this model, predefined traces from areas of the origin to the school are used. Students will be travelling along these traces. With this type of travelling, we want to simulate a city transportation.


### 3.2. Behaviour of Node in Different Areas

In this section, a behaviour of the node in different simulation areas is described. These areas are school, city settlement, college dormitory, and travel traces along which students travel. These areas are separated from each other and behaviours of the nodes in these areas are different.


#### 3.2.1. Behaviour of Nodes in City Settlement

This is the area where students from city live. From the observation, we assumed that students from city spend most of their free time at home. They move along their apartment, which is basically the small range of movement. At the initial phase, the positions of students with city settlement origin are randomly generated inside settlement area and new goal 1 in the new time slot is randomly chosen from current position plus small range.(1)xt+1=xt+rand⁡xmin,xmaxyt+1=yt+rand⁡ymin,ymax.In (1), variables xt, yt represent coordinates in the current time slot and xt+1, yt+1 are coordinates of the node in the time slot (t+1). These coordinates are computed from ranges [xmin,xmax] and [ymin,ymax] with which the small range of movement in the apartment is simulated. Coordinates xmin and ymin from ranges should be negative and opposite numbers of xmax and ymax from ranges, for example, [-5,5].


#### 3.2.2. Behaviour of Nodes in School

The school is the area, where students are every business day according to their schedule. In this mobility model, school area is divided into three subareas, which are actually cells of simulation grid. These subareas can be interpreted as the library, laboratory, lecture hall, and so on. The mobility of nodes or students, respectively, is according to the schedule (structure will be explained later). Every student knows his schedule and he also knows in which study group he is. So, if student A has chemistry in laboratories at 7:00 a.m., the node that represents this student just randomly generates his position inside laboratory subsimulation area, as it is depicted in Figure2.Figure 2
Mobility of students in school area of SSBMM.Figure2 gives us the possibility of seeing that student B has physics in the lecture hall at the same time. If student A has physics in the lecture hall at 8:00 a.m. and student B has chemistry in laboratories at the same time according to the schedule, they just change their subareas by randomly generating positions inside subareas that correspond to the cells of the simulation grid.


#### 3.2.3. Behaviour of Nodes When They Travel

Travelling in this model is realised by traces, along which students can travel. Some traces are two-way; others are just one-way. These traces begin in areas of origin (college dormitory, city settlement) and they end in the school or vice versa. Therefore, it is important to know how simulation area looks like.In Figure3 a simulation area of this mobility model is shown. Blue arrows represent the traces. We can also see that trace from city settlement to school is two-way and the other two traces are just one-way. So, if nodes are travelling from college dormitory to school, they follow trace 2. On that way, in time slot t, they randomly generate their position inside the first cell (light blue) that crosses trace 2. On time slot (t+1) their positions inside the first cell are just shifted to the second cell on that way. These positions are not generated again; they are shifted by the cell size in x-direction and y-direction by the following equation:(2)xt+1=xt+syt+1=yt+s,where s is the size of the cell in simulation grid. This implies that node requires one time slot to pass by the one cell of simulation grid while travelling. For example, if the node needs to travel from city settlement to school along trace 1, he needs one time slot to be in school on time for the lesson. This situation will be described closely in Section 3.4.Figure 3
Simulation area of SSBMM.


#### 3.2.4. Behaviour of Nodes in College Dormitory

In this area live students in their free time. As mentioned before, in this area a social behaviour of those students will be simulated. For that reason, this type of behaviour will be described in a separate section because the social behaviour is the important piece of that paper.


### 3.3. Creating a Social Behaviour

A social behaviour of nodes (student’s, resp.) in college dormitory will be described along with the description of how to model social relationships between nodes and their movement based on these relationships.


#### 3.3.1. Modelling Social Relationships

One of the ways how to model relationships between nodes or students is weighted graph [11]. Each student represents a node in this graph. The edges and their weights are representing the strength of relationships among nodes. An example of that weighted graph is shown in Figure 4.Figure 4
Example of weighted graph created by students, which represents network.Depicted weighted graph represents a network of five students. These students are vertexes of this graph and weights of the edges are the strength of their relationships between each other. This strength is represented by value in the range[0,1], where 0 indicates no relationship between the pair of students and 1 indicates the strong relationship. For better graphical interpretation we showed only edges with weights higher than 0,40. This weighted graph can be also interpreted by the 5 × 5 symmetric Social Relationships (SR) matrix, showed as follows.Example of Symmetric Social Relationships (SR) Matrix
(3)
S
R
=
Student  A
Student  B
Student  C
Student  D
Student  E
Student  A
Student  B
Student  C
Student  D
Student  E
1
0.55
0.23
0.45
0.15
0.55
1
0.92
0.78
0.87
0.23
0.92
1
0.30
0.63
0.45
0.78
0.30
1
0.95
0.15
0.87
0.63
0.95
1
.The elementsri,j of SR matrix represents the strength of the relationship between individuals i and j. As mentioned before, this matrix is symmetric. In this model, it means that the same strength of relationship from both sides of individuals is considered. In the real life, this consideration is false, because some individuals may have stronger feelings for others than vice versa. In this model, this would lead to the asymmetric matrix. This situation requires further investigation in future.


#### 3.3.2. Mobility of Nodes Based on Relationships

In this section, the mobility of nodes in college dormitory based on social relationships presented in Section3.1 will be described. College dormitory in the simulation area will be divided into three subareas, as it is depicted in Figure 3. These subareas can be interpreted as apartments, gym, club, and so on. The mobility of nodes in this subareas will be as follows.(i)
First goal selection: as there are three subareas, in initial phase nodes with origin in college dormitory will be randomly divided into three groups with approximately (in case odd number of nodes) the same number of nodes. The first goal of every student from first group in time slot t will be randomly generated inside first subarea cell of college dormitory simulation area and then first goal of every student from the second group in second subarea and so on.(ii)
Subsequent goal selection: when the first goal in time slot t is generated, new goal in the time slot (t+1) is selected by the following mechanism presented by authors in [11]. A certain number of nodes is associated with subarea cell Ck. Each cell exerts a certain social attractivity for a certain node. The social attractivity of a cell is a measure of its importance in terms of the social relationships for the node taken into consideration. For each node social attractivity of all three cells 3 is calculated. This calculation is based on evaluating the strength of the relationships of nodes from particular cells with the node taken into consideration. So the social attractivity for the cell Ck and for the node i is defined as follows:(4)SACki=∑j=1,j∈Cknsri,jw,where w is the cardinality of cell Ck (number of nodes in Ck) and sri,j is the element of SR matrix between nodes i and j. In other words, the social attractivity of a cell for node i is defined as the sum of the elements of SR matrix that represent the relationships between node i and the other nodes that belong to that particular cell, normalised by the total number of hosts associated with that cell [11]. If the cell Ck is empty, then w=0 and SACki is also equal to 0. The new goal for node i is then randomly generated inside the cell with the highest social attractivity for that node. So, the new goal can be selected inside of other cells or inside the same cell. New goals are selected inside another cell when node i has stronger relationships with nodes from that particular cell. In every time slot, nodes will try to get into the cell where they have friends with strong relationships.


### 3.4. Data Structure of SSBMM

Data structure needed for SSBMM will be described below. The model is implemented in Matlab so data will be stored in matrices. The first described matrix is Schedule. As it is mentioned before, Schedule matrix will be used to manage the movement of students in the school area. In our model, there are three school subareas and also students are divided intoN study groups. For each study group and school subarea, starting time will be defined. At this time student from that particular study group should be in this particular subarea. A Schedule matrix is depicted in Table 1, where every study group has assigned its time in particular school subarea for every business day (for the weekend there is no defined schedule). Values in this matrix indicate a value of time slots. For example, the student from study group 1 at day 1 should be in subarea 1 in time slot 14. We also add the extra row for every day which is end of schedule. This row indicates the end of school for the particular day. This extra row presents information about when students begin to travel home. Italic rows and columns are just for graphical interpretation.Table 1
Example of Schedule matrix in SSBMM.
Study group 1
Study group 2
⋯
Study group
N
Day 1
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋯
Day 2
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋮
⋮
⋮
⋱
⋮
Day 5
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋯Another important matrix is Nodeinfo. This matrix stores information about every node and is depicted in Table2. For every node or student, respectively,origin,study group,travel start, andtravel end are defined.Table 2
Example of Nodeinfo matrix of SSBMM.
Node
1
2
3
⋯
n
Origin
1
2
1
⋯
2
Study group
1
3
2
⋯
3
Travel start
27
24
26
⋯
25
Travel end
32
30
35
⋯
32Number 1 in theorigin row indicates that student is from student’s dormitory and number 2 indicated that student is from city settlement. In thestudy group row each number represents a sequence number of the study group.Travel start andtravel end row shows numbers that represent time slots in which student begins travelling or ends travelling. These time slots numbers are calculated by the following mechanism:(1)
Find out origin of the student(2)
Find out in which study group is the student(3)
From Schedule matrix find out when
(i)
the student should be in school(ii)
the student should end school(4)
In row
(i)
Travel start is calculated, time slotsts=tsch-tt(ii)
Travel end is calculated, time slotste=tsch+ttAt first, there is a need to find out information about the origin of the student, because there is a need to know which trace will be used for him. Then information about to which study group student belongs is needed, because, in the third step, time slot for this study group in particular day in which student starts or ends his education at school will be extracted. When this information is presented, then time slotts which is travel start time or time slot te which is travel end is calculated. tsch is time slot from the third step in Schedule matrix and tt is the value which represents how many time slots student needs to travel through this particular trace. Let us remember that one time slot to pass one cell of the grid is needed. For example, if the student from origin 1 (student’s dormitory) wants to travel to school because he should be in school at time slot 20 defined by Schedule matrix, we calculate time start in Nodeinfo matrix as 18 in step (4). Time tt is 2, because students from dormitory use trace 2 (Figure 3) and they need 2 time slots to pass this trace.In this model, the matrix that stores positions of nodes is used. This matrix storesx and y positions of each node. An example of this matrix is shown in Table 3. Positions in this matrix are updated every time slot.Table 3
Example of Position matrix in SSBMM.
Node
1
2
3
⋯
n
x
100
550
945
⋯
450
y
120
220
615
⋯
808We also implemented a Social Relationships (SR) matrix described in Section3.3 based on social behaviour of nodes. An example of this matrix is shown in Table 4.Table 4
Example of implemented SR matrix in SSBMM.
Node
1
2
3
⋯
n
1
1
0.5
0.7
⋯
0.9
2
0.5
1
0.8
⋯
0.6
⋯
⋯
⋯
⋯
⋯
⋯
n
0.9
0.6
0.25
⋯
1Another matrix implemented in this model is called Random State matrix (Table5). In this matrix is stored a state of the student. This state represents the behaviour of students. Number 10 represents the normal behaviour of student and number 20 represents a random behaviour of the student. What is normal and random behaviour will be explained below.Table 5
Example of Random State matrix in SSBMM.
Node
1
2
3
⋯
n
State
10
20
10
⋯
10


### 3.5. Random Behaviour in Model

Explanation of random behaviour of the nodes or students, respectively, is described in this section. When students obey all rules and algorithms of this model, they behave normally. Sometimes students will not come to school because some uncertain circumstances occurred. These circumstances are, for example, a doctor visit or sickness and so forth. This type of behaviour we called random. The state of every node in every time slot is set by randomly generated numberr. This number is randomly generated from the range [0,1] by Matlab function rand as uniformly distributed random number [16]. Then threshold T is set. In this model threshold is T=0.9. So when a generated number r is from the range [0,0.9], it means that student will behave normally. When number r is from the range [0.91,1], it means that student will behave randomly. In this model random behaviour means that node in particular time slot and random state randomly generates his position in the range of 0 (xmin) and 3/4 grid size (xmax) from the current position by (1). When in another time slot student behaves normally, he returns in the position where he should be in that particular time slot.


#### 3.5.1. Behaviour of Nodes in Weekend

The weekend is the special type of random behaviour. In this time the schedule is not defined. It means that students are behaving mostly randomly. The threshold at this time is set lower, for example,T=0.4. When the students behave normally, they are in their origin area and they move according to laws defined for this particular area. When they behave randomly, they generate their positions as it was described above.


### 3.6. Main Algorithm of SSBMM

The main algorithm takes care about the proper run of the model. This algorithm divides students into lists in every time slot. Then all lists are sent into the functions, which implement algorithms for every area and their behaviour described in previous sections of the model. Each function performs its operations and updates Position matrix. Main algorithm and lists distribution are described in Algorithm1.Algorithm 1:Main algorithm of SSBMM.
input: Load or generate Nodeinfo, Schedule and
Position matrices. t←0
(
1
)   for  day←1  to  days  do
(
2
)
if  day  is   weekend  day  then  //  day==weekend
(
3
)
∀
nodes→WeekendList
(
4
)
Call Function: WEEKEND (WeekendList)
(
5
)
end
(
6
)
while  Time slot  t ≠ last  Time  slot  of  theday  do
(
7
)
- Generate Random state of every node and
write states into Random State matrix;
(
8
)
for  ∀  nodes  do
(
9
)
if  t∈node’s  free  time  then
(
10
)
the particular student has its free
time;
(
11
)
if  node  n∈Dormitory  then
(
12
)
node  n→DormitoryList
(
13
)
else
(
14
)
node  n→CitySettlementList
(
15
)
end
(
16
)
else if  t∈node’s travel time to school
then
(
17
)
if  node  n∈Dormitory  then
(
18
)
node  n→Trace2List
(
19
)
else
(
20
)
node  n→Trace1List
(
21
)
end
(
22
)
else if  t∈node’s school time  then
(
23
)
node  n→SchoolList
(
24
)
else if  t∈node’s travel time from school
then
(
25
)
if  node  n∈Dormitory  then
(
26
)
node  n→Trace3List
(
27
)
else
(
28
)
node  n→Trace1List
(
29
)
end
(
30
)
else
(
31
)
if  node  n∈behave Randomly according
Random State  then
(
32
)
node  n→RandomList
(
33
)
end
(
34
)
end
(
35
)
end
(
36
)
Call Funnctions: WEEKEND (WeekendList),
DORMITORY (DormitoryList),
CITYSET (CitySettlementList),
TRACE1 (Trace1List),
TRACE2 (Trace2List),
TRACE3 (Trace3List),
SCHOOL (SchoolList),
RANDOM (RandomList),
(
37
)
t
=
t
+
1;
(
38
)
end
(
39
)  end


## 3.1. Overview

The main topic of this paper is a creation of Students Social Based Mobility Model (SSBMM). The main idea is to capture usual day or week of the students. As we mentioned above, people or students have their duties. They need to go to the work and students to the school. This part of the day is for them a mandatory. They are not able to choose when they want to go to the school or when they want to go home from school. This time is defined for them by the system, which is the school in this case. Students follow a schedule defined by their school. After they end this mandatory part of the day, they have free time. In this part of the day, some of them just lie down at home, and some of them go to visit their friends or do their hobbies. This is the time of the day, where a social behaviour of the nodes or students is simulated. There is also a need to define a usual week. The week is divided into five business days and two weekend days. A mentioned schedule (structure will be explained later) needs to be defined for each business day differently. On the weekend, we assumed that every student has a free time, so no schedule is defined for that day. In Figure1 is depicted model timeline.Figure 1
Timeline of the SSBMM.Moreover, students are divided by school to the study groups. For these groups a schedule is the defined. It is more efficient if the schedule is defined for study groups rather than for each student separately. Further division of the students is based upon their origins, regardless of the division to the study groups. Some students live in settlement area of the city. Other students live in the college dormitory. These two areas (settlement, dormitory) will be part of the simulation area in different locations. Students’ origin is then important because travelling to the school is also simulated. Students will travel to school from the area of their origin location so there is a need to know how long it takes for them. In this model, predefined traces from areas of the origin to the school are used. Students will be travelling along these traces. With this type of travelling, we want to simulate a city transportation.


## 3.2. Behaviour of Node in Different Areas

In this section, a behaviour of the node in different simulation areas is described. These areas are school, city settlement, college dormitory, and travel traces along which students travel. These areas are separated from each other and behaviours of the nodes in these areas are different.


### 3.2.1. Behaviour of Nodes in City Settlement

This is the area where students from city live. From the observation, we assumed that students from city spend most of their free time at home. They move along their apartment, which is basically the small range of movement. At the initial phase, the positions of students with city settlement origin are randomly generated inside settlement area and new goal 1 in the new time slot is randomly chosen from current position plus small range.(1)xt+1=xt+rand⁡xmin,xmaxyt+1=yt+rand⁡ymin,ymax.In (1), variables xt, yt represent coordinates in the current time slot and xt+1, yt+1 are coordinates of the node in the time slot (t+1). These coordinates are computed from ranges [xmin,xmax] and [ymin,ymax] with which the small range of movement in the apartment is simulated. Coordinates xmin and ymin from ranges should be negative and opposite numbers of xmax and ymax from ranges, for example, [-5,5].


### 3.2.2. Behaviour of Nodes in School

The school is the area, where students are every business day according to their schedule. In this mobility model, school area is divided into three subareas, which are actually cells of simulation grid. These subareas can be interpreted as the library, laboratory, lecture hall, and so on. The mobility of nodes or students, respectively, is according to the schedule (structure will be explained later). Every student knows his schedule and he also knows in which study group he is. So, if student A has chemistry in laboratories at 7:00 a.m., the node that represents this student just randomly generates his position inside laboratory subsimulation area, as it is depicted in Figure2.Figure 2
Mobility of students in school area of SSBMM.Figure2 gives us the possibility of seeing that student B has physics in the lecture hall at the same time. If student A has physics in the lecture hall at 8:00 a.m. and student B has chemistry in laboratories at the same time according to the schedule, they just change their subareas by randomly generating positions inside subareas that correspond to the cells of the simulation grid.


### 3.2.3. Behaviour of Nodes When They Travel

Travelling in this model is realised by traces, along which students can travel. Some traces are two-way; others are just one-way. These traces begin in areas of origin (college dormitory, city settlement) and they end in the school or vice versa. Therefore, it is important to know how simulation area looks like.In Figure3 a simulation area of this mobility model is shown. Blue arrows represent the traces. We can also see that trace from city settlement to school is two-way and the other two traces are just one-way. So, if nodes are travelling from college dormitory to school, they follow trace 2. On that way, in time slot t, they randomly generate their position inside the first cell (light blue) that crosses trace 2. On time slot (t+1) their positions inside the first cell are just shifted to the second cell on that way. These positions are not generated again; they are shifted by the cell size in x-direction and y-direction by the following equation:(2)xt+1=xt+syt+1=yt+s,where s is the size of the cell in simulation grid. This implies that node requires one time slot to pass by the one cell of simulation grid while travelling. For example, if the node needs to travel from city settlement to school along trace 1, he needs one time slot to be in school on time for the lesson. This situation will be described closely in Section 3.4.Figure 3
Simulation area of SSBMM.


### 3.2.4. Behaviour of Nodes in College Dormitory

In this area live students in their free time. As mentioned before, in this area a social behaviour of those students will be simulated. For that reason, this type of behaviour will be described in a separate section because the social behaviour is the important piece of that paper.


## 3.2.1. Behaviour of Nodes in City Settlement

This is the area where students from city live. From the observation, we assumed that students from city spend most of their free time at home. They move along their apartment, which is basically the small range of movement. At the initial phase, the positions of students with city settlement origin are randomly generated inside settlement area and new goal 1 in the new time slot is randomly chosen from current position plus small range.(1)xt+1=xt+rand⁡xmin,xmaxyt+1=yt+rand⁡ymin,ymax.In (1), variables xt, yt represent coordinates in the current time slot and xt+1, yt+1 are coordinates of the node in the time slot (t+1). These coordinates are computed from ranges [xmin,xmax] and [ymin,ymax] with which the small range of movement in the apartment is simulated. Coordinates xmin and ymin from ranges should be negative and opposite numbers of xmax and ymax from ranges, for example, [-5,5].


## 3.2.2. Behaviour of Nodes in School

The school is the area, where students are every business day according to their schedule. In this mobility model, school area is divided into three subareas, which are actually cells of simulation grid. These subareas can be interpreted as the library, laboratory, lecture hall, and so on. The mobility of nodes or students, respectively, is according to the schedule (structure will be explained later). Every student knows his schedule and he also knows in which study group he is. So, if student A has chemistry in laboratories at 7:00 a.m., the node that represents this student just randomly generates his position inside laboratory subsimulation area, as it is depicted in Figure2.Figure 2
Mobility of students in school area of SSBMM.Figure2 gives us the possibility of seeing that student B has physics in the lecture hall at the same time. If student A has physics in the lecture hall at 8:00 a.m. and student B has chemistry in laboratories at the same time according to the schedule, they just change their subareas by randomly generating positions inside subareas that correspond to the cells of the simulation grid.


## 3.2.3. Behaviour of Nodes When They Travel

Travelling in this model is realised by traces, along which students can travel. Some traces are two-way; others are just one-way. These traces begin in areas of origin (college dormitory, city settlement) and they end in the school or vice versa. Therefore, it is important to know how simulation area looks like.In Figure3 a simulation area of this mobility model is shown. Blue arrows represent the traces. We can also see that trace from city settlement to school is two-way and the other two traces are just one-way. So, if nodes are travelling from college dormitory to school, they follow trace 2. On that way, in time slot t, they randomly generate their position inside the first cell (light blue) that crosses trace 2. On time slot (t+1) their positions inside the first cell are just shifted to the second cell on that way. These positions are not generated again; they are shifted by the cell size in x-direction and y-direction by the following equation:(2)xt+1=xt+syt+1=yt+s,where s is the size of the cell in simulation grid. This implies that node requires one time slot to pass by the one cell of simulation grid while travelling. For example, if the node needs to travel from city settlement to school along trace 1, he needs one time slot to be in school on time for the lesson. This situation will be described closely in Section 3.4.Figure 3
Simulation area of SSBMM.


## 3.2.4. Behaviour of Nodes in College Dormitory

In this area live students in their free time. As mentioned before, in this area a social behaviour of those students will be simulated. For that reason, this type of behaviour will be described in a separate section because the social behaviour is the important piece of that paper.


## 3.3. Creating a Social Behaviour

A social behaviour of nodes (student’s, resp.) in college dormitory will be described along with the description of how to model social relationships between nodes and their movement based on these relationships.


### 3.3.1. Modelling Social Relationships

One of the ways how to model relationships between nodes or students is weighted graph [11]. Each student represents a node in this graph. The edges and their weights are representing the strength of relationships among nodes. An example of that weighted graph is shown in Figure 4.Figure 4
Example of weighted graph created by students, which represents network.Depicted weighted graph represents a network of five students. These students are vertexes of this graph and weights of the edges are the strength of their relationships between each other. This strength is represented by value in the range[0,1], where 0 indicates no relationship between the pair of students and 1 indicates the strong relationship. For better graphical interpretation we showed only edges with weights higher than 0,40. This weighted graph can be also interpreted by the 5 × 5 symmetric Social Relationships (SR) matrix, showed as follows.Example of Symmetric Social Relationships (SR) Matrix
(3)
S
R
=
Student  A
Student  B
Student  C
Student  D
Student  E
Student  A
Student  B
Student  C
Student  D
Student  E
1
0.55
0.23
0.45
0.15
0.55
1
0.92
0.78
0.87
0.23
0.92
1
0.30
0.63
0.45
0.78
0.30
1
0.95
0.15
0.87
0.63
0.95
1
.The elementsri,j of SR matrix represents the strength of the relationship between individuals i and j. As mentioned before, this matrix is symmetric. In this model, it means that the same strength of relationship from both sides of individuals is considered. In the real life, this consideration is false, because some individuals may have stronger feelings for others than vice versa. In this model, this would lead to the asymmetric matrix. This situation requires further investigation in future.


### 3.3.2. Mobility of Nodes Based on Relationships

In this section, the mobility of nodes in college dormitory based on social relationships presented in Section3.1 will be described. College dormitory in the simulation area will be divided into three subareas, as it is depicted in Figure 3. These subareas can be interpreted as apartments, gym, club, and so on. The mobility of nodes in this subareas will be as follows.(i)
First goal selection: as there are three subareas, in initial phase nodes with origin in college dormitory will be randomly divided into three groups with approximately (in case odd number of nodes) the same number of nodes. The first goal of every student from first group in time slot t will be randomly generated inside first subarea cell of college dormitory simulation area and then first goal of every student from the second group in second subarea and so on.(ii)
Subsequent goal selection: when the first goal in time slot t is generated, new goal in the time slot (t+1) is selected by the following mechanism presented by authors in [11]. A certain number of nodes is associated with subarea cell Ck. Each cell exerts a certain social attractivity for a certain node. The social attractivity of a cell is a measure of its importance in terms of the social relationships for the node taken into consideration. For each node social attractivity of all three cells 3 is calculated. This calculation is based on evaluating the strength of the relationships of nodes from particular cells with the node taken into consideration. So the social attractivity for the cell Ck and for the node i is defined as follows:(4)SACki=∑j=1,j∈Cknsri,jw,where w is the cardinality of cell Ck (number of nodes in Ck) and sri,j is the element of SR matrix between nodes i and j. In other words, the social attractivity of a cell for node i is defined as the sum of the elements of SR matrix that represent the relationships between node i and the other nodes that belong to that particular cell, normalised by the total number of hosts associated with that cell [11]. If the cell Ck is empty, then w=0 and SACki is also equal to 0. The new goal for node i is then randomly generated inside the cell with the highest social attractivity for that node. So, the new goal can be selected inside of other cells or inside the same cell. New goals are selected inside another cell when node i has stronger relationships with nodes from that particular cell. In every time slot, nodes will try to get into the cell where they have friends with strong relationships.


## 3.3.1. Modelling Social Relationships

One of the ways how to model relationships between nodes or students is weighted graph [11]. Each student represents a node in this graph. The edges and their weights are representing the strength of relationships among nodes. An example of that weighted graph is shown in Figure 4.Figure 4
Example of weighted graph created by students, which represents network.Depicted weighted graph represents a network of five students. These students are vertexes of this graph and weights of the edges are the strength of their relationships between each other. This strength is represented by value in the range[0,1], where 0 indicates no relationship between the pair of students and 1 indicates the strong relationship. For better graphical interpretation we showed only edges with weights higher than 0,40. This weighted graph can be also interpreted by the 5 × 5 symmetric Social Relationships (SR) matrix, showed as follows.Example of Symmetric Social Relationships (SR) Matrix
(3)
S
R
=
Student  A
Student  B
Student  C
Student  D
Student  E
Student  A
Student  B
Student  C
Student  D
Student  E
1
0.55
0.23
0.45
0.15
0.55
1
0.92
0.78
0.87
0.23
0.92
1
0.30
0.63
0.45
0.78
0.30
1
0.95
0.15
0.87
0.63
0.95
1
.The elementsri,j of SR matrix represents the strength of the relationship between individuals i and j. As mentioned before, this matrix is symmetric. In this model, it means that the same strength of relationship from both sides of individuals is considered. In the real life, this consideration is false, because some individuals may have stronger feelings for others than vice versa. In this model, this would lead to the asymmetric matrix. This situation requires further investigation in future.


## 3.3.2. Mobility of Nodes Based on Relationships

In this section, the mobility of nodes in college dormitory based on social relationships presented in Section3.1 will be described. College dormitory in the simulation area will be divided into three subareas, as it is depicted in Figure 3. These subareas can be interpreted as apartments, gym, club, and so on. The mobility of nodes in this subareas will be as follows.(i)
First goal selection: as there are three subareas, in initial phase nodes with origin in college dormitory will be randomly divided into three groups with approximately (in case odd number of nodes) the same number of nodes. The first goal of every student from first group in time slot t will be randomly generated inside first subarea cell of college dormitory simulation area and then first goal of every student from the second group in second subarea and so on.(ii)
Subsequent goal selection: when the first goal in time slot t is generated, new goal in the time slot (t+1) is selected by the following mechanism presented by authors in [11]. A certain number of nodes is associated with subarea cell Ck. Each cell exerts a certain social attractivity for a certain node. The social attractivity of a cell is a measure of its importance in terms of the social relationships for the node taken into consideration. For each node social attractivity of all three cells 3 is calculated. This calculation is based on evaluating the strength of the relationships of nodes from particular cells with the node taken into consideration. So the social attractivity for the cell Ck and for the node i is defined as follows:(4)SACki=∑j=1,j∈Cknsri,jw,where w is the cardinality of cell Ck (number of nodes in Ck) and sri,j is the element of SR matrix between nodes i and j. In other words, the social attractivity of a cell for node i is defined as the sum of the elements of SR matrix that represent the relationships between node i and the other nodes that belong to that particular cell, normalised by the total number of hosts associated with that cell [11]. If the cell Ck is empty, then w=0 and SACki is also equal to 0. The new goal for node i is then randomly generated inside the cell with the highest social attractivity for that node. So, the new goal can be selected inside of other cells or inside the same cell. New goals are selected inside another cell when node i has stronger relationships with nodes from that particular cell. In every time slot, nodes will try to get into the cell where they have friends with strong relationships.


## 3.4. Data Structure of SSBMM

Data structure needed for SSBMM will be described below. The model is implemented in Matlab so data will be stored in matrices. The first described matrix is Schedule. As it is mentioned before, Schedule matrix will be used to manage the movement of students in the school area. In our model, there are three school subareas and also students are divided intoN study groups. For each study group and school subarea, starting time will be defined. At this time student from that particular study group should be in this particular subarea. A Schedule matrix is depicted in Table 1, where every study group has assigned its time in particular school subarea for every business day (for the weekend there is no defined schedule). Values in this matrix indicate a value of time slots. For example, the student from study group 1 at day 1 should be in subarea 1 in time slot 14. We also add the extra row for every day which is end of schedule. This row indicates the end of school for the particular day. This extra row presents information about when students begin to travel home. Italic rows and columns are just for graphical interpretation.Table 1
Example of Schedule matrix in SSBMM.
Study group 1
Study group 2
⋯
Study group
N
Day 1
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋯
Day 2
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋮
⋮
⋮
⋱
⋮
Day 5
Start time subarea 1
⋯
Start time subarea 2
⋯
Start time subarea 3
⋯
End of schedule
⋯Another important matrix is Nodeinfo. This matrix stores information about every node and is depicted in Table2. For every node or student, respectively,origin,study group,travel start, andtravel end are defined.Table 2
Example of Nodeinfo matrix of SSBMM.
Node
1
2
3
⋯
n
Origin
1
2
1
⋯
2
Study group
1
3
2
⋯
3
Travel start
27
24
26
⋯
25
Travel end
32
30
35
⋯
32Number 1 in theorigin row indicates that student is from student’s dormitory and number 2 indicated that student is from city settlement. In thestudy group row each number represents a sequence number of the study group.Travel start andtravel end row shows numbers that represent time slots in which student begins travelling or ends travelling. These time slots numbers are calculated by the following mechanism:(1)
Find out origin of the student(2)
Find out in which study group is the student(3)
From Schedule matrix find out when
(i)
the student should be in school(ii)
the student should end school(4)
In row
(i)
Travel start is calculated, time slotsts=tsch-tt(ii)
Travel end is calculated, time slotste=tsch+ttAt first, there is a need to find out information about the origin of the student, because there is a need to know which trace will be used for him. Then information about to which study group student belongs is needed, because, in the third step, time slot for this study group in particular day in which student starts or ends his education at school will be extracted. When this information is presented, then time slotts which is travel start time or time slot te which is travel end is calculated. tsch is time slot from the third step in Schedule matrix and tt is the value which represents how many time slots student needs to travel through this particular trace. Let us remember that one time slot to pass one cell of the grid is needed. For example, if the student from origin 1 (student’s dormitory) wants to travel to school because he should be in school at time slot 20 defined by Schedule matrix, we calculate time start in Nodeinfo matrix as 18 in step (4). Time tt is 2, because students from dormitory use trace 2 (Figure 3) and they need 2 time slots to pass this trace.In this model, the matrix that stores positions of nodes is used. This matrix storesx and y positions of each node. An example of this matrix is shown in Table 3. Positions in this matrix are updated every time slot.Table 3
Example of Position matrix in SSBMM.
Node
1
2
3
⋯
n
x
100
550
945
⋯
450
y
120
220
615
⋯
808We also implemented a Social Relationships (SR) matrix described in Section3.3 based on social behaviour of nodes. An example of this matrix is shown in Table 4.Table 4
Example of implemented SR matrix in SSBMM.
Node
1
2
3
⋯
n
1
1
0.5
0.7
⋯
0.9
2
0.5
1
0.8
⋯
0.6
⋯
⋯
⋯
⋯
⋯
⋯
n
0.9
0.6
0.25
⋯
1Another matrix implemented in this model is called Random State matrix (Table5). In this matrix is stored a state of the student. This state represents the behaviour of students. Number 10 represents the normal behaviour of student and number 20 represents a random behaviour of the student. What is normal and random behaviour will be explained below.Table 5
Example of Random State matrix in SSBMM.
Node
1
2
3
⋯
n
State
10
20
10
⋯
10


## 3.5. Random Behaviour in Model

Explanation of random behaviour of the nodes or students, respectively, is described in this section. When students obey all rules and algorithms of this model, they behave normally. Sometimes students will not come to school because some uncertain circumstances occurred. These circumstances are, for example, a doctor visit or sickness and so forth. This type of behaviour we called random. The state of every node in every time slot is set by randomly generated numberr. This number is randomly generated from the range [0,1] by Matlab function rand as uniformly distributed random number [16]. Then threshold T is set. In this model threshold is T=0.9. So when a generated number r is from the range [0,0.9], it means that student will behave normally. When number r is from the range [0.91,1], it means that student will behave randomly. In this model random behaviour means that node in particular time slot and random state randomly generates his position in the range of 0 (xmin) and 3/4 grid size (xmax) from the current position by (1). When in another time slot student behaves normally, he returns in the position where he should be in that particular time slot.


### 3.5.1. Behaviour of Nodes in Weekend

The weekend is the special type of random behaviour. In this time the schedule is not defined. It means that students are behaving mostly randomly. The threshold at this time is set lower, for example,T=0.4. When the students behave normally, they are in their origin area and they move according to laws defined for this particular area. When they behave randomly, they generate their positions as it was described above.


## 3.5.1. Behaviour of Nodes in Weekend

The weekend is the special type of random behaviour. In this time the schedule is not defined. It means that students are behaving mostly randomly. The threshold at this time is set lower, for example,T=0.4. When the students behave normally, they are in their origin area and they move according to laws defined for this particular area. When they behave randomly, they generate their positions as it was described above.


## 3.6. Main Algorithm of SSBMM

The main algorithm takes care about the proper run of the model. This algorithm divides students into lists in every time slot. Then all lists are sent into the functions, which implement algorithms for every area and their behaviour described in previous sections of the model. Each function performs its operations and updates Position matrix. Main algorithm and lists distribution are described in Algorithm1.Algorithm 1:Main algorithm of SSBMM.
input: Load or generate Nodeinfo, Schedule and
Position matrices. t←0
(
1
)   for  day←1  to  days  do
(
2
)
if  day  is   weekend  day  then  //  day==weekend
(
3
)
∀
nodes→WeekendList
(
4
)
Call Function: WEEKEND (WeekendList)
(
5
)
end
(
6
)
while  Time slot  t ≠ last  Time  slot  of  theday  do
(
7
)
- Generate Random state of every node and
write states into Random State matrix;
(
8
)
for  ∀  nodes  do
(
9
)
if  t∈node’s  free  time  then
(
10
)
the particular student has its free
time;
(
11
)
if  node  n∈Dormitory  then
(
12
)
node  n→DormitoryList
(
13
)
else
(
14
)
node  n→CitySettlementList
(
15
)
end
(
16
)
else if  t∈node’s travel time to school
then
(
17
)
if  node  n∈Dormitory  then
(
18
)
node  n→Trace2List
(
19
)
else
(
20
)
node  n→Trace1List
(
21
)
end
(
22
)
else if  t∈node’s school time  then
(
23
)
node  n→SchoolList
(
24
)
else if  t∈node’s travel time from school
then
(
25
)
if  node  n∈Dormitory  then
(
26
)
node  n→Trace3List
(
27
)
else
(
28
)
node  n→Trace1List
(
29
)
end
(
30
)
else
(
31
)
if  node  n∈behave Randomly according
Random State  then
(
32
)
node  n→RandomList
(
33
)
end
(
34
)
end
(
35
)
end
(
36
)
Call Funnctions: WEEKEND (WeekendList),
DORMITORY (DormitoryList),
CITYSET (CitySettlementList),
TRACE1 (Trace1List),
TRACE2 (Trace2List),
TRACE3 (Trace3List),
SCHOOL (SchoolList),
RANDOM (RandomList),
(
37
)
t
=
t
+
1;
(
38
)
end
(
39
)  end


## 4. Simulations and Results

Mobility models were simulated and verified in software Matlab. The proposed Students Social Based Mobility Model (SSBMM) and two random mobility models Matis [1] and Random Walk mobility model [17] were used.Simulations are oriented on the comparison of our proposed SSBMM with other mentioned models by Tools for Evaluation of Social Relations in Mobility Models proposed in [18] and some protocol dependent methods [2].The first set of simulations is oriented on our proposed evaluation method [18]. Results are focused on number of communities, modularity quality, and average weighted degree. Contacts in Meeting matrix were calculated based on nodes’ movement in Matlab software. This set of simulations was running based on variables, which are defined in Table 6.Table 6
Set values of variables for first set of simulations.
Variable
Value
Area [m]
1500 × 1500
Number of nodes
50, 100, 200
Radio range [m]
20, 50, 100, 300
Time slots per day
48
Simulation duration [days]
28The second set of simulations was running based on variables, which are defined in Table7 and is oriented on some of the protocol dependent methods [2]. The average E2E delay, the message delivery ratio, the average time of delivery, and the average number of used nodes were used as evaluation methods. Those methods were performed for four routing protocols Dynamic Source Routing (DSR), Unlimited-Dynamic Source Routing (U-DSR), Social Based Opportunistic Routing (SBOR), and Social Based Opportunistic Routing-social aspect (SBOR-sa).Table 7
Set values of variables for second set of simulations.
Variable
Value
Area [m]
1500 × 1500
Number of nodes
200
Radio range [m]
20, 50, 75, 100, 150, 200, 250, 300
Time slots per day
48
Simulation duration [days]
28Used routing protocols are briefly described in the following section.DSR with Limited Number of
Paths Found in Route Discovery Process
.  A first routing protocol is standard DSR routing protocol based on RFC 4728 [19], which is simple and efficient, on-demand routing protocol designed for usage in multihop wireless ad hoc networks. DSR allows the network to be completely self-organised and self-configurable. The protocol is composed of two main mechanisms of “Route Discovery” and “Route Maintenance,” which allow discovering of path from S (source) to D (destination). During Route Discovery mechanism was a path found by RREQ (Route Request) packet. The path is established after the RREP (Route Replay) packet is received [19]. Pathfinding was limited on two attempts for one message, first time at the start of communication and the second time during the maintenance process.DSR with Unlimited Number of
Paths Found in Route Discovery Process
.  Second routing protocol U-DSR is like previous routing protocol DSR [19] with same mechanisms and process but with one change. The difference is that U-DSR has the unlimited number of attempts to find a path between S and D.SBOR with History Based Probability.  Another type of routing in MANET environment is based on opportunistic transfers with or without social relations among nodes. For our comparison, SBOR (Social Based Opportunistic Routing) was used. This method can assume a flooding-based routing [20] for sending “extended RREQ packet (E-RREQ)” and direct transfer of single-copy forwarding based scheme for sending data with social determining. The selection of the next hop neighbour from potential nodes is provided by the probability of delivery. This probability was calculated from contact history among nodes. SBOR is the good solution, in situations, where it is impossible to establish E2E path [1].SBOR-sa with History Based Probability Influenced by Social Aspect.  SBOR-sa is the same routing solution like SBOR, but with one change. The main differences between them are in the probability of delivery. Standard probability of delivery calculated from contact history is recalculated by social aspect given from knowledge about nodes origin and division to the study groups. This kind of information can be extracted from Nodeinfo matrix (see Section 3.4).


### 4.1. Number of Communities, Modularity Quality, and Average Weighted Degree Results

The first set of simulation is focused on the number of communities, which are possible to obtain from the resulting mobility of nodes along with modularity quality and average weighted degree. This result was performed based on data collected from mobility of used models. Data collected from mobility models was contacts based on which Louvain method was performed. More information about data collection and used methods is in [18].


#### 4.1.1. Number of Communities

Here we present some main results from [18]. In radio range of 20 meters (Table 8) it is possible to see that numbers of communities are growing with the number of nodes. This phenomenon is more significant in the case of SSBMM. In the simulation with 100 and 200 nodes, SSBMM has way more communities than random models.Table 8
Number of communities results.
Nodes
20 meters
50 meters
100 meters
200 meters
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
50
3
4
5
3
3
7
3
3
7
2
2
2
100
6
5
12
4
5
13
4
3
6
3
3
2
200
7
6
25
5
6
14
5
4
8
4
4
2More nodes mean denser network; therefore more contacts between nodes were detected and also more friendships among nodes were found. Based on contacts it is possible to say that some relations between nodes are stronger and some of them are weaker. This is the reason why it is possible to obtain the number of communities parameters because relations among nodes inside of communities are stronger than relations among nodes outside of communities. Relationships among nodes in random models were comparable inside and outside. Some of them are a little bit stronger, so some communities were built. In random models, the nodes usually move across the same field of simulation grid and sometimes move from one field of the simulation grid to another. A number of these fields are low so it is expected that the number of discovered communities should be also low. Radio range of 20 meters with 50 nodes creates the sparse network in simulation area. Therefore, not many nodes are in their radio range, so in the case of SSBMM, much smaller, but stronger communities are created.Stronger and weaker relationships can be seen in Figure6, where the division of nodes into communities is depicted. The SSBMM has thicker edges inside than among communities in comparison to random models where edges inside and outside of communities are comparable.The same behaviour was observed for radio range of 50 meters. SSBMM has bigger numbers of communities, while random models have almost same numbers of communities that grow just slightly.In radio range of 100 meters it is possible to see that SSBMM still has bigger numbers of communities, but these numbers are smaller than in radio ranges of 20 and 50 meters. This is because of the dense network in radio range of 100 meters. Thus, Louvain algorithm must consider more edges among nodes, so fewer but stronger communities are created.Different behaviour was observed in simulations of 300 meters of radio range. In all simulations, SSBMM has 2 communities. Those two communities were actually nodes divided by their origin (dormitory, city settlement from SSBMM) that is possible to see in Figure6 in case of 100 nodes for SSBMM. The odd nodes are from the dormitory and even nodes are from the city settlement. On radio range of 300 meters, the network is very dense, so it is possible to say that only contacts in origin areas were strong enough to form communities. Therefore, many more edges among nodes than in radio range of 100 meters are considered by Louvain algorithm, so the even smaller number of communities was discovered.Simulations with number of communities parameter show that SSBMM has stronger relationships inside communities than outside of these communities. With bigger numbers of nodes, SSBMM has more communities than in simulations with the smaller number of nodes. In the sparse network, number of communities for SSBMM was smaller. A smaller number of communities were discovered also in a denser network but these communities were stronger. In the case of random mobility models almost same or just slightly growing numbers of communities were discovered regardless of dense or sparse network.We also present division of 100 nodes in different radio ranges into communities depicted in Figure6. As it was mentioned before, the SSBMM has thicker edges inside than among communities. It means that there are stronger relationships among nodes. In the random models, edge thickness inside and among communities is comparable; thus weaker relationships among nodes are created.


#### 4.1.2. Modularity Quality

In Figure5 are depicted modularity quality results. It is possible to see that modularity quality of SSBMM was always better than in random models. Authors in [21] declared that nonzero values represent deviations from randomness, and in practice, it is found that a value above about 0.3 is a good indicator of significant community structure in a network. Even in radio range of 300 meters, where numbers of communities were lower in the case of SSBMM in a very dense network scenario, modularity quality was still better and above 0.3, which proves SSBMM deviation from randomness. We noticed that modularity with increasing radio range decreases. This is caused by increasing the density of the network, where more edges among nodes are considered by Louvain algorithm, so the decision about division nodes into communities is more difficult. In SSBMM simulation scenario of 50 nodes in radio range of 20 meters it is possible to see the lower value of modularity quality than expected, compared to other simulation scenarios. This is due to the other side of extreme, where 50 nodes in this small radio range are in large simulation area. Such a network is very sparse, so contacts among nodes that form the community are not so often, which means relation ties are weak. It is also possible to see that modularity quality of random models is positive but very low. These results prove that random mobility models are truly random.Figure 5
Modularity quality results of used mobility models in process of community discovery.Figure 6
Division of 100 nodes into communities by all models in different radio ranges by Gephi.


#### 4.1.3. Average Weighted Degree

In Figure7 are depicted the results of the average weighted degree for 100 nodes. The weighted degree of a node has the same idea as classic node degree. It is based on the number of edges for a node but pondered by the weight of each edge. It is doing the sum of the weight of the edges. The SSBMM outperforms random models in all radio ranges. The frequency of contacts among some nodes in SSBMM was higher than in random models, which also push average weighted degree values higher.Figure 7
Average weighted degree of 100 nodes.Therefore, it is possible to say that social ties among nodes cause more often contacts among nodes and this behaviour affects average weighted degree values. The same behaviour was observed for 50 and 200 nodes in [18].


### 4.2. Routing Evaluation Results

Routing evaluation results are performed because of social mobility model verification as the second set of simulations. Described mobility models (Random Walk, Matis, and SSBMM) were used for running four routing methods, which are possible to use in MANET environment. Two of them were based on standard MANET routing solutions and the next two of them were based on social opportunistic routing solutions.In this section are described two main simulation results for three mobility models, where four routing protocols were running.The first results displayed in Table9 represent the ratio between successful and nonsuccessful packet delivery of the full message from all repetition of simulations. This type of result is evaluated for each mobility model (Random Walk, Matis, and SSBMM) and for each routing protocol (DSR, U-DSR, SBOR, and SBOR-sa).Table 9
Simulation ratio (successful/nonsuccessful).
Simulation ratio: successful/nonsuccessful [%]
Protocol
Mobility model
Radio range [m]
20
50
75
100
150
200
250
300
DSR
Random Walk
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
Matis
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
SSBMM
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
U-DSR
Random Walk
0/100
40/60
100/0
100/0
100/0
100/0
100/0
100/0
Matis
0/100
90/10
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
20/80
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SBOR
Random Walk
70/30
100/0
100/0
100/0
100/0
100/0
100/0
100/0
Matis
80/20
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
100/0
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SBOR-sa
Random Walk
70/30
90/10
100/0
100/0
100/0
100/0
100/0
100/0
Matis
40/60
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
90/10
100/0
100/0
100/0
100/0
100/0
100/0
100/0Second result in Figure8 displays average number of transfers for successfully delivered messages on the left axes. Right axes displayed average time for successfully delivered messages. The result is depending on radio range.Figure 8
Average number of transfers for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) applied to three mobility models (Random Walk, Matis, and SSBMM) with time of delivery only for successful simulations.DRS routing protocol has never transferred full message; only some packets of the message were delivered. This scenario occurred for all mobility models and all radio range values. Therefore DSR is not displayed in Figure8, because this figure displays only full message delivered to the destination.U-DSR routing worked independently of social relations. From this reason, it worked similarly by both random mobility models (Random Walk and Matis). When mobility model was social (SSBMM), U-DSR obtained completely transfer of message by lower radio range versus two previous. By comparison of numbers of attempts, get a U-DSR lower value as SBOR and SBOR-sa for a Random Walk. When Matis mobility model was used, U-DSR obtained at first lower value of number of transfers and higher delivery time, then for higher radio range it obtained the higher number of transfers and almost the same delivery time like SBOR and SBOR-sa.At first, U-DSR obtained lower number of transfers for lower values of radio range, then the number of transfers was increased and always higher than SBOR and SBOR-sa obtained.SBOR routing worked based on social relations (contact history). When Random Walk mobility model was used, a number of transfers were higher, because mobile nodes do not move based on social patterns and the probability of delivery among nodes was confused for social routing. When second random mobility model Matis was used, the results were similar. For both of them it reached lower delivery time, but for radio range 200 m and higher SBOR it obtained lower number of transfers. When SSBMM was used for social routing, then for every radio range it was useful and got a much lower number of transfers than previous mobility models.SBOR-sa routing is almost the same like SBOR; the only probability of delivery is changed and recalculated by social aspect among nodes. When random mobility models were used, a number of transfers were worse, because increasing probability of delivery made worse decisions by social routing. In the case, where social mobility model was used for SBOR-sa, a number of transfers and delivery time were lower than at SBOR.In cases, where routing protocols were not successful, their time of delivery reached infinity value.Third result in Figure9 displays average end-to-end (E2E) delay for successful attempts based on [17], which is depending on radio range. Given results are for four routing protocols (DSR, U-DSR, SBOR, and SBOR-sa), each for three mobility models (Random Walk, Matis, and SSBMM), which are used in MANET environment.Figure 9
Average E2E delay for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) and three mobility models (Random Walk, Matis, and SSBMM) depending on radio range only for successful simulations.DSR routing protocol obtained infinity average E2E delay, because it was not totally successful in each simulation. U-DSR obtained lower E2E delay than SBOR and SBOR-sa, but social routing methods were more successful by lower radio range, than U-DSR. When the probability of delivery was adopted by social aspect for SBOR-sa routing protocol, the average E2E delay was higher for unsocial movement and lower for social movements.Fourth result in Figure10 displays packet delivery fraction (PaDF), which is the metric by which we can evaluate the ratio of data packets delivered to the destination to those generated by the source. From the results of PaDF it is possible to conclude that social oriented routing methods are more effective with social mobility model than with random models. When social routing protocols are adopted to random mobility models, their effectivity decreases. Unsocial oriented routing methods such as DSR and U-DSR are not affected by social aspect of social mobility model. Therefore, random mobility models outperform SSBMM in DSR routing method results.Figure 10
Packet delivery fraction for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) applied to three mobility models (Random Walk, Matis, and SSBMM).In MANET environment it is possible to use not only reactive, proactive, or opportunistic routing, also hybrid routing. Based on results from [1] it is possible to assume that using hybrid routing based on social relations among nodes can improve time of delivery and average E2E delay by comparison with described routing methods.


## 4.1. Number of Communities, Modularity Quality, and Average Weighted Degree Results

The first set of simulation is focused on the number of communities, which are possible to obtain from the resulting mobility of nodes along with modularity quality and average weighted degree. This result was performed based on data collected from mobility of used models. Data collected from mobility models was contacts based on which Louvain method was performed. More information about data collection and used methods is in [18].


### 4.1.1. Number of Communities

Here we present some main results from [18]. In radio range of 20 meters (Table 8) it is possible to see that numbers of communities are growing with the number of nodes. This phenomenon is more significant in the case of SSBMM. In the simulation with 100 and 200 nodes, SSBMM has way more communities than random models.Table 8
Number of communities results.
Nodes
20 meters
50 meters
100 meters
200 meters
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
50
3
4
5
3
3
7
3
3
7
2
2
2
100
6
5
12
4
5
13
4
3
6
3
3
2
200
7
6
25
5
6
14
5
4
8
4
4
2More nodes mean denser network; therefore more contacts between nodes were detected and also more friendships among nodes were found. Based on contacts it is possible to say that some relations between nodes are stronger and some of them are weaker. This is the reason why it is possible to obtain the number of communities parameters because relations among nodes inside of communities are stronger than relations among nodes outside of communities. Relationships among nodes in random models were comparable inside and outside. Some of them are a little bit stronger, so some communities were built. In random models, the nodes usually move across the same field of simulation grid and sometimes move from one field of the simulation grid to another. A number of these fields are low so it is expected that the number of discovered communities should be also low. Radio range of 20 meters with 50 nodes creates the sparse network in simulation area. Therefore, not many nodes are in their radio range, so in the case of SSBMM, much smaller, but stronger communities are created.Stronger and weaker relationships can be seen in Figure6, where the division of nodes into communities is depicted. The SSBMM has thicker edges inside than among communities in comparison to random models where edges inside and outside of communities are comparable.The same behaviour was observed for radio range of 50 meters. SSBMM has bigger numbers of communities, while random models have almost same numbers of communities that grow just slightly.In radio range of 100 meters it is possible to see that SSBMM still has bigger numbers of communities, but these numbers are smaller than in radio ranges of 20 and 50 meters. This is because of the dense network in radio range of 100 meters. Thus, Louvain algorithm must consider more edges among nodes, so fewer but stronger communities are created.Different behaviour was observed in simulations of 300 meters of radio range. In all simulations, SSBMM has 2 communities. Those two communities were actually nodes divided by their origin (dormitory, city settlement from SSBMM) that is possible to see in Figure6 in case of 100 nodes for SSBMM. The odd nodes are from the dormitory and even nodes are from the city settlement. On radio range of 300 meters, the network is very dense, so it is possible to say that only contacts in origin areas were strong enough to form communities. Therefore, many more edges among nodes than in radio range of 100 meters are considered by Louvain algorithm, so the even smaller number of communities was discovered.Simulations with number of communities parameter show that SSBMM has stronger relationships inside communities than outside of these communities. With bigger numbers of nodes, SSBMM has more communities than in simulations with the smaller number of nodes. In the sparse network, number of communities for SSBMM was smaller. A smaller number of communities were discovered also in a denser network but these communities were stronger. In the case of random mobility models almost same or just slightly growing numbers of communities were discovered regardless of dense or sparse network.We also present division of 100 nodes in different radio ranges into communities depicted in Figure6. As it was mentioned before, the SSBMM has thicker edges inside than among communities. It means that there are stronger relationships among nodes. In the random models, edge thickness inside and among communities is comparable; thus weaker relationships among nodes are created.


### 4.1.2. Modularity Quality

In Figure5 are depicted modularity quality results. It is possible to see that modularity quality of SSBMM was always better than in random models. Authors in [21] declared that nonzero values represent deviations from randomness, and in practice, it is found that a value above about 0.3 is a good indicator of significant community structure in a network. Even in radio range of 300 meters, where numbers of communities were lower in the case of SSBMM in a very dense network scenario, modularity quality was still better and above 0.3, which proves SSBMM deviation from randomness. We noticed that modularity with increasing radio range decreases. This is caused by increasing the density of the network, where more edges among nodes are considered by Louvain algorithm, so the decision about division nodes into communities is more difficult. In SSBMM simulation scenario of 50 nodes in radio range of 20 meters it is possible to see the lower value of modularity quality than expected, compared to other simulation scenarios. This is due to the other side of extreme, where 50 nodes in this small radio range are in large simulation area. Such a network is very sparse, so contacts among nodes that form the community are not so often, which means relation ties are weak. It is also possible to see that modularity quality of random models is positive but very low. These results prove that random mobility models are truly random.Figure 5
Modularity quality results of used mobility models in process of community discovery.Figure 6
Division of 100 nodes into communities by all models in different radio ranges by Gephi.


### 4.1.3. Average Weighted Degree

In Figure7 are depicted the results of the average weighted degree for 100 nodes. The weighted degree of a node has the same idea as classic node degree. It is based on the number of edges for a node but pondered by the weight of each edge. It is doing the sum of the weight of the edges. The SSBMM outperforms random models in all radio ranges. The frequency of contacts among some nodes in SSBMM was higher than in random models, which also push average weighted degree values higher.Figure 7
Average weighted degree of 100 nodes.Therefore, it is possible to say that social ties among nodes cause more often contacts among nodes and this behaviour affects average weighted degree values. The same behaviour was observed for 50 and 200 nodes in [18].


## 4.1.1. Number of Communities

Here we present some main results from [18]. In radio range of 20 meters (Table 8) it is possible to see that numbers of communities are growing with the number of nodes. This phenomenon is more significant in the case of SSBMM. In the simulation with 100 and 200 nodes, SSBMM has way more communities than random models.Table 8
Number of communities results.
Nodes
20 meters
50 meters
100 meters
200 meters
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
RW
Matis
SSBMM
50
3
4
5
3
3
7
3
3
7
2
2
2
100
6
5
12
4
5
13
4
3
6
3
3
2
200
7
6
25
5
6
14
5
4
8
4
4
2More nodes mean denser network; therefore more contacts between nodes were detected and also more friendships among nodes were found. Based on contacts it is possible to say that some relations between nodes are stronger and some of them are weaker. This is the reason why it is possible to obtain the number of communities parameters because relations among nodes inside of communities are stronger than relations among nodes outside of communities. Relationships among nodes in random models were comparable inside and outside. Some of them are a little bit stronger, so some communities were built. In random models, the nodes usually move across the same field of simulation grid and sometimes move from one field of the simulation grid to another. A number of these fields are low so it is expected that the number of discovered communities should be also low. Radio range of 20 meters with 50 nodes creates the sparse network in simulation area. Therefore, not many nodes are in their radio range, so in the case of SSBMM, much smaller, but stronger communities are created.Stronger and weaker relationships can be seen in Figure6, where the division of nodes into communities is depicted. The SSBMM has thicker edges inside than among communities in comparison to random models where edges inside and outside of communities are comparable.The same behaviour was observed for radio range of 50 meters. SSBMM has bigger numbers of communities, while random models have almost same numbers of communities that grow just slightly.In radio range of 100 meters it is possible to see that SSBMM still has bigger numbers of communities, but these numbers are smaller than in radio ranges of 20 and 50 meters. This is because of the dense network in radio range of 100 meters. Thus, Louvain algorithm must consider more edges among nodes, so fewer but stronger communities are created.Different behaviour was observed in simulations of 300 meters of radio range. In all simulations, SSBMM has 2 communities. Those two communities were actually nodes divided by their origin (dormitory, city settlement from SSBMM) that is possible to see in Figure6 in case of 100 nodes for SSBMM. The odd nodes are from the dormitory and even nodes are from the city settlement. On radio range of 300 meters, the network is very dense, so it is possible to say that only contacts in origin areas were strong enough to form communities. Therefore, many more edges among nodes than in radio range of 100 meters are considered by Louvain algorithm, so the even smaller number of communities was discovered.Simulations with number of communities parameter show that SSBMM has stronger relationships inside communities than outside of these communities. With bigger numbers of nodes, SSBMM has more communities than in simulations with the smaller number of nodes. In the sparse network, number of communities for SSBMM was smaller. A smaller number of communities were discovered also in a denser network but these communities were stronger. In the case of random mobility models almost same or just slightly growing numbers of communities were discovered regardless of dense or sparse network.We also present division of 100 nodes in different radio ranges into communities depicted in Figure6. As it was mentioned before, the SSBMM has thicker edges inside than among communities. It means that there are stronger relationships among nodes. In the random models, edge thickness inside and among communities is comparable; thus weaker relationships among nodes are created.


## 4.1.2. Modularity Quality

In Figure5 are depicted modularity quality results. It is possible to see that modularity quality of SSBMM was always better than in random models. Authors in [21] declared that nonzero values represent deviations from randomness, and in practice, it is found that a value above about 0.3 is a good indicator of significant community structure in a network. Even in radio range of 300 meters, where numbers of communities were lower in the case of SSBMM in a very dense network scenario, modularity quality was still better and above 0.3, which proves SSBMM deviation from randomness. We noticed that modularity with increasing radio range decreases. This is caused by increasing the density of the network, where more edges among nodes are considered by Louvain algorithm, so the decision about division nodes into communities is more difficult. In SSBMM simulation scenario of 50 nodes in radio range of 20 meters it is possible to see the lower value of modularity quality than expected, compared to other simulation scenarios. This is due to the other side of extreme, where 50 nodes in this small radio range are in large simulation area. Such a network is very sparse, so contacts among nodes that form the community are not so often, which means relation ties are weak. It is also possible to see that modularity quality of random models is positive but very low. These results prove that random mobility models are truly random.Figure 5
Modularity quality results of used mobility models in process of community discovery.Figure 6
Division of 100 nodes into communities by all models in different radio ranges by Gephi.


## 4.1.3. Average Weighted Degree

In Figure7 are depicted the results of the average weighted degree for 100 nodes. The weighted degree of a node has the same idea as classic node degree. It is based on the number of edges for a node but pondered by the weight of each edge. It is doing the sum of the weight of the edges. The SSBMM outperforms random models in all radio ranges. The frequency of contacts among some nodes in SSBMM was higher than in random models, which also push average weighted degree values higher.Figure 7
Average weighted degree of 100 nodes.Therefore, it is possible to say that social ties among nodes cause more often contacts among nodes and this behaviour affects average weighted degree values. The same behaviour was observed for 50 and 200 nodes in [18].


## 4.2. Routing Evaluation Results

Routing evaluation results are performed because of social mobility model verification as the second set of simulations. Described mobility models (Random Walk, Matis, and SSBMM) were used for running four routing methods, which are possible to use in MANET environment. Two of them were based on standard MANET routing solutions and the next two of them were based on social opportunistic routing solutions.In this section are described two main simulation results for three mobility models, where four routing protocols were running.The first results displayed in Table9 represent the ratio between successful and nonsuccessful packet delivery of the full message from all repetition of simulations. This type of result is evaluated for each mobility model (Random Walk, Matis, and SSBMM) and for each routing protocol (DSR, U-DSR, SBOR, and SBOR-sa).Table 9
Simulation ratio (successful/nonsuccessful).
Simulation ratio: successful/nonsuccessful [%]
Protocol
Mobility model
Radio range [m]
20
50
75
100
150
200
250
300
DSR
Random Walk
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
Matis
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
SSBMM
0/100
0/100
0/100
0/100
0/100
0/100
0/100
0/100
U-DSR
Random Walk
0/100
40/60
100/0
100/0
100/0
100/0
100/0
100/0
Matis
0/100
90/10
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
20/80
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SBOR
Random Walk
70/30
100/0
100/0
100/0
100/0
100/0
100/0
100/0
Matis
80/20
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
100/0
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SBOR-sa
Random Walk
70/30
90/10
100/0
100/0
100/0
100/0
100/0
100/0
Matis
40/60
100/0
100/0
100/0
100/0
100/0
100/0
100/0
SSBMM
90/10
100/0
100/0
100/0
100/0
100/0
100/0
100/0Second result in Figure8 displays average number of transfers for successfully delivered messages on the left axes. Right axes displayed average time for successfully delivered messages. The result is depending on radio range.Figure 8
Average number of transfers for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) applied to three mobility models (Random Walk, Matis, and SSBMM) with time of delivery only for successful simulations.DRS routing protocol has never transferred full message; only some packets of the message were delivered. This scenario occurred for all mobility models and all radio range values. Therefore DSR is not displayed in Figure8, because this figure displays only full message delivered to the destination.U-DSR routing worked independently of social relations. From this reason, it worked similarly by both random mobility models (Random Walk and Matis). When mobility model was social (SSBMM), U-DSR obtained completely transfer of message by lower radio range versus two previous. By comparison of numbers of attempts, get a U-DSR lower value as SBOR and SBOR-sa for a Random Walk. When Matis mobility model was used, U-DSR obtained at first lower value of number of transfers and higher delivery time, then for higher radio range it obtained the higher number of transfers and almost the same delivery time like SBOR and SBOR-sa.At first, U-DSR obtained lower number of transfers for lower values of radio range, then the number of transfers was increased and always higher than SBOR and SBOR-sa obtained.SBOR routing worked based on social relations (contact history). When Random Walk mobility model was used, a number of transfers were higher, because mobile nodes do not move based on social patterns and the probability of delivery among nodes was confused for social routing. When second random mobility model Matis was used, the results were similar. For both of them it reached lower delivery time, but for radio range 200 m and higher SBOR it obtained lower number of transfers. When SSBMM was used for social routing, then for every radio range it was useful and got a much lower number of transfers than previous mobility models.SBOR-sa routing is almost the same like SBOR; the only probability of delivery is changed and recalculated by social aspect among nodes. When random mobility models were used, a number of transfers were worse, because increasing probability of delivery made worse decisions by social routing. In the case, where social mobility model was used for SBOR-sa, a number of transfers and delivery time were lower than at SBOR.In cases, where routing protocols were not successful, their time of delivery reached infinity value.Third result in Figure9 displays average end-to-end (E2E) delay for successful attempts based on [17], which is depending on radio range. Given results are for four routing protocols (DSR, U-DSR, SBOR, and SBOR-sa), each for three mobility models (Random Walk, Matis, and SSBMM), which are used in MANET environment.Figure 9
Average E2E delay for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) and three mobility models (Random Walk, Matis, and SSBMM) depending on radio range only for successful simulations.DSR routing protocol obtained infinity average E2E delay, because it was not totally successful in each simulation. U-DSR obtained lower E2E delay than SBOR and SBOR-sa, but social routing methods were more successful by lower radio range, than U-DSR. When the probability of delivery was adopted by social aspect for SBOR-sa routing protocol, the average E2E delay was higher for unsocial movement and lower for social movements.Fourth result in Figure10 displays packet delivery fraction (PaDF), which is the metric by which we can evaluate the ratio of data packets delivered to the destination to those generated by the source. From the results of PaDF it is possible to conclude that social oriented routing methods are more effective with social mobility model than with random models. When social routing protocols are adopted to random mobility models, their effectivity decreases. Unsocial oriented routing methods such as DSR and U-DSR are not affected by social aspect of social mobility model. Therefore, random mobility models outperform SSBMM in DSR routing method results.Figure 10
Packet delivery fraction for four routing methods (DSR, U-DSR, SBOR, and SBOR-sa) applied to three mobility models (Random Walk, Matis, and SSBMM).In MANET environment it is possible to use not only reactive, proactive, or opportunistic routing, also hybrid routing. Based on results from [1] it is possible to assume that using hybrid routing based on social relations among nodes can improve time of delivery and average E2E delay by comparison with described routing methods.


## 5. Conclusion and Future Work

In this paper, we propose Student Social Based Mobility Model. This model is inspired by the daily life of students. The main idea was to include mandatory part of our lives into mobility model. Day of the student was divided into free time and mandatory time. In free time, social attractivity among nodes was simulated. In mandatory time, school activities were simulated. In this model, traffic traces were also used to simulate simple city traffic. When we merge all those features into the mobility model, we obtain social based mobility model affected by the mandatory part of mobility.The proposed mobility model was simulated and compared with the random mobility models. Simulations using the number of communities and modularity quality parameter show that SSBMM in sparse networks with small radio ranges has much more than social groups based random mobility models. In the dense network with big radio ranges, a number of social groups are almost the same for all mobility models but SSBMM has little bit more communities and also stronger communities. Results of simulations based on/with respect to modularity quality show that SSBMM always obtains modularity quality values above 0.3, which is a good indicator of significant community structure. On the other hand, small values of modularity quality were obtained when random mobility models were used. The results of the weighted average degree show another significant deviation from random SSBMM of mobility based models. SSBMM has at least twice as bigger values of average weighted degree as random mobility models used in all radio ranges. This is due to the fact that contacts between nodes are more often with longer duration due to the social attraction.Four routing protocols (DSR, U-DSR, SBOR, and SBOR-sa) were simulated as protocol depended methods for evaluation of mobility models (Random Walk, Matis, and SSBMM). The results show the advantages of using social mobility model for transfer data between source and destination node. When social routing methods were used for social movement, the results were much different compared to nonsocial movement.In the future, we will work on the integration of real maps into the model simulation. Furthermore, we want to observe situation when social relationships in SR matrix were considered as two-way, that is different from both sides of the relationship. The proposed SSBMM will be used in the further simulation of protocols in MANET-DTN and Cognitive Radio-MANET.



---

*Source: 2714595-2017-10-18.xml*