Stability calculations for jack-ups and semi-submersibles