Optimization of column distillation in a wastewater treatment plant