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 visualization 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

Interface for Custom Visualization

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

Create an Application

Use these methods in your derived class to implement your custom observer.

Use the Observer to Monitor the Model

Use your custom observer to monitor the model.

Stop Simulation and Disconnect the Model

Stop your custom observer and disconnect it from the model.

Custom Visualization Examples

Explore custom visualization models.