Electric locomotives in a rail yard