Risk-based optimal scheduling of maintenance activities in a railway network