Package isula.aco.algorithms.maxmin
Class UpdatePheromoneMatrixForMaxMin<C,E extends Environment>
java.lang.Object
isula.aco.DaemonAction<C,E>
isula.aco.algorithms.maxmin.UpdatePheromoneMatrixForMaxMin<C,E>
- Type Parameters:
C
- Class for components of a solution.E
- Class representing the Environment.
public abstract class UpdatePheromoneMatrixForMaxMin<C,E extends Environment>
extends DaemonAction<C,E>
The procedure for pheromone update for MMAS. It keeps the pheromone values in
the matrix between a maximum and a minimum, and only allows pheromone deposit
to the best performing ant.
It is not executed online, but at the end of the iteration.
- Author:
- Carlos G. Gavidia
-
Constructor Summary
ConstructorDescriptionInstantiates the Update Pheromone Matrix Policy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyDaemonAction
(ConfigurationProvider provider) protected double
getMaximumPheromoneValue
(MaxMinConfigurationProvider configurationProvider) The maximum value permitted for a pheromone matrix cell.protected double
getMinimumPheromoneValue
(MaxMinConfigurationProvider configurationProvider) The minimum value permitted for a pheromone matrix cell.protected abstract double
getNewPheromoneValue
(Ant<C, E> ant, int positionInSolution, C solutionComponent, MaxMinConfigurationProvider configurationProvider) The new value to be included in the pheromone matrix, depending on a component and its position on the solution.Methods inherited from class isula.aco.DaemonAction
getAcoPhase, getAntColony, getEnvironment, getProblemSolver, setAntColony, setEnvironment, setProblemSolver
-
Constructor Details
-
UpdatePheromoneMatrixForMaxMin
public UpdatePheromoneMatrixForMaxMin()Instantiates the Update Pheromone Matrix Policy.
-
-
Method Details
-
applyDaemonAction
- Specified by:
applyDaemonAction
in classDaemonAction<C,
E extends Environment>
-
getMaximumPheromoneValue
The maximum value permitted for a pheromone matrix cell.- Parameters:
configurationProvider
- Algorithm configuration.- Returns:
- Pheromone threshold.
-
getMinimumPheromoneValue
The minimum value permitted for a pheromone matrix cell.- Parameters:
configurationProvider
- Algorithm configuration.- Returns:
- Pheromone threshold.
-
getNewPheromoneValue
protected abstract double getNewPheromoneValue(Ant<C, E> ant, int positionInSolution, C solutionComponent, MaxMinConfigurationProvider configurationProvider) The new value to be included in the pheromone matrix, depending on a component and its position on the solution.- Parameters:
ant
- Ant performing the deposit.positionInSolution
- Component in the solution.solutionComponent
- Position of the component in the solution.configurationProvider
- Algorithm configuration.- Returns:
- New pheromone value.
-