Simulate systems from ODEs or SDEs, analyze time series.
nsim is for systems in physics, biology and finance that are modelled in continuous time with differential equations. nsim makes it easy to define and simulate these (including proper treatment of noise) and to analyze the resulting time series.
To define a scalar or vector ODE system, subclass ODEModel. (see examples) To define a scalar or vector SDE system, subclass ItoModel or StratonovichModel. Multiple driving Wiener processes are now supported. Order 1.0 strong stochastic Runge-Kutta algorithms (Rößler2010) are used for SDE integration by default.
Model parameters can be specified as random distributions, to create multiple non-identical simulations.
The NetworkModel class allows you to simulate many subsystems coupled together into a network, with the network structure specified as a weighted directed graph. Sub-models can all be identical but they don’t have to be. (The networkx package can optionally be used to generate various kinds of random, clustered and small world graphs useful in a NetworkModel). The sub-models in a NetworkModel can even be other NetworkModels, for simulating networks of networks.
Besides time series from simulations, empirical time series data can also be loaded from MATLAB .mat files or .EDF files for distributed analysis.
For best results use numpy with the __numpy_ufunc__ feature enabled (not yet released). This enables us to support distributed computation when analysing the resulting time series. You can get numpy with this experimental feature enabled here: https://github.com/mattja/numpy/archive/master.zip
Incorporates extra time series analyses from Forrest Sheng Bao’s pyeeg http://fsbao.net
ipyparallel interactive parallel computing: https://ipyparallel.readthedocs.org/
sdeint: Library of SDE integration algorithms that is used by nsim to do the simulations. https://github.com/mattja/sdeint