ACO Framework is created for "Inteligencja Obliczeniowa" course on
University of Science and Technology in Cracow.
Created to effective solve Ant Colony Optimization problems in Scala.
It's also prepared for multi objective optimization.
Currently, there are implemented algorithms for:
- Single Objective Ant Colony Optimization named
Tsp
for Travelling Salesman Problem - Multi Objective Ant Colony Optimization maned
Mtsp
also for TSP kind of problems
All abstract classes are named with pattern `Base___.scala`, those classes inform user about functions that must be implemented to run algorithm.
Needed steps:
- Use
config.yaml
file to determine problem files. Example:
problemType: mtsp
problemFiles:
- mtsp//dimacs_15_a.tsp <br>
- mtsp//dimacs_15_b.tsp <br>
- mtsp//dimacs_15_c.tsp <br>
Where:
problemType
- type of optimization problem (currently availabletsp
ormtsp
)problemFiles
- input problem files
- Used algorithm define all remaining parameters. Quick description:
increment
- defines value that will be added to pheromone table when ant pass selected edgealpha
- power used in pheromone calculation asbeta
- power used in distance heuristic asextinction
- percentage loss of pheromone value after each algorithm iterationdistanceWeights
- weights used to flatten distances in multi objective calculations, should sum up to 1pheromoneWeights
- weights used to flatten pheromone values, should sum up to 1antNumb
- number of ants used for optimization (declared inMain.scala
)iteration
- number of iterations that algorithm can evaluate (declared inMain.scala
)rnd
- random number generator (you can set seed to create more deterministic results)takenAntsToPheromoneUpdate
- used only in TSP problems, determine how many ants update pheromone table (based on fitness value)
-
Run
Main.scala
to run algorithm, results will be printed in console. This file only read the selected problem and map it intoBaseProblem
instance, that can be further evaluated. -
Prepared solutions offers algorithms:
- weighted sum - for distance and pheromone flattening
- tbd
- Included problems:
- Berlin 52 - dataset with 52 dimensions (locations from Berlin) from here.
- DIMACS 15 - dataset with 15 dimensions in 3 different objectives (a, b, c), you can find it here
- Lust 100 - dataset with 100 dimensions in 2 objectives (A, B), also from here
- Paquete 100 - dataset with 100 dimensions in 2 objectives (A, B) here
Testing results:
On included into Framework dataset Berlin 52
, we performed test run. Here are the results:
Data set visualization:
Selected parameters:
Parameter | Value |
---|---|
increment | 5 |
alpha | 1 |
beta | 1 |
extinction | 0.2 |
distanceWeights | 1.0 |
pheromoneWeights | 1.0 |
takenAntsToPheromoneUpdate | 30 |
ants_number | 30 |
algorithm_iterations | 100 |
Results:
Best Fitness: 8356.66
NOTE
Currently there is no visualization methods in Framework!
On included into Framework dataset portgen-100-101
(paquete_euclidAB100) and lust_kroA100
. We performed test run. Here are the results
Selected parameters:
Parameter | Value |
---|---|
increment | 5 |
alpha | 1 |
beta | 1 |
extinction | 0.2 |
distanceWeights | [0.5,0.5] |
pheromoneWeights | [0.5,0.5] |
takenAntsToPheromoneUpdate | 100 |
ants_number | 100 |
algorithm_iterations | 100 |
- Adding More Algorithms to solve different problems
- Adding Visualization Methods (e.g. Front Pareto)
Krzysztof Tylka-Suleja Email: [email protected]
Tymoteusz Dobrzański Email: [email protected]
In cooperation with:
Aleksander Byrski Email: [email protected]
Mateusz Starzec Email: [email protected]
Grażyna Starzec Email: [email protected]