Bang-bang and singular optimal controls in a fedbatch fermentation process are computed for a range of time horizons. Numerical algorithms for determining the optimal control structure and computing the switching times are presented. Second order sufficient optimality conditions and sensitivity of optimal solutions are discussed.