A survey of gradient methods for solving nonlinear optimization