Class AntColonyOptimization
java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.CombinatoricsSolver
org.tweetyproject.math.opt.solver.AntColonyOptimization
This class implements the ant colony algorithm using
isula (https://github.com/cptanalatriste/isula) for combinatrics problems
- Author:
- Sebastian Franke
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Evaporation Ratiodouble
Heuristic Importanceint
configuration dataint
Number Of Iterationsdouble
Pheromone Importance -
Constructor Summary
ConstructorDescriptionAntColonyOptimization
(int NumberOfAnts, double EvaporationRatio, int NumberOfIterations, double HeuristicImportance, double PheromoneImportance) constructor -
Method Summary
Modifier and TypeMethodDescriptionisula.aco.AntColony
<ElementOfCombinatoricsProb, AntColonyOptimization.AntCol_Environment> getAntColony
(isula.aco.ConfigurationProvider configurationProvider) Ant colonystatic double[][]
Return represntationsolve
(CombinatoricsProblem prob) solves the problem and connects the config and initializes the restMethods inherited from class org.tweetyproject.math.opt.solver.CombinatoricsSolver
solve
Methods inherited from class org.tweetyproject.math.opt.solver.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, isInstalled, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
Field Details
-
NumberOfAnts
public int NumberOfAntsconfiguration data -
EvaporationRatio
public double EvaporationRatioEvaporation Ratio -
NumberOfIterations
public int NumberOfIterationsNumber Of Iterations -
HeuristicImportance
public double HeuristicImportanceHeuristic Importance -
PheromoneImportance
public double PheromoneImportancePheromone Importance
-
-
Constructor Details
-
AntColonyOptimization
public AntColonyOptimization(int NumberOfAnts, double EvaporationRatio, int NumberOfIterations, double HeuristicImportance, double PheromoneImportance) throws IOException constructor- Parameters:
NumberOfAnts
- nr of antsEvaporationRatio
- evaporation ratioNumberOfIterations
- nr of iteraionsHeuristicImportance
- importance of heuristicsPheromoneImportance
- importance of pheromons- Throws:
IOException
- IOException
-
-
Method Details
-
solve
public ArrayList<ElementOfCombinatoricsProb> solve(CombinatoricsProblem prob) throws ConfigurationException, isula.aco.exception.InvalidInputException, IOException solves the problem and connects the config and initializes the rest- Parameters:
prob
- some problem- Returns:
- the solution
- Throws:
ConfigurationException
- if some error occursisula.aco.exception.InvalidInputException
- if some error occursIOException
- if some error occurs
-
getAntColony
public isula.aco.AntColony<ElementOfCombinatoricsProb,AntColonyOptimization.AntCol_Environment> getAntColony(isula.aco.ConfigurationProvider configurationProvider) Ant colony- Parameters:
configurationProvider
- a configuration provider- Returns:
- the ant colony
-
getRepresentation
Return represntation- Parameters:
prob
- problem- Returns:
- represntation
- Throws:
IOException
- IOException
-