Maintenance modelling and applications