Algorithmic Resolution of Multiple Impacts in Non-smooth Mechanical Systems with Switching Constraints