Model and simulate message communication and discrete-event systems

Get Started:

Discrete-Event Simulation in Simulink

Discrete-event simulation with SimEvents provides capabilities for analyzing and optimizing event-driven communication using hybrid system models, agent-based models, state charts, and process flows.

Within this integrated modeling and data analysis environment, you can:

  • Design distributed control systems, hardware architectures, and sensor and communication networks for aerospace, automotive, and electronics applications
  • Model process flows, perform capacity planning, and optimize supply chains for manufacturing and operations
  • Analyze and optimize end-to-end latencies, throughput, packet loss, and other performance characteristics of communication networks
  • Customize queues, routing algorithms, processing delays, and prioritization schemes
  • Simulate hybrid systems containing time-based, event-based, and agent-based components
  • Simulate event-driven processes, such as mission plans with autonomous agents or the stages of a manufacturing process

Entities, Messages, Events, and Resources

SimEvents is used to model discrete items of interest within a model, in either the form or entities, messages or resources

Entities and Messages

With SimEvents you can create entities or messages to represent discrete items of interest, such as packets in a communication system or airplanes in an airport taxiway. The generation, movement, and processing of messages or entities in the system causes events, such as the arrival of a packet or the departure of an airplane. In turn, these events modify the states in the system to affect system behavior.

Model, analyze, and optimize various operational processes using SimEvents.

Attributes and Resources

You can characterize your entities with attributes, such as a destination address, processing time, or server delay. Entities can also acquire and release resources, which can represent supplies, machines, or even people that entities use to complete a task or event.

Lockheed Martin developed a discrete-event model of the F-35 fleet, accelerated simulations, and interpolated the results.

Programmatic Control of Event Actions and Entities

You can programmatically control event actions and messages or entities in the following ways:

  • Write MATLAB code for entity events that occur in different blocks, such as the Generator, Queue, and Server blocks. These event actions enable you to manipulate entity attributes and priority.
  • Within the event actions, invoke Simulink functions that can modify entities and start conventional time-driven execution.
  • Define custom queues, route entities, and create custom entity manipulation algorithms, using the Stateflow Discrete-Event Chart block.
  • Using the MATLAB Discrete Event System block, author new discrete-event components and blocks for your discrete-event model.

Add system simulation or environment modeling to your algorithm modeling and graphical programming using SimEvents® .

SimEvents Blocks and Design Patterns

SimEvents provides blocks that enable you to create, process, store, and move messages or entities and their resources in a system.

  • You can model both simple and complex networks of queues and servers.
  • By connecting gate and switching blocks, you can establish paths on which entities travel in response to events. These paths can include delays and selective switching criteria.
  • Many parameters within SimEvents can be programmatically determined to model probabilistic variations in the system.
  • You can also build your own domain-specific blocks by using a Stateflow Discrete-Event Chart or MATLAB Discrete-Event System block.
  • Further, you can use Simulink capabilities, such as masking subsystems and creating libraries, to build up SimEvents subsystems into component blocks that can be shared and reused by others.

The SimEvents Design Patterns library contains predefined blocks for common design patterns, such as time stamping entities upon generation or extracting attributes of entities as signals in Simulink.

Daimler engineers run simulations with Simulink and SimEvents to aid operational decision-making, forecast the outcomes of manufacturing process changes, and improve production lines efficiency.

Analysis and Visualization of Results

Gain insight into the behavior of your model by animating, using statistics and scopes, and debugging.


You can observe entity movement in your model through built-in entity animation. You can also build your own MATLAB animations via custom observers that you create for the entities and events in your model.

Develop models of complex electromechanical and fluidic devices, using SimEvents.

Statistics and Scopes

Most SimEvents blocks produce statistics that let you monitor aggregate measures, such as average service times, queue lengths, and server utilization. Custom scopes enable you to visualize these signals using familiar staircase and stem plots.

TriVector used SimEvents to verify time latencies for the Ares I Rocket.

SimEvents Debugger

The SimEvents debugger is a standalone tool that you can use to debug your model by pausing a simulation at each step or setting a breakpoint to query simulation behavior. The debugger also creates a simulation log with detailed information about what is about to happen or what has just happened in the simulation. You can debug both discrete-event and hybrid simulations by inspecting this log.

Airbus Defence and Space used Simulink and SimEvents to model scientific data flows and run discrete-event simulations of multiday JUICE missions.