A market-based framework for demand side flexibility scheduling and dispatching. (June 2018)