 If the power supply to the locomotive was interrupted (e.g.because of a gap in the third rail at a junction) the flywheel would power the MG set for a short period to bridge the gap.During this period, the motor of the MG set would temporarily run as a generator.