>>1172637Can take as long as a week, or can take several months. It really depends on multiple factors.
Let's take an example. Let's say we want to electrify the Northern Ireland Railways network (because that's my local system and it's what I'm most familiar with).
There are no existing electrification systems, nor are there any other systems in place. The first issue is the building of substations to supply the overhead lines with power. That can take several months to plan, buy land, get permission from authorities and then build. Then there's the issue of safety certification. One more problem, if the power grid (the Irish Grid of Northern Ireland and the Republic of Ireland) cannot generate enough power for the overhead lines, then there will need to be new power generation methods installed, most likely a power station, but since that's becoming more difficult to get permission for a gas, oil or even a coal power station, that won't be an option, really.
Once that's done, and power can be supplied, then the next problem are the railways itself. Big problem is dealing with level crossings, and either planning ways for traffic to bypass level crossings, or for tunnels or bridges to be built to enable tall vehicles to cross over rail lines. Those can take weeks, probably something like 6-8 weeks to build, but before that there's the planning, the land acquisition, etc. etc. etc.
Next problem is the low Victorian era infrastructure being an issue, by which I mean bridges over lines, bridges for trains, tunnels and viaducts. Those will have to be analysed to see if an EMU with a pantograph can fit with an overhead line still above. That can take months, and if any of those won't have the space, then options will need to be drafted, such as lifting the rail lines, digging deeper, then relying the line so that there's more clearance. With tunnels which date back to the Victorian era, then the tunnels may need to be redone, which can take months, maybe years.