-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_fun1.cpp
65 lines (50 loc) · 1.75 KB
/
test_fun1.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <iostream>
#include <string>
#include "constants.hpp"
#include "neuron.hpp"
#include "network.hpp"
using namespace std;
unsigned int simtime (0);
unsigned int simduration(0);
unsigned int nbExciNeur(0);
unsigned int nbInhiNeur(0);
string filename("simulation");
char answer('n');
int main()
{
Network hugeBrain(10000,2500);
hugeBrain.updateWritingSpi(1000, 1.0, "spikes");
/*cout << "Do you want to run a personnalized simulation? [y/n]" << endl;
cin >> answer;
if (answer == 'y') {
do {
cout << "Enter the duration of the simulation (in steps)" << endl;
cin >> simduration;
} while (simduration <= 0);
cout << "Do you want to apply a external current to a neuron of a network [y/n]" << endl;
cin >> answer;
if (answer == 'y') {
do {
cout << "Enter the external current applied to the first neuron of the network (in mV, recommended: 0)" << endl;
cin >> I_ext;
cout << "Enter the time where external current start to be applied (in steps, >=0)" << endl;
cin >> I_ext_start;
cout << "Enter the time where external current stop to be applied (in steps, >=0)" << endl;
cin >> I_ext_stop;
} while ((I_ext_stop < I_ext_start) || (I_ext_start < 0) || (I_ext_stop < 0));
}
do {
cout << "Enter the number of excitatory neurons in the network (int, >= 0)" << endl;
cin >> nbExciNeur;
} while (nbExciNeur < 0);
do {
cout << "Enter the number of inhibitory neurons in the network (int, >= 0)" << endl;
cin >> nbInhiNeur;
} while (nbInhiNeur < 0);
cout << "Enter the name of the where you want to store the membrane potential of the neurons" << endl;
cin >> filename;
Network smallBrain(nbExciNeur,nbInhiNeur);
smallBrain.updateWritingPot(I_ext, simduration, I_ext_start, I_ext_stop, 1, filename);
}
*/
}