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.


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


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


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.

Was this topic helpful?