  We consider optimal swarm control problems where two different classes of
agents are present. Continuum idealizations of large-scale swarms are used
where the dynamics describe the evolution of the spatially-distributed
densities of each agent class. The problem formulation we adopt is motivated by
applications where agents of one class are assigned to agents of the other
class, which we refer to as demand and resource agents respectively.
Assignments have costs related to the distances between mutually assigned
agents, and the overall cost of an assignment is quantified by a Wasserstein
distance between the densities of the two agent classes. When agents can move,
the assignment cost can decrease at the expense of a physical motion cost, and
this tradeoff sets up a nonlinear, infinite-dimensional optimal control
problem. We show that in one spatial dimension, this problem can be converted
to an infinite-dimensional, but decoupled, linear-quadratic (LQ) tracking
problem when expressed in terms of the respective quantile functions. Solutions
are given in the general one-dimensional case, as well as in the special cases
of constant and periodically time-varying demands.
