  Optimal control of large particle systems with collective dynamics by few
agents is a subject of high practical importance (e.g. in evacuation dynamics),
but still limited mathematical basis. In particular the transition from
discrete optimal control to a continuum setting as the number of particles
tends to infinity is by far not fully understood. In this paper we contribute
to this issue by studying a canonical model of controlling an interacting
particle system into a certain spatial region by repulsive forces from few
external agents, which might be interpreted as shepherd dogs leading sheep to
their home.
  We discuss the appropriate modelling of such a problem and the associated
optimality systems, providing some connections between the Lagrange multipliers
in the discrete and continuum setting. As control strategies we investigate an
Instantaneous Control and a global Optimal Control approach.
  The solutions of a family of control problems for the particle system with
external agents are numerically compared to the mean-field controls as the
number of particles tends to infinity. In both cases, this leads to a high
dimensional phase space requiring tailored optimization strategies. All control
problems arising are solved using adjoint information to compute the descent
directions. The numerical results indicate the convergence of controls for both
optimization strategies.
