We provide an introduction to ETEM-SG, a robust linear programming approach specifically designed for regional energy systems analysis. This model can be used to provide prospective analyses of the long-term (30 years and more) evolution of multi-energy regional energy systems in their transition to sustainability. The model assumes that this transition will occur in a smart city environment. It takes into consideration the constraints associated with intermittent and volatile renewable energy sources connected at the transmission and distribution networks. It also takes into account the opportunity to optimize grid friendly flexible loads and distributed energy resources encountered in modern power systems. A case study of a European regional energy system shows how our approach can quantify the ability of flexible loads and distributed energy resources to facilitate and foster the penetration of variable renewable energy sources, like solar and wind.