Optimization of a Water Purification Process