use of org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig 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);
}
use of org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig in project kie-benchmarks by kiegroup.
the class CloudBalancingMultithreadedSolvingScalabilityBenchmark method getMoveSelectorConfig.
@Override
protected MoveSelectorConfig getMoveSelectorConfig() {
UnionMoveSelectorConfig unionMoveSelectorConfig = new UnionMoveSelectorConfig();
unionMoveSelectorConfig.setMoveSelectorConfigList(MoveSelectorConfigurations.createAllNonChainedSelectorList());
return unionMoveSelectorConfig;
}
use of org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig in project kie-benchmarks by kiegroup.
the class AbstractTSPLocalSearchBenchmark method createSolver.
@Override
protected Solver<TspSolution> createSolver() {
LocalSearchPhaseConfig localSearchPhaseConfig = new LocalSearchPhaseConfig();
localSearchPhaseConfig.setMoveSelectorConfig(new UnionMoveSelectorConfig());
((UnionMoveSelectorConfig) localSearchPhaseConfig.getMoveSelectorConfig()).setMoveSelectorConfigList(createMoveSelectorConfigList());
localSearchPhaseConfig.setAcceptorConfig(createAcceptorConfig());
localSearchPhaseConfig.setForagerConfig(new LocalSearchForagerConfig());
localSearchPhaseConfig.getForagerConfig().setAcceptedCountLimit(getAcceptedCountLimit());
localSearchPhaseConfig.setTerminationConfig(getTerminationConfig());
SolverConfig solverConfig = Examples.TRAVELING_SALESMAN.getBaseSolverConfig();
solverConfig.setPhaseConfigList(Collections.singletonList(localSearchPhaseConfig));
SolverFactory<TspSolution> solverFactory = SolverFactory.create(solverConfig);
return solverFactory.buildSolver();
}
use of org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig in project kie-benchmarks by kiegroup.
the class AbstractNurseRosteringMoveSelectorBenchmark method createSolver.
@Override
protected Solver<NurseRoster> createSolver() {
LocalSearchPhaseConfig localSearchPhaseConfig = new LocalSearchPhaseConfig();
UnionMoveSelectorConfig unionMoveSelectorConfig = new UnionMoveSelectorConfig();
unionMoveSelectorConfig.setMoveSelectorConfigList(createMoveSelectorConfigList());
localSearchPhaseConfig.setMoveSelectorConfig(unionMoveSelectorConfig);
localSearchPhaseConfig.setAcceptorConfig(createAcceptorConfig());
localSearchPhaseConfig.setForagerConfig(new LocalSearchForagerConfig());
localSearchPhaseConfig.getForagerConfig().setAcceptedCountLimit(getAcceptedCountLimit());
localSearchPhaseConfig.setTerminationConfig(getTerminationConfig());
SolverConfig solverConfig = Examples.NURSE_ROSTERING.getBaseSolverConfig();
solverConfig.setPhaseConfigList(Collections.singletonList(localSearchPhaseConfig));
SolverFactory<NurseRoster> solverFactory = SolverFactory.create(solverConfig);
return solverFactory.buildSolver();
}
use of org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig in project kie-benchmarks by kiegroup.
the class AbstractProjectJobSchedulingLocalSearchBenchmark method createSolver.
@Override
protected Solver<Schedule> createSolver() {
LocalSearchPhaseConfig localSearchPhaseConfig = new LocalSearchPhaseConfig();
localSearchPhaseConfig.setMoveSelectorConfig(new UnionMoveSelectorConfig());
((UnionMoveSelectorConfig) localSearchPhaseConfig.getMoveSelectorConfig()).setMoveSelectorConfigList(createMoveSelectorConfigList());
localSearchPhaseConfig.setAcceptorConfig(createAcceptorConfig());
localSearchPhaseConfig.setForagerConfig(new LocalSearchForagerConfig());
localSearchPhaseConfig.getForagerConfig().setAcceptedCountLimit(getAcceptedCountLimit());
localSearchPhaseConfig.setTerminationConfig(getTerminationConfig());
SolverConfig solverConfig = Examples.PROJECT_JOB_SCHEDULING.getBaseSolverConfig();
solverConfig.setPhaseConfigList(Collections.singletonList(localSearchPhaseConfig));
SolverFactory<Schedule> solverFactory = SolverFactory.create(solverConfig);
return solverFactory.buildSolver();
}
Aggregations