Model and simulate message communication and discrete-event systems
SimEvents® can be used to model message-based communication in Simulink or any event-driven process with its discrete-event simulation engine and component library for analyzing event-driven system models and optimizing performance characteristics such as latency, throughput, and packet loss. Queues, servers, switches, and other predefined blocks enable you to model routing, processing delays, and prioritization for scheduling and communication.
With SimEvents you can study the effects of task timing and resource usage on the performance of distributed control systems, software and hardware architectures, and communication networks. You can also conduct operational research for decisions related to forecasting, capacity planning, and supply-chain management.
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 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.
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.
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.
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.
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.
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.