NetworkOperation class

(Shortest import: from brian2 import NetworkOperation)

class brian2.core.operations.NetworkOperation(function, dt=None, clock=None, when='start', order=0)[source]

Bases: brian2.core.base.BrianObject

Object with function that is called every time step.


function : function

The function to call every time step, should take either no arguments in which case it is called as function() or one argument, in which case it is called with the current Clock time (Quantity).

dt : Quantity, optional

The time step to be used for the simulation. Cannot be combined with the clock argument.

clock : Clock, optional

The update clock to be used. If neither a clock, nor the dt argument is specified, the defaultclock will be used.

when : str, optional

In which scheduling slot to execute the operation during a time step. Defaults to 'start'.

order : int, optional

The priority of this operation for operations occurring at the same time step and in the same scheduling slot. Defaults to 0.


function The function to be called each time step





The function to be called each time step