Safety-Aware Route Optimization Using Graph
Theory and Real-Time Data
Arya R Pranjal Vishal Usulkar
Department of Information Science Department of Information Science
R V College of Engineering R V College of Engineering
[email protected] [email protected] 3. Modified Dijkstra’s Algorithm: Prioritizes safety
Abstract—Traditional navigation systems prioritize metrics over distance.
shortest distance or fastest time, often ignoring safety
concerns. This paper proposes a safety-aware routing system 4. Graph Neural Networks (GNNs): Predicts future
that modifies Dijkstra’s Algorithm to consider real-time safety safety risks based on historical data trends.
metrics such as crime data, surveillance presence, and
5. Integration with Smart Devices: Uses IoT and
lighting conditions. Inspired by network security principles,
mobile applications for real-time safety alerts.
we introduce trust levels (firewalls), anomaly detection
(Intrusion Detection System), and latency (crime-based
delays) to optimize for safety. Our method leverages IoT, AI, 2. RELATED WORK
and Graph Neural Networks (GNNs) to ensure dynamic and
adaptive safety-aware routing in smart city environments. Previous research in safety-aware navigation systems has
The implementation utilizes multiple tools, including OSNMX limitations:
for road network extraction, NetworkX for shortest path
computation, GeoPandas for geospatial modifications, QGIS Emergency Button-Based Systems: Requires user
intervention, limiting real-time prevention.
for visualization, and Folium for interactive mapping.
Qualitative Safety Ratings: Many studies assign
Keywords—Safe Route Planning, Dijkstra’s Algorithm, “high,” “medium,” or “low” safety scores, which
Network Security, Graph Theory, Smart Cities, IoT, AI. lack numerical accuracy.
Static Safety Weights: Existing systems often fail
1. INTRODUCTION to consider time-based and environmental factors
Urban areas face increasing safety challenges, particularly dynamically.
for vulnerable groups such as women traveling alone.
This study addresses these gaps by integrating IoT-enabled
Existing navigation applications primarily focus on distance
real-time crime data and AI-driven predictive analytics into
and time efficiency, disregarding security risks. This paper
a dynamic safety routing model.
introduces a safety-based routing approach that integrates
real-time data and security-inspired metrics to provide safer
travel options.
2. METHODOLOGY
Problem Statement: Given a road network with dynamically A. Graph Representation of Road Network
changing safety conditions, determine the safest route
between two locations based on real-time data. Nodes (Vertices): Intersections, IoT sensors, bus
stops.
Edges: Roads, pedestrian paths.
Contributions: Edge Weights: Safety scores computed based on
crime rate, lighting, and surveillance coverage.
1. Trust-based Road Network: Assigns safety scores
to roads based on crime reports, police presence, B. Security-Inspired Safety Metrics
streetlights, and CCTV coverage.
1. Trust Levels: Roads act like network firewalls, where
2. Real-time Intrusion Detection: Uses crime data safer roads receive higher trust scores.
monitoring similar to an IDS in cybersecurity. 2. Intrusion Detection System (IDS): Real-time crime
activity is monitored like an IDS flags unusual
network behavior.
3. Latency (Risk Scores): Crime-prone areas introduce Tools Used: Python, OSNMX, NetworkX, GeoPandas,
delays, analogous to network latency.
QGIS, Folium, Google Maps API.
C. Modified Dijkstra’s Algorithm Test Scenario: Compare shortest-path routing vs.
Traditional Dijkstra’s Algorithm finds the shortest path. We safety-aware routing in a city dataset.
modify it to prioritize safety scores instead: C. Evaluation Metrics
Input: Graph with dynamic edge weights. Route Safety Index (RSI): Measures cumulative safety
Algorithm: score along the route.
1. Initialize all nodes with infinite safety risk.
Travel Time Trade-Off: Compares efficiency loss
2. Assign real-time safety scores to edges.
when prioritizing safety.
3. Select the safest path with minimal risk.
Output: Optimal route balancing safety and travel User Acceptance Rate: Surveys on perceived safety
time. improvement.
Accuracy of Safety Predictions: Validates AI-based
safety scoring with real-world crime incidents.
D. Tools and Technologies Used
1. OSMnx - Extracts road network data from D. Visualization and Deployment
OpenStreetMap. QGIS and Folium - Used for creating interactive route
2. NetworkX - Performs graph-based shortest path maps.
Web & Mobile Interface - User-friendly platform for
computation.
safe route navigation.
3. GeoPandas - Processes and modifies geospatial data Real-time Alerts - Notification system for crime-
for safety weight adjustments. prone areas and alternative route suggestions.
4. QGIS - Visualizes datasets and safety metrics.
5. Folium - Creates interactive safety-aware maps for
end-user visualization.
6. Python (Pandas, NumPy, Scikit-learn, Matplotlib,
Seaborn) - For data processing, statistical analysis,
and machine learning-based safety predictions.
7. Graph Neural Networks (GNNs) - Predicts future
safety conditions based on historical trends.
8. IoT Integration - Uses smart sensors, wearables, and
real-time crime data APIs.
9. Mobile App Integration - Sends safety route
recommendations to users.
10. Google Maps API & OpenStreetMap - Provides base
mapping layers and real-time road data.
A. Data Sources
V. CONCLUSION AND FUTURE WORK
Crime Reports: Government and open-source APIs. This study presents a novel approach to safety-aware
IoT Sensors: Smart streetlights, CCTVs, and routing by integrating network security concepts into
emergency buttons. transportation networks. The proposed system
User Feedback: Crowdsourced safety ratings. effectively prioritizes safety while maintaining efficiency.
Historical Crime Data: Used for AI model training and Future work will explore:
future risk prediction.
B. Experimental Setup
Integration with Wearables: Smartwatch alerts [7] "Abhaya: An Android App for the Safety of
for unsafe zones. Women." International Journal of Engineering Research
& Technology (IJERT).
Enhanced AI Models: Deep learning for more
[8] 'Street Smart': Safe Street App for Women Using
accurate crime risk prediction. Augmented Reality. Proceedings of the International
Scalability: Expansion to multiple cities and Conference on Augmented Reality and Safety
Technologies.
diverse urban settings.
Edge Computing for Real-Time Analysis:
Processing safety data at the device level to
improve response time.
Multi-Modal Transport Safety Analysis:
Extending safe routing to public transport and
pedestrian pathways.
REFERENCES
[1] Venkatesh, K., Parthiban, S., Kumar, P. S., & Kumar,
C. V. (2021). "IoT-based unified approach for women
safety alert using GSM," 2021 Third International
Conference on Intelligent Communication Technologies
and Virtual Mobile Networks (ICICV), IEEE, 2021.
[2] Ashok, K., Gurulakshmi, A. B., Prakash, M. B.,
Poornima, R. M., Sneha, N. S., & Gowtham, V. (2022). "A
survey on design and application approaches in women-
safety systems," 2022 8th (ICACCS), IEEE, 2022.
doi:10.1109/ICACCS54159.2022.9785061.
[3] Abdulla, R., & Rana, M. E. (2023). "Architectural
design and recommendations for a smart wearable
device for women's safety," 2023 15th International
Conference on Developments in eSystems Engineering
(DeSE), IEEE, 2023.
doi:10.1109/DeSE59202.2023.10115735.
[4] Kohli, P., Singh, K., & Sidhu, B. K. (2023). "An
intelligent women safety app for educational campus,"
Computer Applications in Engineering Education, 2023.
doi:10.1002/cae.22499.
[5] Yarrabothu, R. S., & Thota, B. (2015). "Abhaya: An
Android app for the safety of women," 2015 Annual IEEE
India Conference (INDICON), IEEE, 2015.
doi:10.1109/INDICON.2015.7443652.
[6] "Safety App: Crime Prediction Using GIS."
International Journal of Advanced Research in Computer
Science and Software Engineering.