A control strategy for district energy management