A Variational Formulation for a Human Migration Problem