An interface for storing Event
objects and providing for their addition and removal. This class can be accessed through model.events
, but should not be instantiated by user code. Individual Event
objects may be accessed through this object as a dict
using the name under which the event was registered, i.e. model.events[name]
.
Methods
Click a method name for more detailed documentation.
add( name, function, repeat, … )
Registers an Event. When triggered, an event stores the data output at that time and registers on the visualizer.
TimeSeries
, for example, draws a vertical line on the plots (see the image to the right), andCharts
will flash the background. In the image to the right there are two events, marking the increase and leveling off of population.This function is aliased by the
@heli.event
decorator, which is generally the preferred syntax.clear( )
Removes all registered events.
remove( name )
Static Properties
multi — bool
Whether the
dict
values should store a function, or a list of functions. This is a static property and should be changed only by subclassingfuncStore
.Initial value: False
Notes and Examples