Emergency Services Deployment optimisation using DSM for maximizing coverage, minimizing the response time for Fatal Accidents on Hyderabad Outer Ring Road 🛣️
- Algorithms and Source Codes
- Outputs as .csv
- Execution Guide
- Reference materials
- Presentation discussing the solution
Welcome to the Ambulance Optimization repository! This project aims to optimize the deployment of ambulances on highways using accident clustering data and mathematical optimization.
This repository contains several modules to process raw data, cluster demand points, calculate travel times, and optimize ambulance deployment using the PuLP library. Below is a step-by-step guide on how to run each module on a custom dataset.
- Pre-processing
- Clustering
- OD Time Matrix
- PuLP Optimization Module
- Additional Resources
- Installation
- Contributing
- License
This module maps accident chainage to the nearest equipment's latitude and longitude. Use this step if your dataset lacks accident lat-lon and frequency.
Accident_Chainage
Accident_Frequency
Equipment_Chainage
Equipment_Lat
Equipment_Lon
.csv
file withAccident_Chainage
,Accident_Lat
,Accident_Lon
- Prepare your raw dataset with the mandatory fields.
- Run the pre-processing script:
python pre_processing.py --input <path_to_raw_dataset> --output <path_to_processed_output>
This module clusters the processed accident data to form demand points.
Accident_Chainage
Accident_Lat
Accident_Lon
.csv
file withCluster_ID
,Demand_Point_Lat
,Demand_Point_Lon
,Demand_Frequency
- Ensure you have the processed dataset from the Pre-processing step.
- Run the clustering script:
python clustering.py --input <path_to_processed_dataset> --output <path_to_demand_points_output>
This module calculates the shortest travel time from each ambulance location to each demand point.
- Ambulance locations with fields:
Ambulance_ID
,Ambulance_Lat
,Ambulance_Lon
- Demand points with fields:
Demand_Point_ID
,Demand_Point_Lat
,Demand_Point_Lon
.csv
file withAmbulance_ID
,Demand_Point_ID
,Travel_Time
- Prepare your dataset with ambulance locations and demand points.
- Run the OD Time Matrix script:
python od_time_matrix.py --ambulance <path_to_ambulance_locations> --demand <path_to_demand_points> --output <path_to_od_matrix_output>
This module uses mathematical optimization to maximize the coverage of each demand point with the given primary (r1) and secondary (r2) response times and alpha reliability.
- OD Time Matrix from the previous step with fields:
Ambulance_ID
,Demand_Point_ID
,Travel_Time
- Additional parameters:
Primary response time (r1)
,Secondary response time (r2)
,Alpha reliability
- Optimized ambulance deployment plan including fields:
Ambulance_ID
,Assigned_Demand_Point_ID
- Ensure you have the OD Time Matrix from the previous step.
- Define your primary and secondary response times, and alpha reliability.
- Run the optimization script:
python pulp_optimization.py --input <path_to_od_matrix> --r1 <primary_response_time> --r2 <secondary_response_time> --alpha <alpha_reliability> --output <path_to_optimization_output>
- Comparison of each optimization iteration with old ambulance deployment:
- Loop iteration for multiple parameters and visualization:
Clone the repository and install the required dependencies:
git clone https://github.com/AGAMPANDEYY/Ambulance-Optimisation-EfkonStrabag.git
cd Ambulance-Optimisation-EfkonStrabag
source venv-efkon/bin/activate