The execution sequence of the plugins and steppables


51
views
0
5 weeks ago by
Yuan  
The following is the pseudo-code of CC3D. My question is what is the execution sequences of the plugins and steppables?   Are the sequences impacting on the results? What should I do if I want to make the steppables run in my sequence?

Community: CompuCell3D

2 Answers


2
5 weeks ago by
One way to enforce a particular ordering of steppables would be to simply include them all in a single steppable. You then have complete flow control in python.
Yeah, a good idea! Thank you so much!
written 5 weeks ago by Yuan  
2
4 weeks ago by
Steppables are executed in the same order in which they are aded to steppableRegistry. So in your main python file you typically see the following
from scientificHistBarPlotsSteppables import HistPlotSteppable
histPlotSteppable=HistPlotSteppable(_simulator=sim,_frequency=1)
steppableRegistry.registerSteppable(histPlotSteppable)

from scientificHistBarPlotsSteppables import BarPlotSteppable
barPlotSteppable=BarPlotSteppable(_simulator=sim,_frequency=1)
steppableRegistry.registerSteppable(barPlotSteppable)

CompuCellSetup.mainLoop(sim,simthread,steppableRegistry)​
 which means that barPlotSteppable will be executer AFTER histPlotSteppable because it was added to steppebleRegistry later in the code.

And Yes, in certain situations the order of steppables may impact your results so you need to keep an eye on that
BTW, what about the order of plugins?
written 4 weeks ago by Yuan  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »