Maintenance optimisation for multipurpose production plants