Diesel locomotive
Diesel locomotives offer significant operating advantages over steam locomotives. They can safely be operated by one person, making them ideal for switching/shunting duties in yards (although for safety reasons many main-line diesel locomotives continue to have 2-man crews: an engineer and a conductor/switchman) and the operating environment is much more attractive, being quieter, fully weatherproof and without the dirt and heat that is an inevitable part of operating a steam locomotive. Diesel locomotives can be worked in multiple with a single crew controlling multiple locomotives in a single train — something not practical with steam locomotives. This brought greater efficiencies to the operator, as individual locomotives could be relatively low-powered for use as a single unit on light duties but marshaled together to provide the power needed on a heavy train. With steam traction a single very powerful and expensive locomotive was required for the heaviest trains or the operator resorted to double heading with multiple locomotives and crews, a method which was also expensive and brought with it its own operating difficulties.
Electric locomotive
Electric locomotives benefit from the high efficiency of electric motors, often above 90% (not including the inefficiency of generating the electricity). Additional efficiency can be gained from regenerative braking, which allows kinetic energy to be recovered during braking to put power back on the line. Newer electric locomotives use AC motor-inverter drive systems that provide for regenerative braking. Electric locomotives are quiet compared to diesel locomotives since there is no engine and exhaust noise and less mechanical noise. The lack of reciprocating parts means electric locomotives are easier on the track, reducing track maintenance. Power plant capacity is far greater than any individual locomotive uses, so electric locomotives can have a higher power output than diesel locomotives and they can produce even higher short-term surge power for fast acceleration. Electric locomotives are ideal for commuter rail service with frequent stops. Electric locomotives are used on freight routes with consistently high traffic volumes, or in areas with advanced rail networks. Power plants, even if they burn fossil fuels, are far cleaner than mobile sources such as locomotive engines. The power can also come from clean or renewable sources, including geothermal power, hydroelectric power, nuclear power, solar power and wind turbines.