Agent-Oriented Approach for Detecting and Managing Risks in Emergency Situations