[Pybrainsim-activity] SF.net SVN: pybrainsim:[41] trunk/src/Head.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-02 18:40:07
|
Revision: 41 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=41&view=rev Author: rgoj Date: 2009-08-02 18:40:00 +0000 (Sun, 02 Aug 2009) Log Message: ----------- * Changed the way connections are run from Head, so that the generators do not generate their output more than once, possibly leading to unexpected results. * During simulation the current time is printed to standard output... at least for now. Modified Paths: -------------- trunk/src/Head.py Modified: trunk/src/Head.py =================================================================== --- trunk/src/Head.py 2009-08-02 18:36:19 UTC (rev 40) +++ trunk/src/Head.py 2009-08-02 18:40:00 UTC (rev 41) @@ -78,12 +78,17 @@ for generator in self.generatorList: generatorOutput.append(0) - # Querying all generators and connections + # Querying all generators and sending generator output through connections for timePoint in range(duration * self.samplingFrequency): + print("HEAD, time: " + str(timePoint/self.samplingFrequency)) for i in range(len(self.generatorList)): generatorOutput[i] = (self.generatorList[i]).runGenerator(timePoint/self.samplingFrequency) for i in range(len(self.connectionList)): - self.connectionList[i].runConnection() + sourceGeneratorIndex = 0 + for j in range(len(self.generatorList)): + if self.connectionList[i].getSourceName() == self.generatorList[j].getName(): + sourceGeneratorIndex = j + self.connectionList[i].runConnection(generatorOutput[sourceGeneratorIndex]) recording = self.runHeadModel(generatorOutput, recording) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |