[Pybrainsim-activity] SF.net SVN: pybrainsim:[55] trunk/src/GeneratorNumberIncrementing.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-03 11:07:08
|
Revision: 55 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=55&view=rev Author: rgoj Date: 2009-08-03 11:06:58 +0000 (Mon, 03 Aug 2009) Log Message: ----------- * GeneratorNumberIncrementing now reacts to input 'Stimulus' from a Stimulus class object by zeroing it's activation, making instantaneous zeroing of activation possible. Modified Paths: -------------- trunk/src/GeneratorNumberIncrementing.py Modified: trunk/src/GeneratorNumberIncrementing.py =================================================================== --- trunk/src/GeneratorNumberIncrementing.py 2009-08-03 10:56:16 UTC (rev 54) +++ trunk/src/GeneratorNumberIncrementing.py 2009-08-03 11:06:58 UTC (rev 55) @@ -23,14 +23,14 @@ """ class GeneratorNumberIncrementing: - def __init__(self): - self.activation = 0 + def printInfo(self): + print(self.name + ": A GeneratorNumberIncrementing object") - def sendOutput(self): - return self.activation - def receiveInput(self, input): - self.activation += input + if activation == 'Stimulus': + self.activation = 0 + else: + self.activation += input def runGenerator(self, time): self.activation = self.activation + 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |