Class ValueSelectorConfig
java.lang.Object
ai.timefold.solver.core.config.AbstractConfig<Config_>
ai.timefold.solver.core.config.heuristic.selector.SelectorConfig<ValueSelectorConfig>
ai.timefold.solver.core.config.heuristic.selector.value.ValueSelectorConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SelectionCacheTypeprotected Class<?>protected Class<? extends SelectionFilter>protected Stringprotected Stringprotected NearbySelectionConfigprotected Class<? extends SelectionProbabilityWeightFactory>protected Longprotected SelectionOrderprotected Class<? extends SelectionSorter>protected Class<? extends Comparator>protected ValueSorterMannerprotected SelectionSorterOrderprotected Class<? extends SelectionSorterWeightFactory>protected String -
Constructor Summary
ConstructorsConstructorDescriptionValueSelectorConfig(ValueSelectorConfig inheritedConfig) ValueSelectorConfig(String variableName) -
Method Summary
Modifier and TypeMethodDescriptionTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.static <Solution_>
SelectionSorter<Solution_,Object> determineSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) Class<?>Class<? extends SelectionFilter>getId()Class<? extends SelectionProbabilityWeightFactory>Class<? extends SelectionSorter>Class<? extends Comparator>Class<? extends SelectionSorterWeightFactory>booleanVerifies if the current configuration has any Nearby Selection settings.static <Solution_>
booleanhasSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) inherit(ValueSelectorConfig inheritedConfig) Inherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).voidsetCacheType(SelectionCacheType cacheType) voidsetDowncastEntityClass(Class<?> downcastEntityClass) voidsetFilterClass(Class<? extends SelectionFilter> filterClass) voidvoidsetMimicSelectorRef(String mimicSelectorRef) voidsetNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig) voidsetProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) voidsetSelectedCountLimit(Long selectedCountLimit) voidsetSelectionOrder(SelectionOrder selectionOrder) voidsetSorterClass(Class<? extends SelectionSorter> sorterClass) voidsetSorterComparatorClass(Class<? extends Comparator> sorterComparatorClass) voidsetSorterManner(ValueSorterManner sorterManner) voidsetSorterOrder(SelectionSorterOrder sorterOrder) voidsetSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) voidsetVariableName(String variableName) toString()voidvisitReferencedClasses(Consumer<Class<?>> classVisitor) Call the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs).withCacheType(SelectionCacheType cacheType) withDowncastEntityClass(Class<?> entityClass) withFilterClass(Class<? extends SelectionFilter> filterClass) withMimicSelectorRef(String mimicSelectorRef) withNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig) withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> factoryClass) withSelectedCountLimit(long selectedCountLimit) withSelectionOrder(SelectionOrder selectionOrder) withSorterClass(Class<? extends SelectionSorter> sorterClass) withSorterComparatorClass(Class<? extends Comparator> comparatorClass) withSorterManner(ValueSorterManner sorterManner) withSorterOrder(SelectionSorterOrder sorterOrder) withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) withVariableName(String variableName)
-
Field Details
-
id
-
mimicSelectorRef
-
downcastEntityClass
-
variableName
-
cacheType
-
selectionOrder
-
nearbySelectionConfig
-
filterClass
-
sorterManner
-
sorterComparatorClass
-
sorterWeightFactoryClass
-
sorterOrder
-
sorterClass
-
probabilityWeightFactoryClass
-
selectedCountLimit
-
-
Constructor Details
-
ValueSelectorConfig
public ValueSelectorConfig() -
ValueSelectorConfig
-
ValueSelectorConfig
-
-
Method Details
-
getId
-
setId
-
getMimicSelectorRef
-
setMimicSelectorRef
-
getDowncastEntityClass
-
setDowncastEntityClass
-
getVariableName
-
setVariableName
-
getCacheType
-
setCacheType
-
getSelectionOrder
-
setSelectionOrder
-
getNearbySelectionConfig
-
setNearbySelectionConfig
-
getFilterClass
-
setFilterClass
-
getSorterManner
-
setSorterManner
-
getSorterComparatorClass
-
setSorterComparatorClass
-
getSorterWeightFactoryClass
-
setSorterWeightFactoryClass
public void setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) -
getSorterOrder
-
setSorterOrder
-
getSorterClass
-
setSorterClass
-
getProbabilityWeightFactoryClass
-
setProbabilityWeightFactoryClass
public void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) -
getSelectedCountLimit
-
setSelectedCountLimit
-
withId
-
withMimicSelectorRef
-
withDowncastEntityClass
-
withVariableName
-
withCacheType
-
withSelectionOrder
-
withNearbySelectionConfig
-
withFilterClass
-
withSorterManner
-
withSorterComparatorClass
-
withSorterWeightFactoryClass
public ValueSelectorConfig withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) -
withSorterOrder
-
withSorterClass
-
withProbabilityWeightFactoryClass
public ValueSelectorConfig withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> factoryClass) -
withSelectedCountLimit
-
inherit
Description copied from class:AbstractConfigInherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this
AbstractConfigcomposition is replaced, it should not affect the inherited composition instance.- Specified by:
inheritin classAbstractConfig<ValueSelectorConfig>- Parameters:
inheritedConfig- never null- Returns:
- this
-
copyConfig
Description copied from class:AbstractConfigTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.- Specified by:
copyConfigin classAbstractConfig<ValueSelectorConfig>- Returns:
- new instance
-
visitReferencedClasses
Description copied from class:AbstractConfigCall the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs). Required to create the bean factory in Quarkus.- Specified by:
visitReferencedClassesin classAbstractConfig<ValueSelectorConfig>- Parameters:
classVisitor- The visitor of classes, never null. Can accept null instances of Class.
-
toString
- Overrides:
toStringin classAbstractConfig<ValueSelectorConfig>
-
hasSorter
public static <Solution_> boolean hasSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) -
determineSorter
public static <Solution_> SelectionSorter<Solution_,Object> determineSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) -
hasNearbySelectionConfig
public boolean hasNearbySelectionConfig()Description copied from class:SelectorConfigVerifies if the current configuration has any Nearby Selection settings.- Specified by:
hasNearbySelectionConfigin classSelectorConfig<ValueSelectorConfig>
-