public MoveSelector buildBaseMoveSelector( EnvironmentMode environmentMode, SolutionDescriptor solutionDescriptor, SelectionCacheType minimumCacheType, SelectionOrder resolvedSelectionOrder) { PlanningEntityDescriptor entityDescriptor = fetchEntityDescriptor(solutionDescriptor); SubChainSelector subChainSelector = subChainSelectorConfig.buildSubChainSelector( environmentMode, solutionDescriptor, entityDescriptor, minimumCacheType, resolvedSelectionOrder); ValueSelector valueSelector = valueSelectorConfig.buildValueSelector( environmentMode, solutionDescriptor, entityDescriptor, minimumCacheType, resolvedSelectionOrder); return new SubChainChangeMoveSelector( subChainSelector, valueSelector, resolvedSelectionOrder == SelectionOrder.RANDOM, selectReversingMoveToo == null ? true : selectReversingMoveToo); }
public void inherit(SubChainChangeMoveSelectorConfig inheritedConfig) { super.inherit(inheritedConfig); planningEntityClass = ConfigUtils.inheritOverwritableProperty( planningEntityClass, inheritedConfig.getPlanningEntityClass()); if (subChainSelectorConfig == null) { subChainSelectorConfig = inheritedConfig.getSubChainSelectorConfig(); } else if (inheritedConfig.getSubChainSelectorConfig() != null) { subChainSelectorConfig.inherit(inheritedConfig.getSubChainSelectorConfig()); } if (valueSelectorConfig == null) { valueSelectorConfig = inheritedConfig.getValueSelectorConfig(); } else if (inheritedConfig.getValueSelectorConfig() != null) { valueSelectorConfig.inherit(inheritedConfig.getValueSelectorConfig()); } selectReversingMoveToo = ConfigUtils.inheritOverwritableProperty( selectReversingMoveToo, inheritedConfig.getSelectReversingMoveToo()); }