The basic target of the DR mechanism, in a
microgrid or VPP, is to keep the total load created by a set of M consumers below the capacity produced by the N prosumers (N M) or to enable dynamic energy management according to real time pricing signals. The decision variables and constraints of the DR problem can be modelled according to the user oriented comfort constraints a, d, Tmin and Tmax.