This repository contains several implementations of the Simulated Annealing (SA) metaheuristic applied to different optimization problems. The project is written in C++.
The implemented problems include:
- Benchmark function optimization **
- 0/1 Knapsack Problem
- Traveling Salesman Problem (TSP)
- Vehicle Routing Problem with Time Windows (VRPTW)
The goal of this project is to study and implement the Simulated Annealing algorithm as a general optimization method. SA is inspired by the physical annealing process, where a material is heated and then slowly cooled to reach a stable low-energy configuration.
In optimization, the algorithm explores the solution search space by accepting better solutions and, with a certain probability, also accepting worse solutions. This allows the algorithm to escape local optima and continue searching for better global solutions.
This project applies Simulated Annealing to both:
- Maximization problems, such as the Knapsack Problem.
- Minimization problems, such as the Traveling Salesman Problem and the Vehicle Routing Problem with Time Windows.
SimulatedAnnealingProject/
│
├── EvaluatingBechmarkFunctions/
│ ├── SAmain.cpp
│ └── SAmain.exe
│
├── KanaspackProblem/
│ ├── dataset/
│ ├── kp.cpp
│ ├── kp.exe
│ ├── objective_history.csv
│ ├── objective_weight_history.csv
│ └── value_weight_history.csv
│
├── TravelingSalesmanProblem/
│ ├── dataset/
│ │ └── d2/
│ ├── TSP.cpp
│ ├── TSP.exe
│ ├── TSPTesting.cpp
│ └── TSPTesting.exe
│
├── VRPTW/
│ ├── dataset/
│ ├── VRPTW.cpp
│ └── VRPTW.exe
│
└── README.md