Resumen: The present paper tackles the issue of allocating economic costs in trigeneration systems including thermal energy storage (TES) for buildings of the residential-commercial sector. As energy systems become more and more complex (multiple resources, products and technologies; joint production; TES) the issue of the appropriate way to allocate the cost of the resources consumed arises. This is important because the way in which allocation is made directly affects the prices of the products obtained and, thus, the consumers' behavior. Thermoeconomics has been used to explain the cost formation process in complex energy systems. In this paper, two issues in thermoeconomics that have not been deeply studied are addressed: (i) the joint production of energy services in dynamic energy systems; and (ii) the incorporation of TES. A thermoeconomic analysis of a simple trigeneration system including TES was performed and the hourly unit costs of the internal flows and final products were obtained for a day of the year. The cost allocation proposal considered that the cogenerated products must share the benefits of the joint production. Regarding the TES, the interconnection between charging and discharging periods was explored, allowing the discharged energy flow to be traced back to its production period. Idioma: Inglés DOI: 10.1016/j.energy.2018.04.012 Año: 2018 Publicado en: Energy 153 (2018), 170-184 ISSN: 0360-5442 Factor impacto JCR: 5.537 (2018) Categ. JCR: THERMODYNAMICS rank: 3 / 60 = 0.05 (2018) - Q1 - T1 Categ. JCR: ENERGY & FUELS rank: 15 / 103 = 0.146 (2018) - Q1 - T1 Factor impacto SCIMAGO: 2.048 - Building and Construction (Q1) - Civil and Structural Engineering (Q1) - Electrical and Electronic Engineering (Q1) - Pollution (Q1) - Industrial and Manufacturing Engineering (Q1) - Mechanical Engineering (Q1) - Energy (miscellaneous) (Q1)