ModelEvents are communication events that are created and put onto the Model.DiscreteEventSimulator. Read the section Model Events of the Software Development Guide which describes Events in detail. An Event contains data for the Event which is passed through the constructor. The base class, EventBaseClass, MUST be inherited into each class in ModelEvents. The base class, EventBaseClass, contains the basic Event data (for example event sequence number) and references to the nodes, links, and interfaces. So inheriting from EventBaseClass gives you most of the data necessary for event execution. The constructor passes the data needed for your specific Event.
Each Event must have an ExecuteEvent () method with is called when the event executes. The Events does whatever is necessary and then terminates. During Event execution, the Event may create additional Events which it puts in the discrete event simulator. An easy way to create a new Event is:
New NewEvent ( timeOfEvent , dataSpecificToThisEvent ) ;
The base class, EventBaseClass, MUST be inherited into each class in ModelEvents. The base class, EventBaseClass, contains the basic Event information, references to the nodes, links, and interfaces. The EventBaseClass constructor automatically adds the Events to the Model.DiscreteEventSimulator. The constructor of each Event MUST in its constructor call
super ( timeOfEvent ) ;
as the first statement. This calls the single parameter constructor of ModelEvents.Event which automatically adds the event to the Model.DiscreteEventSimulator.
Each Event should have a constructor which passes the needed data to the event, and it must have an ExecuteEvent ( ) method which executes the event. The process of executing the Event, it may create additional Events.