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


4 Models

Multiple models can be created, accessed, modified, advanced within a single interpreter context. Models are identified by a label (a string).

4.1 Creating and deleting models

Function: new_model (C, M)

Create a model named M (model label).

Function: delete_model (C, M)

Delete model M.

Function: list_models (C)

List models existing in context C, returned as strings.

4.2 Populating models

Models can be populated by constituent neurons and synapses in two ways:

  1. importing topology from a file (import_nml());
  2. adding individual units one by one (new_neuron(), new_synapse()).
Function: import_nml (C, M, file_name)

Import network topology from a file (file_name) into a model named M.

Function: export_nml (C, M, file_name)

Export network topology of model M into file file_name.

Function: new_neuron (C, M, type, label)

Create a neuron of type type, with this label, in model M. label must be of the form “population.id”.

Function: new_synapse (C, M, type, source, target)

Create a synapse of this type connecting neurons labelled source and target.

4.3 Other operations on models as a whole

Function: reset_model (C, M)

Reset the state of all units, rewind all periodic sources and flush and close any logs in model M.

Function: cull_deaf_synapses (C, M)

Remove all synapses with a zero gsyn, in model M. This makes sense unless you are going to modify gsyn at a later time.

Function: describe_model (C, M)

Describe model M. The output will be printed to stdout and look like this:

Model "FAFA":
     13 units total (7 Neurons, 6 Synapses):
       11 hosted,
        2 standalone
        0 discrete dt-bound
      0 Listening units
      0 Spikelogging neurons
      0 Units being tuned continuously
      0 Units being tuned periodically
      2 Spontaneously firing neurons
      2 Multiplexing synapses
     26 vars on integration vector
Function: advance (C, M, duration)

Run simulation in model M for duration milliseconds.

Function: advance_until (C, M, time)

Run simulation in model M until point in time time.

Note that the real eventual model time after this function has returned may be a little (less than the last dt) greater than expected.

4.4 Model parameters

Each model has the following parameters that affect its behaviour:

verbosely

Level of verbosity of printed messages (integer, 0 up to 6).

integration_dt_min

Lower bound for dt (float).

integration_dt_max

Upper bound for dt (float).

integration_dt_cap

Maximal factor by which dt can be allowed to increase in consecutive iterations (float).

listen_dt

A time increment between consecutive sampling and logging of state variables (float).

listen_mode

A string of symbols defining unit ‘listening’ mode, of the form x{-}, where x indicates the mode and -, whether to disable that mode (if given, else enable). There are three modes: 1, whether to log the first state variable only, or all unit vars; d, whether to defer writing until end of simulation; and b, whether to write FP values in native machine representation instead of "%g".

sxf_start_delay

Length of time, before and after sampling point, limiting the extent of counting spikes for sdf/sxf evaluation (float). Leave at 0 to count all spikes from 0 until current model time; a couple of seconds should be good for reasonable accuracy.

sxf_period

Sampling period for sdf and shf (spike density and spike heterogeneity) functions.

sdf_sigma

Parameter sigma in sdf (float).

Function: get_model_parameter (C, M, P)

Get a model parameter P, one of those listed above.

Function: set_model_parameter (C, M, P, V)

Set a model parameter P to value V.


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