Title: A dynamic programming solution to optimisation of pumping costs