optimal management of demand