Modified simplex algorithm