Regulatory-framework-embedded energy management system for microgrids: The case study of the Spanish self-consumption scheme | Publicación