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
-
Method Summary
Modifier and TypeMethodDescriptionprotected EntitySelector<Solution_>
applyProbability
(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector, ClassInstanceCache instanceCache) protected EntitySelector<Solution_>
applySorting
(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector, ClassInstanceCache instanceCache) buildEntitySelector
(HeuristicConfigPolicy<Solution_> configPolicy, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder) protected EntitySelector<Solution_>
buildMimicReplaying
(HeuristicConfigPolicy<Solution_> configPolicy) static <Solution_>
EntitySelectorFactory<Solution_>create
(EntitySelectorConfig entitySelectorConfig) protected boolean
determineBaseRandomSelection
(EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder) extractEntityDescriptor
(HeuristicConfigPolicy<Solution_> configPolicy) protected boolean
protected void
validateProbability
(SelectionOrder resolvedSelectionOrder) protected void
validateSorting
(SelectionOrder resolvedSelectionOrder) Methods inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory
validateCacheTypeVersusSelectionOrder
Methods inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory
deduceEntityDescriptor, deduceGenuineVariableDescriptor, deduceVariableDescriptorList, getDefaultEntitySelectorConfigForEntity, getTheOnlyEntityDescriptor, getTheOnlyVariableDescriptor, getVariableDescriptorForName
-
Constructor Details
-
EntitySelectorFactory
-
-
Method Details
-
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
-
applySorting
protected EntitySelector<Solution_> applySorting(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector, ClassInstanceCache instanceCache) -
validateProbability
-
applyProbability
protected EntitySelector<Solution_> applyProbability(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector, ClassInstanceCache instanceCache)
-