Defines a set of integration methods for both deterministic and stochastic differential equations.
will be consistent with Monitor periods corresponding to any of [4096, 2048, 1024, 512, 256, 128] Hz
# TODO: error analysis
The Integrator class is a base class for the integration methods...
[1] | Kloeden and Platen, Springer 1995, Numerical solution of stochastic differential equations. |
[2] | Riccardo Mannella, Integration of Stochastic Differential Equations on a Computer, Int J. of Modern Physics C 13(9): 1177–1194, 2002. |
[3] | R. Mannella and V. Palleschi, Fast and precise algorithm for computer simulation of stochastic differential equations, Phys. Rev. A 40: 3381, 1989. |
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
The IntegratorStochastic class is a base class for the stochastic integration methods. It derives from the Integrator abstract base class.
We consider a stochastic differential equation has the generic form:
\[\dot{X}_i(t) = dX_i(\vec{X}) + g_i(\vec{X}) \xi(t)\]
where we assume that the stochastic process \(\xi\) is a Gaussian forcing. In the deterministic case, \(g(X)\) would be zero. The full algorithm, for one external stochastic forcing which is additive, is:
\[X_i(t) = X_i(0) + g_i(X) Z_1(t) + dX_i t + Z_2(t) dX_{i,k} g_k(X) + 0.5 dX_{i,jk} g_j(X) g_k(X) Z_3(t) + 0.5 t^2 dX_{i,j} dX_j\]
where \(Z_1\), \(Z_2\) and \(Z_3\) are Gaussian variables, assuming the Einstein notation and defining:
\[dX_{i,j} = \frac{\partial dX_i}{\partial X_j}\]
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>
It is a simple example of a predictor-corrector method. It is also known as modified trapezoidal method, which uses the Euler method as its predictor. And it is also a implicit integration scheme.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
It is a simple example of a predictor-corrector method. It is also known as modified trapezoidal method, which uses the Euler method as its predictor.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>
It is the simplest difference methods for the initial value problem. The recursive structure of Euler scheme, which evaluates approximate values to the Ito process at the discretization instants only, is the key to its successful implementation.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
It is the simplest difference methods for the initial value problem. The recursive structure of Euler scheme, which evaluates approximate values to the Ito process at the discretization instants only, is the key to its successful implementation.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>
The Runge-Kutta method is a standard procedure with most one-step methods.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
The Identity integrator does not apply any scheme to the provided dfun, only returning its results.
This allows the model to determine its stepping scheme directly, and may be used for difference equations and cellular automata.
traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
Provides a base class for integrators using SciPy’s ode class.
traited class VODE traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
traited class VODEStochastic traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>
traited class Dopri5 traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
traited class Dopri5Stochastic traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>
traited class Dop853 traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125
traited class Dop853Stochastic traits on this class:
- clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)
default: None- clamped_state_variable_values (The values of the state variables which are clamped )
default: None- dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.default: 0.01220703125- noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.default: <class ‘tvb.simulator.noise.Additive’>