Field instances as well as many/most processes store the values of attributes in instance variables. The MCS process updates attributes with values for the current trial and then calls Field's [new] cache_attributes() method. The same needs to happen in Process subclasses that cache attribute values or their values will not be updated with the values for the trial.
Processes that cache attributes should:
Create the method cache_attributes(self) which saves attributes values in instance variables.
Add definitions of all instance variables to __init__(), initializing these to None.
Call self.cache_attributes() from the appropriate place in the class' __init__() method.
Field
instances as well as many/most processes store the values of attributes in instance variables. The MCS process updates attributes with values for the current trial and then callsField
's [new]cache_attributes()
method. The same needs to happen inProcess
subclasses that cache attribute values or their values will not be updated with the values for the trial.Processes that cache attributes should:
cache_attributes(self)
which saves attributes values in instance variables.__init__()
, initializing these toNone
.self.cache_attributes()
from the appropriate place in the class'__init__()
method.