—In this paper we describe a framework for the optimal control of delay tolerant mobile ad hoc networks where multiple classes of nodes co-exist. We specialize the description of the energy-delay tradeoffs as an optimization problem based on a fluid approximation. We then adopt two product forms to model message diffusion and show that optimal controls are of bang-bang type. Under this general framework, we analyze some specific cases of interest for applications.