There will be some data processing/crunching that can be done only once during a given simulation. This would typically be done in the initialise method of Component, then the information could be used in its run method as often as required. However, at the moment the only information that can be passed between initialise and run are the states initial conditions. The easiest way to make this possible would be to give Component a new attribute, e.g. called extra, pointing to a dictionary in which the component contributor can store any information they want computed once during the initialise call and retrieve it from this dictionary in run or even finalise.
There will be some data processing/crunching that can be done only once during a given simulation. This would typically be done in the
initialise
method ofComponent
, then the information could be used in itsrun
method as often as required. However, at the moment the only information that can be passed betweeninitialise
andrun
are the states initial conditions. The easiest way to make this possible would be to giveComponent
a new attribute, e.g. called extra, pointing to a dictionary in which the component contributor can store any information they want computed once during theinitialise
call and retrieve it from this dictionary inrun
or evenfinalise
.