Improving the operation of medium voltage networks through optimal management of generation, energy storage and transformer ratio | Synapse