Giter VIP home page Giter VIP logo

simulation_assignment_2's Introduction

Python Simulator Extension

This repository contains the solution of the Assignment 2 of Simulation and Performance Evaluation, winter 2016 - 2017, University of Trento.

The current version of the simulator is Simple Carrier Sensing with Realistic Propagation. You can checkout the Aloha and Trivial Carrier Sensing using the git tags aloha, trivial (or even simple for the latest version).

Assignment

We started from a Python simulator (provided by Michele Segata - teaching assistant) for the Aloha MAC access protocol and extend it to implement some other protocol. The complete text of the assignment can be found in the assignment.pdf file.

Simulator

The simulator is written in plain Python 2, so nothing special is required to run it. The run parameter are described with a JSON configuration file. By default, the simulator tries to load the file config.json from the simulator folder. An example JSON file is provided in the run folder.

Instruction to run the simulator can be obtained using:

python simulator/main.py -h

Multiple simulations can be executed at the same time using the amazing GNU Parallel utility:

python simulator/main.py -l | parallel -j 7 --no-notice

Processing

Each simulation produces a log file. Log files are processed to compute some metrics to evaluate the performances of the various protocols (see report.pdf). We use Pandas for data processing and Matplotlib to plot the results. Make sure to install all the needed Python packages before running the processing script. After running the simulations, you can run the process.py script to process the data. The results will be available in the results folder.

python utils/process.py

Results

The run folder contains the configuration file used to run the simulations and the computed metrics. You can run the following commands to process the results of the simulations without running them:

mkdir results
cp run/statistics.h5 results/statistics.h5
python utils/process.py

To run all the simulations, you can use the all_simulations.sh bash file. Please note that the script will checkout old versions of the simulators using git tags. If you interrupt the script for some reason, make sure to checkout the master branch.

cp run/config.json utils/config.json
bash all_simulations.sh

Report

The simulator logic and all results are discussed in details in the report. The report folder contains the LaTeX sources, plots and diagrams.

License

The simulator code and the processing scripts are licenced under the GNU General Public Licence. The report and its LaTeX code are licenced under the Creative Commons Attribution-ShareAlike 4.0 International License.

simulation_assignment_2's People

Contributors

davidepedranz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.