This page describes how to use NeuroML ot parameter a Neosim
simulation.
For more informations about NeuroML, please consult the NeuroML web site.
The best is to use the sample file as a template.
The steps to describe a simulation are :
Defining a network is then defining its populations and projections :
The attributes of the Grid1DStructure structure are :
The attributes of the Grid3DStructure structure are :
The Raw projection is a class of projection allowing us to
explicitly define each connection, one by one.
The attributes of the Raw projection are :
As most of the time, it would be too costly to explicitely define each
connections, we introduce here the ModuleProjection, which
uses external code modules (in .jar files) to define the
connectivity.
The attributes of the ModuleProjection are :
The actual paths for code modules are not explicitely given everytime
a module has to be specified.
The list of modules contain the modules name and location
Defining the entities
<neuroml class="NeuromlPkg" description="" author="tutorial master" keywords="tutorial spike neuron model">
<models>
<model name="our_cells" class="CellPkg">
<solutions>
</solutions>
<sectionProperties>
</sectionProperties>
<neurons>
<neuron name="SpikeNeuron" class="ModuleNeuron">
<module module="SpikeNeuronjar">
<parameters class="tutorial.neuron.SpikeNeuronFactory"
threshold="0.0"
excitation="20.0"
inhibition ="-10.0"/>
</module>
</neuron>
</neurons>
<structures>
</structures>
</model>
</models>
</neuroml>
The tag <neurons> presides for a list of neurons.
The exemple shown here presents only one neuron in this list but there
can be as many as whished.
The neuron defined here by the tag <neuron> is a SpikeNeuron cell.
Its attributes are :
Defining the network
<neuroml class="NeuromlPkg" description="four neurons producing walking pattern" author="tutorial master"
keywords="tutorial spike neuron model">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="our_network">
<elements>
</elements>
<projections>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The tag <networks> is a list of
networks, each network being described by a <network> tag.
In the current model we define only one network. The attributes of a
network are :
Defining the populations
<neuroml class="NeuromlPkg" description="four neurons producing walking pattern" author="tutorial master" keywords="tutorial spike neuron model">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="our_network">
<elements>
<element name="SpikeNeurons" elementClass="SpikeNeuron">
<structure class="Grid1DStructure" size="4"/>
</element>
<element name="SpikeNeurons3D" elementClass="SpikeNeuron">
<structure class="Grid3DStructure" xsize="5" ysize="5" zsize="2"/>
</element>
</elements>
<projections>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The list of elements can contain as many populations as
wanted. The attributes of a population are :
The structure of a population can be of many kind according to the needs.
Here are shown two different kinds of structures
used in the current model : the first one, a Grid1DStructure
just specifies its number of elements without any spatial
constraints, whereas the second one is a Grid3Dstructure
able to emulate a three dimensional array.
Defining the projections
<neuroml class="NeuromlPkg" description="four neurons producing walking pattern" author="tutorial master" keywords="tutorial spike neuron model">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="our_network">
<elements>
</elements>
<projections>
<projection name="fromGen" class="RawProjection" source="SpikeGens" dest="SpikeNeurons">
<connections>
<connection name="unique" sourceIndex="0" destIndex="0"
sourcePort="out" destPort="in" delay="2.0ms" weight="1.0" />
</connections>
</projection>
<projection name="betweenNeurons"
class="ModuleProjection" source="SpikeNeurons" dest="SpikeNeurons">
<sourceMethod module="modules.toNextSrc">
<parameters class="tutorial.sourcemethod.SpikeSourceMethod" srcPort="out"/>
</sourceMethod>
<destMethod module="modules.toNextDest">
<parameters class="tutorial.destmethod.SpikeDestMethod" dstPort="in" delay="2.0"/>
</destMethod>
</projection>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The projections to be defined are also part of a list, called
projections.
Here we show two different kind of
projections : RawProjection and ModuleProjection.
The connections are then defined by the connection tag.
The default connection class has the following attributes :
The following section explains how to define Source and Destination methods.
Defining the destination and source methods
<sourceMethod module="modules.toNextSrc">
<parameters class="tutorial.sourcemethod.SpikeSourceMethod" srcPort="out"/>
</sourceMethod>
<destMethod module="modules.toNextDest" >
<parameters class="tutorial.destmethod.SpikeDestMethod" dstPort ="in" delay="2.0"/>
</destMethod>
The destination and source methods are special links to the modules
Neosim will use to implement the connectivity.
The parameters needed here are :
Defining the simulation's controls
<neuroml class="NeuromlPkg" description="" author="tutorial master" keywords="tutorial spike neuron model">
<models>
</models>
<environment>
<io>
</io>
<schedule class="ControlledSchedule" module="Controljar">
<parameters class=tutorial.TurorialControl time="10"
neuronpop="SpikeNeurons" genpop="SpikeGens"/>
</schedule>
</environment>
<modules>
</modules>
</neuroml>
The simulation environment is defined in this section.
The environement attributes are :
The schedule's default class allows only to set the simulation
duration. The schedule class used here is a
ControlledSchedule giving the control to a code module.
The attributes of the ControlledSchedule are:
Defining the external modules used
<neuroml class="NeuromlPkg" description="" author="tutorial master" keywords="tutorial spike neuron model">
<models>
</models>
<environment>
</environment>
<modules>
<module name="toNextSrc" class="SourceMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/tutsourcemethod.jar"/>
<module name="toNextDest" class="DestMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/tutdestmethod.jar"/>
<module name="Controljar" class="ControlModule" location="http://www.anc.ed.ac.uk/~paulro/jars/tutcontrol.jar"/>
<module name="SpikeNeuronjar"
location="http://www.anc.ed.ac.uk/~paulro/jars/tutspikeneuron.jar"/>
<module name="SpikeGenjar"
location="http://www.anc.ed.ac.uk/~paulro/jars/tutspikegen.jar"/>
</modules>
</neuroml>
Instead a reference is
given, targeting a module name placed in a module
list.