An algorithm for incremental elastoplastic analysis using equality constrained sequential quadratic programming