'Run simulation loops and reschedule callbacks.'

def simulate(self):

    if (self._simtag is not None):
        self._source_remove(self._simtag)
    self.iterate()
    timeout = min(self.timeout(), 0.01)
    if (timeout is None):
        timeout = 0.01
    self._simtag = self._timeout_add(int((timeout * 1000)), self.simulate, priority=self._glib.PRIORITY_DEFAULT_IDLE)
