if (solverBenchmarkConfigList.size() > MAXIMUM_SOLVER_BENCHMARK_SIZE) {
solverBenchmarkConfigList = solverBenchmarkConfigList.subList(0, MAXIMUM_SOLVER_BENCHMARK_SIZE);
plannerBenchmarkConfig.setSolverBenchmarkConfigList(solverBenchmarkConfigList);
}
long maximumSecondsSpentPerSolverBenchmark = MAXIMUM_SECONDS_SPENT / solverBenchmarkConfigList.size();
SolverBenchmarkConfig inheritedSolverBenchmarkConfig = plannerBenchmarkConfig.getInheritedSolverBenchmarkConfig();
if (inheritedSolverBenchmarkConfig != null) {
ProblemBenchmarksConfig problemBenchmarksConfig = inheritedSolverBenchmarkConfig.getProblemBenchmarksConfig();
if (problemBenchmarksConfig == null) {
problemBenchmarksConfig = new ProblemBenchmarksConfig();
inheritedSolverBenchmarkConfig.setProblemBenchmarksConfig(problemBenchmarksConfig);
}
problemBenchmarksConfig.setInputSolutionFileList(
Collections.singletonList(unsolvedDataFile));
TerminationConfig terminationConfig = new TerminationConfig();
terminationConfig.setSecondsSpentLimit(maximumSecondsSpentPerSolverBenchmark);
inheritedSolverBenchmarkConfig.getSolverConfig().setTerminationConfig(terminationConfig);
}
for (SolverBenchmarkConfig solverBenchmarkConfig : solverBenchmarkConfigList) {
ProblemBenchmarksConfig problemBenchmarksConfig = solverBenchmarkConfig.getProblemBenchmarksConfig();
if (problemBenchmarksConfig != null) {
problemBenchmarksConfig.setInputSolutionFileList(null);