Multi-agent systems for the dependability and safety of microgrids