  We derive novel algorithms for optimization problems constrained by partial
differential equations describing multiscale particle dynamics, including
non-local integral terms representing interactions between particles. In
particular, we investigate problems where the control acts as an advection
'flow' vector or a source term of the partial differential equation, and the
constraint is equipped with boundary conditions of Dirichlet or no-flux type.
After deriving continuous first-order optimality conditions for such problems,
we solve the resulting systems by developing a link with computational methods
for statistical mechanics, deriving pseudospectral methods in both space and
time variables, and utilizing variants of existing fixed point methods.
Numerical experiments indicate the effectiveness of our approach for a range of
problem set-ups, boundary conditions, as well as regularization and model
parameters.
