OptaPlanner core 6.0.0.Beta3

org.optaplanner.core.config.heuristic.selector.move
Class MoveSelectorConfig

java.lang.Object
  extended by org.optaplanner.core.config.heuristic.selector.SelectorConfig
      extended by org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig
Direct Known Subclasses:
CartesianProductMoveSelectorConfig, ChangeMoveSelectorConfig, MoveIteratorFactoryConfig, MoveListFactoryConfig, PillarSwapMoveSelectorConfig, SubChainChangeMoveSelectorConfig, SubChainSwapMoveSelectorConfig, SwapMoveSelectorConfig, UnionMoveSelectorConfig

public abstract class MoveSelectorConfig
extends SelectorConfig

General superclass for ChangeMoveSelectorConfig, etc.


Field Summary
protected  SelectionCacheType cacheType
           
protected  List<Class<? extends SelectionFilter>> filterClassList
           
protected  Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass
           
protected  SelectionOrder selectionOrder
           
protected  Class<? extends SelectionSorter> sorterClass
           
protected  Class<? extends Comparator> sorterComparatorClass
           
protected  SelectionSorterOrder sorterOrder
           
protected  Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass
           
 
Constructor Summary
MoveSelectorConfig()
           
 
Method Summary
protected abstract  MoveSelector buildBaseMoveSelector(EnvironmentMode environmentMode, SolutionDescriptor solutionDescriptor, SelectionCacheType minimumCacheType, boolean randomSelection)
           
 MoveSelector buildMoveSelector(EnvironmentMode environmentMode, SolutionDescriptor solutionDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)
           
protected  boolean determineBaseRandomSelection(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)
           
 SelectionCacheType getCacheType()
           
 List<Class<? extends SelectionFilter>> getFilterClassList()
           
 Double getFixedProbabilityWeight()
           
 Class<? extends SelectionProbabilityWeightFactory> getProbabilityWeightFactoryClass()
           
 SelectionOrder getSelectionOrder()
           
 Class<? extends SelectionSorter> getSorterClass()
           
 Class<? extends Comparator> getSorterComparatorClass()
           
 SelectionSorterOrder getSorterOrder()
           
 Class<? extends SelectionSorterWeightFactory> getSorterWeightFactoryClass()
           
protected  void inherit(MoveSelectorConfig inheritedConfig)
           
protected  boolean isBaseInherentlyCached()
           
 void setCacheType(SelectionCacheType cacheType)
           
 void setFilterClassList(List<Class<? extends SelectionFilter>> filterClassList)
           
 void setFixedProbabilityWeight(Double fixedProbabilityWeight)
           
 void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass)
           
 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)
           
 
Methods inherited from class org.optaplanner.core.config.heuristic.selector.SelectorConfig
deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptors, inherit, toString, validateCacheTypeVersusSelectionOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cacheType

protected SelectionCacheType cacheType

selectionOrder

protected SelectionOrder selectionOrder

filterClassList

protected List<Class<? extends SelectionFilter>> filterClassList

sorterComparatorClass

protected Class<? extends Comparator> sorterComparatorClass

sorterWeightFactoryClass

protected Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass

sorterOrder

protected SelectionSorterOrder sorterOrder

sorterClass

protected Class<? extends SelectionSorter> sorterClass

probabilityWeightFactoryClass

protected Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass
Constructor Detail

MoveSelectorConfig

public MoveSelectorConfig()
Method Detail

getCacheType

public SelectionCacheType getCacheType()

setCacheType

public void setCacheType(SelectionCacheType cacheType)

getSelectionOrder

public SelectionOrder getSelectionOrder()

setSelectionOrder

public void setSelectionOrder(SelectionOrder selectionOrder)

getFilterClassList

public List<Class<? extends SelectionFilter>> getFilterClassList()

setFilterClassList

public void setFilterClassList(List<Class<? extends SelectionFilter>> filterClassList)

getSorterComparatorClass

public Class<? extends Comparator> getSorterComparatorClass()

setSorterComparatorClass

public void setSorterComparatorClass(Class<? extends Comparator> sorterComparatorClass)

getSorterWeightFactoryClass

public Class<? extends SelectionSorterWeightFactory> getSorterWeightFactoryClass()

setSorterWeightFactoryClass

public void setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass)

getSorterOrder

public SelectionSorterOrder getSorterOrder()

setSorterOrder

public void setSorterOrder(SelectionSorterOrder sorterOrder)

getSorterClass

public Class<? extends SelectionSorter> getSorterClass()

setSorterClass

public void setSorterClass(Class<? extends SelectionSorter> sorterClass)

getProbabilityWeightFactoryClass

public Class<? extends SelectionProbabilityWeightFactory> getProbabilityWeightFactoryClass()

setProbabilityWeightFactoryClass

public void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass)

getFixedProbabilityWeight

public Double getFixedProbabilityWeight()

setFixedProbabilityWeight

public void setFixedProbabilityWeight(Double fixedProbabilityWeight)

buildMoveSelector

public MoveSelector buildMoveSelector(EnvironmentMode environmentMode,
                                      SolutionDescriptor solutionDescriptor,
                                      SelectionCacheType minimumCacheType,
                                      SelectionOrder inheritedSelectionOrder)
Parameters:
environmentMode - never null
solutionDescriptor - never null
minimumCacheType - never null, If caching is used (different from SelectionCacheType.JUST_IN_TIME), then it should be at least this SelectionCacheType because an ancestor already uses such caching and less would be pointless.
inheritedSelectionOrder - never null
Returns:
never null

determineBaseRandomSelection

protected boolean determineBaseRandomSelection(SelectionCacheType resolvedCacheType,
                                               SelectionOrder resolvedSelectionOrder)

isBaseInherentlyCached

protected boolean isBaseInherentlyCached()

buildBaseMoveSelector

protected abstract MoveSelector buildBaseMoveSelector(EnvironmentMode environmentMode,
                                                      SolutionDescriptor solutionDescriptor,
                                                      SelectionCacheType minimumCacheType,
                                                      boolean randomSelection)
Parameters:
environmentMode - never null
solutionDescriptor - never null
minimumCacheType - never null, If caching is used (different from SelectionCacheType.JUST_IN_TIME), then it should be at least this SelectionCacheType because an ancestor already uses such caching and less would be pointless.
randomSelection - true is equivalent to SelectionOrder.RANDOM, false is equivalent to SelectionOrder.ORIGINAL
Returns:
never null

inherit

protected void inherit(MoveSelectorConfig inheritedConfig)

OptaPlanner core 6.0.0.Beta3

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.