Instead of working with coroutines (and yield statements) it is possible to run salabim in yieldless mode.
This means, instead of
yield self.passivate() yield from self.double_hold(2) item = yield self.from_store(my_store)
,you can just use
self.passivate() self.double_hold(2) item = self.from_store(my_store)
And things like
do not change.
The yieldless version is the default, so just have to use :
In order to run yieldless, do
import salabim as sim
import salabim as sim sim.yieldless(True)
We refer to the yieldless documentation for details.