Discrete Event Simulation and Event Programming in NetSim

The entire source code of NetSim is based on Event Programming since NetSim is a Discrete Event Simulator (DES)

Discrete-event simulation (DES), models the operation of a system as a discrete sequence of events in time. Each event occurs at a particular instant in time and marks a change of state in the system. Between consecutive events, no change in the system is assumed to occur; thus the simulation can directly jump in time from one event to the next.

Event-driven programming is a programming paradigm where flow of program is determined by different events. Thus, Event Programming is the favored method of coding a DES.

In NetSim there are different specific events and its sub-events
and the simulation kernel does the entire event handling. While, inserting an event into the kernel its event time should be mentioned since all events are executed in increasing order of their event time.

The link http://tetcos.com/netsim_gen.html explains in detail how to model, run, visualize and analyze a Discrete Event Simulation of various networks.