use of org.optaplanner.core.config.solver.SolverConfig in project kie-benchmarks by kiegroup.
the class NurseRosteringExample method getBaseSolverConfig.
@Override
public SolverConfig getBaseSolverConfig() {
SolverConfig solverConfig = new SolverConfig();
solverConfig.withEntityClasses(ShiftAssignment.class);
solverConfig.withSolutionClass(NurseRoster.class);
solverConfig.setScoreDirectorFactoryConfig(new ScoreDirectorFactoryConfig());
solverConfig.getScoreDirectorFactoryConfig().setConstraintProviderClass(NurseRosteringConstraintProvider.class);
solverConfig.getScoreDirectorFactoryConfig().setInitializingScoreTrend("ONLY_DOWN");
return solverConfig;
}
use of org.optaplanner.core.config.solver.SolverConfig in project kie-benchmarks by kiegroup.
the class ProjectJobSchedulingExample method getBaseSolverConfig.
@Override
public SolverConfig getBaseSolverConfig() {
SolverConfig solverConfig = new SolverConfig();
solverConfig.setEnvironmentMode(EnvironmentMode.REPRODUCIBLE);
solverConfig.withEntityClasses(Allocation.class);
solverConfig.withSolutionClass(Schedule.class);
solverConfig.setScoreDirectorFactoryConfig(new ScoreDirectorFactoryConfig());
solverConfig.getScoreDirectorFactoryConfig().setIncrementalScoreCalculatorClass(ProjectJobSchedulingIncrementalScoreCalculator.class);
solverConfig.getScoreDirectorFactoryConfig().setInitializingScoreTrend("ONLY_DOWN");
return solverConfig;
}
use of org.optaplanner.core.config.solver.SolverConfig in project kie-benchmarks by kiegroup.
the class VehicleRoutingExample method getBaseSolverConfig.
@Override
public SolverConfig getBaseSolverConfig() {
SolverConfig solverConfig = new SolverConfig();
solverConfig.withEntityClassList(new ArrayList<>(Arrays.asList(Standstill.class, Customer.class)));
solverConfig.withSolutionClass(VehicleRoutingSolution.class);
solverConfig.setEnvironmentMode(EnvironmentMode.REPRODUCIBLE);
solverConfig.setScoreDirectorFactoryConfig(new ScoreDirectorFactoryConfig());
solverConfig.getScoreDirectorFactoryConfig().setIncrementalScoreCalculatorClass(VehicleRoutingIncrementalScoreCalculator.class);
solverConfig.getScoreDirectorFactoryConfig().setInitializingScoreTrend("ONLY_DOWN");
return solverConfig;
}
use of org.optaplanner.core.config.solver.SolverConfig in project droolsjbpm-integration by kiegroup.
the class AbstractTaskAssigningCoreTest method createNonDaemonSolver.
protected Solver<TaskAssigningSolution> createNonDaemonSolver(int stepCountLimit) {
SolverConfig config = createBaseConfig();
ConstructionHeuristicPhaseConfig constructionHeuristicPhaseConfig = new ConstructionHeuristicPhaseConfig();
constructionHeuristicPhaseConfig.setConstructionHeuristicType(ConstructionHeuristicType.FIRST_FIT);
LocalSearchPhaseConfig phaseConfig = new LocalSearchPhaseConfig();
phaseConfig.setTerminationConfig(new TerminationConfig().withStepCountLimit(stepCountLimit));
config.setPhaseConfigList(Arrays.asList(constructionHeuristicPhaseConfig, phaseConfig));
SolverFactory<TaskAssigningSolution> solverFactory = SolverFactory.create(config);
return solverFactory.buildSolver();
}
use of org.optaplanner.core.config.solver.SolverConfig in project droolsjbpm-integration by kiegroup.
the class AbstractTaskAssigningCoreTest method createBaseConfig.
protected SolverConfig createBaseConfig() {
SolverConfig config = new SolverConfig();
config.setSolutionClass(TaskAssigningSolution.class);
config.setEntityClassList(Arrays.asList(TaskOrUser.class, Task.class));
config.setScoreDirectorFactoryConfig(new ScoreDirectorFactoryConfig().withScoreDrls("org/kie/server/services/taskassigning/solver/taskAssigningScoreRules.drl"));
return config;
}
Aggregations