Package libai.ants.algorithms
Class ElitistAntSystem
- java.lang.Object
-
- libai.ants.algorithms.Metaheuristic
-
- libai.ants.algorithms.AntSystem
-
- libai.ants.algorithms.ElitistAntSystem
-
- All Implemented Interfaces:
java.util.Comparator<Ant>
- Direct Known Subclasses:
AntSystemRank
public abstract class ElitistAntSystem extends AntSystem
This class belong to the core classes of the Ant Framework.Implements the Elitits Ant System algorithm. It is essentially the same as Ant System, but the arcs of the best-so-far tour are reinforced on each iteration using the
daemonActions()function. Empirical results shows that this behaves better that Ant System.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intepsilonDetermine the weight given to the best-so-far tour Used in thedaemonActions()method-
Fields inherited from class libai.ants.algorithms.AntSystem
debug, pheromonesEvaporationRate
-
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 protectedElitistAntSystem()Constructor.protectedElitistAntSystem(Enviroment E)Constructor.
-
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.voiddaemonActions()This function is called on each iteration and it provides a way to implement centralized actions-
Methods inherited from class libai.ants.algorithms.AntSystem
antCycle, antDensity, antQuantity, candidateList, decisionRule, linkOccursInPath, pheromonesEvaporation, pheromonesUpdate, solve
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from class libai.ants.algorithms.Metaheuristic
compare, constrains, f, getBestSolution, getCurrentIterationNumber, getE, getNumberOfNodes, getParam, heuristicInfo, setE, setNumberOfNodes, setParam
-
-
-
-
Field Detail
-
epsilon
protected static final int epsilon
Determine the weight given to the best-so-far tour Used in thedaemonActions()method- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElitistAntSystem
protected ElitistAntSystem(Enviroment E)
Constructor. Allocates the enviroment.- Parameters:
E- enviroment
-
ElitistAntSystem
protected ElitistAntSystem()
Constructor. Empty constructor.
-
-
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 classAntSystem- Throws:
AntFrameworkException
-
daemonActions
public void daemonActions()
Description copied from class:MetaheuristicThis function is called on each iteration and it provides a way to implement centralized actions- Overrides:
daemonActionsin classAntSystem
-
-