Main Content

Discrete-Event System Objects

Implement a discrete-event System object™ using MATLAB Discrete-Event System block

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 SystemMATLAB discrete-event system

Classes

matlab.DiscreteEventSystemBase class for discrete-event system objects

Methods

expand all

eventAcquireResource Create a resource acquisition event
eventDestroyCreate entity destroy event
eventForwardCreate entity forward event
eventGenerateCreate entity generate event
eventIterateCreate entity iterate event
eventReleaseResourceCreate an event to release previously acquired resources
eventReleaseAllResourcesCreate an event to release all resources acquired by an entity
eventTestEntryCreate an event to indicate that the acceptance policy for the storage has changed and the storage retests arriving entities
eventTimerCreate entity timer event
initEventArrayInitialize event array
initResourceArray Initialize a resource specification array
blockedEvent action when entity forward fails
destroyEvent action upon entity destruction
entryEvent action when entity enters storage element
exitEvent action before entity exit from storage
generateEvent action upon entity creation
iterateEvent action when entity iterates
modifiedEvent action upon entity modification by the Entity Find block
resourceAcquired Event action upon successful resource acquisition
resourceReleased Event action upon successful resource release
testEntryEvent action to accept or refuse entity
timerEvent action when timer completes
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
entityTypeDefine entity type
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
queueFIFODefine first-in first-out (FIFO) queue storage
queueLIFODefine last-in last-out (LIFO) stack storage
queuePriorityDefine priority queue storage
queueSysPriorityDefine system priority queue storage
resourceSpecificationCreate specifications for a resource acquisition or a resource release event
resourceType Specify an entity type and the name of the resources to be acquired by the specified entity
setupEventsInitialize entity generation events

Topics