Class ValueSelectorFactory<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.AbstractFromConfigFactory<Solution_,SelectorConfig_>
-
- org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory<Solution_,ValueSelectorConfig>
-
- org.optaplanner.core.impl.heuristic.selector.value.ValueSelectorFactory<Solution_>
-
public class ValueSelectorFactory<Solution_> extends AbstractSelectorFactory<Solution_,ValueSelectorConfig>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory
config
-
-
Constructor Summary
Constructors Constructor Description ValueSelectorFactory(ValueSelectorConfig valueSelectorConfig)
-
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
-
ValueSelectorFactory
public ValueSelectorFactory(ValueSelectorConfig valueSelectorConfig)
-
-
Method Detail
-
create
public static <Solution_> ValueSelectorFactory<Solution_> create(ValueSelectorConfig valueSelectorConfig)
-
extractVariableDescriptor
public GenuineVariableDescriptor<Solution_> extractVariableDescriptor(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor)
-
buildValueSelector
public ValueSelector<Solution_> buildValueSelector(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)
- Parameters:
configPolicy
- never nullentityDescriptor
- 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
-
buildValueSelector
public ValueSelector<Solution_> buildValueSelector(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder, boolean applyReinitializeVariableFiltering, boolean applyUnassignedValueFiltering)
-
buildMimicReplaying
protected ValueSelector<Solution_> buildMimicReplaying(HeuristicConfigPolicy<Solution_> configPolicy)
-
downcastEntityDescriptor
protected EntityDescriptor<Solution_> downcastEntityDescriptor(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor)
-
determineBaseRandomSelection
protected boolean determineBaseRandomSelection(GenuineVariableDescriptor<Solution_> variableDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)
-
isBaseInherentlyCached
protected boolean isBaseInherentlyCached(GenuineVariableDescriptor<Solution_> variableDescriptor)
-
applyFiltering
protected ValueSelector<Solution_> applyFiltering(ValueSelector<Solution_> valueSelector)
-
applyInitializedChainedValueFilter
protected ValueSelector<Solution_> applyInitializedChainedValueFilter(HeuristicConfigPolicy<Solution_> configPolicy, GenuineVariableDescriptor<Solution_> variableDescriptor, ValueSelector<Solution_> valueSelector)
-
validateSorting
protected void validateSorting(SelectionOrder resolvedSelectionOrder)
-
applySorting
protected ValueSelector<Solution_> applySorting(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, ValueSelector<Solution_> valueSelector)
-
validateProbability
protected void validateProbability(SelectionOrder resolvedSelectionOrder)
-
applyProbability
protected ValueSelector<Solution_> applyProbability(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, ValueSelector<Solution_> valueSelector)
-
-