A multiagent system for microgrids | Synapse