Class AntColonyOptimization
- java.lang.Object
-
- org.tweetyproject.math.opt.solver.Solver
-
- org.tweetyproject.math.opt.solver.CombinatoricsSolver
-
- org.tweetyproject.math.opt.solver.AntColonyOptimization
-
public class AntColonyOptimization extends CombinatoricsSolver
This class implements the ant colony algorithm using isula (https://github.com/cptanalatriste/isula) for combinatrics problems- Author:
- Sebastian Franke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AntColonyOptimization.AntCol_Environment
environment
-
Field Summary
Fields Modifier and Type Field Description double
EvaporationRatio
double
HeuristicImportance
int
NumberOfAnts
configuration dataint
NumberOfIterations
double
PheromoneImportance
-
Constructor Summary
Constructors Constructor Description AntColonyOptimization(int NumberOfAnts, double EvaporationRatio, int NumberOfIterations, double HeuristicImportance, double PheromoneImportance)
-
Method Summary
Modifier and Type Method Description isula.aco.AntColony<ElementOfCombinatoricsProb,AntColonyOptimization.AntCol_Environment>
getAntColony(isula.aco.ConfigurationProvider configurationProvider)
Ant colonystatic double[][]
getRepresentation(CombinatoricsProblem prob)
java.util.ArrayList<ElementOfCombinatoricsProb>
solve(CombinatoricsProblem prob)
solves the problem and connects the config and initializes the rest-
Methods 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
-
-
-
-
Method Detail
-
solve
public java.util.ArrayList<ElementOfCombinatoricsProb> solve(CombinatoricsProblem prob) throws javax.naming.ConfigurationException, isula.aco.exception.InvalidInputException, java.io.IOException
solves the problem and connects the config and initializes the rest- Parameters:
prob
- some problem- Returns:
- the solution
- Throws:
javax.naming.ConfigurationException
- if some error occursisula.aco.exception.InvalidInputException
- if some error occursjava.io.IOException
- 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
public static double[][] getRepresentation(CombinatoricsProblem prob) throws java.io.IOException
- Throws:
java.io.IOException
-
-