Create Custom Visualization

Observers for entities and events

To create custom observers of the entities and events in your model, use the simevents.SimulationObserver object.

Classes

simevents.SimulationObserverInterface to create your custom observer for models with SimEvents blocks

Methods

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

Topics

Observe Entities Using simevents.SimulationObserver Class

This example shows how to use simevents.SimulationObserver object to count entity departures and acquire departure timestamps.

Use SimulationObserver Class to Monitor a SimEvents Model

To create an observer, create a class that derives from the simevents.SimulationObserver object.

Using Custom Visualization for Entities

These examples show how you can create MATLAB based custom visualization for entities.