Gomes, LuisSpínola, JoãoVale, ZitaCorchado, Juan M.2021-09-232021-09-2320190959-6526http://hdl.handle.net/10400.22/18509Microgrids and smart grids are largely accepted concepts in power energy systems. They bring an innovative and distributed view to the old centralized system. This demands a more active participation from end-consumers, that can be achieved by using demand response and demand side management. In this paper it is proposed a solution for demand side management involving and agent-based architectures that was deployed in a small office. The deployment integrated an algorithm for generation and consumption balance with real-time contextual resources' priorities. The deployment's overall results, from a winter and a summer day, are presented in this paper.engDemand-side managementLoad optimizationLoad priorityRealtime optimizationAgent-based architecture for demand side management using real-time resources’ priorities and a deterministic optimization algorithmjournal article10.1016/j.jclepro.2019.118154