# The execution sequence of the plugins and steppables

121
views
0
9 months ago by
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?

2
9 months 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 9 months ago by Yuan
2
9 months 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 9 months ago by Yuan