Discrete-Event System Objects
You can extend the existing functionality of SimEvents® by authoring new blocks to model behaviors that are not provided with a SimEvents built-in solution. To create custom functionality in SimEvents models, you can use the MATLAB Discrete-Event System block that allows you to implement a discrete-event System object written in MATLAB® language.
To implement a custom discrete-event System object, inherit matlab.DiscreteEventSystem class. Link the System object to a SimEvents model by using a MATLAB Discrete-Event
                                System block. The linked MATLAB Discrete-Event
                                System block exhibits the desired custom behavior during
                            simulation.
Blocks
| MATLAB Discrete-Event System | MATLAB discrete-event system | 
Classes
matlab.DiscreteEventSystem | Base class for discrete-event system objects | 
Methods
Topics
- SimEvents Common Design Patterns
The SimEvents library provides design patterns that you can refer to while modeling.
 - Create Custom Blocks Using MATLAB Discrete-Event System Block
Author discrete-event System object by defining entity types, ports, storage, and events.
- STEP 1: Delay Entities with a Custom Entity Storage Block
 - STEP 2: Create a Custom Entity Storage Block with Iteration Event
 - STEP 3: Custom Entity Storage Block with Multiple Timer Events
 - STEP 4: Custom Entity Generator Block with Signal Input and Signal Output
 - STEP 5: Build a Custom Block with Multiple Storages
 - STEP 6: Create a Custom Resource Acquirer Block
 
 - Create a Discrete-Event System Object
Use the
matlab.DiscreteEventSystemclass to implement a discrete-event System object. - Generate Code for MATLAB Discrete-Event System Blocks
Configure MATLAB Discrete-Event System block.
 - Customize Discrete-Event System Behavior Using Events and Event Actions
Define and work with events in custom discrete-event systems.
 - Call Simulink Function from a MATLAB Discrete-Event System Block
Call Simulink® function from a MATLAB Discrete-Event System Block.
 - Resource Scheduling Using MATLAB Discrete-Event System and Data Store Memory Blocks
This example shows how to model resource scheduling using data exchange between the MATLAB Discrete-Event System block and the Data Store Memory block.
 

