This project implements a simulation to optimize race strategies using the Artificial Bee Colony (ABC) algorithm. The program is designed to minimize total race time by determining the optimal pitstop timing, tire selection, and fuel strategy under varying weather and track conditions.
-
Artificial Bee Colony (ABC) Algorithm:
- Utilizes exploration and exploitation to find the best race strategy.
- Dynamically adapts to weather changes, tire wear, and other conditions.
-
Dynamic Simulation:
- Simulates real-world racing scenarios including wet and dry tracks.
- Models tire performance degradation and fuel consumption.
-
Configurable Parameters:
- Adjust bee count, iteration limits, and race-specific configurations for experimentation.
-
Visualization:
- Provides visual feedback on optimization progress and results.
-
Multiprocess testing:
- Better CPU utilization through parallel processing. Reduced time for tests.
Parameters (Number of tests, Iterations, Bees, Food) Previous Time (Single process) New Time (Multiprocessing) 50, 30, 30, 30
🕰️ 55 minutes 50 seconds ⚡ 26 minutes 48 seconds
- Better CPU utilization through parallel processing. Reduced time for tests.
Generate Race Data to optimize:
python racegenerator.py
To start algorithm on generated data use:
python ABCalgorithm2.py
Minimization of the total race time:
- Tlap(lap): Lap time, dependent on various parameters such as tire wear, weather conditions, engine power, and failures.
- Tpitstop(lap): Time spent in the pit stop per lap, determined by decisions on repairs, tire changes, and refueling.
- Tbase: Base lap time (modified based on the set engine power).
- Rfailures: Additional time due to failures
- Rweather: Time due to weather conditions, proportional to the difference between track wetness and tire performance
- Rtires: Time due to tire grip loss
- Rparts: Time due to part wear
- Tbase_pitstop: Base time for entering and exiting the pit stop.
- Tfuel: Refueling time, proportional to the amount of fuel added.
- Ttires change: Time for tire changes (constant value).
- Trepairs: Repair time
Objective function to optimize:
- fuel_pitstop: Minimum fuel level to trigger a pit stop.
- tire_wear_str: Minimum tire wear level to trigger a pit stop.
- engine_wear_strat: Minimum engine wear level to trigger a pit stop.
- brakes_wear_strat: Minimum brake wear level to trigger a pit stop.
- suspension_wear_strat: Minimum suspension wear level to trigger a pit stop.
- car_power: Engine power (trade-off between speed and part wear).
- tires: Type of tire used.