Social-Sim Simulator

General description: This project is an implementation package for studying different aspects of human mobility in a mobile social setting such as a conference, a campus, or an outdoor event where people carry their cellphones. It contains implementations of several routing algorithms for Delay Tolerant Networks (DTN). Using Contact Graph definition (i.e. nodes represent people and edges represent contact events), Social-Sim allows researchers to study and understand how people contact/meet each others in different social settings.

Code Input: It takes as input any human mobility traces collected by Bluetooth sensors such as MIT or Cambridge datasets.

Code Output: It outputs the performance of different routing algorithms for spreading information (Successful Delivery Ratio and Delay metrics). It also computes different statistical properties of human contact graphs.

Project Goal: You attend a concert or a conference and you like to share the photos on your smartphones with other people who are there.



Implementation period: Nov 2009 - Sep 2010

Technical details:
The Social-Sim contacins the following classes/features:

  1. Contact Graph class: It has the required methods to generate a contact graph by using the real data collected from cellphones or wireless sensors. It contains several methods for computing the centrality of mobile nodes, the similarity between consecutive contact graph snapshots over time, average clustering coefficient of a contact graph, and the time-variant paths from a source node to a destination node in the contact graph.
  2. Distribution class: It has several methods to compute the probability distributions of different properties of social contact graphs such as distribution of contact durations, inter-contact durations, and number of contacts between mobile nodes. It can also process social profiles of people in order to compute social distances between them in a mobile social network. It implements the Jacard Index and Kleinberg Social Focus for computing the social distances. It caclculates the rank of each node by counting the number of visited nodes. It also has a method for finding the places where a person has visited during a time period.
  3. Message class: This class basically implements a message entity that represents a piece of information such as a video file, a text message, or a photo. Every message has a unique id as well as a sender and a receiver id. A message can carry extra information. When two nodes come to each other proximity, they can exchange their messages on demand.
  4. Parser class: Includes all necessary methods to read the wireless sensors/cellphones real data which are in text formats and parse them into a mysql database for post-processing step.
  5. Traffic class: It implements the traffic concept in the sense that every node can have some information which should be sent to another node in the network. Thus, in the beginning of the analysis we generate the traffic profiles randomly for all nodes. Once a message is delivered, we update the traffic profile list to keep track of the delivered messages, their delivery costs and delays, and the number of hops taken by each message to reach its destination.
  6. Statistics class: This class computes the mean and standard deviation of a data vector, and the pearson correlation coefficient between two data vectors.
  7. Random Graph Model class: This class has two methods that compute the Jacard index and the Social Focus distance (Kleinberg) between two given nodes respect to a given social dimension.
  8. Routing class: This class implements the three variations of our Social-Greedy routing algorithm as well as other routing algorithms proposed by other researchers for mobile social networks. It has a method to create traffic flows randomly among all nodes of the network. It has also the codes for the three versions of our proposed Social-Greedy routing algorithms, as well as Random, and RankSec. It has the implemntation for the following routing algorithms proposed by other researhers: Waiting, Epidemic, Multiple-Copies, Two-Hop, Label, Bubble-Rap, and Delegation.
  9. main(): This code demos how to use different classes for differenr purposes.

*** You can download Social-Sim source code from the github repository: Haggle.

Language: C++
No of lines: 16k
Used data structures: Lists, Graphs, & Maps
Used libraries: Boost, MySql, & GSL

[1] K. Jahanbakhsh, G.C. Shoja, V. King, Social-Greedy: A Socially-Based Greedy Routing Algorithm for Delay Tolerant Networks, ACM/SIGMOBILE MobiOpp, Feburary 2010, Pisa, Italy.


You should follow Follow @kjahanbakhsh me on Twitter.