Automated liquid transfer optimization