simevents.SimulationObserver class

Package: simevents
Superclasses: handle

Interface to create your custom visualization for models with SimEvents blocks


This class is an interface for creating custom visualizations for models with SimEvents® blocks. Subclass this class to create your own visualization, using the methods below. Some utility functions are also provided to interact with event calendars, blocks, and entities. Do not overwrite these utility functions.


obj = SimulationObserver(modelName) returns an object of the SimulationObserver class, used to create a model observer for a SimEvents model.

Input Arguments

expand all

The name of the model to observe.


expand all

simStartedSpecify behavior when simulation starts
simPausedSpecify behavior when simulation pauses
simResumedSpecify behavior when simulation resumes
simTerminatingDefine observer behavior when simulation is terminating
getBlocksToNotifySpecify list of blocks to be notified of entity entry and exit events
notifyEventCalendarEventsSpecify whether you want notification for all events in event calendar
postEntrySpecify behavior after an entity enters a block that has entity storage
preExitSpecify behavior before an entity exits a block with entity storage
preExecuteSpecify behavior before execution of an event
addBlockNotificationAdd block to list of blocks to be notified
removeBlockNotificationRemove block from list of blocks being notified
getEventCalendarsGet handles to event calendars
getAllBlockWithStoragesGet list of blocks that store entities
getHandleToBlockReturn block handle for a given block path
getHandlesToBlockStoragesReturn storage handles of specified block


collapse all

Construct an animator.

function this = seExampleRestaurantAnimator
            % Constructor
            modelname = 'seExampleCustomVisualization';
            this.mModel = modelname;

Introduced in R2016a