예제 #1
0
int main(){

	cout << "Demonstrating Omurtag et al. (2000)" << endl;
	Number    n_bins = 500;
	Potential V_min  = 0.0;

	NeuronParameter
		par_neuron
		(
			1.0,
			0.0,
			0.0,
			0.0,
			50e-3
		);

	OdeParameter
		par_ode
		(
			n_bins,
			V_min,
			par_neuron,
			InitialDensityParameter(0.0,0.0)
		);

	double min_bin = 0.01;
	LifNeuralDynamics dyn(par_ode,min_bin);
	LeakingOdeSystem sys(dyn);
	GeomParameter par_geom(sys);
	GeomDelayAlg alg(par_geom);

	Rate rate_ext = 800.0;
	RateAlgorithm<MPILib::DelayedConnection> alg_ext(rate_ext);

	Network network;

	NodeId id_rate = network.addNode(alg_ext,EXCITATORY_DIRECT);
	NodeId id_alg  = network.addNode(alg,    EXCITATORY_DIRECT);

	MPILib::DelayedConnection con(1,0.03,0.0);
	network.makeFirstInputOfSecond(id_rate,id_alg,con);

	MPILib::report::handler::RootReportHandler handler("singlepoptest", true, true);
	handler.addNodeToCanvas(id_alg);

	const SimulationRunParameter
		par_run
		(
			handler,
			10000000,
			0.0,
			0.5,
			1e-3,
			1e-4,
			"singlepoptest.log"
		);

	network.configureSimulation(par_run);
	network.evolve();

	return 0;
}
예제 #2
0
int main(){

	cout << "Demonstrating Quadratic-Integrate-and-Fire under jump response" << endl;
	Number    n_bins = 1000;
	Potential V_min  = -10.0;

	NeuronParameter
		par_neuron
		(
			10.0,
			-10.0,
			-10.0,
			0.0,
			10e-3
		);

	OdeParameter
		par_ode
		(
			n_bins,
			V_min,
			par_neuron,
			InitialDensityParameter(0.0,0.0)
		);


	GeomLib::QifParameter
	  par_qif
	  (
	    0.5, // 
	    0.5  // default gamma sys
	  );

	DiffusionParameter par_diffusion(0.03,0.03);
	CurrentCompensationParameter par_current(0.0,0.0);
	SpikingQifNeuralDynamics dyn(par_ode,par_qif);
	QifOdeSystem sys(dyn);
	GeomDelayAlg alg_qif(GeomParameter(sys,  par_diffusion, par_current));
      


	// Reproduce mu = 0.6, sigma = 0.7       
	Rate rate_ext = 6000;
	Efficacy h    = -8e-3;

	RateAlgorithm<MPILib::DelayedConnection> alg_ext(rate_ext);

	Network network;

	NodeId id_rate = network.addNode(alg_ext, MPILib::INHIBITORY_GAUSSIAN);
	NodeId id_alg  = network.addNode(alg_qif, MPILib::EXCITATORY_GAUSSIAN);

	MPILib::DelayedConnection con(1,h,0.0);
	network.makeFirstInputOfSecond(id_rate,id_alg,con);


	MPILib::CanvasParameter par_canvas;
	par_canvas._state_min     = -10.0;
	par_canvas._state_max     =  10.0;
	par_canvas._t_min         = 0.0;
	par_canvas._t_max         = 0.5;
	par_canvas._f_min         = 0.0;
	par_canvas._f_max         = 10.0;
	par_canvas._dense_min     = 0.0;
	par_canvas._dense_max     = 5.0;


	MPILib::report::handler::RootReportHandler handler("twopopcanvas.root", true, true, par_canvas);
	handler.addNodeToCanvas(id_alg);

      

	const SimulationRunParameter
		par_run
		(
			handler,
			10000000,
			0.0,
			0.5,
			2e-3,
			1e-4,
			"singlepoptest.log"
		);

	network.configureSimulation(par_run);
	network.evolve();

	return 0;
}