Text this: Optimization of traction power supply system modes by voltage and reactive power to reduce losses