Smart Building Emergency Exit Mapping App Design Using OOD Concepts
The Smart Building Emergency Exit Mapping App aims to enhance building safety by providing real-time emergency exit information, real-time location tracking, and route optimization during emergencies. The app utilizes object-oriented design (OOD) principles to ensure scalability, maintainability, and efficiency.
1. System Overview
The app will help building occupants, such as employees, tenants, or visitors, during emergencies by offering the following key features:
-
Real-time location tracking: Identifies user location within the building.
-
Dynamic exit mapping: Provides real-time optimal emergency exit routes based on current location and environmental conditions.
-
Real-time updates: Offers up-to-date information about blocked or inaccessible exits, fire alarms, or hazards.
-
Personalized alerts: Sends notifications with clear guidance and instructions based on user preferences or needs.
2. Key Object-Oriented Design Principles
The app will be structured around core object-oriented design principles:
-
Encapsulation: Each component will be designed as an independent class that encapsulates its own attributes and methods.
-
Inheritance: Different types of users (e.g., regular users, building admins, emergency responders) will inherit from a base user class.
-
Polymorphism: The system will use polymorphic methods to allow flexible behavior based on specific requirements (e.g., route adjustments).
-
Abstraction: Complex system functionalities will be abstracted into higher-level classes to make the code simpler and maintainable.
3. Core Components
The system can be broken into several components, each represented by classes with well-defined responsibilities. These include:
-
User Class
-
Building Class
-
EmergencyExit Class
-
Route Class
-
Sensor Class
-
Alert Class
-
Admin Class
3.1 User Class
The User class is responsible for managing the user’s identity and preferences.
-
Attributes:
-
userID -
userType(e.g., Visitor, Tenant, Emergency Responder) -
currentLocation -
emergencyPreferences
-
-
Methods:
-
getCurrentLocation() -
updatePreferences() -
receiveAlert()
-
3.2 Building Class
The Building class represents the overall structure of the building.
-
Attributes:
-
buildingID -
totalFloors -
emergencyExits(list ofEmergencyExitobjects) -
sensors(list ofSensorobjects)
-
-
Methods:
-
getExitsForFloor() -
getNearestExit()
-
3.3 EmergencyExit Class
The EmergencyExit class represents an emergency exit point in the building.
-
Attributes:
-
exitID -
floor -
capacity -
status(e.g., Open, Blocked, Maintenance)
-
-
Methods:
-
checkAvailability() -
getExitStatus()
-
3.4 Route Class
The Route class is responsible for managing the path from the user’s current location to the nearest emergency exit.
-
Attributes:
-
startLocation -
endLocation(nearestEmergencyExit) -
routeMap(data structure representing the path) -
estimatedTime
-
-
Methods:
-
calculateRoute() -
updateRoute()
-
3.5 Sensor Class
The Sensor class monitors the building’s environment for potential hazards.
-
Attributes:
-
sensorID -
sensorType(e.g., Smoke, Fire, Motion) -
status(e.g., Active, Inactive)
-
-
Methods:
-
detectHazard() -
alertEmergencyResponders()
-
3.6 Alert Class
The Alert class handles user notifications during emergencies.
-
Attributes:
-
alertType(e.g., Evacuation, Fire, Gas Leak) -
alertMessage -
alertTimestamp
-
-
Methods:
-
sendAlertToUser() -
generateAlertMessage()
-
3.7 Admin Class
The Admin class manages emergency system configurations, system health checks, and real-time updates.
-
Attributes:
-
adminID -
adminType(e.g., Building Manager, Emergency Response Team) -
controlCenterStatus
-
-
Methods:
-
monitorBuildingHealth() -
updateExitAvailability()
-
4. App Flow
-
User Login: A user opens the app and logs in. The system determines whether the user is a visitor, tenant, or emergency responder.
-
Location Tracking: The system continuously tracks the user’s current location within the building via the user’s device.
-
Route Calculation: Upon detecting an emergency (e.g., fire alarm), the app calculates the nearest exit route. It considers the user’s location, the status of exits (using
EmergencyExit), and possible hazards. -
Dynamic Updates: If an exit is blocked due to fire or other hazards (detected by the
Sensorclass), the system recalculates the safest route and notifies the user. -
Alerts: The user receives real-time alerts on their screen, with details on their exit route and safety instructions.
-
Admin Monitoring: Building admins and emergency responders are able to monitor the situation in real-time, updating exit availability and directing emergency teams.
5. Design Diagrams
A few UML diagrams would help further clarify the system’s design. Here’s a basic overview:
5.1 Class Diagram
5.2 Sequence Diagram
-
User Triggering Emergency Alert:
-
User logs in.
-
Building system detects emergency (e.g., smoke).
-
The app calculates nearest exit.
-
Alert sent to the user with exit details.
-
User receives dynamic updates if exits are blocked or rerouted.
-
6. Technologies and Frameworks
The app would need the following technologies:
-
Frontend: React Native (for cross-platform mobile app development)
-
Backend: Node.js with Express
-
Real-Time Communication: WebSockets (for dynamic route updates and alerts)
-
Database: MongoDB (for storing building, user, and sensor data)
-
Geospatial Data: Google Maps API or custom GIS for route mapping
-
Notification: Firebase Cloud Messaging (for sending real-time alerts)
7. Scalability & Extensibility
As the system grows or as more buildings are added, the architecture supports:
-
Multi-building support: Each building instance will be a separate object, easily scalable.
-
User-specific preferences: The system can be extended to handle personalized preferences based on user roles and emergency needs.
-
Smart sensor integration: Future integration with advanced IoT devices for better environmental hazard detection.
By adhering to these object-oriented principles, this design ensures that the app is modular, maintainable, and scalable. Each component can evolve independently, ensuring ease of future updates and feature additions.