This paper deals with the modeling of the long term evolution of regional energy systems in a smart city and smart grid environment. It is shown that demand response and distributed grid energy storage, driven by dynamic pricing schemes, based on locational marginal costs, can be represented in the linear programming framework of the models of the MARKAL/TIMES family. An implementation in the ETEM-SG modeling tool, which is an energy model tailored to the representation of regional energy systems is then described. An illustration is provided, based on energy scenarios concerning the Arc L ́emanique region in Switzerland. Finally the SESCOM modeling framework, which is under development in a project on smart energy systems for smart cities in Qatar is introduced. This modeling approach expands ETEM-SG to the representation of useful energy demands influenced by changes in life styles, smart transmission and interconnection between regions and market price revelation at distribution levels .