ANNarchy 5.0.0
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • ANNarchy
  • Core components
    • Network
    • Population
    • Projection
    • Monitor
    • PopulationView
    • Dendrite
  • Neuron and Synapse models
    • Neuron
    • Synapse
    • Parameter
    • Variable
    • Creating
    • Pruning
    • Constant
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • Hebb
    • Oja
    • IBCM
    • STP
    • STDP
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions
    • add_function
    • functions
  • Callbacks
    • every
  • Utilities
    • report
    • timeit
    • sparse_random_matrix
    • sparse_delays_from_weights
    • magic_network
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter
  • DEPRECATED Top-level API
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
    • simulate
    • simulate_until
    • step
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
    • save
    • load
    • save_parameters
    • load_parameters
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks

On this page

  • Variable
    • Parameters

Variable

Variable(
    self,
    equation,
    init=None,
    min=None,
    max=None,
    method=None,
    locality='local',
    type='float',
)

Dataclass to represent a variable in a Neuron or Synapse definition.

neuron = ann.Neuron(
    equations = [
        ann.Variable('C * dv/dt = - gL * (v - E_L) +  gL * delta_T * exp((v-v_T)/delta_T) + I - w', init=-70.0),

        ann.Variable('tau_w * dw/dt = a * (v - E_L) - w', min=0.0),
    ]
)

Variables are local by default. Set locality to global or semiglobal otherwise.

Parameters

Name Type Description Default
equation str string representing the equation. required
init float | int | bool | RandomDistribution initial value of the variable. It can be defined as a RandomDistribution, which will be sampled with the correct shape when the population/projection is created, or a float/int/bool, depending on type. None
min float minimum value that the variable can take. None
max float maximum value that the variable can take. None
method str numerical method to be used when the equation is an ODE. Must be in [‘explicit’, ‘implicit’, ‘semiimplicit’, ‘exponential’,‘midpoint’, ‘rk4’, ‘event-driven’] None
locality str Locality of the parameter. Must be in [‘global’, ‘semiglobal’, ‘local’]. 'local'
type str Data type of the parameter. Must be in [float, int, bool] (or [‘float’, ‘int’, ‘bool’]). 'float'
Parameter
Creating
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker