lianedahas
Hi, good evening,
I need help with codes for this situation:
I need a schedule for a scheme competitor CRF (bar 1) x FI 10s (bar 2) for two bars. Pressure in bar that is on CRF scheme is always reinforced and generates a delay of four seconds on the FI 10s. Each response in the CRF generates a delay of 4 seconds to be accumulated untill the animal complete the FI + delays scheme and press this bar. When animal mets the FI + delay scheme, pressing the bar is reinforced and the delay is reset and starts counting a new FI 10 s.
For example:
if the animal pressed twice in the CRF while FI is 6 seconds, only in the FI press barafter 12 seconds is reinforced (12 = 4 the rest of the FI + 4 +4 delay).My problem putting together the code is that 1) the FI delays are accumulated at each pressure on the CRF and 2) delays start to occur after completion of the FI, which was already in progress when the pressures of the CRF occurred. In other words, I can not simply add up the number of 10 + pressures CRF bar x 4 sec, sincethe FI may have already started, and therefore may be 9, 8, 7 … any numbers until you finish all 10 seconds.
I have tried many different ways, but with no success!!Thank you very much for your time.