Development Of Robust Three-Phase Equilibrium Calculation Algorithms For Complex Reservoir Fluids