Hamiltonian Formalism for the Problem of Optimal Motion Control under Multiple Criteria