optimal discharge