Class EntitySelectorFactory<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.AbstractFromConfigFactory<Solution_,SelectorConfig_>
-
- org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory<Solution_,EntitySelectorConfig>
-
- org.optaplanner.core.impl.heuristic.selector.entity.EntitySelectorFactory<Solution_>
-
public class EntitySelectorFactory<Solution_> extends AbstractSelectorFactory<Solution_,EntitySelectorConfig>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory
config
-
-
Constructor Summary
Constructors Constructor Description EntitySelectorFactory(EntitySelectorConfig entitySelectorConfig)
-
Method Summary
-
Methods inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory
validateCacheTypeVersusSelectionOrder
-
Methods inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory
deduceEntityDescriptor, deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList
-
-
-
-
Constructor Detail
-
EntitySelectorFactory
public EntitySelectorFactory(EntitySelectorConfig entitySelectorConfig)
-
-
Method Detail
-
create
public static <Solution_> EntitySelectorFactory<Solution_> create(EntitySelectorConfig entitySelectorConfig)
-
extractEntityDescriptor
public EntityDescriptor<Solution_> extractEntityDescriptor(HeuristicConfigPolicy<Solution_> configPolicy)
-
buildEntitySelector
public EntitySelector<Solution_> buildEntitySelector(HeuristicConfigPolicy<Solution_> configPolicy, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)
- Parameters:
configPolicy
- never nullminimumCacheType
- never null, If caching is used (different fromSelectionCacheType.JUST_IN_TIME
), then it should be at least thisSelectionCacheType
because an ancestor already uses such caching and less would be pointless.inheritedSelectionOrder
- never null- Returns:
- never null
-
buildMimicReplaying
protected EntitySelector<Solution_> buildMimicReplaying(HeuristicConfigPolicy<Solution_> configPolicy)
-
determineBaseRandomSelection
protected boolean determineBaseRandomSelection(EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)
-
isBaseInherentlyCached
protected boolean isBaseInherentlyCached()
-
validateSorting
protected void validateSorting(SelectionOrder resolvedSelectionOrder)
-
applySorting
protected EntitySelector<Solution_> applySorting(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector)
-
validateProbability
protected void validateProbability(SelectionOrder resolvedSelectionOrder)
-
applyProbability
protected EntitySelector<Solution_> applyProbability(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector)
-
-