Augmented Lagrangian methods represent an efficient way to carry out the forward-dynamics simulation of mechanical systems. These algorithms introduce the constraint forces in the dynamic equations of the system through a set of multipliers. While most of these formalisms were obtained using Lagrange's equations as starting point, a number of them have been derived from Hamilton's canonical equations. Besides being efficient, they are generally considered to be robust, which makes them especially suitable for the simulation of systems with discontinuities and impacts. In this work, we have focused on the simulation of mechanical assemblies that undergo singular configurations. First, some sources of numerical difficulties in the proximity of singular configurations were identified and discussed. Afterwards, several augmented Lagrangian and Hamiltonian formulations were compared in terms of their robustness during the forward-dynamics simulation of two benchmark problems. Newton-Raphson iterative schemes were developed for these formulations with the Newmark formula as numerical integrator. These outperformed fixed point iteration approaches in terms of robustness and efficiency. The effect of the formulation parameters on simulation performance was also assessed.