"The parameters fall into 3 categories: Model parameters, Simulation parameters, Theory parameters.<br>\n",
"\n",
"**Model parameters**<br>\n",
"Model paramters are the most important among all the paramters, it directly affect the model itself and thus have a great impact on the simulation results. Model paramters define the connection, input, neuron, and network charateristics of the model.\n",
"* Connection paramters\n",
"* Input parameters\n",
"* Neuron parameters\n",
"* Network parameters<br>\n",
"\n",
"**Simualation parameters**<br>\n",
"Simulation parameters define the paramters that influence the process of simulation, inlcuding the simulation time, the number of processes and theads used to run the simulation.<br>\n",
**Scaling factor** (scale_down_to) is the parameter which defines the the ratio of the full scale multi-area model being down-scaled to a model with fewer neurons and indegrees so as to be simulated on machines with lower computational ability and the simulation results can be obtained within relative shorter period of time.<br><br>
Neurons and indegrees are both scaled down to 0.5%, where the model can usually be simulated on a local machine.<br>**Warning**: This will not yield reasonable dynamical results from the network and is only meant to demonstrate the simulation workflow.**
scale_down_to=0.005# Change it to 1. for running the fullscale network
```
%% Cell type:markdown id:d53f1eab tags:
### 2. Model and simulation parameters
### 2. Model, simulation and theory parameters
%% Cell type:markdown id:e779c727 tags:
The parameters fall into 3 categories: Model parameters, Simulation parameters, Theory parameters.<br>
**Model parameters**<br>
Model paramters are the most important among all the paramters, it directly affect the model itself and thus have a great impact on the simulation results. Model paramters define the connection, input, neuron, and network charateristics of the model.
* Connection paramters
* Input parameters
* Neuron parameters
* Network parameters<br>
**Simualation parameters**<br>
Simulation parameters define the paramters that influence the process of simulation, inlcuding the simulation time, the number of processes and theads used to run the simulation.<br>
"rate of {0:.3f} spikes/s across all populations.".format(np.mean(r[:,-1])))
```
%% Cell type:markdown id:2062ddf3 tags:
### 3. Extract connectivity
%% Cell type:markdown id:8a7c09e0 tags:
The connectivity and neuron numbers are stored in the attributes of the model class. Neuron numbers are stored in `M.N` as a dictionary (and in `M.N_vec` as an array), indegrees in `M.K` as a dictionary (and in `M.K_matrix` as an array). Number of synapses can also be access via `M.synapses` (and in `M.syn_matrix` as an array).
# run the simulation, depending on the model parameter and downscale ratio, the running time varies largely.
M.simulation.simulate()
```
%% Cell type:markdown id:fd6e3232 tags:
<br>
%% Cell type:markdown id:28e071f8 tags:
## Simulation results analysis
%% Cell type:markdown id:89c7b7cf tags:
The following instructions will work when the `simulate` parameter is set to `True` during the creation of the MultiAreaModel object, and the `M.simulation.simulate()` method is executed.
%% Cell type:code id:dc3b1820 tags:
``` python
# Uncomment the lines in this code cell below to test if the number of synapses created by NEST matches the expected values
# """
# Test if the correct number of synapses has been created.
# syn = M.synapses[target_area.name][target_pop][source_area.name][source_pop]
# assert(len(created_syn) == int(syn))
```
%% Cell type:markdown id:57401110 tags:
To obtain the connections information, you can extract the lists of connected sources and targets. Moreover, you can access additional synaptic details, such as synaptic weights and delays.
You can determine the area and subpopulation to which the neuron ID ranges belong by referring to the file `network_gids.txt`, which is automatically generated during network creation.