SimEvents

Key Features

  • Discrete-event simulation engine for multidomain modeling of complex systems in Simulink
  • Predefined block libraries, including queues, servers, generators, routing, and entity combiner/splitter blocks
  • Entities with custom data attributes for flexible representation of packets, tasks, and parts
  • Built-in statistics aggregation for obtaining delay, throughput, average queue length, and other metrics
  • Library blocks for defining domain-specific constructs, such as communication channels, messaging protocols, and conveyor belts
  • In-model animation for visualizing model operation and debugging

Discrete Event Simulation with SimEvents 2:27
Get an introduction to discrete-event simulation and the applications of SimEvents® and explore online product resources.

Discrete-Event Simulation in Simulink

SimEvents provides a discrete-event simulation engine that manages and processes sequences of asynchronous events. These events can help model mode changes and trigger state transitions within time-based systems in Simulink.

Entities and Events

With SimEvents you can create entities 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 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. You can characterize your entity with attributes, such as a destination address, processing time, or server delay. SimEvents distinguishes between entity lines, which represent entity movement between blocks, and event-signal lines, which denote corresponding event-based computations, via unique port styles.

Production Simulation Software for Manufacturing 4:57
Identify bottlenecks in a production process and identify optimized inventory and logistics management techniques.

Integrating SimEvents with Simulink and Stateflow

SimEvents lets you integrate event-based modeling into time-based Simulink models by using blocks from the Gateway library. The Timed-to-Event Signal block converts time-based signals to event-based signals; conversely, the Event-to-Timed Signal block converts events back to time-based signals. Using this bidirectional conversion, you can model discrete mode-switching in time-based components as well as communication between time-based components.

Model of an antilock braking system using CAN communications and supporting plots showing how network utilization, message delivery delay, and vehicle and wheel speeds are affected by overall CAN traffic.
Model of an antilock braking system (ABS) using CAN communications and supporting plots showing how network utilization (above right), message delivery delay (below right), and vehicle and wheel speeds (bottom left) are affected by overall CAN traffic.

You can operate directly on event-based signals using Simulink and Stateflow® library blocks, including Math Operations, MATLAB Function, Stateflow Charts, and Logical Operator. You can also encapsulate any Simulink calculation that needs to operate on an event-based signal using the Atomic Subsystem block.

Model of a CAN node that uses a MATLAB Function block, an atomic subsystem, and a math operation to alter SimEvents signals.
Model of a CAN node that uses a MATLAB Function block, an atomic subsystem, and a math operation (Gain block) to alter SimEvents signals.

Predefined and Domain-Specific Libraries

SimEvents provides a block library that enables you to create, process, store, and move entities 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 statistically determined to model probabilistic variations in the system. You can also build your own domain-specific library blocks by using key Simulink capabilities, such as masking subsystems and creating libraries, and adding special SimEvents signal ports to Simulink subsystems that produce and consume events.

SimEvents block libraries for building discrete-event simulations.
SimEvents block libraries for building discrete-event simulations.

The Generators library includes blocks for creating entities based on time or signals, such as the Event-Based Entity Generation block.

The Entity Management library includes blocks for packaging entities or separating those packages, such as the Entity Combiner block.

The Attributes library includes blocks for setting and reading attributes on an entity, such as the Set Attribute and Get Attribute blocks.

The Queues library includes blocks to handle incoming entities, such as the FIFO Queue block.

The Servers library includes blocks to process incoming entities, such as the Infinite Server block.

The Routing and Gates libraries include blocks that use switches that operate either statistically or deterministically, such as the Input Switch block.

Analysis and Visualization of Results

You can gain insight into the behavior of your model by:

  • Animating
  • Using statistics and scopes
  • Debugging

Animation

SimEvents support of animation lets you examine the execution behavior of a SimEvents model. You can observe both entity movement and the production and use of events in event-based blocks. For event-based signals, animation illustrates the execution sequence of computation blocks in response to events.

Animation of a SimEvents model showing the flow of entities, as well as the number of entities in queue and server during a simulation.
Animation of a SimEvents model showing the flow of entities, as well as the number of entities in the queue and server during a simulation.

Statistics and Scopes

Most SimEvents blocks can output 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.

Model of an Ethernet local area network using statistics and scopes to analyze the throughput and channel utilization of the MAC Controller (B) subsystem.
Model of an Ethernet local area network using statistics and scopes to analyze the throughput (bottom left) and channel utilization (bottom right) of the MAC Controller (B) subsystem.

SimEvents Debugger

The SimEvents debugger lets you use MATLAB® functions to suspend a simulation at each step or breakpoint to query simulation behavior. The debugger also creates a simulation log for further inspection of detailed information. You can debug both discrete-event and hybrid simulations by closely inspecting the events and blocks that process them.

SimEvents Debugger Tutorial Part 1 9:44
Use the SimEvents debugger for basic simulation stepping and debugging.

SimEvents Debugger Tutorial Part 2 7:20
Use the SimEvents debugger for breakpoints and advanced querying.

Try SimEvents

Get trial software

Incorporating Optimization Into Supply Chain Scheduling

View webinar