18kw/100 m = 180kw/km
The most powerful Swiss electric locomotive [1] maxes out at 7900kw. That's 44km of track.The most common Swiss electric (4/4) typicaly maxes at 6100kw requiring up to 34km of track.
Switzeraland has about 5000km of track and 180 is about 200, so a million kilowatts if all the track has solar panels.
Assuming 3000kw per locomotive and 100% efficiency [2], that's 300 electrical locomotives running simultaneously. The Swiss fleet is about four times that.
---
Of course I am no expert.
[1] https://en.wikipedia.org/wiki/List_of_stock_used_by_Swiss_Fe...
[2] and ignoring the 10 per year efficiency loss of the panels mentioned in the article