Main Content


Open SimEvents library




simevents opens the main SimEvents® library.

SimEvents integrates discrete-event system modeling into the Simulink® time-based framework. In time-based systems, a signal changes value in response to the simulation clock, and state updates occur synchronously with time. In discrete-event or event-based systems, state transitions depend on asynchronous discrete incidents called events.

SimEvents provides a discrete-event simulation engine and component library for analyzing event-driven system models and optimizing performance characteristics such as latency, throughput, and packet loss. Queues, servers, switches, and other predefined blocks enable you to model routing, processing delays, and prioritization for scheduling and communication.

In SimEvents:

  • Entity — A discrete item or object of interest based on the application domain. For example an entity can represent vehicles arriving at a gas station, messages within a communication network, planes on a runway, or trains within a signaling system.

  • Event — Asynchronous discrete incidents. For example, an event can represent an entity entry to a block or entity departure from a block.

  • Event Action — A custom action invoked by an event. You can customize event actions using MATLAB® code that performs calculations and Simulink function calls.

SimEvents blocks can produce, process, and route entities. The blocks can also attach data to entities and manipulate entity data using event actions.


collapse all

Open the SimEvents library and use the blocks from the library to build a queuing system that generates entities, queues them in a specified order, services them to change their attributes, and terminates them to represent their departure. For more information, see A Simple Queuing System.

Block diagram showing an Entity Generator block connected to a FIFO Entity Queue that, in turn, connects to an Entity Server block. The Entity Server block terminates its output signal at an Entity Terminator block.


Open the SimEvents library and use the blocks to model a single-queue single-server system with a single traffic source and an infinite storage capacity. In the notation, the M stands for Markovian; M/M/1 means that the system has a Poisson arrival process, an exponential service time distribution, and one server. Queuing theory provides exact theoretical results for some performance measures of an M/M/1 queuing system and this model makes it easy to compare empirical results with the corresponding theoretical results. For more information, see M/M/1 Queuing System.

Block diagram modeling an M/M/1 Queuing system.


Version History

Introduced in R2011b