Many diesel locomotives use rheostatic braking. During such braking, the diesel locomotive’s traction motor switches to the mode power generator, the electricity generated by the traction motor is transferred to the rheostat, where it is converted into the heat and the traction motor stops.