Next: , Previous: , Up: Top   [Contents][Index]


1 Introduction

CNrun is a slow but precise neuronal network model simulator written in C++, for which functions are exposed in the Lua scripting language. These functions are described in this document.

In the present version (2.x), CNrun core is made into a shared library, in contrast to CNrun 1.x which had it as a single executable interpreting its own, very simple scripts. In order to enable a more competent scripting, with interesting possibilities such as network plastic processes regulated by some model activity (excitation levels, spike patterns, etc), wrappers are provided to call core functions from Lua.

In the simplest case where you have a NeuroML-defined topology, a simulation session could be as brief as this:

local M = require("cnrun")
_, C = M.get_context()
_, M = M.new_model (C, "fafa")
M.import_nml (C, "fafa", "model.nml")
M.advance (C, "fafa", 1000)

This snippet will create an interpreter context, create a model in it, load an NML file, and advance the model one second.

To report a bug or request a wishlist item, go to http://github.com/hmmr/cnrun.