sark245 / slotted-aloha-simulator

A very simple C simulator for experimenting with Slotted ALOHA protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slotted Aloha Simulation

This is a very simple C simulator of Slotted ALOHA protocol.

Running simulator

Simply run:

make

You can then start simulation:

./aloha

If you want, you can specify a value for retransmission probability p:

./aloha 0.01

Experimenting with many values for p

The experiments directory contains scripts for experimenting with many different values for retransmission probability. You can simulate using values defined in p_vs_delays.sh:

bash experiments/p_vs_delays.sh

You can then plot obtained results using gnuplot (if installed):

gnuplot experiments/plot_p_vs_delays.gnuplot -p

You can also run both commands at once using:

make experiment

About

A very simple C simulator for experimenting with Slotted ALOHA protocol.


Languages

Language:C 71.4%Language:Makefile 20.3%Language:Shell 7.4%Language:Gnuplot 0.8%