ODEN files:  The .oden files that you generate for your neurons are the most potentially complex files that are used in NeuronetExperimenter.  (NOTE: The file structure is modeled loosely on the style of XPPAUT files to ease transfer between the programs but they are not fully compatible.) The file has three main sections: equations, auxiliary parameters, and auxiliary functions. 


Equations section:  The equations section can contain four different types of statements: ODEs, Standard Equations, Utility Functions, and wiener variables


ODEs: Each state variable should have an ODE equation, whose syntax is

d{state variable name}/dt=oden-equation-statement   or 

{state_variable_name}'=oden-equation-statement  


Example: x'=x*0.5+y


ODE functions should not be explicitly referred to from other functions. If you want to use the value of some expression for more than one state variables or other functions, you should make the expression a standard equation and then refer to it wherever it is needed.


oden-equation-statement: may contain any normal arithmetic operators (specifically, all legal C++ operators), as well as any special functions defined below for function-statement, as well as any standard equations, utility functions, parameters, or special variables.


Special Variables

t for time (intra-experiment) - This is the absolute time in ms

dt for timestep - This should not be used to add noise to a simulation (see wiener variables)


The following common functions are implicitly provided:

abs, fabs, pow, powint, sin, cos, tan, sinh, cosh, tanh, exp, sqrt, square, acos, asin, atan, atan2, ceil, floor, fmod, log, log10


and these less common functions (all arguments can be parameters, numbers, state variables, unless otherwise indicated):


Special Mathematical Function

Operation

heav(x)

= 1 if t > x, 0 if t <= x

step(x,y)

= 1 if x < = t <= y, else 0

istep(x,y)

= 0 if x <= t <= y, else 0

inhibit(x,y,z)

= x*step(y,z) (optimized)

activate(x,y,z)

= x*istep(y,z) (optimized)

influence(w,x,y,z)

= w*istep(y,z)+x*step(y,z) (optimized)

quartic(x)

= x^4

cube(x)

= x^3

hilleqnng1(x, y, int z)

= x^z/(x^z+y^z) (optimized, no nan or inf), z >= 1

hilleqnne1(x,y)

= hilleqnng1(x,y,1) (optimized, no nan or inf)

hilleqnne2(x,y)

= hilleqnng1(x,y,2) (optimized, no nan or inf)

hilleqnne3(x,y)

= hilleqnng1(x,y,3) (optimized, no nan or inf)

 hilleqnne4(x,y)

= hilleqnng1(x,y,4) (optimized, no nan or inf)

hilleqnne2(x,y,z)

= z*hilleqnng1(x,y,2) (optimized, z > 0, no nan or inf)

hilleqnne3(x,y,z)

= z*hilleqnng1(x,y,3) (optimized, z > 0, no nan or inf)

hilleqnne4(x,y,z)

= z*hilleqnng1(x,y,4) (optimized, z > 0, no nan or inf)

hilleqnnd1(x,y,z)

= x^z/(x^z+y^z) (optimized), z >= 1

gaussian(u,w,x,y,z)

= z+u*e^(-(y-w)^2/x)

dxdt(x,y,z)

= (x-y)/z

tau_x(w,x,y,z)

= w/cosh((z-x)/(2*y)) (optimized, no nan or inf)

x_inf(x,y,z)

= 1/(1+e^((x-y)/z) (optimized, no nan or inf)

x_inf(x)

= 1/(1+e^x) (optimized, no nan or inf)

dxdt(u,w,x,y,z)

= dxdt(x_inf(z,w,x),y,tau_x(u,w,x,z))




The only difference between the results of these functions and those listed below in the function-statement section is that gauss() will return a number with a standard deviation of sqrt(1.0/dt) (see wiener variable).  Use gauss(1.0) to get the standard behavior.


Special Functions for Implementing Neuron Connectivity

There are also three functions that act on the connections that a neuron has

max(x) - calculates the maximum x of all the incoming neuronal connections

ave(x) - calculates the average x of all the incoming neuronal connections

sum(x) - calculates the sum total x of all the incoming neuronal connections


where x is a connection-target (either a parameter, state variable, or a function whose value is used by other neurons)    


Standard Equations: Standard equations can be 


Equation-name(<{state variables}>)=oden-equation-statement


Note that the arguments are strictly optional; even if your equation uses state variables, you don't need to declare them inside the parenthesis.  Placing state-variable arguments inside the parenthesis is for readability only.  When you refer to a standard equation anywhere in the file, you must include the parenthesis after the variable name, but again, if you put any arguments in the parenthesis, they will be ignored.  


Utility functions:  a utility function is an equation that will be used with varying arguments throughout the ODEN file.

  

Utility-function-name({non-state variables})=oden-equation-statement


Here you should use the arguments of the function inside the oden-equation-statement.  Note that if you use a parameter used elsewhere in the file in both the arguments and oden-equation-statement, you will get the value passed to the function, not the value of the neurons parameter.  


Wiener variable declarations: syntax:


wiener {wiener variable names},*


Wiener variables are recalculated at each timestep and are pulled from a normal distribution with mean 0 and standard deviation sqrt(1.0/dt).  The reason for doing this is that if you set an ODE equal to a wiener variable, when it is integrated the resulting time series will have a distribution with a standard deviation of 1. Wiener variables can be multiplied or output just like any other function.  


Auxiliary parameters section:

This section can follow the previous section or be placed after the auxiliary functions section (actually, you can have multiple auxiliary parameters sections).  Auxiliary parameters are placed, one per line, after a line that reads 

#Auxiliary Parameters 

in the oden file.  They will be available for output and use in any auxiliary functions that you define.  They are most often useful if you want to set some of the parameters in your oden file based off of others and want to do this automatically in your setup files.  i.e.., you could define 'specific_gNaF = 1.5', then in your setup file write 'Change g_NaF = specific_gNaF*C'. 


Auxiliary functions section:

If you want to interface NeuronetExperimenter with other C++ code that you have written, you may find it necessary to add new functions to your oden files. Write any C++ legal functions that you like beginning with:


inline void 


or 


inline fp_type 


(fp_type is defined in include/basicHeader.h and is usually a double) and that function and its declaration will be put directly into the generated C++ files.