An iterative method for shakedown analysis