Simulation control

setup(timestep=0.1, min_delay='auto', **extra_params)[source]

Should be called at the very beginning of a script.

extra_params contains any keyword arguments that are required by a given simulator but not by others.

NEURON specific extra_params:

use_cvode - use the NEURON cvode solver. Defaults to False.

Optional cvode Parameters: -> rtol - specify relative error tolerance -> atol - specify absolute error tolerance

native_rng_baseseed - added to MPI.rank to form seed for SpikeSourcePoisson, etc. default_maxstep - TODO

returns: MPI rank

run(simtime, callbacks=None)

Advance the simulation by simtime ms.

callbacks is an optional list of callables, each of which should accept the current time as an argument, and return the next time it wishes to be called.

run() may be called multiple times during a simulation. In between calls to run() it is possible to retrieve data and modify neuron/synapse parameters. Some backends allow modification of the network structure. run(x + y) is equivalent to run(x) followed by run(y). If you wish to reset the simulation state to the initial conditions (time t = 0), use the reset() function.

run_until(time_point, callbacks=None)

Advance the simulation until time_point (in ms).

callbacks is an optional list of callables, each of which should accept the current time as an argument, and return the next time it wishes to be called.

run_until() and run() may be combined freely. See the documentation of the run() function for further information.

reset(annotations={})

Reset the time to zero, neuron membrane potentials and synaptic weights to their initial values, and begin a new Segment for recorded data. The network structure is not changed, nor are neuron/synapse parameters, nor the specification of which neurons to record from.

end(compatible_output=True)[source]

Do any necessary cleaning up before exiting.

get_time_step()

Return the integration time step (in milliseconds).

get_current_time()

Return the current time in the simulation (in milliseconds).

get_min_delay()

Return the minimum allowed synaptic delay (in milliseconds).

get_max_delay()

Return the maximum allowed synaptic delay (in milliseconds).

num_processes()

Return the number of MPI processes.

rank()

Return the MPI rank of the current node.

set(*args, **kwargs)

Deprecated. Use Population.set() instead.

initialize(*args, **kwargs)

Deprecated. Use Population.initialize() instead.

record(*args, **kwargs)

Deprecated. Use Population.record() instead.