Search in sources :

Example 1 with LocalSearchAcceptorConfig

use of org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig in project kie-benchmarks by kiegroup.

the class VehicleRoutingBenchmark method getPhaseConfigList.

private List<PhaseConfig> getPhaseConfigList() {
    ConstructionHeuristicPhaseConfig constructionHeuristicPhaseConfig = new ConstructionHeuristicPhaseConfig();
    constructionHeuristicPhaseConfig.setConstructionHeuristicType(ConstructionHeuristicType.FIRST_FIT_DECREASING);
    LocalSearchPhaseConfig localSearchPhaseConfig = new LocalSearchPhaseConfig();
    SubChainChangeMoveSelectorConfig subChainChangeMoveSelectorConfig = new SubChainChangeMoveSelectorConfig();
    subChainChangeMoveSelectorConfig.setSelectReversingMoveToo(true);
    SubChainSwapMoveSelectorConfig subChainSwapMoveSelectorConfig = new SubChainSwapMoveSelectorConfig();
    subChainSwapMoveSelectorConfig.setSelectReversingMoveToo(true);
    List<MoveSelectorConfig> moveSelectorConfigList = Arrays.asList(new ChangeMoveSelectorConfig(), new SwapMoveSelectorConfig(), subChainChangeMoveSelectorConfig, subChainSwapMoveSelectorConfig);
    UnionMoveSelectorConfig selectorConfig = new UnionMoveSelectorConfig(moveSelectorConfigList);
    LocalSearchForagerConfig foragerConfig = new LocalSearchForagerConfig();
    foragerConfig.setAcceptedCountLimit(FORAGER_CONFIG_ACCEPTED_COUNT_LIMIT);
    localSearchPhaseConfig.setForagerConfig(foragerConfig);
    localSearchPhaseConfig.setMoveSelectorConfig(selectorConfig);
    localSearchPhaseConfig.setAcceptorConfig(new LocalSearchAcceptorConfig().withLateAcceptanceSize(ACCEPTOR_CONFIG_LATE_ACCEPTANCE_SIZE));
    return Arrays.asList(constructionHeuristicPhaseConfig, localSearchPhaseConfig);
}
Also used : SubChainSwapMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainSwapMoveSelectorConfig) SwapMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.SwapMoveSelectorConfig) SubChainChangeMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainChangeMoveSelectorConfig) ChangeMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.ChangeMoveSelectorConfig) MoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig) UnionMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig) SubChainSwapMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainSwapMoveSelectorConfig) SwapMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.SwapMoveSelectorConfig) LocalSearchForagerConfig(org.optaplanner.core.config.localsearch.decider.forager.LocalSearchForagerConfig) LocalSearchAcceptorConfig(org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig) SubChainChangeMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainChangeMoveSelectorConfig) ChangeMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.ChangeMoveSelectorConfig) LocalSearchPhaseConfig(org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig) ConstructionHeuristicPhaseConfig(org.optaplanner.core.config.constructionheuristic.ConstructionHeuristicPhaseConfig) SubChainSwapMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainSwapMoveSelectorConfig) SubChainChangeMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainChangeMoveSelectorConfig) UnionMoveSelectorConfig(org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig)

Example 2 with LocalSearchAcceptorConfig

use of org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig in project kie-benchmarks by kiegroup.

the class AcceptorConfigurations method createHillClimbingAcceptor.

public static LocalSearchAcceptorConfig createHillClimbingAcceptor() {
    LocalSearchAcceptorConfig localSearchAcceptorConfig = new LocalSearchAcceptorConfig();
    localSearchAcceptorConfig.setAcceptorTypeList(Collections.singletonList(AcceptorType.HILL_CLIMBING));
    return localSearchAcceptorConfig;
}
Also used : LocalSearchAcceptorConfig(org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig)

Example 3 with LocalSearchAcceptorConfig

use of org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig in project kie-benchmarks by kiegroup.

the class AcceptorConfigurations method createLateAcceptanceAcceptor.

public static LocalSearchAcceptorConfig createLateAcceptanceAcceptor(Integer lateAcceptanceSize) {
    LocalSearchAcceptorConfig localSearchAcceptorConfig = new LocalSearchAcceptorConfig();
    localSearchAcceptorConfig.setLateAcceptanceSize(lateAcceptanceSize);
    return localSearchAcceptorConfig;
}
Also used : LocalSearchAcceptorConfig(org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig)

Example 4 with LocalSearchAcceptorConfig

use of org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig in project kie-benchmarks by kiegroup.

the class AcceptorConfigurations method createSimulatedAnnealingAcceptor.

public static LocalSearchAcceptorConfig createSimulatedAnnealingAcceptor(String startingTemperature) {
    LocalSearchAcceptorConfig localSearchAcceptorConfig = new LocalSearchAcceptorConfig();
    localSearchAcceptorConfig.setSimulatedAnnealingStartingTemperature(startingTemperature);
    return localSearchAcceptorConfig;
}
Also used : LocalSearchAcceptorConfig(org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig)

Example 5 with LocalSearchAcceptorConfig

use of org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig in project kie-benchmarks by kiegroup.

the class AcceptorConfigurations method createTabuSearchAcceptor.

public static LocalSearchAcceptorConfig createTabuSearchAcceptor(Double entityRatio) {
    LocalSearchAcceptorConfig localSearchAcceptorConfig = new LocalSearchAcceptorConfig();
    localSearchAcceptorConfig.setEntityTabuRatio(entityRatio);
    return localSearchAcceptorConfig;
}
Also used : LocalSearchAcceptorConfig(org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig)

Aggregations

LocalSearchAcceptorConfig (org.optaplanner.core.config.localsearch.decider.acceptor.LocalSearchAcceptorConfig)6 ConstructionHeuristicPhaseConfig (org.optaplanner.core.config.constructionheuristic.ConstructionHeuristicPhaseConfig)1 MoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig)1 UnionMoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig)1 ChangeMoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.generic.ChangeMoveSelectorConfig)1 SwapMoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.generic.SwapMoveSelectorConfig)1 SubChainChangeMoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainChangeMoveSelectorConfig)1 SubChainSwapMoveSelectorConfig (org.optaplanner.core.config.heuristic.selector.move.generic.chained.SubChainSwapMoveSelectorConfig)1 LocalSearchPhaseConfig (org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig)1 LocalSearchForagerConfig (org.optaplanner.core.config.localsearch.decider.forager.LocalSearchForagerConfig)1