Discrete Event Simulation with SimEvents
Get an introduction to discrete-event simulation and the applications of SimEvents® and explore online product resources.
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.
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
Identify bottlenecks in a production process and identify optimized inventory and logistics management techniques.
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.
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.
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.
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.
You can gain insight into the behavior of your model by:
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.
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.
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
Use the SimEvents debugger for basic simulation stepping and debugging.