离散事件系统是状态变化(事件)发生在离散实例上的系统,事件发生时间为零。
假设在两个连续事件之间没有发生任何事情(即没有任何有趣的事情发生),即在事件之间系统中没有发生状态变化。
这意味着在数据包传输开始和数据包传输结束等两个事件之间,不会发生任何有趣的事情。 也就是说,数据包的状态仍在传输中。
离散事件模拟在通常称为 **FES(未来事件集)**或 **FEL(未来事件列表)**的数据结构中维护未来事件集。
initialize -- this includes building the model and
inserting initial events to FES
while (FES not empty and simulation not yet complete)
{
retrieve first event from FES
t:= timestamp of this event
process event