Problems, models, and algorithms in data-driven energy demand management