Optimal control of the reaction-diffusion process on directed networks.