matlab.DiscreteEventSystem class

Package: matlab
Superclasses: matlab.System

Base class for discrete-event system objects


matlab.DiscreteEventSystem is the base class for discrete-event System objects. In your class definition file, you must subclass your object from this base class (or from another class that derives from this base class). Subclassing allows you to use the implementation and service methods provided by this base class to build your object. For more information about implementing matlab.DiscreteEventSystem class with MATLAB Discrete-Event System block, see Create Custom Blocks Using MATLAB Discrete-Event System Block.

Type this syntax as the first line of your class definition file to directly inherit from the matlab.DiscreteEventSystem base class, where ObjectName is the name of your object:

classdef ObjectName < matlab.DiscreteEventSystem

Define as public these methods:

  • blocked

  • destroy

  • entry

  • exit

  • generate

  • iterate

  • setupEvents

  • timer

For other methods, set Access = protected.

matlab.DiscreteEventSystem Class Methods

This list contains the methods to implement and the utility methods inherited from the matlab.DiscreteEventSystem base class. For more information about implementing a discrete-event System object™, see Create a Discrete-Event System Object. For information about linking the discrete-event System object to a SimEvents® model and creating a custom behavior, see Delay Entities with a Custom Entity Storage Block.

blockedEvent action when entity forward fails
cancelAcquireResource Cancel previously scheduled resource acquisition event
cancelDestroyCancel previously scheduled entity destroy event
cancelForwardCancel previously scheduled forward events
cancelGenerateCancel previously scheduled entity generation event
cancelIterateCancel previously scheduled iterate event
cancelTimerCancel previously scheduled timer event
destroyEvent action upon entity destruction
entityTypeDefine entity type
entryEvent action when entity enters storage element
eventAcquireResource Create a resource acquisition event
eventDestroyCreate entity destroy event
eventForwardCreate entity forward event
eventGenerateCreate entity generate event
eventIterateCreate entity iterate event
eventReleaseAllResourcesCreate an event to release all resources acquired by an entity
eventReleaseResourceCreate an event to release previously acquired resources
eventTestEntryCreate an event to indicate that the acceptance policy for the storage has changed and the storage retests arriving entities
eventTimerCreate entity timer event
exitEvent action before entity exit from storage
generateEvent action upon entity creation
getEntityPortsImplDefine input ports and output ports of discrete-event system
getEntityStorageImplDefine entity storage elements of discrete-event system
getEntityTypesImplDefine entity types of discrete-event system
getResourceNamesImplDefine resource pools from which to acquire resources
initEventArrayInitialize event array
initResourceArray Initialize a resource specification array
iterateEvent action when entity iterates
modifiedEvent action upon entity modification by the Entity Find block
queueFIFODefine first-in first-out (FIFO) queue storage
queueLIFODefine last-in last-out (LIFO) queue storage
queuePriorityDefine priority queue storage
queueSysPriorityDefine system priority queue storage
resourceAcquired Event action upon successful resource acquisition
resourceReleased Event action upon successful resource release
resourceSpecificationCreate specifications for a resource acquisition or a resource release event
setupEventsInitialize entity generation events
testEntryEvent action to accept or refuse entity
timerEvent action when timer completes

Introduced in R2016a