In the same manner as we use Rail and Schedule generators we should introduce a Malfunction Generator.
This will be help to easily test different malfunction models in the future. Here we can add more complex malfunction models then the currently implemented.
I suggest using the same setup as with the rail and schedule generators. This would also help resolve the problem with saving and loading different parameters from pickle files as we could also write generators for this.