예제 #1
0
 def setUp(self):
     sim.setup()
     self.p1 = sim.Population(7, sim.IF_cond_exp())
     self.p2 = sim.Population(4, sim.IF_cond_exp())
     self.p3 = sim.Population(5, sim.IF_curr_alpha())
     self.syn1 = sim.StaticSynapse(weight=0.123, delay=0.5)
     self.random_connect = sim.FixedNumberPostConnector(n=2)
     self.syn2 = sim.StaticSynapse(weight=0.456, delay=0.4)
     self.all2all = sim.AllToAllConnector()
예제 #2
0
 def setUp(self, sim=sim, **extra):
     sim.setup(**extra)
     self.p1 = sim.Population(7, sim.IF_cond_exp())
     self.p2 = sim.Population(4, sim.IF_cond_exp())
     self.p3 = sim.Population(5, sim.IF_curr_alpha())
     self.syn1 = sim.StaticSynapse(weight=0.006, delay=0.5)
     self.random_connect = sim.FixedNumberPostConnector(n=2)
     self.syn2 = sim.StaticSynapse(weight=0.012, delay=0.4)
     self.all2all = sim.AllToAllConnector()
     self.syn3 = sim.TsodyksMarkramSynapse(weight=0.012, delay=0.6, U=0.2, tau_rec=50)
예제 #3
0
 def setUp(self, sim=sim, **extra):
     self.MIN_DELAY = 0.123
     sim.setup(num_processes=2, rank=1, min_delay=self.MIN_DELAY, **extra)
     self.p1 = sim.Population(7, sim.IF_cond_exp())
     self.p2 = sim.Population(4, sim.IF_cond_exp())
     self.p3 = sim.Population(5, sim.IF_curr_alpha())
     self.projections = {"cond": {}, "curr": {}}
     for psr, post in (("cond", self.p2), ("curr", self.p3)):
         for rt in ("excitatory", "inhibitory"):
             self.projections[psr][rt] = sim.Projection(
                 self.p1,
                 post,
                 sim.AllToAllConnector(safe=True),
                 sim.StaticSynapse(),
                 receptor_type=rt)