# NetworkOperation class

(Shortest import: `from brian2 import NetworkOperation)`

class brian2.core.operations.NetworkOperation(*args, **kw)

  Bases: `BrianObject`

  Object with function that is called every time step.

  Parameters:

    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'`. See Scheduling for possible values.

    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.

  See also

  `network_operation()`, `Network`, `BrianObject`

  Attributes

  `function` | The function to be called each time step

  Methods

  `run`() |

  Details

  function

    The function to be called each time step

  run()