https://github.com/nikhil97353/travelling-thief-problem-genetic-algorithm-_approach
This project solves the GECCO19 Traveling Thief Problem (TTP) using a Multi-objective Evolutionary Algorithm (MOEA) to optimize both travel time (TSP) and profit (KNP) with advanced crossover, mutation, and selection operators
https://github.com/nikhil97353/travelling-thief-problem-genetic-algorithm-_approach
crossover-operator evolutionary-algorithms knapsack-problem mutation npproblem optimization-algorithms shortest-path-algorithm travelling-salesman-problem travelling-thief-problem
Last synced: 7 months ago
JSON representation
This project solves the GECCO19 Traveling Thief Problem (TTP) using a Multi-objective Evolutionary Algorithm (MOEA) to optimize both travel time (TSP) and profit (KNP) with advanced crossover, mutation, and selection operators
- Host: GitHub
- URL: https://github.com/nikhil97353/travelling-thief-problem-genetic-algorithm-_approach
- Owner: nikhil97353
- Created: 2024-08-22T02:17:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-06T18:07:30.000Z (about 1 year ago)
- Last Synced: 2025-01-11T06:45:18.344Z (9 months ago)
- Topics: crossover-operator, evolutionary-algorithms, knapsack-problem, mutation, npproblem, optimization-algorithms, shortest-path-algorithm, travelling-salesman-problem, travelling-thief-problem
- Language: Jupyter Notebook
- Homepage:
- Size: 5.77 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Genetic-Algorithm-approach-to-Travelling Thief Problem
The GECCO19 Traveling Thief Problem (TTP) combines two NP-hard problems - the Traveling Salesman Problem (TSP) and the Knapsack Problem (KNP). TSP focuses on finding the shortest distance for a traveling salesman to visit each city and return to the original city, while KNP focuses on maximizing the value of the thief's backpack while minimizing the backpack weight below the backpack weight capacity. This project will combine the two problems Optimize in order to obtain an optimal solution.Key Features:
Dynamic Fitness Calculation: Computes the traveling time based on the thief's speed, which decreases as more items are added to the knapsack.
2-Opt Algorithm: Implements the 2-opt algorithm to improve the route by swapping city pairs for shorter travel time.
Profit Maximization: Ensures optimal profit by selecting the most valuable items without exceeding the knapsack capacity.Algorithm Overview:
The core of this solution is a Multi-objective Evolutionary Algorithm (MOEA). It includes:Initial Population Generation: Random generation of individuals (TSP routes and selected items for the knapsack).
Selection Operators: Tournament selection and Roulette Wheel selection to choose parents.
Crossover Operators: Two-point crossover and ordered crossover for TSP and single-point crossover for the knapsack problem.
Mutation Operators: Inversion mutation for TSP routes and flipping mutation for knapsack items.
Pareto Front: A set of non-dominated solutions representing the best trade-offs between objectives.
Crowding Distance: Used for sorting solutions in the Pareto front based on how spread out they are.## How to Use the Project
### Code Execution:
1. Clone the repository:
```bash
git clone https://github.com/yourusername/TTP-Optimization.git
cd TTP-Optimization
2. Run the provided Python script:
```bash
evolutionary_algorithm.py
Conclusion:
The project utilized a Genetic Algorithm to solve the TSP with additional constraints. Several iterations and improvements were made to enhance the algorithm's performance in handling constraints while maximizing profits. The final implementation offers a trade-off between exploration and exploitation for an optimal solution.References:
Research papers and articles on Genetic Algorithms, Travelling Salesman Problem, and optimization with constraints.
Python documentation for necessary libraries.