7. Pure ALOHA applet


The applet written in Java and presented here enables the simulation of the communication system which uses a random-access protocol called pure ALOHA. The description of the applet can be found on the page 9 of this lesson. The steps of this instruction guide a student through the capabilities of the applet and show how it operates.

In the example below it is assumed that there are 6 users in the system. Four of them offer the traffic to the channel of 0.05 Erlang each (on average 1 packet per 20 time units), two of them offer the traffic of 0.1 Erlang each (on average 1 packet per 10 time units). The total traffic (traffic intensity) offered to the channel by all 6 users equals 0.4 Erlang.
A new packet is expected by the time shown in the Arrival window. We find there that the first packet will arrive in 1.22 time units and it will be generated by the 6th user. In the nearby window (bookmark Time axis) we find time axis of all users and in the same window (bookmark Buffers) there are buffers of the system users.

1. Click the button  

(System time: 0.5)
Notice that the system time (System info window) equals 0.5. Simultaneously the time remaining to the new packets arrival decreased by 0.5.

2. Move to the right the slider close to the button     and click once again the button  

(System time: 1.5)
Notice that the system time increased by 1 time unit. The 6th user has started transmission of the packet. The contour of the rectangle representing the packet is blue. The Arrival window shows the time remaining to the beginning of the next packet generated by the 6th user.

3. Click the button  

(System time: 2.5)
The packet of the 6th user is transmitted with success packet became green. The Channel window (below the Time axis window) shows with green color successful transmission of the packet. In the Arrival window we find that the next packet in the system is offered by the 3rd user in 0.48 time units.

4. Double click the button  

(System time: 4.5)
Transmission of the 3rd user packet finished with success. In the System info window we find that the number of the packets transmitted with success is two (Successful: 2).

5. Click the button  

The system is running continuously. System time is rising. The packets are moving along the time axis. Notice that the icon replaced . If you press this icon the system will stop.

6. Click the button when the system time equals 12.0

The system stops. Two users (5th and 6th) are transmitting their packets.

7. Click the button  

(System time: 13.0)
Packets that have been transmitted by user 4th and 6th collided. The packets became red (Time axis window). In the Channel window, the red color informs that the time ocupied by both packets has been lost because of the unsuccessful transmission. In the System info window we find that two packets collided (In collision: 2).

8. Click the bookmark Buffers (the same window as Time axis)

Now we can observe the buffers of all users in the system. The buffer of the 4th and the 6th user contains a yellow packet which has just collided. Above the buffer there is a time interval that remains to the nearest retransmission trial and a number of this trial (in parenthesis). Retransmitted packets have yellow contour to distinguish them from new packets which are blue.

9. Go to the bookmark Time axis and press the button  

The packets are moving along the time axis. You can change the speed of the packet movement using the slider close to the button . Notice that majority of the packets are red. It means that they are colliding with each other because the traffic intensity is too high. The collided packets are stored in the buffers.

10. Undo the selection of the 5th and 6th user (Traffic intensity window)

Two users, 5th and 6th, were removed from the system. The traffic intensity offered to the system decreased two times, from 0.4 to 0.2 Erlang (see the Declared traffic in the System info window). In spite of this there are a lot of collisions in the system. The number of collisions can be decreased by increasing the length of the time interval from which a retransmission delay of each collided packet is randomly selected.

11. Go to the bookmark Settings

Change the length of the contention window (CWmax) from 5 to 40. Notice that successful transmissions are more often.

12. Press the button (stop the system) and then press the button  

The system runs for 10 time units. The number of the time units the system runs can be changed within the field close to the button   .

13. Press the button Restart

The system time, all counters and the buffers have been cleared, all other settings remain unchanged.

14. Press the button Reset

All settings are cleared.



15. Define settings of some users in the system

To add a new users to the system you have to select a user in the Traffic intensity window, input the traffic intensity of the selected user and accept by pressing the key ENTER.

16. Find in the applet description what are the differences among the Aloha types implemented in the applet. Start the simulation of the system for each Aloha type (Settings/Protocol type) using the button Restart. Observe the differences in the operation of the system

17. Observe the system simulation when you change:

  • the size of the buffers (window Buffers),
  • the way a random delay of the retransmitted packets is selected (window Settings/Delay window: constant/exponential),
  • the length of the interval from which delay is randomly selected (window Settings/Delay window: CWmin, CWmax).