Numerical solution of dynamical systems with equality state-space constraints