Production Cost Optimization in Industrial Wastewater Treatment