An ILP model and a hybrid heuristic for an energy management problem