Class SwapMoveSelectorConfig
java.lang.Object
ai.timefold.solver.core.config.AbstractConfig<Config_>
ai.timefold.solver.core.config.heuristic.selector.SelectorConfig<Config_>
ai.timefold.solver.core.config.heuristic.selector.move.MoveSelectorConfig<SwapMoveSelectorConfig>
ai.timefold.solver.core.config.heuristic.selector.move.generic.SwapMoveSelectorConfig
- All Implemented Interfaces:
NearbyAutoConfigurationEnabled<SwapMoveSelectorConfig>
public class SwapMoveSelectorConfig
extends MoveSelectorConfig<SwapMoveSelectorConfig>
implements NearbyAutoConfigurationEnabled<SwapMoveSelectorConfig>
-
Field Summary
FieldsFields inherited from class ai.timefold.solver.core.config.heuristic.selector.move.MoveSelectorConfig
cacheType, filterClass, probabilityWeightFactoryClass, selectedCountLimit, selectionOrder, sorterClass, sorterComparatorClass, sorterOrder, sorterWeightFactoryClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull SwapMoveSelectorConfigTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.@NonNull SwapMoveSelectorConfigenableNearbySelection(@NonNull Class<? extends NearbyDistanceMeter<?, ?>> distanceMeter, @NonNull Random random) @Nullable EntitySelectorConfig@Nullable EntitySelectorConfigbooleanVerifies if the current configuration has any Nearby Selection settings.@NonNull SwapMoveSelectorConfiginherit(@NonNull SwapMoveSelectorConfig inheritedConfig) Inherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).voidsetEntitySelectorConfig(@Nullable EntitySelectorConfig entitySelectorConfig) voidsetSecondaryEntitySelectorConfig(@Nullable EntitySelectorConfig secondaryEntitySelectorConfig) voidsetVariableNameIncludeList(@Nullable List<@NonNull String> variableNameIncludeList) toString()voidvisitReferencedClasses(@NonNull 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).@NonNull SwapMoveSelectorConfigwithEntitySelectorConfig(@NonNull EntitySelectorConfig entitySelectorConfig) @NonNull SwapMoveSelectorConfigwithSecondaryEntitySelectorConfig(@NonNull EntitySelectorConfig secondaryEntitySelectorConfig) @NonNull SwapMoveSelectorConfigwithVariableNameIncludes(@NonNull String @NonNull ... variableNameIncludes) Methods inherited from class ai.timefold.solver.core.config.heuristic.selector.move.MoveSelectorConfig
extractLeafMoveSelectorConfigsIntoList, getCacheType, getFilterClass, getFixedProbabilityWeight, getProbabilityWeightFactoryClass, getSelectedCountLimit, getSelectionOrder, getSorterClass, getSorterComparatorClass, getSorterOrder, getSorterWeightFactoryClass, inheritFolded, setCacheType, setFilterClass, setFixedProbabilityWeight, setProbabilityWeightFactoryClass, setSelectedCountLimit, setSelectionOrder, setSorterClass, setSorterComparatorClass, setSorterOrder, setSorterWeightFactoryClass, visitCommonReferencedClasses, withCacheType, withFilterClass, withFixedProbabilityWeight, withProbabilityWeightFactoryClass, withSelectedCountLimit, withSelectionOrder, withSorterClass, withSorterComparatorClass, withSorterOrder, withSorterWeightFactoryClass
-
Field Details
-
XML_ELEMENT_NAME
- See Also:
-
-
Constructor Details
-
SwapMoveSelectorConfig
public SwapMoveSelectorConfig()
-
-
Method Details
-
getEntitySelectorConfig
-
setEntitySelectorConfig
-
getSecondaryEntitySelectorConfig
-
setSecondaryEntitySelectorConfig
public void setSecondaryEntitySelectorConfig(@Nullable EntitySelectorConfig secondaryEntitySelectorConfig) -
getVariableNameIncludeList
-
setVariableNameIncludeList
-
withEntitySelectorConfig
public @NonNull SwapMoveSelectorConfig withEntitySelectorConfig(@NonNull EntitySelectorConfig entitySelectorConfig) -
withSecondaryEntitySelectorConfig
public @NonNull SwapMoveSelectorConfig withSecondaryEntitySelectorConfig(@NonNull EntitySelectorConfig secondaryEntitySelectorConfig) -
withVariableNameIncludes
public @NonNull SwapMoveSelectorConfig withVariableNameIncludes(@NonNull String @NonNull ... variableNameIncludes) -
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.- Overrides:
inheritin classMoveSelectorConfig<SwapMoveSelectorConfig>- Returns:
- this
-
copyConfig
Description copied from class:AbstractConfigTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.- Specified by:
copyConfigin classAbstractConfig<SwapMoveSelectorConfig>- 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<SwapMoveSelectorConfig>- Parameters:
classVisitor- The visitor of classes. Can accept null instances of Class.
-
enableNearbySelection
public @NonNull SwapMoveSelectorConfig enableNearbySelection(@NonNull Class<? extends NearbyDistanceMeter<?, ?>> distanceMeter, @NonNull Random random) - Specified by:
enableNearbySelectionin interfaceNearbyAutoConfigurationEnabled<SwapMoveSelectorConfig>- Returns:
- new instance with the Nearby Selection settings properly configured
-
hasNearbySelectionConfig
public boolean hasNearbySelectionConfig()Description copied from class:SelectorConfigVerifies if the current configuration has any Nearby Selection settings.- Specified by:
hasNearbySelectionConfigin classSelectorConfig<SwapMoveSelectorConfig>
-
canEnableNearbyInMixedModels
public boolean canEnableNearbyInMixedModels()- Specified by:
canEnableNearbyInMixedModelsin interfaceNearbyAutoConfigurationEnabled<SwapMoveSelectorConfig>- Returns:
- true if it can enable the nearby setting for the given move configuration; otherwise, it returns false.
-
toString
- Overrides:
toStringin classAbstractConfig<SwapMoveSelectorConfig>
-