Event List

Definition of EventList class.

This module defines the EventList class, used by the timeline to order and execute events. EventList is implemented as a min heap ordered by simulation time.

class src.kernel.eventlist.EventList

Class of event list.

This class is implemented as a min-heap. The event with the lowest time and priority is placed at the top of heap.

data

heap storing events.

Type:

List[Event]

remove(event: Event) None

Method to remove events from heap.

The event is set as the invalid state to save the time of removing event from heap.

update_event_time(event: Event, time: int)

Method to update the timestamp of event and maintain the min-heap structure.