Multi-stage linear programming optimization for pump scheduling