calculation of ideal types using CVX