A Technology Selection and Operation (TSO) optimisation model for distributed energy systems: Mathematical formulation and case study. (15th October 2016)