Text this: Exact Optimum Design of Segmented Thermoelectric Generators