Optimizing Investment Decisions for Railway Systems Protection