  Controlling large particle systems in collective dynamics by a few agents is
a subject of high practical importance, e.g., in evacuation dynamics. In this
paper we study an instantaneous control approach to steer an interacting
particle system into a certain spatial region by repulsive forces from a few
external agents, which might be interpreted as shepherd dogs leading sheep to
their home. We introduce an appropriate mathematical model and the
corresponding optimization problem. In particular, we are interested in the
interaction of numerous particles, which can be approximated by a mean-field
equation. Due to the high-dimensional phase space this will require a tailored
optimization strategy. The arising control problems are solved using adjoint
information to compute the descent directions. Numerical results on the
microscopic and the macroscopic level indicate the convergence of optimal
controls and optimal states in the mean-field limit,i.e., for an increasing
number of particles.
