Ant Colony Optimization on Bin Packing Problem, made in 2019.
Video: Ant Colony Optimization on Bin Packing Problem (principles, importance & actual code)
For problem 1, there are 10 bins, 500 items. The weight of items are 1,2,...,500.
The algorithm aims at utilizing p number of ants and 50000/p iterations to find an optimal ant path for putting items of different weights into a certain number of bins such that the maximum weight difference of heaviest and lightest bin is kept to a minimum.
The algorithm prints the fitness 'Best', 'Worst' & 'Avereage'of the first and last generation, and also the best path and worst path of first and last generation. Note: a small value in fitness indicates a better path.
For problem 2, there are 50 bins, 500 items. The weight of items are 1/2,4/2,9/2,...,(500^2)/2.
The algorithm aims at utilizing p number of ants and 50000/p iterations to find an optimal ant path for putting items of different weights into a certain number of bins such that the maximum weight difference of heaviest and lightest bin is kept to a minimum.
The algorithm prints the fitness 'Best', 'Worst' & 'Avereage'of the first and last generation, and also the best path and worst path of first and last generation. Note: a small value in fitness indicates a better path.