A software tool for optimised maintenance of electric locomotives