Stochastic Optimization Model for Sustainable Water Treatment with Minimal Energy Use