Class EntitySelectorConfig
java.lang.Object
ai.timefold.solver.core.config.AbstractConfig<Config_>
ai.timefold.solver.core.config.heuristic.selector.SelectorConfig<EntitySelectorConfig>
ai.timefold.solver.core.config.heuristic.selector.entity.EntitySelectorConfig
-
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 EntitySorterMannerprotected SelectionSorterOrderprotected Class<? extends SelectionSorterWeightFactory> -
Constructor Summary
ConstructorsConstructorDescriptionEntitySelectorConfig(EntitySelectorConfig inheritedConfig) EntitySelectorConfig(Class<?> entityClass) -
Method Summary
Modifier and TypeMethodDescriptionTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.static <Solution_,T>
SelectionSorter<Solution_,T> determineSorter(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) 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(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) inherit(EntitySelectorConfig inheritedConfig) Inherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).static EntitySelectorConfignewMimicSelectorConfig(String mimicSelectorRef) voidsetCacheType(SelectionCacheType cacheType) voidsetEntityClass(Class<?> entityClass) 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(EntitySorterManner sorterManner) voidsetSorterOrder(SelectionSorterOrder sorterOrder) voidsetSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) 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) withEntityClass(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(EntitySorterManner sorterManner) withSorterOrder(SelectionSorterOrder sorterOrder) withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass)
-
Field Details
-
id
-
mimicSelectorRef
-
entityClass
-
cacheType
-
selectionOrder
-
nearbySelectionConfig
-
filterClass
-
sorterManner
-
sorterComparatorClass
-
sorterWeightFactoryClass
-
sorterOrder
-
sorterClass
-
probabilityWeightFactoryClass
-
selectedCountLimit
-
-
Constructor Details
-
EntitySelectorConfig
public EntitySelectorConfig() -
EntitySelectorConfig
-
EntitySelectorConfig
-
-
Method Details
-
newMimicSelectorConfig
-
getId
-
setId
-
getMimicSelectorRef
-
setMimicSelectorRef
-
getEntityClass
-
setEntityClass
-
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
-
withEntityClass
-
withCacheType
-
withSelectionOrder
-
withNearbySelectionConfig
-
withFilterClass
-
withSorterManner
-
withSorterComparatorClass
-
withSorterWeightFactoryClass
public EntitySelectorConfig withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) -
withSorterOrder
-
withSorterClass
-
withProbabilityWeightFactoryClass
public EntitySelectorConfig 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<EntitySelectorConfig>- 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<EntitySelectorConfig>- 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<EntitySelectorConfig>- Parameters:
classVisitor- The visitor of classes, never null. Can accept null instances of Class.
-
toString
- Overrides:
toStringin classAbstractConfig<EntitySelectorConfig>
-
hasSorter
public static <Solution_> boolean hasSorter(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) -
determineSorter
public static <Solution_,T> SelectionSorter<Solution_,T> determineSorter(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) -
hasNearbySelectionConfig
public boolean hasNearbySelectionConfig()Description copied from class:SelectorConfigVerifies if the current configuration has any Nearby Selection settings.- Specified by:
hasNearbySelectionConfigin classSelectorConfig<EntitySelectorConfig>
-