Development of a building energy model suitable for MILP. Verification according to ASHRAE standard and more detailed models. Application to retrofitting of a residential building. Energy system modifications appear more cost effective than envelope retrofits.