ExponentialEulerStateUpdater class

(Shortest import: from brian2.stateupdaters.exponential_euler import ExponentialEulerStateUpdater)

class brian2.stateupdaters.exponential_euler.ExponentialEulerStateUpdater[source]

Bases: brian2.stateupdaters.base.StateUpdateMethod

A state updater for conditionally linear equations, i.e. equations where each variable only depends linearly on itself (but possibly non-linearly on other variables). Typical Hodgkin-Huxley equations fall into this category, it is therefore the default integration method used in the GENESIS simulator, for example.


__call__(equations[, variables]) Generate abstract code from equations.
can_integrate(equations, variables) Return whether the given equations can be integrated using this state updater.


__call__(equations, variables=None)[source]

Generate abstract code from equations. The method also gets the the variables because some state updaters have to check whether variable names reflect other state variables (which can change from timestep to timestep) or are external values (which stay constant during a run) For convenience, this arguments are optional – this allows to directly see what code a state updater generates for a set of equations by simply writing euler(eqs), for example.


equations : Equations

The model equations.

variables : dict, optional

The Variable objects for the model variables.


code : str

The abstract code performing a state update step.

can_integrate(equations, variables)[source]

Return whether the given equations can be integrated using this state updater. This method tests for conditional linearity by executing get_conditionally_linear_system and returns True in case this call succeeds.