District energy dispatch optimization