Optimization-based identification of potential for demand-side management