Using Simulated Annealing and Perceptron Classification
- Muath Hassoun – Computer Engineer
- Zeina Hanani – Computer Engineer
This project simulates an intelligent drone-based delivery system that finds the most cost-effective delivery route using Simulated Annealing, while avoiding locations with unsafe weather conditions predicted by a Perceptron classifier. Unsafe cities increase the delivery cost due to risk factors.
By completing this project, you will learn how to:
- Train and apply a Perceptron classifier for binary classification.
- Integrate classification output into decision-making algorithms.
- Implement Simulated Annealing to solve real-world optimization problems.
- Combine Machine Learning with path planning in delivery systems.
- Build an interactive Graphical User Interface (GUI) for input and visualization.
The project uses an Excel file: weather_data_linearly_separable.xlsx
- Samples: 200
- Features:
- Temperature (°C)
- Humidity (%)
- Wind Speed (km/h)
- Label:
SafeToFly:0→ Safe to fly1→ Unsafe to fly
- Train a Perceptron model using the provided dataset.
- Predict
SafeToFlylabel for new weather data.
- Generate
Ndelivery cities. - Assign each city:
- Random or user-defined weather values.
- 2D coordinates (X, Y).
- Use the Perceptron to predict if each city is safe or unsafe.
- Calculate Euclidean distance between all city pairs.
- Add a penalty cost (e.g.,
+50) for visiting cities predicted as unsafe.
- Generate a random initial route.
- Use Simulated Annealing to minimize the total delivery cost:
- Includes travel distance + unsafe location penalties.
Allow the user to input:
- Number of delivery cities
- Each city's:
- Coordinates (X, Y)
- Weather conditions:
- Temperature
- Humidity
- Wind Speed
- Simulated Annealing parameters:
- Initial temperature
- Cooling rate
- Show the initial route on a 2D plane with labels and total cost.
- Show the optimized route after Simulated Annealing:
- Highlight changes with different colors or line styles.
- Display the new total route cost.
- For each city, display:
- ✅ Safe (Green / Checkmark)
⚠️ Unsafe (Red / Warning Icon)
- Optionally display weather data in a table or popup.
Display a comparison between:
- Initial route cost (distance + unsafe penalties)
- Optimized route cost