Package libai.ants.algorithms
Class AntQ
- java.lang.Object
-
- libai.ants.algorithms.Metaheuristic
-
- libai.ants.algorithms.AntColonySystem
-
- libai.ants.algorithms.AntQ
-
- All Implemented Interfaces:
java.util.Comparator<Ant>
public abstract class AntQ extends AntColonySystem
-
-
Field Summary
Fields Modifier and Type Field Description protected static intgammaLearning step size-
Fields inherited from class libai.ants.algorithms.AntColonySystem
debug, maxCandidates, r_0, ro_1, ro_2, tau_0
-
Fields inherited from class libai.ants.algorithms.Metaheuristic
alpha, Ants, bestSolution, beta, candidates, currentIterationNumber, destinationNode, E, Graph, initialNode, maxNumIterations, numberOfAnts, numberOfNodes, Parameters, Pheromones
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAntQ()AntQ(Enviroment E)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckParameters()Checks whether or not all of the algorithm's parameters exists.doublegetMaxNeighbor(int i)voidlocalPheromonesUpdate(int i, int j)Updates pheromone trail of a current local solutionvoidpheromonesUpdate()Updates the pheromone trail contained in the enviroment E according to some ACO algorithm specific logic-
Methods inherited from class libai.ants.algorithms.AntColonySystem
daemonActions, decisionRule, decisionRuleNotFromCandidate, pheromonesEvaporation, solve
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from class libai.ants.algorithms.Metaheuristic
candidateList, compare, constrains, f, getBestSolution, getCurrentIterationNumber, getE, getNumberOfNodes, getParam, heuristicInfo, setE, setNumberOfNodes, setParam
-
-
-
-
Field Detail
-
gamma
protected static final int gamma
Learning step size- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AntQ
public AntQ(Enviroment E)
-
AntQ
protected AntQ()
-
-
Method Detail
-
checkParameters
public void checkParameters() throws AntFrameworkExceptionDescription copied from class:MetaheuristicChecks whether or not all of the algorithm's parameters exists. If some obligatory parameter do not exist, the function throws an exception. If some other parameter do not exists but it is possible to set a default value, here is the place to do it.- Overrides:
checkParametersin classAntColonySystem- Throws:
AntFrameworkException
-
getMaxNeighbor
public double getMaxNeighbor(int i)
-
localPheromonesUpdate
public void localPheromonesUpdate(int i, int j)Description copied from class:AntColonySystemUpdates pheromone trail of a current local solution- Overrides:
localPheromonesUpdatein classAntColonySystem- Parameters:
i- position i of the solutionj- position j of the solution
-
pheromonesUpdate
public void pheromonesUpdate()
Description copied from class:MetaheuristicUpdates the pheromone trail contained in the enviroment E according to some ACO algorithm specific logic- Overrides:
pheromonesUpdatein classAntColonySystem
-
-