  Demand dispatch is the science of extracting virtual energy storage through
the automatic control of deferrable loads to provide balancing or regulation
services to the grid, while maintaining consumer-end quality of service (QoS).
  The control of a large collection of heterogeneous loads is in part a
resource allocation problem, since different classes of loads are valuable for
different services.
  The goal of this paper is to unveil the structure of the optimal solution to
the resource allocation problem and to investigate short term market
implications. It is found that the marginal cost for each load class evolves on
a two-dimensional subspace, spanned by an optimal costate process and its
derivative.
  The resource allocation problem is recast to construct a dynamic competitive
equilibrium model, in which the consumer utility is the negative of the cost of
deviation from ideal QoS. It is found that a competitive equilibrium exists,
with the equilibrium price equal to the negative of an optimal costate process.
Moreover, the equilibrium price is different from what would be obtained based
on the standard assumption that the consumer's utility is a function of power
consumption.
