- 📒 Table of Contents
- 📍 Overview
- 📂 Project Structure
- 🔎 Details of Codes
- 🚀 Getting Started
- 📝 Results
- 🤝 Collaborators
This repository contains an evolutionary approach to solving the Antenna Problem. The Antenna Problem involves finding the optimal configuration and placement of a set of antennas to achieve maximum users' satisfaction (Internet signal and speed in this case) in a given area. The goal of this project is to apply evolutionary algorithms to find a solution that maximizes the users' satisfaction while considering various constraints. Evolutionary algorithms mimic the process of natural selection to find an optimal solution within a given search space. By evolving a population of candidate antenna configurations over multiple generations, we can gradually converge towards an optimal solution.
The evolutionary algorithm implemented in this file follows a standard genetic algorithm framework. It involves the following steps:
-
Initialization: Generate an initial population of candidate antenna configurations randomly.
-
Evaluation: Evaluate each antenna configuration's fitness based on the users' satisfaction achieved and consider any constraints.
-
Selection: Select a subset of the population for reproduction based on their fitness. Better-performing solutions have a higher chance of being selected.
-
Crossover: Create new offsprings by combining the genetic material (parameters) of selected individuals.
-
Mutation: Introduce random changes in the offspring's genetic material to explore new areas of the search space.
-
Replacement: Replace some individuals in the population with the new offspring.
-
Termination: Check termination conditions, such as reaching a maximum number of generations or finding a satisfactory solution.
-
Repeat steps 2-7 until the termination conditions are met.
This code visualizes the best results of the evolutionary approach applied to the antenna problem.
Before you begin, ensure that you have the packages in requirements.txt
installed.
- Clone the Antenna_Problem_Evolutionary_Approach repository:
https://github.com/audrina-ebrahimi/Antenna_Problem_Evolutionary_Approach.git
- Change to the project directory:
cd Antenna_Problem_Evolutionary_Approach
- Install the dependencies:
pip install -r ./Codes/requirements.txt
-
Once the installation is complete, you can run the evolutionary algorithm to solve the Antenna Problem. Follow these steps:
-
Prepare the input data: The input data should include the blocks to be covered and their population. You can find it in blocks_population.txt.
-
Configure the algorithm parameters: You may need to set parameters such as the tower construction cost, tower maintanance cost, user satisfaction levels, and user satisfaction scores. You can find it in problem_config.txt.
-
Run the algorithm.
-
Analyze the results: Once the algorithm finishes, the best antenna configuration found will be displayed.
The results of running the code with different config for evolutionary algorithm can be found in the logs directory. This directory contains logs and plots which helps analyze the performance and quality of the solution found.