1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // #include "debug.hpp"
- #include "simloop.hpp"
- #include "vconnection.hpp"
- #include "layer.hpp"
- #include "layer/iaf_psc_exp.h"
- #include "layerfactory.hpp"
- #include <sys/stat.h>
- #include <fstream>
- #include <iostream>
- #include <stdlib.h>
- using namespace std;
- int main(int argc, char** argv)
- {
- cout << "Hallo world!!" << endl;
- cout << "argc=" << argc << endl;
- float start = 100;
- float stop = 110;
- float current = 2.0;
- if (argc>=2)
- start = atof(argv[1]);
- if (argc>=3)
- stop = atof(argv[2]);
- if (argc>=4)
- current = atof(argv[3]);
- layer* MyLayer = createLayer(1, NMType_iaf_psc_exp, NPType_Excitatory);
- MyLayer->SetName("MyLayer");
- // MyLayer->SetupPositions(InputNx, InputNy, true);
- float* ExInput = MyLayer->GetInputPointer(csimInputChannel_Membrane);
- std::fstream f("output.txt", ios_base::out);
- float dt = MyLayer->GetDeltaT();
- int i_start = floor(start/dt);
- int i_stop = floor(stop/dt);
- iaf_psc_exp* MyNestLayer = dynamic_cast<iaf_psc_exp*>(MyLayer);
- for (int i=0; i<900;++i)
- {
- if (i >= i_start && i < i_stop) {
- ExInput[0] += current;
- }
- MyLayer->proceede(i);
- f << MyNestLayer->pS_[0].V_m_ << "\n";
- }
- f.close();
- return 0;
- }
|