Java Discrete Event Driven Simulation

  • Posted April 14, 2008. Last modified June 7, 2010 by

Recently in my Networks course at Guelph they had us create an event-driven discrete simulation to model both a wireless network and a switch. For the project I got a hexagonal geometry for the wireless network which was to be arranged similar to a Manhattan Street Network with each node having at most six neighbours. Other groups got triangular and square geometries for this portion.  For the switch I got an 8×8 Banyan switch. Other groups got the crossbar switch or backplane switches.

Hexagonal Wirless Network

The first run of the simulation was terrible. There were problems with the timing in the simulation and nodes which were supposed to be holding packets in them towards the end of the simulation were actually blocking traffic right at the start causing an extremely high proportion of packets to be dropped.  In revision two the problems were fixed and the results were so well done that the prof accused us of doctoring them.

So basically, I thought I would post the code online in case anyone would like to make use of it.  Right now the simulation does not take into account such factors as interference and is fairly simplistic however it is good for testing different network geometries and routing algorithms within them. It could easily be extended to include more complicated factors such as interference however it was not necessary at the time of the project. If you are making use of the code please leave a reference to my name in it.  If you have any questions or would like some help getting it to work feel free to contact me.

For those who are interested here are some of the results from the simulations:

And for those who would like the code here are the links:

3 comments on “Java Discrete Event Driven Simulation”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.