An optimization algorithm for degraded traffic operation in high speed railway lines