SiReNe Simulation Software  1.0
Sirene.c File Reference

Main functions of the SiReNe Software. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include "SireneComponents.h"
Include dependency graph for Sirene.c:

Functions

void Iter (Simul *Simulation, double *TmpVar, double *TmpDer)
 Computation of one time-step from (t) to (t + dt) More...
 
void Advance (Simul *Simulation)
 Simulation process over time-steps. More...
 
void InitSimu (Simul *Simulation)
 Initialization of the simulation structure. More...
 
void PrepareSimu (Simul *Simulation, ushort VerboseMask, ushort SaveMask, int ResultsInterval)
 Preparation of simulation data according to the neural network description. More...
 

Variables

unsigned long MEMORY =0
 Total amount of requested memory. More...
 
unsigned long ALLOCATED =0
 Total amount of actually allocated memory. More...
 
unsigned long FREED =0
 Total amount of de-allocated memory. More...
 

Detailed Description

Main functions of the iterative process to simulate biological neuronal networks with adjustable properties (normal state, Parkinson's disease,...).

Function Documentation

◆ Advance()

◆ InitSimu()

◆ Iter()

void Iter ( Simul Simulation,
double *  TmpVar,
double *  TmpDer 
)

Network state is computed at (t + dt) using a numerical method (Euler or Runge-Kutta 2).
Detection of spikes using the SpikeDetection() function.

Parameters
SimulationStructure where all simulation information is stored
TmpVarVariables array for intermediate time-steps computed in the numerical method
TmpDerDerivatives array for intermediate time-steps computed in the numerical method

References Simul::Chrono_Iter, Simul::CrtNum, INPUT_CALL, Simul::NumericalMethod, Simul::PrvNum, RETURN_CALL, SpikeDetection(), Simul::t, Simul::Time_Iter, Simul::TimeStep, and UpdateModels().

Referenced by Advance().

◆ PrepareSimu()

void PrepareSimu ( Simul Simulation,
ushort  VerboseMask,
ushort  SaveMask,
int  ResultsInterval 
)

Initialization of:

  • Simulation structure:
    • SaveMask for data saving during the simulation
    • Time index PrvNum (previous time-step)
    • Crt (current time-step)
    • Time t0 = simulation starting point
    • Total number of neurons
    • Number of variables
    • Allocation of the variables array
    • Allocation of the derivatives of the variables array
    • Sum of the LFP
  • Neuron structure:
    • Input/Synaptic current
    • Global number neuron
    • Number of parameters
    • Parameters
    • Synaptic current factor
    • Spike threshold
    • Potential index
    • Mid-time step potential
    • Mid-time step derivative of the potential
    • Number of spikes
    • Last spike time
  • Message:
    • Display of initialization information
      • Initialization display is activated via the VerboseMask parameter
  • Chrono:
    • Time initalization for each function
Parameters
SimulationStructure where all simulation information is stored
VerboseMaskMask of information to display
SaveMaskMask of variables to save to file
ResultsIntervalNumber of iterations between results display / save

References BUFFER_SIZE, Simul::BufferSpikes, Simul::Chrono_Init, Simul::ChronoStart, Simul::CrtNum, Simul::DVar, Neuron::dVMidStep, NeuralModel::FirstNeuronNumber, Neuron::GlobalNumNeuron, Neuron::InitialValues, INPUT_CALL, Neuron::InputCurrent, Neuron::LastSpikeTime, MAXTHREADS, MYMALLOC(), NBMEMSTEP, Simul::NbSpInBuf, Simul::NbThreads, NeuralModelPrint(), Simul::NeuralModels, NeuronPrint(), NeuralModel::Neurons, Simul::NumberNeuralModels, SynapseModel::NumberOfConnections, NeuralModel::NumberOfNeurons, Neuron::NumberOfParameters, NeuralModel::NumberOfParameters, Neuron::NumberOfSpikes, NeuralModel::NumberOfVariables, Simul::NumberOfVariables, Neuron::Parameters, NeuralModel::Parameters, Neuron::PotentialIndex, Simul::PrvNum, Simul::ResultsInterval, RETURN_CALL, Simul::SaveMask, Simul::sLFP, Neuron::SpikeTreshold, NeuralModel::SpikeTreshold, Simul::Start, SynapseModelPrint(), Simul::SynapseModels, Neuron::SynapticCurrent, Neuron::SynCurrentFactor, Simul::t, Simul::Time_Advance, Simul::Time_Detection, Simul::Time_Init, Simul::Time_Iter, Simul::Time_NumericalMethod, Simul::Time_RandGenConn, Simul::Time_SpikeProcessing, Simul::Time_UpdateModels, Simul::Time_UpdateNeuron, Simul::TimeStep, Simul::TotalNumberOfNeurons, Simul::TotalTimeSim, Simul::Variables, VERBOSE_CONFIG, VERBOSE_DETAILS, Simul::VerboseMask, and Neuron::VMidStep.

Referenced by main().

Variable Documentation

◆ ALLOCATED

unsigned long ALLOCATED =0

Referenced by DISPLAYMEM(), and MYMALLOC().

◆ FREED

unsigned long FREED =0

Referenced by DISPLAYMEM(), and MYFREE().

◆ MEMORY

unsigned long MEMORY =0

Referenced by DISPLAYMEM(), and MYMALLOC().