On every railway yoke (for the overhead wiring) there could be placed a windmill. When a train passes it would cause this mill to spin and generate energy which could then directly be guided into the energy network that provides the trains with power.