Shape optimisation of residential mid-rise buildings for reduction of energy demand in temperate climate