Bugfix: `agent.malfunction_data['next_malfunction'] ` can be below zero.
Reported by @vetrov_andrew (https://discourse.aicrowd.com/t/suggestion-bug-fix-of-flatland-2-0/1966)
I found that sometimes agent.malfunction_data['next_malfunction'] parameter can be below zero. It happens when the next malfunction for a single agent occurs before current ended (I can send a simulation code, if you want). So, a flatland user have to write one extra line to find out a next_malfunction value. Personally I use this code:
next_malfunction = max(self.env.agents[ind].malfunction_data['next_malfunction'], self.env.agents[ind].malfunction_data['malfunction'] + 1)
Edited by Christian Eichenberger