Traffic management optimization of railway networks