Package isula.aco.algorithms.acs
Class PseudoRandomNodeSelection<C,E extends Environment>
java.lang.Object
isula.aco.AntPolicy<C,E>
isula.aco.algorithms.antsystem.RandomNodeSelection<C,E>
isula.aco.algorithms.acs.PseudoRandomNodeSelection<C,E>
- Type Parameters:
C
- Class for components of a solution.E
- Class representing the Environment.
The selection policy for Ant Colony System algorithms. It defines to
selection rules.
- The first is the best selection rule. It picks the component with the better heuristic and pheromone information.
- The other one is the usual ACO policy, selecting based on the probabilities of each possible component.
Using one or another is determined by a "best-choice" probability.
- Author:
- Carlos G. Gavidia
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applyPolicy
(E environment, ConfigurationProvider configuration) protected boolean
doIfNoNodeWasSelected
(E environment, ConfigurationProvider configuration) getMostConvenient
(Map<C, Double> componentsWithProbabilities) Returns the most convenient component based on heuristic and pheromone information.protected boolean
selectMostConvenient
(AcsConfigurationProvider configurationProvider) In a pseudo-random selection rule, determines if we greedily select the most convenient component.Methods inherited from class isula.aco.algorithms.antsystem.RandomNodeSelection
doIfNoComponentsFound, getComponentsWithProbabilities, getHeuristicTimesPheromone, getNextComponent, getProbabilitiesForNeighbourhood, toString
Methods inherited from class isula.aco.AntPolicy
getAnt, getPolicyType, setAnt
-
Constructor Details
-
PseudoRandomNodeSelection
public PseudoRandomNodeSelection()
-
-
Method Details
-
applyPolicy
- Overrides:
applyPolicy
in classRandomNodeSelection<C,
E extends Environment>
-
selectMostConvenient
In a pseudo-random selection rule, determines if we greedily select the most convenient component.- Parameters:
configurationProvider
- Algorithm configuration.- Returns:
- True if the greedy approach is followed, false otherwise.
-
getMostConvenient
Returns the most convenient component based on heuristic and pheromone information.- Parameters:
componentsWithProbabilities
- Possible components.- Returns:
- Most convenient component.
-
doIfNoNodeWasSelected
-