Accelerating the pace of engineering and science

SimEvents

Key Features

  • Discrete-event simulation engine for multidomain system models
  • Entities with custom data attributes representing tasks, packets, and items
  • Blocks for queuing, service, routing, resource management, multicasting, replication, and batching
  • Statistics generation for delay, throughput, average queue length, and other metrics
  • Library authoring with MATLAB® or Stateflow® for custom schedulers, hardware and software constructs, and communication channels
  • Block diagram animation and inspection for visualizing model operation and debugging
  • Custom animation creation for monitoring entities and events
Model of a tank filling station that combines discrete-event dynamics and continuous system dynamics.
Model of a tank filling station that combines discrete-event dynamics and continuous system dynamics.

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, Events, and Resources

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 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. 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.

SimEvents for Operations Research
Model, analyze, and optimize various operational processes using SimEvents®.

Programmatic Control of Event Actions and Entities

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

  • You can 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, you can invoke Simulink functions that can modify entities and start conventional time-driven execution.
  • Using the Stateflow Discrete-Event Chart block, you can define custom queues, route entities, and create custom entity manipulation algorithms.
  • Using the MATLAB Discrete Event System block, you can author new discrete-event components and blocks for your discrete-event model.

SimEvents for Model-Based Design
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 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.

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

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.

SimEvents Design Patterns library, which can be used to learn and apply frequently used design patterns
SimEvents Design Patterns library, which can be used to learn and apply frequently used design patterns.

Analysis and Visualization of Results

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

  • Animating
  • Using statistics and scopes
  • Debugging

Animation

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.

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.

Model of an M/M/1 queuing system.
Model of an M/M/1 queuing system. Statistics are plotted using SimEvents statistics output ports and Dashboard scopes.

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.

SimEvents Debugger showing breakpoints set to enable inspection of events at different times during the simulation in various blocks.
SimEvents Debugger showing breakpoints set to enable inspection of events at different times during the simulation in various blocks.

Incorporating Optimization Into Supply Chain Scheduling

View webinar