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 int
gamma
Learning 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 protected
AntQ()
AntQ(Enviroment E)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkParameters()
Checks whether or not all of the algorithm's parameters exists.double
getMaxNeighbor(int i)
void
localPheromonesUpdate(int i, int j)
Updates pheromone trail of a current local solutionvoid
pheromonesUpdate()
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 AntFrameworkException
Description copied from class:Metaheuristic
Checks 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:
checkParameters
in classAntColonySystem
- Throws:
AntFrameworkException
-
getMaxNeighbor
public double getMaxNeighbor(int i)
-
localPheromonesUpdate
public void localPheromonesUpdate(int i, int j)
Description copied from class:AntColonySystem
Updates pheromone trail of a current local solution- Overrides:
localPheromonesUpdate
in classAntColonySystem
- Parameters:
i
- position i of the solutionj
- position j of the solution
-
pheromonesUpdate
public void pheromonesUpdate()
Description copied from class:Metaheuristic
Updates the pheromone trail contained in the enviroment E according to some ACO algorithm specific logic- Overrides:
pheromonesUpdate
in classAntColonySystem
-
-