An equation analyzer package for the manipulation of mathematical expressions—II: Application to nonlinear optimization