A min-max procedure for the shakedown analysis of skeletal structures