As with @tofuSCHNITZEL's implementation, there seem to be issues if you restart it at a time when there are no departures.