Added regularization to simplex algorithm