Precise case study of CHP investment capacity and timing over a 30-year horizon. Merged operational control and capacity planning optimization. Uncertainty analysis gives distribution for boiler and turbine capacity. Characteristic winter and summer diurnal cycles data for electricity and heat. Dynamic optimization of planning with mixed integer nonlinear programming.