This project was started as part of a class at the University of Guelph in computer networks. For one of our projects we were told to create a discrete event simulation of a “wireless” Manhattan street network. The network topology is arranged such that each Base Station (BS) is distributed evenly in a grid covering a certain area in the city. Each BS can have up to six neighbours making the layout hexagonal. Other groups got other geometries such as square and triangular with each of those having four and three neighbours respectively. End Stations (ES) are evenly distributed around the entire area of the network. In the simulation, a given ES tries to send a packet to another ES in the network. Each BS has a one packet buffer so this causes the packet to be dropped or retried. The simulation supports two different styles of routing: random and Cartesian. In random routing, the next hop neighbour is selected randomly from all the neighbours of a given node. In Cartesian, the neighbour closest to the destination is selected.
This code may be updated in the future to support more complex styles of routing, more realistic interference models etc. The code is being made freely available for anyone to use and extend.
For some results from the simulation see my previous post in the blog section of the site: Java Discrete Event Driven Simulation