Class EntitySelectorFactory<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.AbstractFromConfigFactory<Solution_,SelectorConfig_>
ai.timefold.solver.core.impl.heuristic.selector.AbstractSelectorFactory<Solution_,EntitySelectorConfig>
ai.timefold.solver.core.impl.heuristic.selector.entity.EntitySelectorFactory<Solution_>
public class EntitySelectorFactory<Solution_>
extends AbstractSelectorFactory<Solution_,EntitySelectorConfig>
-
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.AbstractFromConfigFactory
config -
Constructor Summary
Constructors -
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 booleandetermineBaseRandomSelection(EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder) extractEntityDescriptor(HeuristicConfigPolicy<Solution_> configPolicy) protected booleanprotected voidvalidateProbability(SelectionOrder resolvedSelectionOrder) protected voidvalidateSorting(SelectionOrder resolvedSelectionOrder) Methods inherited from class ai.timefold.solver.core.impl.heuristic.selector.AbstractSelectorFactory
validateCacheTypeVersusSelectionOrderMethods inherited from class ai.timefold.solver.core.impl.AbstractFromConfigFactory
deduceBasicVariableDescriptorList, deduceEntityDescriptor, deduceEntitySortManner, deduceGenuineVariableDescriptor, deduceVariableDescriptorList, getDefaultEntitySelectorConfigForEntity, getTheOnlyEntityDescriptor, getTheOnlyEntityDescriptorWithBasicVariables, getTheOnlyEntityDescriptorWithListVariable, 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 thisSelectionCacheTypebecause 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)
-