Class MoveSelectorConfig<Config_ extends MoveSelectorConfig<Config_>>
java.lang.Object
org.optaplanner.core.config.AbstractConfig<Config_>
org.optaplanner.core.config.heuristic.selector.SelectorConfig<Config_>
org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig<Config_>
- Direct Known Subclasses:
AbstractPillarMoveSelectorConfig
,CartesianProductMoveSelectorConfig
,ChangeMoveSelectorConfig
,KOptListMoveSelectorConfig
,KOptMoveSelectorConfig
,MoveIteratorFactoryConfig
,MoveListFactoryConfig
,SubChainChangeMoveSelectorConfig
,SubChainSwapMoveSelectorConfig
,SubListChangeMoveSelectorConfig
,SubListSwapMoveSelectorConfig
,SwapMoveSelectorConfig
,TailChainSwapMoveSelectorConfig
,UnionMoveSelectorConfig
public abstract class MoveSelectorConfig<Config_ extends MoveSelectorConfig<Config_>>
extends SelectorConfig<Config_>
General superclass for
ChangeMoveSelectorConfig
, etc.-
Field Summary
Modifier and TypeFieldDescriptionprotected SelectionCacheType
protected Class<? extends SelectionFilter>
protected Class<? extends SelectionProbabilityWeightFactory>
protected Long
protected SelectionOrder
protected Class<? extends SelectionSorter>
protected Class<? extends Comparator>
protected SelectionSorterOrder
protected Class<? extends SelectionSorterWeightFactory>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
extractLeafMoveSelectorConfigsIntoList
(List<MoveSelectorConfig> leafMoveSelectorConfigList) Gather a list of all descendantMoveSelectorConfig
s except forUnionMoveSelectorConfig
andCartesianProductMoveSelectorConfig
.Class<? extends SelectionFilter>
Class<? extends SelectionProbabilityWeightFactory>
Class<? extends SelectionSorter>
Class<? extends Comparator>
Class<? extends SelectionSorterWeightFactory>
Inherits each property of theinheritedConfig
unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).void
inheritFolded
(MoveSelectorConfig<Config_> foldedConfig) Does not inherit subclass properties because this class andfoldedConfig
can be of a different type.void
setCacheType
(SelectionCacheType cacheType) void
setFilterClass
(Class<? extends SelectionFilter> filterClass) void
setFixedProbabilityWeight
(Double fixedProbabilityWeight) void
setProbabilityWeightFactoryClass
(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) void
setSelectedCountLimit
(Long selectedCountLimit) void
setSelectionOrder
(SelectionOrder selectionOrder) void
setSorterClass
(Class<? extends SelectionSorter> sorterClass) void
setSorterComparatorClass
(Class<? extends Comparator> sorterComparatorClass) void
setSorterOrder
(SelectionSorterOrder sorterOrder) void
setSorterWeightFactoryClass
(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) protected void
visitCommonReferencedClasses
(Consumer<Class<?>> classVisitor) withCacheType
(SelectionCacheType cacheType) withFilterClass
(Class<? extends SelectionFilter> filterClass) withFixedProbabilityWeight
(Double fixedProbabilityWeight) withProbabilityWeightFactoryClass
(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) withSelectedCountLimit
(Long selectedCountLimit) withSelectionOrder
(SelectionOrder selectionOrder) withSorterClass
(Class<? extends SelectionSorter> sorterClass) withSorterComparatorClass
(Class<? extends Comparator> sorterComparatorClass) withSorterOrder
(SelectionSorterOrder sorterOrder) withSorterWeightFactoryClass
(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) Methods inherited from class org.optaplanner.core.config.AbstractConfig
copyConfig, toString, visitReferencedClasses
-
Field Details
-
cacheType
-
selectionOrder
-
filterClass
-
sorterComparatorClass
-
sorterWeightFactoryClass
-
sorterOrder
-
sorterClass
-
probabilityWeightFactoryClass
-
selectedCountLimit
-
-
Constructor Details
-
MoveSelectorConfig
public MoveSelectorConfig()
-
-
Method Details
-
getCacheType
-
setCacheType
-
getSelectionOrder
-
setSelectionOrder
-
getFilterClass
-
setFilterClass
-
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
-
getFixedProbabilityWeight
-
setFixedProbabilityWeight
-
withCacheType
-
withSelectionOrder
-
withFilterClass
-
withSorterComparatorClass
-
withSorterWeightFactoryClass
public Config_ withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) -
withSorterOrder
-
withSorterClass
-
withProbabilityWeightFactoryClass
public Config_ withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) -
withSelectedCountLimit
-
withFixedProbabilityWeight
-
extractLeafMoveSelectorConfigsIntoList
public void extractLeafMoveSelectorConfigsIntoList(List<MoveSelectorConfig> leafMoveSelectorConfigList) Gather a list of all descendantMoveSelectorConfig
s except forUnionMoveSelectorConfig
andCartesianProductMoveSelectorConfig
.- Parameters:
leafMoveSelectorConfigList
- not null
-
inherit
Description copied from class:AbstractConfig
Inherits each property of theinheritedConfig
unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this
AbstractConfig
composition is replaced, it should not affect the inherited composition instance.- Specified by:
inherit
in classAbstractConfig<Config_ extends MoveSelectorConfig<Config_>>
- Parameters:
inheritedConfig
- never null- Returns:
- this
-
inheritFolded
Does not inherit subclass properties because this class andfoldedConfig
can be of a different type.- Parameters:
foldedConfig
- never null
-
visitCommonReferencedClasses
-