A matheuristic algorithm for a large-scale energy management problem