#ifndef SIMULATE_H #define SIMULATE_H #include #include #include "neuron.h" #include "synapse.h" #include "tracepoints.h" #include "event.h" #include "interface.h" #include "spike.h" using namespace std; class Simulation { public: Simulation(); // ----- FUNCTIONS ----- // controlling functions bool Step(); // do a single step (fire one neuron); return if the net is dead bool proceedTime(double td); bool proceedSpikes(long count); void addEvent(Event*); // ----- SIMULATION STATE ----- // simulation global variables double currentTime; // list of spikes and events priority_queue, PEventGreater> pendingSpikes; // list of discontinous dopamin changes (time, amount), sorted by time (newest is front) std::list > da_history; // ----- HELPER VARS ----- // reflection & traces std::list *> spikeOIfList; std::set binSets; // file descriptors FILE *fd_ineuron, *fd_isynapse, *fd_ispike, *fd_iglobal, *fd_oneuron, *fd_osynapse, *fd_ospike, *fd_oglobal, *fd_trace; // command file // debug vars #ifdef DEBUG_STATUSLINE long long numSpikes; // number of spikes (counted after axon hillock) processed so far map eventCount; int charCount; #endif }; // init neural network Simulation s; #endif // SIMULATE_H