Cost-optimal retrofit analysis for residential buildings