You are on page 1of 7

SimEvents

Model and simulate discrete-event systems


SimEvents provides a discrete-event simulation engine and component library for Simulink. You can model event-driven communication between components to analyze and optimize end-to-end latencies, throughput, packet loss, and other performance characteristics. Libraries of predefined blocks, such as queues, servers, and switches, enable you to accurately represent your system and customize routing, processing delays, prioritization, and other operations. With SimEvents you can design distributed control systems, hardware architectures, and sensor and communication networks for aerospace, automotive, and electronics applications. You can also simulate event-driven processes, such as the execution of a mission plan or the stages of a manufacturing process, to determine resource requirements and identify bottlenecks. 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 (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 (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.

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

Resources
Product Details, Examples, and System Requirements www.mathworks.com/products/simevents Trial Software www.mathworks.com/trialrequest Sales www.mathworks.com/contactsales Technical Support www.mathworks.com/support Online User Community www.mathworks.com/matlabcentral Training Services www.mathworks.com/training Third-Party Products and Services www.mathworks.com/connections Worldwide Contacts www.mathworks.com/contact

2012 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

You might also like