Skip to content

megfault/F2FDTNsim

Repository files navigation

This is a simulator for a delay-tolerant friend-to-friend network. It was written for the purpose of evaluating the network performance of the anonymous wireless communication scheme aDTN.

Requirements

The simulator is written in python3 and requires following python modules:

  • sqlalchemy
  • numpy
  • networkx
  • the module for the database you will store the data in (we used psycopg2 for postgres)

Instructions

Before you start, place your mobility input file in the input directory (create the directory if it doesn't exist yet). The lines of the file have following format:

n m b0*e0 b1*e1 b2*e2 ...

where n and m are integers that identify two nodes, and b_ and e_ define the beginning and end times of a contact between the two nodes. Time is an integer, given in seconds. The simulation starts at time 0.

To run the simulation, start by configuring parameters in config.yaml and run the following steps:

  1. initialize the data model

     python3 model.py
    
  2. read the mobility input from the input directory and generate the simulation events

     python3 initialize_data.py
    
  3. (optional) create indexes on relevant table columns: node1 and node2 of contacts table; time, sender_id and frequency of broadcast table; and recipient_id and broadcast_id of delivery table.

  4. handle the simulation events in order of occurrence and collect statistics

     python3 simulate.py 
    
  5. process statistics and write them into the data directory (please create one if it doesn't already exist)

     python3 analyze_results.py
    

Database connection

If you wish to extend the code, to get a session to the database, simply call:

from bootstrap import get_mobility_session
session = get_mobility_session()

Usage in academic work

Please note that any use of the simulator which results in an academic publication or other publication which includes a bibliography must include a citation to this project. Please use the following BibTex citation code:

@url{warplab-ofdm,
    Author = {Barroso, Ana and Hollick, Matthias},
    Title = {Delay-tolerant friend-to-friend network simulator},
    Url = {http://www.seemoo.tu-darmstadt.de/research/software/f2fdtnsim/}
}

About

Simulator for delay-tolerant friend-to-friend networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages